From 6a3de86588be1193c85005ef44e69b1919096e78 Mon Sep 17 00:00:00 2001 From: gram-incolo Date: Sun, 9 Jun 2024 23:56:21 +0300 Subject: [PATCH 1/2] fix error in the tests --- easel/test/extensions/size_extensions.dart | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/easel/test/extensions/size_extensions.dart b/easel/test/extensions/size_extensions.dart index d643d3ab2d..32a1375beb 100644 --- a/easel/test/extensions/size_extensions.dart +++ b/easel/test/extensions/size_extensions.dart @@ -7,21 +7,30 @@ import 'package:flutter_test/flutter_test.dart'; import 'package:shared_preferences/shared_preferences.dart'; extension SetScreenSize on WidgetTester { - Future setScreenSize({double width = 480, double height = 965, double pixelDensity = 1}) async { + Future setScreenSize( + {double width = 480, + double height = 965, + double pixelDensity = 1}) async { final size = Size(width, height); await binding.setSurfaceSize(size); view.physicalSize = size; view.devicePixelRatio = pixelDensity; } - Future testAppForWidgetTesting(Widget child, {Duration duration = Duration.zero}) async { + Future testAppForWidgetTesting(Widget child, + {Duration duration = Duration.zero}) async { SharedPreferences.setMockInitialValues({}); await EasyLocalization.ensureInitialized(); return pumpWidget(Builder(builder: (context) { return EasyLocalization( - supportedLocales: const [Locale('en', 'US'), Locale('ru', 'RU'), Locale('es'), Locale('de')], + supportedLocales: const [ + Locale('en', 'US'), + Locale('ru', 'RU'), + Locale('es'), + Locale('de') + ], path: 'i18n', fallbackLocale: const Locale('en'), useOnlyLangCode: true, @@ -36,7 +45,8 @@ extension SetScreenSize on WidgetTester { builder: (context, widget) { ScreenUtil.init(context); return MediaQuery( - data: MediaQuery.of(context).copyWith(textScaler: TextScaler.noScaling), + data: MediaQuery.of(context) + .copyWith(textScaler: TextScaler.noScaling), child: widget!, ); }, @@ -45,6 +55,6 @@ extension SetScreenSize on WidgetTester { }, ), ); - }), duration); + })); } } From 3f265ec7eca77238d0095e5a2f5b9fda357517eb Mon Sep 17 00:00:00 2001 From: gram-incolo Date: Wed, 12 Jun 2024 23:24:20 +0300 Subject: [PATCH 2/2] fix deprecated error in detectable_text_field --- easel/pubspec.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/easel/pubspec.yaml b/easel/pubspec.yaml index 2d541ad5e5..3a5e462c73 100644 --- a/easel/pubspec.yaml +++ b/easel/pubspec.yaml @@ -36,7 +36,7 @@ dependencies: collection: ^1.16.0 cupertino_icons: ^1.0.2 dartz: ^0.10.0 - detectable_text_field: ^2.0.4 + detectable_text_field: ^3.0.2 device_preview: 1.1.0 dio: ^5.0.1 easy_localization: