Skip to content

Commit

Permalink
Reset execution when creating a new pad (#2735)
Browse files Browse the repository at this point in the history
  • Loading branch information
parlough authored Nov 30, 2023
1 parent 7d62c04 commit 951d7c9
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions pkgs/sketch_pad/lib/model.dart
Original file line number Diff line number Diff line change
Expand Up @@ -160,16 +160,17 @@ class AppServices {
type ??= 'dart';
final source = Samples.getDefault(type: type);

// reset the source
// Reset the source.
appModel.sourceCodeController.text = source;

// reset the title
// Reset the title.
appModel.title.value = generateSnippetName();

// reset the console
// Reset the console.
appModel.clearConsole();

// TODO: reset the execution area
// Reset the execution area.
executionService?.reset();

appModel.editorStatus.showToast('Created new ${titleCase(type)} snippet');
}
Expand Down

0 comments on commit 951d7c9

Please sign in to comment.