diff --git a/lib/widgets/autocomplete.dart b/lib/widgets/autocomplete.dart index 7b2d6d6c8e..277048f6a9 100644 --- a/lib/widgets/autocomplete.dart +++ b/lib/widgets/autocomplete.dart @@ -1,6 +1,5 @@ import 'package:flutter/material.dart'; -import '../api/model/model.dart'; import 'content.dart'; import 'store.dart'; import '../model/autocomplete.dart'; @@ -8,7 +7,7 @@ import '../model/compose.dart'; import '../model/narrow.dart'; import 'compose_box.dart'; -abstract class AutocompleteField extends StatefulWidget { +abstract class AutocompleteField extends StatefulWidget { const AutocompleteField({ super.key, required this.controller, @@ -27,10 +26,10 @@ abstract class AutocompleteField initViewModel(BuildContext context); @override - State> createState() => _AutocompleteFieldState(); + State> createState() => _AutocompleteFieldState(); } -class _AutocompleteFieldState extends State> with PerAccountStoreAwareStateMixin> { +class _AutocompleteFieldState extends State> with PerAccountStoreAwareStateMixin> { AutocompleteView? _viewModel; void _initViewModel() { @@ -71,7 +70,7 @@ class _AutocompleteFieldState oldWidget) { + void didUpdateWidget(covariant AutocompleteField oldWidget) { super.didUpdateWidget(oldWidget); if (widget.controller != oldWidget.controller) { oldWidget.controller.removeListener(_handleControllerChange); @@ -145,7 +144,7 @@ class _AutocompleteFieldState { +class ComposeAutocomplete extends AutocompleteField { const ComposeAutocomplete({ super.key, required this.narrow, @@ -218,7 +217,7 @@ class ComposeAutocomplete extends AutocompleteField { +class TopicAutocomplete extends AutocompleteField { const TopicAutocomplete({ super.key, required this.streamId,