Browse Source

fix(neon,neon_notes): properly dispose FocusNodes

Signed-off-by: Nikolas Rimikis <leptopoda@users.noreply.github.com>
pull/714/head
Nikolas Rimikis 1 year ago
parent
commit
38873e52eb
No known key found for this signature in database
GPG Key ID: 85ED1DE9786A4FF2
  1. 1
      packages/neon/neon/lib/src/widgets/app_bar.dart
  2. 2
      packages/neon/neon_notes/lib/pages/note.dart

1
packages/neon/neon/lib/src/widgets/app_bar.dart

@ -55,6 +55,7 @@ class _NeonAppBarState extends State<NeonAppBar> {
@override @override
void dispose() { void dispose() {
_searchBarFocusNode.dispose();
unawaited(_searchTermSubscription.cancel()); unawaited(_searchTermSubscription.cancel());
unawaited(_searchTermController.close()); unawaited(_searchTermController.close());
super.dispose(); super.dispose();

2
packages/neon/neon_notes/lib/pages/note.dart

@ -61,6 +61,8 @@ class _NotesNotePageState extends State<NotesNotePage> {
void dispose() { void dispose() {
_contentController.dispose(); _contentController.dispose();
_titleController.dispose(); _titleController.dispose();
_contentFocusNode.dispose();
_titleFocusNode.dispose();
unawaited(_contentStreamController.close()); unawaited(_contentStreamController.close());
unawaited(_titleStreamController.close()); unawaited(_titleStreamController.close());
super.dispose(); super.dispose();

Loading…
Cancel
Save