Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: 2 bugfixes (brand not removable + minor issue) #6199

Merged
merged 2 commits into from
Jan 13, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,6 @@ class _AddBasicDetailsPageState extends State<AddBasicDetailsPage> {
final SimpleInputPageBrandsHelper _brandsHelper =
SimpleInputPageBrandsHelper();
late final MultilingualHelper _multilingualHelper;
late final FocusNode _focusNode;

/// Only used when there's not enough place
bool _showPhotosBanner = false;
Expand All @@ -81,7 +80,6 @@ class _AddBasicDetailsPageState extends State<AddBasicDetailsPage> {
monolingualText: _product.productName,
productLanguage: _product.lang,
);
_focusNode = FocusNode();
}

@override
Expand Down Expand Up @@ -137,7 +135,6 @@ class _AddBasicDetailsPageState extends State<AddBasicDetailsPage> {
_productNameController.dispose();
_brandsController.dispose();
_weightController.dispose();
_focusNode.dispose();
super.dispose();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,12 @@ class MayExitPageHelper {
Future<bool?> openSaveBeforeLeavingDialog(
final BuildContext context, {
final String? title,
final bool unfocus = true,
}) async {
if (unfocus) {
FocusManager.instance.primaryFocus?.unfocus();
}

final AppLocalizations appLocalizations = AppLocalizations.of(context);
final SmoothColorsThemeExtension extension =
context.extension<SmoothColorsThemeExtension>();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ abstract class AbstractSimpleInputPageHelper extends ChangeNotifier {

/// Mainly used when reordering the list.
void replaceItems(final List<String> items) {
_terms = items;
_terms = List<String>.of(items);
_changed = true;
notifyListeners();
}
Expand Down
Loading