diff --git a/README.md b/README.md index dc8ea707c3b..fae8bfb038e 100644 --- a/README.md +++ b/README.md @@ -87,7 +87,7 @@ - Make sure you have installed flutter and all the requirements - [Official flutter installation guide](https://docs.flutter.dev/get-started/install) -- Currently, the app uses the latest stable version of Flutter (3.13). +- Currently, the app uses the latest stable version of Flutter (3.16). We have predefined run configurations for Android Studio and Visual Studio Code diff --git a/flutter-version.txt b/flutter-version.txt index 64af02e6251..ec16bf59120 100644 --- a/flutter-version.txt +++ b/flutter-version.txt @@ -1 +1 @@ -3.13.6 +3.16.5 diff --git a/packages/smooth_app/lib/generic_lib/bottom_sheets/smooth_bottom_sheet.dart b/packages/smooth_app/lib/generic_lib/bottom_sheets/smooth_bottom_sheet.dart index 1eab1795d6d..38341b9f6e8 100644 --- a/packages/smooth_app/lib/generic_lib/bottom_sheets/smooth_bottom_sheet.dart +++ b/packages/smooth_app/lib/generic_lib/bottom_sheets/smooth_bottom_sheet.dart @@ -232,7 +232,7 @@ class SmoothModalSheetHeaderButton extends StatelessWidget @override double widgetHeight(BuildContext context) { - return math.max(17.0 * MediaQuery.textScaleFactorOf(context), + return math.max(MediaQuery.textScalerOf(context).scale(17.0), suffix is Icon || prefix is Icon ? 20.0 : 0.0) + _padding.vertical; } diff --git a/packages/smooth_app/lib/helpers/extension_on_text_helper.dart b/packages/smooth_app/lib/helpers/extension_on_text_helper.dart index 23a6b7953e5..ea07e963e47 100644 --- a/packages/smooth_app/lib/helpers/extension_on_text_helper.dart +++ b/packages/smooth_app/lib/helpers/extension_on_text_helper.dart @@ -8,7 +8,7 @@ extension Selectable on Text { style: style, strutStyle: strutStyle, textDirection: textDirection, - textScaleFactor: textScaleFactor, + textScaler: textScaler, textAlign: textAlign, maxLines: maxLines, // TODO(m123): Fix or remove alltogether @@ -23,7 +23,7 @@ extension Selectable on Text { style: style, strutStyle: strutStyle, textDirection: textDirection, - textScaleFactor: textScaleFactor, + textScaler: textScaler, textAlign: textAlign, maxLines: maxLines, ); diff --git a/packages/smooth_app/lib/pages/all_product_list_modal.dart b/packages/smooth_app/lib/pages/all_product_list_modal.dart index 4b7b12c9010..cf846ef6491 100644 --- a/packages/smooth_app/lib/pages/all_product_list_modal.dart +++ b/packages/smooth_app/lib/pages/all_product_list_modal.dart @@ -45,7 +45,7 @@ class AllProductListModal extends StatelessWidget { ConstrainedBox( constraints: BoxConstraints( minWidth: double.infinity, - minHeight: 80.0 * MediaQuery.of(context).textScaleFactor, + minHeight: MediaQuery.textScalerOf(context).scale(80.0), ), child: FutureBuilder( future: daoProductList.get(productList), diff --git a/packages/smooth_app/lib/pages/crop_page.dart b/packages/smooth_app/lib/pages/crop_page.dart index 77977549798..0f265a0b867 100644 --- a/packages/smooth_app/lib/pages/crop_page.dart +++ b/packages/smooth_app/lib/pages/crop_page.dart @@ -26,6 +26,7 @@ import 'package:smooth_app/pages/product/edit_image_button.dart'; import 'package:smooth_app/pages/product/may_exit_page_helper.dart'; import 'package:smooth_app/widgets/smooth_app_bar.dart'; import 'package:smooth_app/widgets/smooth_scaffold.dart'; +import 'package:smooth_app/widgets/will_pop_scope.dart'; /// Page dedicated to image cropping. Pops the resulting file path if relevant. class CropPage extends StatefulWidget { @@ -151,8 +152,8 @@ class _CropPageState extends State { Widget build(final BuildContext context) { _screenSize = MediaQuery.of(context).size; final AppLocalizations appLocalizations = AppLocalizations.of(context); - return WillPopScope( - onWillPop: () async => _mayExitPage(saving: false), + return WillPopScope2( + onWillPop: () async => (await _mayExitPage(saving: false), null), child: SmoothScaffold( appBar: SmoothAppBar( centerTitle: false, diff --git a/packages/smooth_app/lib/pages/hunger_games/question_page.dart b/packages/smooth_app/lib/pages/hunger_games/question_page.dart index 0d630e372a6..0f42a3860aa 100755 --- a/packages/smooth_app/lib/pages/hunger_games/question_page.dart +++ b/packages/smooth_app/lib/pages/hunger_games/question_page.dart @@ -17,6 +17,7 @@ import 'package:smooth_app/pages/hunger_games/question_card.dart'; import 'package:smooth_app/query/product_questions_query.dart'; import 'package:smooth_app/query/questions_query.dart'; import 'package:smooth_app/query/random_questions_query.dart'; +import 'package:smooth_app/widgets/will_pop_scope.dart'; Future openQuestionPage( BuildContext context, { @@ -203,13 +204,13 @@ class _QuestionPageState extends State<_QuestionPage> @override Widget build(BuildContext context) { - return WillPopScope( + return WillPopScope2( onWillPop: () async { final Function()? callback = widget.updateProductUponAnswers; if (_lastAnswer != null && callback != null) { await callback(); } - return true; + return (true, null); }, child: Center( child: AnimatedSwitcher( diff --git a/packages/smooth_app/lib/pages/onboarding/onboarding_flow_navigator.dart b/packages/smooth_app/lib/pages/onboarding/onboarding_flow_navigator.dart index 8bafca20065..9cd670c5ee9 100644 --- a/packages/smooth_app/lib/pages/onboarding/onboarding_flow_navigator.dart +++ b/packages/smooth_app/lib/pages/onboarding/onboarding_flow_navigator.dart @@ -14,6 +14,7 @@ import 'package:smooth_app/pages/onboarding/scan_example.dart'; import 'package:smooth_app/pages/onboarding/welcome_page.dart'; import 'package:smooth_app/pages/page_manager.dart'; import 'package:smooth_app/widgets/smooth_scaffold.dart'; +import 'package:smooth_app/widgets/will_pop_scope.dart'; enum OnboardingPage { NOT_STARTED, @@ -121,8 +122,8 @@ enum OnboardingPage { BuildContext context, Widget widget, ) => - WillPopScope( - onWillPop: () async => false, + WillPopScope2( + onWillPop: () async => (false, null), // wrap the widget in [Builder] to allow navigation on the [context]. child: Builder( builder: (BuildContext context) => SmoothScaffold( diff --git a/packages/smooth_app/lib/pages/page_manager.dart b/packages/smooth_app/lib/pages/page_manager.dart index 3d702376c53..615ee2500fb 100644 --- a/packages/smooth_app/lib/pages/page_manager.dart +++ b/packages/smooth_app/lib/pages/page_manager.dart @@ -5,6 +5,7 @@ import 'package:smooth_app/data_models/preferences/user_preferences.dart'; import 'package:smooth_app/pages/carousel_manager.dart'; import 'package:smooth_app/pages/preferences/user_preferences_dev_mode.dart'; import 'package:smooth_app/widgets/tab_navigator.dart'; +import 'package:smooth_app/widgets/will_pop_scope.dart'; enum BottomNavigationTab { Profile, @@ -103,18 +104,18 @@ class PageManagerState extends State { ), ], ); - return WillPopScope( + return WillPopScope2( onWillPop: () async { final bool isFirstRouteInCurrentTab = !await _navigatorKeys[_currentPage]!.currentState!.maybePop(); if (isFirstRouteInCurrentTab) { if (_currentPage != BottomNavigationTab.Scan) { _selectTab(BottomNavigationTab.Scan, 1); - return false; + return (false, null); } } // let system handle back button if we're on the first route - return isFirstRouteInCurrentTab; + return (isFirstRouteInCurrentTab, null); }, child: Scaffold( body: Stack(children: tabs), diff --git a/packages/smooth_app/lib/pages/product/add_basic_details_page.dart b/packages/smooth_app/lib/pages/product/add_basic_details_page.dart index 9f15a148926..d1f04cf98d7 100644 --- a/packages/smooth_app/lib/pages/product/add_basic_details_page.dart +++ b/packages/smooth_app/lib/pages/product/add_basic_details_page.dart @@ -17,6 +17,7 @@ import 'package:smooth_app/pages/product/multilingual_helper.dart'; import 'package:smooth_app/pages/text_field_helper.dart'; import 'package:smooth_app/widgets/smooth_app_bar.dart'; import 'package:smooth_app/widgets/smooth_scaffold.dart'; +import 'package:smooth_app/widgets/will_pop_scope.dart'; /// Input of a product's basic details, like name, quantity and brands. /// @@ -86,105 +87,105 @@ class _AddBasicDetailsPageState extends State { Widget build(BuildContext context) { final Size size = MediaQuery.sizeOf(context); final AppLocalizations appLocalizations = AppLocalizations.of(context); - return WillPopScope( - onWillPop: () async => _mayExitPage(saving: false), + return WillPopScope2( + onWillPop: () async => (await _mayExitPage(saving: false), null), child: UnfocusWhenTapOutside( child: SmoothScaffold( fixKeyboard: true, appBar: SmoothAppBar( - centerTitle: false, - title: Text(appLocalizations.basic_details), - subTitle: buildProductTitle(widget.product, appLocalizations), - ), - body: Form( - key: _formKey, - child: Scrollbar( - child: ListView( - children: [ - Align( - alignment: AlignmentDirectional.topStart, - child: ProductImageCarousel( - _product, - height: size.height * 0.20, - ), - ), - SizedBox(height: _heightSpace), - Padding( - padding: EdgeInsets.symmetric( - horizontal: size.width * 0.05, + centerTitle: false, + title: Text(appLocalizations.basic_details), + subTitle: buildProductTitle(widget.product, appLocalizations), + ), + body: Form( + key: _formKey, + child: Scrollbar( + child: ListView( + children: [ + Align( + alignment: AlignmentDirectional.topStart, + child: ProductImageCarousel( + _product, + height: size.height * 0.20, + ), ), - child: Column( - children: [ - Text( - appLocalizations.barcode_barcode(_product.barcode!), - style: - Theme.of(context).textTheme.bodyMedium?.copyWith( - fontWeight: FontWeight.bold, - ), - ), - SizedBox(height: _heightSpace), - if (_multilingualHelper.isMonolingual()) - SmoothTextFormField( - controller: _productNameController, - type: TextFieldTypes.PLAIN_TEXT, - hintText: appLocalizations.product_name, - ) - else - Card( - child: Column( - children: [ - _multilingualHelper - .getLanguageSelector(setState), - Padding( - padding: const EdgeInsets.all(8.0), - child: SmoothTextFormField( - controller: _productNameController, - type: TextFieldTypes.PLAIN_TEXT, - hintText: appLocalizations.product_name, + SizedBox(height: _heightSpace), + Padding( + padding: EdgeInsets.symmetric( + horizontal: size.width * 0.05, + ), + child: Column( + children: [ + Text( + appLocalizations.barcode_barcode(_product.barcode!), + style: + Theme.of(context).textTheme.bodyMedium?.copyWith( + fontWeight: FontWeight.bold, + ), + ), + SizedBox(height: _heightSpace), + if (_multilingualHelper.isMonolingual()) + SmoothTextFormField( + controller: _productNameController, + type: TextFieldTypes.PLAIN_TEXT, + hintText: appLocalizations.product_name, + ) + else + Card( + child: Column( + children: [ + _multilingualHelper + .getLanguageSelector(setState), + Padding( + padding: const EdgeInsets.all(8.0), + child: SmoothTextFormField( + controller: _productNameController, + type: TextFieldTypes.PLAIN_TEXT, + hintText: appLocalizations.product_name, + ), ), - ), - ], + ], + ), + ), + SizedBox(height: _heightSpace), + LayoutBuilder( + builder: ( + final BuildContext context, + final BoxConstraints constraints, + ) => + SmoothAutocompleteTextField( + focusNode: _focusNode, + controller: _brandNameController, + autocompleteKey: _autocompleteKey, + hintText: appLocalizations.brand_name, + constraints: constraints, + manager: AgnosticSuggestionManager.brand(), ), ), - SizedBox(height: _heightSpace), - LayoutBuilder( - builder: ( - final BuildContext context, - final BoxConstraints constraints, - ) => - SmoothAutocompleteTextField( - focusNode: _focusNode, - controller: _brandNameController, - autocompleteKey: _autocompleteKey, - hintText: appLocalizations.brand_name, - constraints: constraints, - manager: AgnosticSuggestionManager.brand(), + SizedBox(height: _heightSpace), + SmoothTextFormField( + controller: _weightController, + type: TextFieldTypes.PLAIN_TEXT, + hintText: appLocalizations.quantity, ), - ), - SizedBox(height: _heightSpace), - SmoothTextFormField( - controller: _weightController, - type: TextFieldTypes.PLAIN_TEXT, - hintText: appLocalizations.quantity, - ), - // in order to be able to scroll suggestions - SizedBox(height: MediaQuery.sizeOf(context).height), - ], + // in order to be able to scroll suggestions + SizedBox(height: MediaQuery.sizeOf(context).height), + ], + ), ), - ), - ], + ], + ), ), ), - ), - bottomNavigationBar: ProductBottomButtonsBar( - onSave: () async => _exitPage( - await _mayExitPage(saving: true), - ), - onCancel: () async => _exitPage( - await _mayExitPage(saving: false), + bottomNavigationBar: ProductBottomButtonsBar( + onSave: () async => _exitPage( + await _mayExitPage(saving: true), + ), + onCancel: () async => _exitPage( + await _mayExitPage(saving: false), + ), ), ), - ), ), ); } diff --git a/packages/smooth_app/lib/pages/product/add_new_product_page.dart b/packages/smooth_app/lib/pages/product/add_new_product_page.dart index 259966eac78..c606c543d3e 100644 --- a/packages/smooth_app/lib/pages/product/add_new_product_page.dart +++ b/packages/smooth_app/lib/pages/product/add_new_product_page.dart @@ -27,6 +27,7 @@ import 'package:smooth_app/pages/product/product_image_swipeable_view.dart'; import 'package:smooth_app/pages/product/simple_input_page_helpers.dart'; import 'package:smooth_app/query/product_query.dart'; import 'package:smooth_app/widgets/smooth_scaffold.dart'; +import 'package:smooth_app/widgets/will_pop_scope.dart'; /// "Create a product we couldn't find on the server" page. class AddNewProductPage extends StatefulWidget { @@ -218,8 +219,8 @@ class _AddNewProductPageState extends State tracker.track(); } - return WillPopScope( - onWillPop: _onWillPop, + return WillPopScope2( + onWillPop: () async => (await _onWillPop(), null), child: SmoothScaffold( body: SafeArea( child: Column( diff --git a/packages/smooth_app/lib/pages/product/add_other_details_page.dart b/packages/smooth_app/lib/pages/product/add_other_details_page.dart index 30191a1c661..7274bff0347 100644 --- a/packages/smooth_app/lib/pages/product/add_other_details_page.dart +++ b/packages/smooth_app/lib/pages/product/add_other_details_page.dart @@ -11,6 +11,7 @@ import 'package:smooth_app/pages/product/may_exit_page_helper.dart'; import 'package:smooth_app/pages/text_field_helper.dart'; import 'package:smooth_app/widgets/smooth_app_bar.dart'; import 'package:smooth_app/widgets/smooth_scaffold.dart'; +import 'package:smooth_app/widgets/will_pop_scope.dart'; /// Input of a product's less significant details, like website. class AddOtherDetailsPage extends StatefulWidget { @@ -54,8 +55,8 @@ class _AddOtherDetailsPageState extends State { Widget build(BuildContext context) { final Size size = MediaQuery.of(context).size; final AppLocalizations appLocalizations = AppLocalizations.of(context); - return WillPopScope( - onWillPop: () async => _mayExitPage(saving: false), + return WillPopScope2( + onWillPop: () async => (await _mayExitPage(saving: false), null), child: SmoothScaffold( fixKeyboard: true, appBar: SmoothAppBar( diff --git a/packages/smooth_app/lib/pages/product/common/product_list_page.dart b/packages/smooth_app/lib/pages/product/common/product_list_page.dart index b91b04a3222..2c77e01c418 100644 --- a/packages/smooth_app/lib/pages/product/common/product_list_page.dart +++ b/packages/smooth_app/lib/pages/product/common/product_list_page.dart @@ -32,6 +32,7 @@ import 'package:smooth_app/pages/product_list_user_dialog_helper.dart'; import 'package:smooth_app/query/product_query.dart'; import 'package:smooth_app/widgets/smooth_app_bar.dart'; import 'package:smooth_app/widgets/smooth_scaffold.dart'; +import 'package:smooth_app/widgets/will_pop_scope.dart'; /// Displays the products of a product list, with access to other lists. class ProductListPage extends StatefulWidget { @@ -274,8 +275,8 @@ class _ProductListPageState extends State ), ), ) - : WillPopScope( - onWillPop: _handleUserBacktap, + : WillPopScope2( + onWillPop: () async => (await _handleUserBacktap(), null), child: RefreshIndicator( //if it is in selectmode then refresh indicator is not shown notificationPredicate: diff --git a/packages/smooth_app/lib/pages/product/common/product_query_page.dart b/packages/smooth_app/lib/pages/product/common/product_query_page.dart index c7941e43717..9ed060ae598 100644 --- a/packages/smooth_app/lib/pages/product/common/product_query_page.dart +++ b/packages/smooth_app/lib/pages/product/common/product_query_page.dart @@ -391,7 +391,7 @@ class _ProductQueryPageState extends State final List localizedCountries = await IsoCountries.isoCountriesForLocale(locale); for (final Country country in localizedCountries) { - if (country.countryCode.toLowerCase() == _country!.offTag.toLowerCase()) { + if (country.countryCode.toLowerCase() == _country.offTag.toLowerCase()) { return country.name; } } diff --git a/packages/smooth_app/lib/pages/product/edit_new_packagings.dart b/packages/smooth_app/lib/pages/product/edit_new_packagings.dart index 4f909505c5e..f3da4ab5eff 100644 --- a/packages/smooth_app/lib/pages/product/edit_new_packagings.dart +++ b/packages/smooth_app/lib/pages/product/edit_new_packagings.dart @@ -22,6 +22,7 @@ import 'package:smooth_app/query/product_query.dart'; import 'package:smooth_app/themes/color_schemes.dart'; import 'package:smooth_app/widgets/smooth_app_bar.dart'; import 'package:smooth_app/widgets/smooth_scaffold.dart'; +import 'package:smooth_app/widgets/will_pop_scope.dart'; /// Edit display of a product packagings (the new api V3 version). class EditNewPackagings extends StatefulWidget { @@ -183,8 +184,8 @@ class _EditNewPackagingsState extends State ), ); - return WillPopScope( - onWillPop: () async => _mayExitPage(saving: false), + return WillPopScope2( + onWillPop: () async => (await _mayExitPage(saving: false), null), child: UnfocusWhenTapOutside( child: SmoothScaffold( fixKeyboard: true, diff --git a/packages/smooth_app/lib/pages/product/multilingual_helper.dart b/packages/smooth_app/lib/pages/product/multilingual_helper.dart index 09072466c01..00a65b7ad13 100644 --- a/packages/smooth_app/lib/pages/product/multilingual_helper.dart +++ b/packages/smooth_app/lib/pages/product/multilingual_helper.dart @@ -103,7 +103,7 @@ class MultilingualHelper { } // Fallback: we may have old data where there are no translations. - controller.text = _initialMonolingualText!; + controller.text = _initialMonolingualText; } // TODO(monsieurtanuki): we would be better off always never monolingual diff --git a/packages/smooth_app/lib/pages/product/nutrition_page_loaded.dart b/packages/smooth_app/lib/pages/product/nutrition_page_loaded.dart index 4faa9bee6db..10c02e7528f 100644 --- a/packages/smooth_app/lib/pages/product/nutrition_page_loaded.dart +++ b/packages/smooth_app/lib/pages/product/nutrition_page_loaded.dart @@ -24,6 +24,7 @@ import 'package:smooth_app/pages/product/simple_input_number_field.dart'; import 'package:smooth_app/pages/text_field_helper.dart'; import 'package:smooth_app/widgets/smooth_app_bar.dart'; import 'package:smooth_app/widgets/smooth_scaffold.dart'; +import 'package:smooth_app/widgets/will_pop_scope.dart'; /// Actual nutrition page, with data already loaded. class NutritionPageLoaded extends StatefulWidget { @@ -192,8 +193,8 @@ class _NutritionPageLoadedState extends State _focusNodes.clear(); } - return WillPopScope( - onWillPop: () async => _mayExitPage(saving: false), + return WillPopScope2( + onWillPop: () async => (await _mayExitPage(saving: false), null), child: SmoothScaffold( fixKeyboard: true, appBar: SmoothAppBar( diff --git a/packages/smooth_app/lib/pages/product/portion_calculator.dart b/packages/smooth_app/lib/pages/product/portion_calculator.dart index 874823adbf4..0b44db940f7 100644 --- a/packages/smooth_app/lib/pages/product/portion_calculator.dart +++ b/packages/smooth_app/lib/pages/product/portion_calculator.dart @@ -56,7 +56,7 @@ class _PortionCalculatorState extends State { ), const SizedBox(height: MEDIUM_SPACE), Container( - height: (data.textScaleFactor * (SMALL_SPACE * 2 + 15.0)) * 1.2, + height: MediaQuery.textScalerOf(context).scale(SMALL_SPACE * 2 + 15.0) * 1.2, padding: const EdgeInsets.symmetric(horizontal: MEDIUM_SPACE), child: Row( mainAxisAlignment: MainAxisAlignment.center, diff --git a/packages/smooth_app/lib/pages/product/simple_input_page.dart b/packages/smooth_app/lib/pages/product/simple_input_page.dart index 0b552674f3c..3508620cb56 100644 --- a/packages/smooth_app/lib/pages/product/simple_input_page.dart +++ b/packages/smooth_app/lib/pages/product/simple_input_page.dart @@ -15,6 +15,7 @@ import 'package:smooth_app/pages/product/simple_input_page_helpers.dart'; import 'package:smooth_app/pages/product/simple_input_widget.dart'; import 'package:smooth_app/widgets/smooth_app_bar.dart'; import 'package:smooth_app/widgets/smooth_scaffold.dart'; +import 'package:smooth_app/widgets/will_pop_scope.dart'; /// Simple input page: we have a list of terms, we add, we remove, we save. class SimpleInputPage extends StatefulWidget { @@ -86,8 +87,8 @@ class _SimpleInputPageState extends State { ); } - return WillPopScope( - onWillPop: () async => _mayExitPage(saving: false), + return WillPopScope2( + onWillPop: () async => (await _mayExitPage(saving: false), null), child: UnfocusWhenTapOutside( child: SmoothScaffold( fixKeyboard: true, diff --git a/packages/smooth_app/lib/widgets/will_pop_scope.dart b/packages/smooth_app/lib/widgets/will_pop_scope.dart new file mode 100644 index 00000000000..be96d655074 --- /dev/null +++ b/packages/smooth_app/lib/widgets/will_pop_scope.dart @@ -0,0 +1,36 @@ +import 'package:flutter/widgets.dart'; + +/// Brings the same behavior as WillPopScope, which is now deprecated +/// [onWillPop] is a bit different and still asks as the first value if we should block the pop +/// The second value is used, if [Navigator.pop()] should provide a specific value (can be null) +class WillPopScope2 extends StatelessWidget { + const WillPopScope2({ + required this.child, + required this.onWillPop, + super.key, + }); + + final Widget child; + final Future<(bool shouldClose, dynamic res)> Function() onWillPop; + + @override + Widget build(BuildContext context) { + return PopScope( + canPop: false, + onPopInvoked: (bool didPop) async { + if (didPop) { + return; + } + + final (bool shouldClose, dynamic res) = await onWillPop.call(); + if (shouldClose == true) { + WidgetsBinding.instance.addPostFrameCallback((_) { + /// Passing a value is required here, otherwise we will have a black screen + Navigator.of(context).pop(res); + }); + } + }, + child: child, + ); + } +} \ No newline at end of file diff --git a/packages/smooth_app/pubspec.lock b/packages/smooth_app/pubspec.lock index 338861a5e97..ab013576cd7 100644 --- a/packages/smooth_app/pubspec.lock +++ b/packages/smooth_app/pubspec.lock @@ -161,10 +161,10 @@ packages: dependency: transitive description: name: barcode - sha256: "789f898eef0bd88312470bdb2cc996f895ad7dd5f89e9adde84b204546a90b45" + sha256: "2a8b2ee065f419c2aeda141436cc556d91ae772d220fd80679f4d431d6c2ab43" url: "https://pub.dev" source: hosted - version: "2.2.4" + version: "2.2.5" barcode_widget: dependency: "direct main" description: @@ -201,10 +201,10 @@ packages: dependency: transitive description: name: built_value - sha256: "723b4021e903217dfc445ec4cf5b42e27975aece1fc4ebbc1ca6329c2d9fb54e" + sha256: c9aabae0718ec394e5bc3c7272e6bb0dc0b32201a08fe185ec1d8401d3e39309 url: "https://pub.dev" source: hosted - version: "8.7.0" + version: "8.8.1" camera: dependency: "direct main" description: @@ -217,26 +217,26 @@ packages: dependency: transitive description: name: camera_android - sha256: "58463140f1b39591b8e2155861b436abad4ceb48160058be8374164ff0309ef3" + sha256: "7215e38fa0be58cc3203a6e48de3636fb9b1bf93d6eeedf667f882d51b3a4bf3" url: "https://pub.dev" source: hosted - version: "0.10.8+13" + version: "0.10.8+15" camera_avfoundation: dependency: transitive description: name: camera_avfoundation - sha256: "3b6d9f550cfd658c71f34a99509528501e5e5d4fa79f11e3a4d6ef380d8e0254" + sha256: "3c8dd395f18722f01b5f325ddd7f5256e9bcdce538fb9243b378ba759df3283c" url: "https://pub.dev" source: hosted - version: "0.9.13+7" + version: "0.9.13+8" camera_platform_interface: dependency: transitive description: name: camera_platform_interface - sha256: "86fd4fc597c6e455265ddb5884feb352d0171ad14b9cdf3aba30da59b25738c4" + sha256: b6a568984254cadaca41a6b896d87d3b2e79a2e5791afa036f8d524c6783b93a url: "https://pub.dev" source: hosted - version: "2.6.0" + version: "2.7.0" camera_web: dependency: transitive description: @@ -273,10 +273,10 @@ packages: dependency: transitive description: name: cli_util - sha256: b8db3080e59b2503ca9e7922c3df2072cf13992354d5e944074ffa836fba43b7 + sha256: c05b7406fdabc7a49a3929d4af76bcaccbbffcbcdcf185b082e1ae07da323d19 url: "https://pub.dev" source: hosted - version: "0.4.0" + version: "0.4.1" clock: dependency: transitive description: @@ -289,18 +289,18 @@ packages: dependency: transitive description: name: code_builder - sha256: "1be9be30396d7e4c0db42c35ea6ccd7cc6a1e19916b5dc64d6ac216b5544d677" + sha256: feee43a5c05e7b3199bb375a86430b8ada1b04104f2923d0e03cc01ca87b6d84 url: "https://pub.dev" source: hosted - version: "4.7.0" + version: "4.9.0" collection: dependency: "direct main" description: name: collection - sha256: f092b211a4319e98e5ff58223576de6c2803db36221657b46c82574721240687 + sha256: ee67cb0715911d28db6bf4af1026078bd6f0128b07a5f66fb2ed94ec6783c09a url: "https://pub.dev" source: hosted - version: "1.17.2" + version: "1.18.0" connectivity_plus: dependency: "direct main" description: @@ -337,10 +337,10 @@ packages: dependency: transitive description: name: cross_file - sha256: "445db18de832dba8d851e287aff8ccf169bed30d2e94243cb54c7d2f1ed2142c" + sha256: fedaadfa3a6996f75211d835aaeb8fede285dae94262485698afd832371b9a5e url: "https://pub.dev" source: hosted - version: "0.3.3+6" + version: "0.3.3+8" crypto: dependency: transitive description: @@ -393,10 +393,10 @@ packages: dependency: transitive description: name: dbus - sha256: "6f07cba3f7b3448d42d015bfd3d53fe12e5b36da2423f23838efc1d5fb31a263" + sha256: "365c771ac3b0e58845f39ec6deebc76e3276aa9922b0cc60840712094d9047ac" url: "https://pub.dev" source: hosted - version: "0.7.8" + version: "0.7.10" device_frame: dependency: transitive description: @@ -542,18 +542,18 @@ packages: dependency: transitive description: name: flutter_custom_tabs_platform_interface - sha256: bbd2d9a2ff22d27e079a35302ddd3da9f2328110c370d56c81655a7ba306fee2 + sha256: "1d6b9eb6c5671b21511fdb47babf18aa65982784373986c003aaf67ca78798ad" url: "https://pub.dev" source: hosted - version: "1.0.1" + version: "1.2.0" flutter_custom_tabs_web: dependency: transitive description: name: flutter_custom_tabs_web - sha256: d735abff9a1b215018dfe2584f131fe0a3bb0e3b685fbd6ae8a55cf5c4d7dcd8 + sha256: dbb5689a97c2398aa5dbcfc9cd59cffea5518ec815e9d23def448dc143cb02be url: "https://pub.dev" source: hosted - version: "1.0.0" + version: "1.1.0" flutter_driver: dependency: "direct dev" description: flutter @@ -759,10 +759,10 @@ packages: dependency: transitive description: name: fwfh_text_style - sha256: f0883ccb64b7bb3f2a7a091542c2e834fc3e2a6aa54158f46b3c43b55675d8f7 + sha256: "5f8b587fd223a6bf14aad3d3da5e7ced0628becbd0768f8e7ae25ff6b9f3d2ec" url: "https://pub.dev" source: hosted - version: "2.22.8+3" + version: "2.23.8" glob: dependency: transitive description: @@ -847,10 +847,10 @@ packages: dependency: transitive description: name: image_picker_android - sha256: d6a6e78821086b0b737009b09363018309bbc6de3fd88cc5c26bc2bb44a4957f + sha256: ecdc963d2aa67af5195e723a40580f802d4392e31457a12a562b3e2bd6a396fe url: "https://pub.dev" source: hosted - version: "0.8.8+2" + version: "0.8.9+1" image_picker_for_web: dependency: transitive description: @@ -863,10 +863,10 @@ packages: dependency: transitive description: name: image_picker_ios - sha256: "76ec722aeea419d03aa915c2c96bf5b47214b053899088c9abb4086ceecf97a7" + sha256: eac0a62104fa12feed213596df0321f57ce5a572562f72a68c4ff81e9e4caacf url: "https://pub.dev" source: hosted - version: "0.8.8+4" + version: "0.8.9" image_picker_linux: dependency: transitive description: @@ -1036,10 +1036,10 @@ packages: dependency: transitive description: name: meta - sha256: "3c74dbf8763d36539f114c799d8a2d87343b5067e9d796ca22b5eb8437090ee3" + sha256: a6e590c838b18133bb482a2745ad77c5bb7715fb0451209e1a7567d416678b8e url: "https://pub.dev" source: hosted - version: "1.9.1" + version: "1.10.0" mgrs_dart: dependency: transitive description: @@ -1245,10 +1245,10 @@ packages: dependency: transitive description: name: petitparser - sha256: cb3798bef7fc021ac45b308f4b51208a152792445cce0448c9a4ba5879dd8750 + sha256: c15605cd28af66339f8eb6fbe0e541bfe2d1b72d5825efc6598f3e0a31b9ad27 url: "https://pub.dev" source: hosted - version: "5.4.0" + version: "6.0.2" photo_view: dependency: "direct main" description: @@ -1261,10 +1261,10 @@ packages: dependency: transitive description: name: platform - sha256: "4a451831508d7d6ca779f7ac6e212b4023dd5a7d08a27a63da33756410e32b76" + sha256: ae68c7bfcd7383af3629daafb32fb4e8681c7154428da4febcff06200585f102 url: "https://pub.dev" source: hosted - version: "3.1.0" + version: "3.1.2" plugin_platform_interface: dependency: "direct dev" description: @@ -1394,10 +1394,10 @@ packages: dependency: transitive description: name: sensors_plus_platform_interface - sha256: "95f0cc08791b8bf0c41c5fa99c84be2a7d5bf60a811ddc17e1438b1e68caf0d3" + sha256: bc472d6cfd622acb4f020e726433ee31788b038056691ba433fec80e448a094f url: "https://pub.dev" source: hosted - version: "1.1.3" + version: "1.2.0" sentry: dependency: transitive description: @@ -1474,10 +1474,10 @@ packages: dependency: transitive description: name: shared_preferences_web - sha256: d762709c2bbe80626ecc819143013cc820fa49ca5e363620ee20a8b15a3e3daf + sha256: "7b15ffb9387ea3e237bb7a66b8a23d2147663d391cafc5c8f37b2e7b4bde5d21" url: "https://pub.dev" source: hosted - version: "2.2.1" + version: "2.2.2" shared_preferences_windows: dependency: transitive description: @@ -1511,10 +1511,10 @@ packages: dependency: transitive description: name: source_gen - sha256: fc0da689e5302edb6177fdd964efcb7f58912f43c28c2047a808f5bfff643d16 + sha256: "14658ba5f669685cd3d63701d01b31ea748310f7ab854e471962670abcf57832" url: "https://pub.dev" source: hosted - version: "1.4.0" + version: "1.5.0" source_span: dependency: transitive description: @@ -1535,26 +1535,26 @@ packages: dependency: transitive description: name: sqflite_common - sha256: "8ed044102f3135add97be8653662052838859f5400075ef227f8ad72ae320803" + sha256: bb4738f15b23352822f4c42a531677e5c6f522e079461fd240ead29d8d8a54a6 url: "https://pub.dev" source: hosted - version: "2.5.0+1" + version: "2.5.0+2" stack_trace: dependency: transitive description: name: stack_trace - sha256: c3c7d8edb15bee7f0f74debd4b9c5f3c2ea86766fe4178eb2a18eb30a0bdaed5 + sha256: "73713990125a6d93122541237550ee3352a2d84baad52d375a4cad2eb9b7ce0b" url: "https://pub.dev" source: hosted - version: "1.11.0" + version: "1.11.1" stream_channel: dependency: transitive description: name: stream_channel - sha256: "83615bee9045c1d322bbbd1ba209b7a749c2cbcdcb3fdd1df8eb488b3279c1c8" + sha256: ba2aa5d8cc609d96bbb2899c28934f9e1af5cddbd60a827822ea467161eb54e7 url: "https://pub.dev" source: hosted - version: "2.1.1" + version: "2.1.2" stream_transform: dependency: transitive description: @@ -1583,10 +1583,10 @@ packages: dependency: transitive description: name: synchronized - sha256: "5fcbd27688af6082f5abd611af56ee575342c30e87541d0245f7ff99faa02c60" + sha256: "539ef412b170d65ecdafd780f924e5be3f60032a1128df156adad6c5b373d558" url: "https://pub.dev" source: hosted - version: "3.1.0" + version: "3.1.0+1" term_glyph: dependency: transitive description: @@ -1599,10 +1599,10 @@ packages: dependency: transitive description: name: test_api - sha256: "75760ffd7786fffdfb9597c35c5b27eaeec82be8edfb6d71d32651128ed7aab8" + sha256: "5c2f730018264d276c20e4f1503fd1308dfbbae39ec8ee63c5236311ac06954b" url: "https://pub.dev" source: hosted - version: "0.6.0" + version: "0.6.1" typed_data: dependency: transitive description: @@ -1647,18 +1647,18 @@ packages: dependency: transitive description: name: url_launcher_ios - sha256: "4ac97281cf60e2e8c5cc703b2b28528f9b50c8f7cebc71df6bdf0845f647268a" + sha256: bba3373219b7abb6b5e0d071b0fe66dfbe005d07517a68e38d4fc3638f35c6d3 url: "https://pub.dev" source: hosted - version: "6.2.0" + version: "6.2.1" url_launcher_linux: dependency: transitive description: name: url_launcher_linux - sha256: "9f2d390e096fdbe1e6e6256f97851e51afc2d9c423d3432f1d6a02a8a9a8b9fd" + sha256: ab360eb661f8879369acac07b6bb3ff09d9471155357da8443fd5d3cf7363811 url: "https://pub.dev" source: hosted - version: "3.1.0" + version: "3.1.1" url_launcher_macos: dependency: transitive description: @@ -1679,18 +1679,18 @@ packages: dependency: transitive description: name: url_launcher_web - sha256: "7fd2f55fe86cea2897b963e864dc01a7eb0719ecc65fcef4c1cc3d686d718bb2" + sha256: "7286aec002c8feecc338cc33269e96b73955ab227456e9fb2a91f7fab8a358e9" url: "https://pub.dev" source: hosted - version: "2.2.0" + version: "2.2.2" url_launcher_windows: dependency: transitive description: name: url_launcher_windows - sha256: "7754a1ad30ee896b265f8d14078b0513a4dba28d358eabb9d5f339886f4a1adc" + sha256: ecf9725510600aa2bb6d7ddabe16357691b6d2805f66216a97d1b881e21beff7 url: "https://pub.dev" source: hosted - version: "3.1.0" + version: "3.1.1" uuid: dependency: "direct main" description: @@ -1743,10 +1743,10 @@ packages: dependency: transitive description: name: vm_service - sha256: c620a6f783fa22436da68e42db7ebbf18b8c44b9a46ab911f666ff09ffd9153f + sha256: c538be99af830f478718b51630ec1b6bee5e74e52c8a802d328d9e71d35d2583 url: "https://pub.dev" source: hosted - version: "11.7.1" + version: "11.10.0" watcher: dependency: transitive description: @@ -1759,10 +1759,10 @@ packages: dependency: transitive description: name: web - sha256: dc8ccd225a2005c1be616fe02951e2e342092edf968cf0844220383757ef8f10 + sha256: afe077240a270dcfd2aafe77602b4113645af95d0ad31128cc02bce5ac5d5152 url: "https://pub.dev" source: hosted - version: "0.1.4-beta" + version: "0.3.0" webdriver: dependency: transitive description: @@ -1807,18 +1807,18 @@ packages: dependency: transitive description: name: win32 - sha256: f2add6fa510d3ae152903412227bda57d0d5a8da61d2c39c1fb022c9429a41c0 + sha256: b0f37db61ba2f2e9b7a78a1caece0052564d1bc70668156cf3a29d676fe4e574 url: "https://pub.dev" source: hosted - version: "5.0.6" + version: "5.1.1" win32_registry: dependency: transitive description: name: win32_registry - sha256: e4506d60b7244251bc59df15656a3093501c37fb5af02105a944d73eb95be4c9 + sha256: "41fd8a189940d8696b1b810efb9abcf60827b6cbfab90b0c43e8439e3a39d85a" url: "https://pub.dev" source: hosted - version: "1.1.1" + version: "1.1.2" wkt_parser: dependency: transitive description: @@ -1839,10 +1839,10 @@ packages: dependency: transitive description: name: xml - sha256: "5bc72e1e45e941d825fd7468b9b4cc3b9327942649aeb6fc5cdbf135f0a86e84" + sha256: b015a8ad1c488f66851d762d3090a21c600e479dc75e68328c52774040cf9226 url: "https://pub.dev" source: hosted - version: "6.3.0" + version: "6.5.0" yaml: dependency: transitive description: @@ -1852,5 +1852,5 @@ packages: source: hosted version: "3.1.2" sdks: - dart: ">=3.1.0 <4.0.0" - flutter: ">=3.13.0" + dart: ">=3.2.3 <4.0.0" + flutter: ">=3.16.0" diff --git a/packages/smooth_app/pubspec.yaml b/packages/smooth_app/pubspec.yaml index 0e19a6b3fec..fe19dc73b1e 100644 --- a/packages/smooth_app/pubspec.yaml +++ b/packages/smooth_app/pubspec.yaml @@ -4,7 +4,7 @@ version: 0.0.0+734 publish_to: "none" environment: - sdk: '>=3.1.0 <4.0.0' + sdk: '>=3.2.3 <4.0.0' dependencies: flutter: @@ -54,7 +54,7 @@ dependencies: crop_image: 1.0.11 shared_preferences: 2.2.2 intl: 0.18.1 - collection: 1.17.2 + collection: 1.18.0 path: 1.8.3 path_provider: 2.1.1 share_plus: 7.2.1 diff --git a/packages/smooth_app/test/tests_utils/mocks.dart b/packages/smooth_app/test/tests_utils/mocks.dart index c2cddc0f187..5baafc176d9 100644 --- a/packages/smooth_app/test/tests_utils/mocks.dart +++ b/packages/smooth_app/test/tests_utils/mocks.dart @@ -177,7 +177,7 @@ class _MockHttpClientSVGResponse extends Mock implements HttpClientResponse { '''; - final Uint8List svgBytes = utf8.encode(svgStr) as Uint8List; + final Uint8List svgBytes = utf8.encode(svgStr); } Future mockMatomo() async {