File tree Expand file tree Collapse file tree 3 files changed +6
-4
lines changed
packages/smooth_app/lib/pages/product Expand file tree Collapse file tree 3 files changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -61,7 +61,6 @@ class _AddBasicDetailsPageState extends State<AddBasicDetailsPage> {
6161 final SimpleInputPageBrandsHelper _brandsHelper =
6262 SimpleInputPageBrandsHelper ();
6363 late final MultilingualHelper _multilingualHelper;
64- late final FocusNode _focusNode;
6564
6665 /// Only used when there's not enough place
6766 bool _showPhotosBanner = false ;
@@ -81,7 +80,6 @@ class _AddBasicDetailsPageState extends State<AddBasicDetailsPage> {
8180 monolingualText: _product.productName,
8281 productLanguage: _product.lang,
8382 );
84- _focusNode = FocusNode ();
8583 }
8684
8785 @override
@@ -137,7 +135,6 @@ class _AddBasicDetailsPageState extends State<AddBasicDetailsPage> {
137135 _productNameController.dispose ();
138136 _brandsController.dispose ();
139137 _weightController.dispose ();
140- _focusNode.dispose ();
141138 super .dispose ();
142139 }
143140
Original file line number Diff line number Diff line change @@ -18,7 +18,12 @@ class MayExitPageHelper {
1818 Future <bool ?> openSaveBeforeLeavingDialog (
1919 final BuildContext context, {
2020 final String ? title,
21+ final bool unfocus = true ,
2122 }) async {
23+ if (unfocus) {
24+ FocusManager .instance.primaryFocus? .unfocus ();
25+ }
26+
2227 final AppLocalizations appLocalizations = AppLocalizations .of (context);
2328 final SmoothColorsThemeExtension extension =
2429 context.extension < SmoothColorsThemeExtension > ();
Original file line number Diff line number Diff line change @@ -207,7 +207,7 @@ abstract class AbstractSimpleInputPageHelper extends ChangeNotifier {
207207
208208 /// Mainly used when reordering the list.
209209 void replaceItems (final List <String > items) {
210- _terms = items;
210+ _terms = List < String >. of ( items) ;
211211 _changed = true ;
212212 notifyListeners ();
213213 }
You can’t perform that action at this time.
0 commit comments