From 850e51cc9d7f416f784c979a3c03abd41135dca8 Mon Sep 17 00:00:00 2001 From: Sergey Parshonok Date: Sat, 25 Feb 2023 13:54:21 +0300 Subject: [PATCH 1/3] chore: minor fixes --- lib/common/utils/snackbar_messenger.dart | 2 +- lib/core/data/repository/currency.dart | 6 +++--- lib/core/presentation/screens/main/wmodel.dart | 3 +++ 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/lib/common/utils/snackbar_messenger.dart b/lib/common/utils/snackbar_messenger.dart index ecc9990..e590447 100644 --- a/lib/common/utils/snackbar_messenger.dart +++ b/lib/common/utils/snackbar_messenger.dart @@ -16,7 +16,7 @@ class SnackBarMessengerImpl implements SnackBarMessenger { void showSnackBar(String text) { assert(ScaffoldMessenger.maybeOf(context) != null); - WidgetsBinding.instance?.addPostFrameCallback( + WidgetsBinding.instance.addPostFrameCallback( (_) { ScaffoldMessenger.of(context) .showSnackBar(SnackBar(content: Text(text))); diff --git a/lib/core/data/repository/currency.dart b/lib/core/data/repository/currency.dart index b694450..bc3d13f 100644 --- a/lib/core/data/repository/currency.dart +++ b/lib/core/data/repository/currency.dart @@ -29,8 +29,8 @@ class CurrencyRepositoryImpl implements CurrencyRepository { @override CurrencyDto get prepopulatedDebit => CurrencyDto.fromCodeAndSymbol( - _rubCode, - CurrenciesStaticInfo.list.getSymbolByCode(_rubCode), + _eurCode, + CurrenciesStaticInfo.list.getSymbolByCode(_eurCode), ); CurrencyRepositoryImpl(this._getExchangeRatesApi); @@ -53,5 +53,5 @@ class CurrencyRepositoryImpl implements CurrencyRepository { } } -const _rubCode = 'EUR'; +const _eurCode = 'EUR'; const _usdCode = 'USD'; diff --git a/lib/core/presentation/screens/main/wmodel.dart b/lib/core/presentation/screens/main/wmodel.dart index 538d744..45c4a21 100644 --- a/lib/core/presentation/screens/main/wmodel.dart +++ b/lib/core/presentation/screens/main/wmodel.dart @@ -120,6 +120,8 @@ class MainScreenWidgetModel extends IMainScreenWidgetModel { @override void openSelectCreditModalSheet() { + FocusScope.of(context).unfocus(); + SelectCurrencyModalBottomSheet.show( context, currencies, @@ -129,6 +131,7 @@ class MainScreenWidgetModel extends IMainScreenWidgetModel { @override void openSelectDebitModalSheet() { + FocusScope.of(context).unfocus(); SelectCurrencyModalBottomSheet.show( context, currencies, From 1ea4e40400c6be2eb432b56bfb1a36785a8f82a3 Mon Sep 17 00:00:00 2001 From: Sergey Parshonok Date: Sat, 25 Feb 2023 13:55:18 +0300 Subject: [PATCH 2/3] feat: add integration test --- integration_test/app_test.dart | 132 +++++++++++++++++++++++++++ ios/Podfile.lock | 19 ++-- ios/Runner.xcodeproj/project.pbxproj | 75 ++++++++++----- ios/Runner/Info.plist | 2 + pubspec.lock | 82 +++++++++++------ pubspec.yaml | 2 + 6 files changed, 251 insertions(+), 61 deletions(-) create mode 100644 integration_test/app_test.dart diff --git a/integration_test/app_test.dart b/integration_test/app_test.dart new file mode 100644 index 0000000..71020fe --- /dev/null +++ b/integration_test/app_test.dart @@ -0,0 +1,132 @@ +import 'package:currency_exchange/main.dart' as app; +import 'package:currency_exchange/resources/dictionary.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter_test/flutter_test.dart'; +import 'package:integration_test/integration_test.dart'; + +void main() async { + IntegrationTestWidgetsFlutterBinding.ensureInitialized(); + testWidgets( + 'Тест приложения (а как ещё это назвать 🤡)', + (tester) async { + await app.main(); + await tester.pumpAndSettle(); + + /// Ищем текстовые поля + final debitTF = find.byWidgetPredicate((w) => + w is TextField && + w.decoration?.hintText == AppDictionary.mainScreenDebitHint); + final creditTF = find.byWidgetPredicate((w) => + w is TextField && + w.decoration?.hintText == AppDictionary.mainScreenCreditHint); + + /// И кнопки + final debitBtn = find.widgetWithText(ClipOval, '€'); + final creditBtn = find.widgetWithText(ClipOval, r'$'); + + /// Убеждаемся, что они есть на экране + expect(debitTF, findsOneWidget); + expect(creditTF, findsOneWidget); + expect(debitBtn, findsOneWidget); + expect(creditBtn, findsOneWidget); + + /// Вводим цифру в первое поле + await tester.enterText(debitTF, '12'); + + await tester.pumpAndSettle(); + + /// И ожидаем правильный результат во втором поле + expect( + find.byWidgetPredicate( + (w) => + w is TextField && + w.decoration?.hintText == AppDictionary.mainScreenCreditHint && + w.controller?.text == '12.71', + ), + findsOneWidget, + ); + + /// Вводим цифру во второе поле + await tester.enterText(creditTF, '12'); + + await tester.pumpAndSettle(); + + /// И ожидаем правильный результат в первом поле + expect( + find.byWidgetPredicate( + (w) => + w is TextField && + w.decoration?.hintText == AppDictionary.mainScreenDebitHint && + w.controller?.text == '11.33', + ), + findsOneWidget, + ); + + /// Нажимаем на кнопку переключения валюты первого поля + await tester.tap(debitBtn); + await tester.pumpAndSettle(); + final debitlist = find.byType(ListView); + + /// Будем переключаться на рубль + final debitItem = find.widgetWithText(InkWell, 'Russia Ruble'); + + expect(debitlist, findsOneWidget); + + /// Драгаем, пока не найдём искомый элемент + await tester.dragUntilVisible( + debitItem, + debitlist, + const Offset(0, -200), + ); + + await tester.tap(debitItem); + + /// Ждём, пока все устаканится + пройдёт запрос + await tester.pumpAndSettle(const Duration(milliseconds: 1000)); + + /// И ожидаем правильный результат во втором поле + expect( + find.byWidgetPredicate( + (w) => + w is TextField && + w.decoration?.hintText == AppDictionary.mainScreenCreditHint && + w.controller?.text == '0.15', + ), + findsOneWidget, + ); + + /// Нажимаем на кнопку переключения валюты второго поля + await tester.tap(creditBtn); + await tester.pumpAndSettle(); + final creditList = find.byType(ListView); + + /// Будем переключаться на ту же валюту, что и в первом поле + final creditItem = find.widgetWithText(InkWell, 'Russia Ruble'); + + expect(creditList, findsOneWidget); + + /// Драгаем, пока не найдём искомый элемент + await tester.dragUntilVisible( + creditItem, + creditList, + const Offset(0, -200), + ); + + await tester.tap(creditItem); + + await tester.pumpAndSettle(); + + /// Ожидаем увидеть снек с предупреждением + expect( + find.widgetWithText( + SnackBar, + AppDictionary.mainScreenSameCurrenciesSelectedWarning, + ), + findsOneWidget, + ); + + /// И то, что вторая валюта осталась неизменной + expect(find.widgetWithText(ClipOval, r'$'), findsOneWidget); + }, + ); +} diff --git a/ios/Podfile.lock b/ios/Podfile.lock index f9e547b..e82d22d 100644 --- a/ios/Podfile.lock +++ b/ios/Podfile.lock @@ -1,22 +1,29 @@ PODS: - Flutter (1.0.0) - - path_provider_ios (0.0.1): + - integration_test (0.0.1): - Flutter + - path_provider_foundation (0.0.1): + - Flutter + - FlutterMacOS DEPENDENCIES: - Flutter (from `Flutter`) - - path_provider_ios (from `.symlinks/plugins/path_provider_ios/ios`) + - integration_test (from `.symlinks/plugins/integration_test/ios`) + - path_provider_foundation (from `.symlinks/plugins/path_provider_foundation/ios`) EXTERNAL SOURCES: Flutter: :path: Flutter - path_provider_ios: - :path: ".symlinks/plugins/path_provider_ios/ios" + integration_test: + :path: ".symlinks/plugins/integration_test/ios" + path_provider_foundation: + :path: ".symlinks/plugins/path_provider_foundation/ios" SPEC CHECKSUMS: Flutter: 50d75fe2f02b26cc09d224853bb45737f8b3214a - path_provider_ios: 14f3d2fd28c4fdb42f44e0f751d12861c43cee02 + integration_test: a1e7d09bd98eca2fc37aefd79d4f41ad37bdbbe5 + path_provider_foundation: c68054786f1b4f3343858c1e1d0caaded73f0be9 PODFILE CHECKSUM: aafe91acc616949ddb318b77800a7f51bffa2a4c -COCOAPODS: 1.11.2 +COCOAPODS: 1.11.3 diff --git a/ios/Runner.xcodeproj/project.pbxproj b/ios/Runner.xcodeproj/project.pbxproj index 81732ce..a4d2b9b 100644 --- a/ios/Runner.xcodeproj/project.pbxproj +++ b/ios/Runner.xcodeproj/project.pbxproj @@ -14,6 +14,7 @@ 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; }; 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; }; 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; }; + D8508E4E74E790ED0087B1BF /* Pods_Runner.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C2A5856A2640A8B6106963FE /* Pods_Runner.framework */; }; /* End PBXBuildFile section */ /* Begin PBXCopyFilesBuildPhase section */ @@ -34,8 +35,7 @@ 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = ""; }; 1A9777643329ADD1BE557C00 /* Pods_Runner.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Runner.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = ""; }; - 421A1C9B4662D08931872BBA /* Pods-Runner.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.profile.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.profile.xcconfig"; sourceTree = ""; }; - 63266AD98F7BF8E241046C47 /* Pods-Runner.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.release.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"; sourceTree = ""; }; + 6FF2AF9BF937CCD2244F611E /* Pods-Runner.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.release.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"; sourceTree = ""; }; 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Runner-Bridging-Header.h"; sourceTree = ""; }; 74858FAE1ED2DC5600515810 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = ""; }; @@ -47,6 +47,9 @@ 97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; 97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + A412718D52D476C7F5F54944 /* Pods-Runner.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.debug.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"; sourceTree = ""; }; + C2A5856A2640A8B6106963FE /* Pods_Runner.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Runner.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + D4886FF0CBD643A07E8A6CBF /* Pods-Runner.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.profile.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.profile.xcconfig"; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -54,13 +57,24 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - 95EC7BB7A9B0E73B3ABD088D /* Pods_Runner.framework in Frameworks */, + D8508E4E74E790ED0087B1BF /* Pods_Runner.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXFrameworksBuildPhase section */ /* Begin PBXGroup section */ + 56A866E9F81F167B644DAFE7 /* Pods */ = { + isa = PBXGroup; + children = ( + A412718D52D476C7F5F54944 /* Pods-Runner.debug.xcconfig */, + 6FF2AF9BF937CCD2244F611E /* Pods-Runner.release.xcconfig */, + D4886FF0CBD643A07E8A6CBF /* Pods-Runner.profile.xcconfig */, + ); + name = Pods; + path = Pods; + sourceTree = ""; + }; 9740EEB11CF90186004384FC /* Flutter */ = { isa = PBXGroup; children = ( @@ -78,8 +92,8 @@ 9740EEB11CF90186004384FC /* Flutter */, 97C146F01CF9000F007C117D /* Runner */, 97C146EF1CF9000F007C117D /* Products */, - 9FB4D4C8A8E595663EF24F22 /* Pods */, - A356DF8A5DC6D947309522C1 /* Frameworks */, + 56A866E9F81F167B644DAFE7 /* Pods */, + B243C6CE7531743C7E757F18 /* Frameworks */, ); sourceTree = ""; }; @@ -106,21 +120,10 @@ path = Runner; sourceTree = ""; }; - 9FB4D4C8A8E595663EF24F22 /* Pods */ = { - isa = PBXGroup; - children = ( - 8A662864B71121D7954E3B70 /* Pods-Runner.debug.xcconfig */, - 63266AD98F7BF8E241046C47 /* Pods-Runner.release.xcconfig */, - 421A1C9B4662D08931872BBA /* Pods-Runner.profile.xcconfig */, - ); - name = Pods; - path = Pods; - sourceTree = ""; - }; - A356DF8A5DC6D947309522C1 /* Frameworks */ = { + B243C6CE7531743C7E757F18 /* Frameworks */ = { isa = PBXGroup; children = ( - 1A9777643329ADD1BE557C00 /* Pods_Runner.framework */, + C2A5856A2640A8B6106963FE /* Pods_Runner.framework */, ); name = Frameworks; sourceTree = ""; @@ -132,14 +135,14 @@ isa = PBXNativeTarget; buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */; buildPhases = ( - 06D983342D4F3188632ED132 /* [CP] Check Pods Manifest.lock */, + 8A489384D2CE02B97C3B7AA8 /* [CP] Check Pods Manifest.lock */, 9740EEB61CF901F6004384FC /* Run Script */, 97C146EA1CF9000F007C117D /* Sources */, 97C146EB1CF9000F007C117D /* Frameworks */, 97C146EC1CF9000F007C117D /* Resources */, 9705A1C41CF9048500538489 /* Embed Frameworks */, 3B06AD1E1E4923F5004D2608 /* Thin Binary */, - 82F5B082583292876A767DA9 /* [CP] Embed Pods Frameworks */, + A66109582EA56F6041E12D4A /* [CP] Embed Pods Frameworks */, ); buildRules = ( ); @@ -234,21 +237,26 @@ shellPath = /bin/sh; shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" embed_and_thin"; }; - 82F5B082583292876A767DA9 /* [CP] Embed Pods Frameworks */ = { + 8A489384D2CE02B97C3B7AA8 /* [CP] Check Pods Manifest.lock */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( ); inputFileListPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-input-files.xcfilelist", ); - name = "[CP] Embed Pods Frameworks"; + inputPaths = ( + "${PODS_PODFILE_DIR_PATH}/Podfile.lock", + "${PODS_ROOT}/Manifest.lock", + ); + name = "[CP] Check Pods Manifest.lock"; outputFileListPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-output-files.xcfilelist", + ); + outputPaths = ( + "$(DERIVED_FILE_DIR)/Pods-Runner-checkManifestLockResult.txt", ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh\"\n"; + shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; showEnvVarsInLog = 0; }; 9740EEB61CF901F6004384FC /* Run Script */ = { @@ -265,6 +273,23 @@ shellPath = /bin/sh; shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build"; }; + A66109582EA56F6041E12D4A /* [CP] Embed Pods Frameworks */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputFileListPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-input-files.xcfilelist", + ); + name = "[CP] Embed Pods Frameworks"; + outputFileListPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-output-files.xcfilelist", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh\"\n"; + showEnvVarsInLog = 0; + }; /* End PBXShellScriptBuildPhase section */ /* Begin PBXSourcesBuildPhase section */ diff --git a/ios/Runner/Info.plist b/ios/Runner/Info.plist index bb0e9d2..0087183 100644 --- a/ios/Runner/Info.plist +++ b/ios/Runner/Info.plist @@ -43,5 +43,7 @@ UIViewControllerBasedStatusBarAppearance + CADisableMinimumFrameDurationOnPhone + diff --git a/pubspec.lock b/pubspec.lock index 68a4f67..de01f4d 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -35,7 +35,7 @@ packages: name: archive url: "https://pub.dartlang.org" source: hosted - version: "3.2.1" + version: "3.1.11" args: dependency: transitive description: @@ -112,7 +112,7 @@ packages: name: coverage url: "https://pub.dartlang.org" source: hosted - version: "1.0.3" + version: "1.2.0" crypto: dependency: transitive description: @@ -189,7 +189,7 @@ packages: name: ffi url: "https://pub.dartlang.org" source: hosted - version: "1.1.2" + version: "2.0.1" file: dependency: transitive description: @@ -202,13 +202,18 @@ packages: description: flutter source: sdk version: "0.0.0" + flutter_driver: + dependency: transitive + description: flutter + source: sdk + version: "0.0.0" flutter_launcher_icons: dependency: "direct main" description: name: flutter_launcher_icons url: "https://pub.dartlang.org" source: hosted - version: "0.9.2" + version: "0.9.3" flutter_lints: dependency: transitive description: @@ -228,6 +233,11 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "2.1.2" + fuchsia_remote_debug_protocol: + dependency: transitive + description: flutter + source: sdk + version: "0.0.0" glob: dependency: transitive description: @@ -241,7 +251,7 @@ packages: name: hive url: "https://pub.dartlang.org" source: hosted - version: "2.0.6" + version: "2.2.3" html: dependency: transitive description: @@ -269,7 +279,12 @@ packages: name: image url: "https://pub.dartlang.org" source: hosted - version: "3.1.3" + version: "3.3.0" + integration_test: + dependency: "direct dev" + description: flutter + source: sdk + version: "0.0.0" io: dependency: transitive description: @@ -367,56 +382,49 @@ packages: name: path_provider url: "https://pub.dartlang.org" source: hosted - version: "2.0.9" + version: "2.0.13" path_provider_android: dependency: transitive description: name: path_provider_android url: "https://pub.dartlang.org" source: hosted - version: "2.0.12" - path_provider_ios: + version: "2.0.23" + path_provider_foundation: dependency: transitive description: - name: path_provider_ios + name: path_provider_foundation url: "https://pub.dartlang.org" source: hosted - version: "2.0.8" + version: "2.1.2" path_provider_linux: dependency: transitive description: name: path_provider_linux url: "https://pub.dartlang.org" source: hosted - version: "2.1.5" - path_provider_macos: - dependency: transitive - description: - name: path_provider_macos - url: "https://pub.dartlang.org" - source: hosted - version: "2.0.5" + version: "2.1.9" path_provider_platform_interface: dependency: transitive description: name: path_provider_platform_interface url: "https://pub.dartlang.org" source: hosted - version: "2.0.3" + version: "2.0.6" path_provider_windows: dependency: transitive description: name: path_provider_windows url: "https://pub.dartlang.org" source: hosted - version: "2.0.5" + version: "2.1.4" petitparser: dependency: transitive description: name: petitparser url: "https://pub.dartlang.org" source: hosted - version: "4.4.0" + version: "5.0.0" platform: dependency: transitive description: @@ -430,7 +438,7 @@ packages: name: plugin_platform_interface url: "https://pub.dartlang.org" source: hosted - version: "2.1.2" + version: "2.1.4" pool: dependency: transitive description: @@ -451,7 +459,7 @@ packages: name: provider url: "https://pub.dartlang.org" source: hosted - version: "6.0.2" + version: "6.0.5" pub_semver: dependency: transitive description: @@ -548,6 +556,13 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "1.4.1" + sync_http: + dependency: transitive + description: + name: sync_http + url: "https://pub.dartlang.org" + source: hosted + version: "0.3.0" term_glyph: dependency: transitive description: @@ -603,7 +618,7 @@ packages: name: vm_service url: "https://pub.dartlang.org" source: hosted - version: "7.5.0" + version: "8.2.2" watcher: dependency: transitive description: @@ -618,6 +633,13 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "2.1.0" + webdriver: + dependency: transitive + description: + name: webdriver + url: "https://pub.dartlang.org" + source: hosted + version: "3.0.0" webkit_inspection_protocol: dependency: transitive description: @@ -631,21 +653,21 @@ packages: name: win32 url: "https://pub.dartlang.org" source: hosted - version: "2.4.1" + version: "3.1.3" xdg_directories: dependency: transitive description: name: xdg_directories url: "https://pub.dartlang.org" source: hosted - version: "0.2.0+1" + version: "1.0.0" xml: dependency: transitive description: name: xml url: "https://pub.dartlang.org" source: hosted - version: "5.3.1" + version: "6.1.0" yaml: dependency: transitive description: @@ -654,5 +676,5 @@ packages: source: hosted version: "3.1.0" sdks: - dart: ">=2.17.0-0 <3.0.0" - flutter: ">=2.10.0" + dart: ">=2.17.0 <3.0.0" + flutter: ">=3.0.0" diff --git a/pubspec.yaml b/pubspec.yaml index 9a2fd8d..c88c11a 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -28,6 +28,8 @@ dependencies: dev_dependencies: flutter_test: sdk: flutter + integration_test: + sdk: flutter flutter: assets: From 13b176fcdbd1b999111841c16d440eaaf606b3db Mon Sep 17 00:00:00 2001 From: Sergey Parshonok Date: Thu, 23 Mar 2023 14:04:42 +0300 Subject: [PATCH 3/3] fix --- integration_test/app_test.dart | 120 +++++- integration_test/mock.dart | 343 ++++++++++++++++ ios/Flutter/AppFrameworkInfo.plist | 2 +- ios/Podfile | 2 +- ios/Podfile.lock | 4 +- ios/Runner.xcodeproj/project.pbxproj | 10 +- ios/Runner/Info.plist | 2 + .../presentation/screens/main/wmodel.dart | 5 +- lib/main.dart | 24 +- lib/resources/currencies.dart | 2 +- pubspec.lock | 374 +++++++++++------- pubspec.yaml | 2 +- 12 files changed, 730 insertions(+), 160 deletions(-) create mode 100644 integration_test/mock.dart diff --git a/integration_test/app_test.dart b/integration_test/app_test.dart index 71020fe..bcad8f4 100644 --- a/integration_test/app_test.dart +++ b/integration_test/app_test.dart @@ -1,15 +1,48 @@ +import 'package:currency_exchange/core/data/network/models/currency.dart'; +import 'package:currency_exchange/core/data/network/service/get_exchange_rates.dart'; import 'package:currency_exchange/main.dart' as app; import 'package:currency_exchange/resources/dictionary.dart'; import 'package:flutter/material.dart'; import 'package:flutter_test/flutter_test.dart'; import 'package:integration_test/integration_test.dart'; +import 'package:mocktail/mocktail.dart'; + +import 'mock.dart'; + +class GetExchangeRatesApiMock extends Mock implements GetExchangeRatesApi {} + +// 12 eur - 13.03 usd +// 12 usd - 11.06 eur +// 12 rub - 0.16 usd void main() async { IntegrationTestWidgetsFlutterBinding.ensureInitialized(); + + final api = GetExchangeRatesApiMock(); + + setUp(() { + when(() => api('EUR')).thenAnswer( + (_) => Future.value( + CurrencyNetworkDto( + 'EUR', + euroMock, + ), + ), + ); + when(() => api('RUB')).thenAnswer( + (_) => Future.value( + CurrencyNetworkDto( + 'RUB', + rubMock, + ), + ), + ); + }); + testWidgets( - 'Тест приложения (а как ещё это назвать 🤡)', + 'Ввод значения в первое поле - изменение во втором', (tester) async { - await app.main(); + await app.main([], api); await tester.pumpAndSettle(); /// Ищем текстовые поля @@ -41,10 +74,36 @@ void main() async { (w) => w is TextField && w.decoration?.hintText == AppDictionary.mainScreenCreditHint && - w.controller?.text == '12.71', + w.controller?.text == '13.03', ), findsOneWidget, ); + }, + ); + + testWidgets( + 'Ввод значения во второе поле - изменение в первом', + (tester) async { + await app.main([], api); + await tester.pumpAndSettle(); + + /// Ищем текстовые поля + final debitTF = find.byWidgetPredicate((w) => + w is TextField && + w.decoration?.hintText == AppDictionary.mainScreenDebitHint); + final creditTF = find.byWidgetPredicate((w) => + w is TextField && + w.decoration?.hintText == AppDictionary.mainScreenCreditHint); + + /// И кнопки + final debitBtn = find.widgetWithText(ClipOval, '€'); + final creditBtn = find.widgetWithText(ClipOval, r'$'); + + /// Убеждаемся, что они есть на экране + expect(debitTF, findsOneWidget); + expect(creditTF, findsOneWidget); + expect(debitBtn, findsOneWidget); + expect(creditBtn, findsOneWidget); /// Вводим цифру во второе поле await tester.enterText(creditTF, '12'); @@ -57,10 +116,38 @@ void main() async { (w) => w is TextField && w.decoration?.hintText == AppDictionary.mainScreenDebitHint && - w.controller?.text == '11.33', + w.controller?.text == '11.06', ), findsOneWidget, ); + }, + ); + + testWidgets( + 'Переключение валюты в первом поле - изменение во втором', + (tester) async { + await app.main([], api); + await tester.pumpAndSettle(); + + /// Ищем текстовые поля + final debitTF = find.byWidgetPredicate((w) => + w is TextField && + w.decoration?.hintText == AppDictionary.mainScreenDebitHint); + final creditTF = find.byWidgetPredicate((w) => + w is TextField && + w.decoration?.hintText == AppDictionary.mainScreenCreditHint); + + /// Находим кнопки + final debitBtn = find.widgetWithText(ClipOval, '€'); + final creditBtn = find.widgetWithText(ClipOval, r'$'); + + /// Убеждаемся, что они есть на экране + expect(debitTF, findsOneWidget); + expect(creditTF, findsOneWidget); + expect(debitBtn, findsOneWidget); + expect(creditBtn, findsOneWidget); + + await tester.enterText(debitTF, '12'); /// Нажимаем на кнопку переключения валюты первого поля await tester.tap(debitBtn); @@ -90,18 +177,37 @@ void main() async { (w) => w is TextField && w.decoration?.hintText == AppDictionary.mainScreenCreditHint && - w.controller?.text == '0.15', + w.controller?.text == '0.16', ), findsOneWidget, ); + }, + ); + + testWidgets( + 'Установка одинаковой валюты в первом и втором поле', + (tester) async { + await app.main([], api); + await tester.pumpAndSettle(); + + /// Находим кнопки + final debitBtn = find.widgetWithText(ClipOval, '€'); + final creditBtn = find.widgetWithText(ClipOval, r'$'); + + /// Убеждаемся, что они есть на экране + expect(debitBtn, findsOneWidget); + expect(creditBtn, findsOneWidget); /// Нажимаем на кнопку переключения валюты второго поля await tester.tap(creditBtn); await tester.pumpAndSettle(); final creditList = find.byType(ListView); - /// Будем переключаться на ту же валюту, что и в первом поле - final creditItem = find.widgetWithText(InkWell, 'Russia Ruble'); + /// Будем переключаться на евро + final creditItem = find.widgetWithText( + InkWell, + 'Euro Member Countries', + ); expect(creditList, findsOneWidget); diff --git a/integration_test/mock.dart b/integration_test/mock.dart new file mode 100644 index 0000000..221031a --- /dev/null +++ b/integration_test/mock.dart @@ -0,0 +1,343 @@ +final euroMock = { + 'AED': 3.98489, + 'AFN': 94.513013, + 'ALL': 114.762704, + 'AMD': 422.303989, + 'ANG': 1.956, + 'AOA': 547.689933, + 'ARS': 222.788953, + 'AUD': 1.623705, + 'AWG': 1.953412, + 'AZN': 1.84471, + 'BAM': 1.966165, + 'BBD': 2.170288, + 'BDT': 114.04737, + 'BGN': 1.954725, + 'BHD': 0.409903, + 'BIF': 2256.645978, + 'BMD': 1.085535, + 'BND': 1.447894, + 'BOB': 7.520435, + 'BRL': 5.682689, + 'BSD': 1.08542, + 'BTC': 0.00004, + 'BTN': 89.651618, + 'BWP': 14.379859, + 'BYN': 2.738705, + 'BZD': 2.175756, + 'CAD': 1.488846, + 'CDF': 2262.193692, + 'CHF': 0.995616, + 'CLF': 0.03289, + 'CLP': 880.85802, + 'CNH': 7.44269, + 'CNY': 7.465215, + 'COP': 5185.852418, + 'CRC': 585.666904, + 'CUC': 1.085738, + 'CUP': 27.938611, + 'CVE': 110.801097, + 'CZK': 23.710033, + 'DJF': 192.936886, + 'DKK': 7.43933, + 'DOP': 59.420818, + 'DZD': 147.285874, + 'EGP': 33.520862, + 'ERN': 16.275066, + 'ETB': 58.427704, + 'EUR': 1, + 'FJD': 2.400304, + 'FKP': 0.884653, + 'GBP': 0.884705, + 'GEL': 2.788302, + 'GGP': 0.88469, + 'GHS': 13.346669, + 'GIP': 0.884726, + 'GMD': 66.345646, + 'GNF': 9335.726091, + 'GTQ': 8.462834, + 'GYD': 228.940745, + 'HKD': 8.515793, + 'HNL': 26.76025, + 'HRK': 7.528501, + 'HTG': 168.183917, + 'HUF': 387.201134, + 'IDR': 16548.911567, + 'ILS': 3.931693, + 'IMP': 0.885158, + 'INR': 89.53671, + 'IQD': 1583.57963, + 'IRR': 45171.268968, + 'ISK': 149.779359, + 'JEP': 0.884811, + 'JMD': 163.649729, + 'JOD': 0.7696, + 'JPY': 142.485985, + 'KES': 142.021794, + 'KGS': 94.84839, + 'KHR': 4405.555073, + 'KMF': 491.538625, + 'KPW': 976.465447, + 'KRW': 1406.605822, + 'KWD': 0.332797, + 'KYD': 0.904911, + 'KZT': 504.145081, + 'LAK': 18331.903085, + 'LBP': 16286.782107, + 'LKR': 349.920765, + 'LRD': 166.841613, + 'LSL': 19.994549, + 'LYD': 5.206005, + 'MAD': 11.187916, + 'MDL': 20.151987, + 'MGA': 4724.123875, + 'MKD': 62.070879, + 'MMK': 2278.470097, + 'MNT': 3696.424338, + 'MOP': 8.771917, + 'MRU': 37.348127, + 'MUR': 50.446129, + 'MVR': 16.644375, + 'MWK': 1113.751374, + 'MXN': 20.204821, + 'MYR': 4.839177, + 'MZN': 69.303449, + 'NAD': 19.804981, + 'NGN': 499.556809, + 'NIO': 39.683251, + 'NOK': 11.343752, + 'NPR': 143.443306, + 'NZD': 1.744059, + 'OMR': 0.418045, + 'PAB': 1.08509, + 'PEN': 4.104399, + 'PGK': 3.873955, + 'PHP': 59.044345, + 'PKR': 307.066503, + 'PLN': 4.681319, + 'PYG': 7784.130022, + 'QAR': 3.976401, + 'RON': 4.915582, + 'RSD': 117.236589, + 'RUB': 83.492327, + 'RWF': 1188.909472, + 'SAR': 4.075557, + 'SBD': 8.930076, + 'SCR': 14.477353, + 'SDG': 617.153673, + 'SEK': 11.182735, + 'SGD': 1.443366, + 'SHP': 0.884446, + 'SLL': 19165.837638, + 'SOS': 616.81927, + 'SRD': 37.842062, + 'SSP': 141.327992, + 'STD': 24763.14117, + 'STN': 24.619569, + 'SVC': 9.494571, + 'SYP': 2725.997941, + 'SZL': 19.989218, + 'THB': 37.128263, + 'TJS': 11.832815, + 'TMT': 3.800892, + 'TND': 3.392982, + 'TOP': 2.560482, + 'TRY': 20.664009, + 'TTD': 7.374664, + 'TWD': 32.97769, + 'TZS': 2539.031693, + 'UAH': 40.072498, + 'UGX': 4095.875408, + 'USD': 1.085479, + 'UYU': 42.461771, + 'UZS': 12354.390114, + 'VES': 26.210488, + 'VND': 25522.503484, + 'VUV': 128.074139, + 'WST': 2.926979, + 'XAF': 655.345784, + 'XAG': 0.047374, + 'XAU': 0.001403, + 'XCD': 2.932452, + 'XDR': 0.813604, + 'XOF': 655.346376, + 'XPD': 0.001181, + 'XPF': 119.22152, + 'XPT': 0.001331, + 'YER': 271.509396, + 'ZAR': 19.796682, + 'ZMW': 22.676987, + 'ZWL': 349.35734, +}; + +final rubMock = { + 'AED': 0.047728, + 'AFN': 1.131996, + 'ALL': 1.37453, + 'AMD': 5.057998, + 'ANG': 0.023427, + 'AOA': 6.559764, + 'ARS': 2.668376, + 'AUD': 0.019447, + 'AWG': 0.023396, + 'AZN': 0.022094, + 'BAM': 0.023549, + 'BBD': 0.025994, + 'BDT': 1.365962, + 'BGN': 0.023412, + 'BHD': 0.004909, + 'BIF': 27.028184, + 'BMD': 0.013002, + 'BND': 0.017342, + 'BOB': 0.090073, + 'BRL': 0.068062, + 'BSD': 0.013, + 'BTC': 0, + 'BTN': 1.073771, + 'BWP': 0.17223, + 'BYN': 0.032802, + 'BZD': 0.026059, + 'CAD': 0.017832, + 'CDF': 27.09463, + 'CHF': 0.011925, + 'CLF': 0.000394, + 'CLP': 10.550167, + 'CNH': 0.089142, + 'CNY': 0.089412, + 'COP': 62.111725, + 'CRC': 7.01462, + 'CUC': 0.013004, + 'CUP': 0.334625, + 'CVE': 1.327081, + 'CZK': 0.283979, + 'DJF': 2.310834, + 'DKK': 0.089102, + 'DOP': 0.711692, + 'DZD': 1.764065, + 'EGP': 0.401484, + 'ERN': 0.194929, + 'ETB': 0.699797, + 'EUR': 0.011977, + 'FJD': 0.028749, + 'FKP': 0.010596, + 'GBP': 0.010596, + 'GEL': 0.033396, + 'GGP': 0.010596, + 'GHS': 0.159855, + 'GIP': 0.010596, + 'GMD': 0.794632, + 'GNF': 111.815378, + 'GTQ': 0.101361, + 'GYD': 2.742057, + 'HKD': 0.101995, + 'HNL': 0.320511, + 'HRK': 0.09017, + 'HTG': 2.014364, + 'HUF': 4.637566, + 'IDR': 198.208772, + 'ILS': 0.04709, + 'IMP': 0.010602, + 'INR': 1.072394, + 'IQD': 18.966768, + 'IRR': 541.022999, + 'ISK': 1.79393, + 'JEP': 0.010598, + 'JMD': 1.960057, + 'JOD': 0.009218, + 'JPY': 1.706576, + 'KES': 1.701016, + 'KGS': 1.136013, + 'KHR': 52.765988, + 'KMF': 5.887231, + 'KPW': 11.695272, + 'KRW': 16.847127, + 'KWD': 0.003986, + 'KYD': 0.010838, + 'KZT': 6.038221, + 'LAK': 219.563927, + 'LBP': 195.069209, + 'LKR': 4.191053, + 'LRD': 1.998287, + 'LSL': 0.239478, + 'LYD': 0.062353, + 'MAD': 0.133999, + 'MDL': 0.241363, + 'MGA': 56.581533, + 'MKD': 0.743432, + 'MMK': 27.289575, + 'MNT': 44.272623, + 'MOP': 0.105063, + 'MRU': 0.447324, + 'MUR': 0.604201, + 'MVR': 0.199352, + 'MWK': 13.339566, + 'MXN': 0.241996, + 'MYR': 0.05796, + 'MZN': 0.830058, + 'NAD': 0.237207, + 'NGN': 5.983266, + 'NIO': 0.475292, + 'NOK': 0.135866, + 'NPR': 1.718042, + 'NZD': 0.020889, + 'OMR': 0.005007, + 'PAB': 0.012996, + 'PEN': 0.049159, + 'PGK': 0.046399, + 'PHP': 0.707183, + 'PKR': 3.677781, + 'PLN': 0.056069, + 'PYG': 93.231682, + 'QAR': 0.047626, + 'RON': 0.058875, + 'RSD': 1.40416, + 'RUB': 1, + 'RWF': 14.239745, + 'SAR': 0.048814, + 'SBD': 0.106957, + 'SCR': 0.173397, + 'SDG': 7.391741, + 'SEK': 0.133937, + 'SGD': 0.017287, + 'SHP': 0.010593, + 'SLL': 229.552085, + 'SOS': 7.387736, + 'SRD': 0.45324, + 'SSP': 1.692706, + 'STD': 296.591821, + 'STN': 0.294872, + 'SVC': 0.113718, + 'SYP': 32.649682, + 'SZL': 0.239414, + 'THB': 0.444691, + 'TJS': 0.141723, + 'TMT': 0.045524, + 'TND': 0.040638, + 'TOP': 0.030667, + 'TRY': 0.247496, + 'TTD': 0.088327, + 'TWD': 0.394979, + 'TZS': 30.41036, + 'UAH': 0.479954, + 'UGX': 49.056908, + 'USD': 0.013001, + 'UYU': 0.508571, + 'UZS': 147.970366, + 'VES': 0.313927, + 'VND': 305.686816, + 'VUV': 1.533963, + 'WST': 0.035057, + 'XAF': 7.849174, + 'XAG': 0.000567, + 'XAU': 0.000017, + 'XCD': 0.035122, + 'XDR': 0.009745, + 'XOF': 7.849181, + 'XPD': 0.000014, + 'XPF': 1.427934, + 'XPT': 0.000016, + 'YER': 3.251908, + 'ZAR': 0.237108, + 'ZMW': 0.271606, + 'ZWL': 4.184305, +}; diff --git a/ios/Flutter/AppFrameworkInfo.plist b/ios/Flutter/AppFrameworkInfo.plist index 8d4492f..9625e10 100644 --- a/ios/Flutter/AppFrameworkInfo.plist +++ b/ios/Flutter/AppFrameworkInfo.plist @@ -21,6 +21,6 @@ CFBundleVersion 1.0 MinimumOSVersion - 9.0 + 11.0 diff --git a/ios/Podfile b/ios/Podfile index 1e8c3c9..88359b2 100644 --- a/ios/Podfile +++ b/ios/Podfile @@ -1,5 +1,5 @@ # Uncomment this line to define a global platform for your project -# platform :ios, '9.0' +# platform :ios, '11.0' # CocoaPods analytics sends network stats synchronously affecting flutter build latency. ENV['COCOAPODS_DISABLE_STATS'] = 'true' diff --git a/ios/Podfile.lock b/ios/Podfile.lock index e82d22d..095ede5 100644 --- a/ios/Podfile.lock +++ b/ios/Podfile.lock @@ -20,10 +20,10 @@ EXTERNAL SOURCES: :path: ".symlinks/plugins/path_provider_foundation/ios" SPEC CHECKSUMS: - Flutter: 50d75fe2f02b26cc09d224853bb45737f8b3214a + Flutter: f04841e97a9d0b0a8025694d0796dd46242b2854 integration_test: a1e7d09bd98eca2fc37aefd79d4f41ad37bdbbe5 path_provider_foundation: c68054786f1b4f3343858c1e1d0caaded73f0be9 -PODFILE CHECKSUM: aafe91acc616949ddb318b77800a7f51bffa2a4c +PODFILE CHECKSUM: ef19549a9bc3046e7bb7d2fab4d021637c0c58a3 COCOAPODS: 1.11.3 diff --git a/ios/Runner.xcodeproj/project.pbxproj b/ios/Runner.xcodeproj/project.pbxproj index a4d2b9b..476bd6c 100644 --- a/ios/Runner.xcodeproj/project.pbxproj +++ b/ios/Runner.xcodeproj/project.pbxproj @@ -3,7 +3,7 @@ archiveVersion = 1; classes = { }; - objectVersion = 50; + objectVersion = 54; objects = { /* Begin PBXBuildFile section */ @@ -225,6 +225,7 @@ }; 3B06AD1E1E4923F5004D2608 /* Thin Binary */ = { isa = PBXShellScriptBuildPhase; + alwaysOutOfDate = 1; buildActionMask = 2147483647; files = ( ); @@ -261,6 +262,7 @@ }; 9740EEB61CF901F6004384FC /* Run Script */ = { isa = PBXShellScriptBuildPhase; + alwaysOutOfDate = 1; buildActionMask = 2147483647; files = ( ); @@ -365,7 +367,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 9.0; + IPHONEOS_DEPLOYMENT_TARGET = 11.0; MTL_ENABLE_DEBUG_INFO = NO; SDKROOT = iphoneos; SUPPORTED_PLATFORMS = iphoneos; @@ -442,7 +444,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 9.0; + IPHONEOS_DEPLOYMENT_TARGET = 11.0; MTL_ENABLE_DEBUG_INFO = YES; ONLY_ACTIVE_ARCH = YES; SDKROOT = iphoneos; @@ -491,7 +493,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 9.0; + IPHONEOS_DEPLOYMENT_TARGET = 11.0; MTL_ENABLE_DEBUG_INFO = NO; SDKROOT = iphoneos; SUPPORTED_PLATFORMS = iphoneos; diff --git a/ios/Runner/Info.plist b/ios/Runner/Info.plist index 0087183..b8b344e 100644 --- a/ios/Runner/Info.plist +++ b/ios/Runner/Info.plist @@ -45,5 +45,7 @@ CADisableMinimumFrameDurationOnPhone + UIApplicationSupportsIndirectInputEvents + diff --git a/lib/core/presentation/screens/main/wmodel.dart b/lib/core/presentation/screens/main/wmodel.dart index 45c4a21..72e6f63 100644 --- a/lib/core/presentation/screens/main/wmodel.dart +++ b/lib/core/presentation/screens/main/wmodel.dart @@ -1,5 +1,4 @@ import 'package:currency_exchange/common/utils/snackbar_messenger.dart'; -import 'package:currency_exchange/core/data/network/client.dart'; import 'package:currency_exchange/core/data/network/service/get_exchange_rates.dart'; import 'package:currency_exchange/core/data/repository/currency.dart'; import 'package:currency_exchange/core/domain/entities/currency.dart'; @@ -23,9 +22,7 @@ IMainScreenWidgetModel mainScreenWidgetModelFactory(BuildContext _) => MainScreenModel( CurrenciesUseCasesImpl( CurrencyRepositoryImpl( - GetExchangeRatesApiImpl( - Provider.of(_, listen: false), - ), + Provider.of(_, listen: false), ), ), MainScreenErrorHandler(), diff --git a/lib/main.dart b/lib/main.dart index 27f9ee8..ddb68b8 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -1,27 +1,39 @@ import 'package:currency_exchange/core/data/network/client.dart'; +import 'package:currency_exchange/core/data/network/service/get_exchange_rates.dart'; import 'package:currency_exchange/core/presentation/screens/main/ui.dart'; import 'package:currency_exchange/resources/currencies.dart'; import 'package:dio/dio.dart'; import 'package:flutter/material.dart'; import 'package:provider/provider.dart'; -Future main() async { +Future main(List args, [GetExchangeRatesApi? api]) async { WidgetsFlutterBinding.ensureInitialized(); await NetworkClient.initCacheOptions(); await CurrenciesStaticInfo.loadFromJson(); - runApp(const MyApp()); + runApp(MyApp(api: api)); } class MyApp extends StatelessWidget { - const MyApp({Key? key}) : super(key: key); + final GetExchangeRatesApi? api; + + const MyApp({ + required this.api, + Key? key, + }) : super(key: key); @override Widget build(BuildContext context) { return Provider( create: (_) => NetworkClient(Dio()), - child: const MaterialApp( - title: 'Currency Exchange', - home: MainScreen(), + child: Builder( + builder: (context) => Provider( + create: (context) => + api ?? GetExchangeRatesApiImpl(context.read()), + child: const MaterialApp( + title: 'Currency Exchange', + home: MainScreen(), + ), + ), ), ); } diff --git a/lib/resources/currencies.dart b/lib/resources/currencies.dart index 193f46c..aa9c3c4 100644 --- a/lib/resources/currencies.dart +++ b/lib/resources/currencies.dart @@ -15,7 +15,7 @@ extension SymbolByCodeRetriever on List { class CurrenciesStaticInfo { static const _assetPath = 'assets/json/currencies.json'; - static late final List list; + static late List list; /// Метод, инициирующий загрузку данных из json-ассета. Должен вызываться перед стартом приложения static Future loadFromJson() async { diff --git a/pubspec.lock b/pubspec.lock index de01f4d..b319fe7 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -5,198 +5,218 @@ packages: dependency: transitive description: name: _fe_analyzer_shared - url: "https://pub.dartlang.org" + sha256: d976d24314f193899a3079b14fe336215a63a3b1e1c3743eabba8f83e049e9a9 + url: "https://pub.dev" source: hosted - version: "31.0.0" + version: "49.0.0" analyzer: dependency: transitive description: name: analyzer - url: "https://pub.dartlang.org" + sha256: "40ba2c6d2ab41a66476f8f1f099da6be0795c1b47221f5e2c5f8ad6048cdffae" + url: "https://pub.dev" source: hosted - version: "2.8.0" + version: "5.1.0" analyzer_plugin: dependency: transitive description: name: analyzer_plugin - url: "https://pub.dartlang.org" + sha256: c1d5f167683de03d5ab6c3b53fc9aeefc5d59476e7810ba7bbddff50c6f4392d + url: "https://pub.dev" source: hosted - version: "0.8.0" + version: "0.11.2" ansicolor: dependency: transitive description: name: ansicolor - url: "https://pub.dartlang.org" + sha256: "607f8fa9786f392043f169898923e6c59b4518242b68b8862eb8a8b7d9c30b4a" + url: "https://pub.dev" source: hosted version: "2.0.1" archive: dependency: transitive description: name: archive - url: "https://pub.dartlang.org" + sha256: "80e5141fafcb3361653ce308776cfd7d45e6e9fbb429e14eec571382c0c5fecb" + url: "https://pub.dev" source: hosted - version: "3.1.11" + version: "3.3.2" args: dependency: transitive description: name: args - url: "https://pub.dartlang.org" + sha256: "0bd9a99b6eb96f07af141f0eb53eace8983e8e5aa5de59777aca31684680ef22" + url: "https://pub.dev" source: hosted version: "2.3.0" async: dependency: transitive description: name: async - url: "https://pub.dartlang.org" + sha256: bfe67ef28df125b7dddcea62755991f807aa39a2492a23e1550161692950bbe0 + url: "https://pub.dev" source: hosted - version: "2.8.2" + version: "2.10.0" boolean_selector: dependency: transitive description: name: boolean_selector - url: "https://pub.dartlang.org" + sha256: "6cfb5af12253eaf2b368f07bacc5a80d1301a071c73360d746b7f2e32d762c66" + url: "https://pub.dev" source: hosted - version: "2.1.0" + version: "2.1.1" bottom_sheet: dependency: "direct main" description: name: bottom_sheet - url: "https://pub.dartlang.org" + sha256: "21312ea7c02391ce0b797c3519b8342d318622d49e34ad5850e49dac05cd5d38" + url: "https://pub.dev" source: hosted - version: "2.0.0" + version: "1.0.5" characters: dependency: transitive description: name: characters - url: "https://pub.dartlang.org" + sha256: e6a326c8af69605aec75ed6c187d06b349707a27fbff8222ca9cc2cff167975c + url: "https://pub.dev" source: hosted - version: "1.2.0" + version: "1.2.1" charcode: dependency: transitive description: name: charcode - url: "https://pub.dartlang.org" + sha256: fb98c0f6d12c920a02ee2d998da788bca066ca5f148492b7085ee23372b12306 + url: "https://pub.dev" source: hosted version: "1.3.1" - cli_util: - dependency: transitive - description: - name: cli_util - url: "https://pub.dartlang.org" - source: hosted - version: "0.3.5" clock: dependency: transitive description: name: clock - url: "https://pub.dartlang.org" + sha256: cb6d7f03e1de671e34607e909a7213e31d7752be4fb66a86d29fe1eb14bfb5cf + url: "https://pub.dev" source: hosted - version: "1.1.0" + version: "1.1.1" collection: dependency: transitive description: name: collection - url: "https://pub.dartlang.org" + sha256: cfc915e6923fe5ce6e153b0723c753045de46de1b4d63771530504004a45fae0 + url: "https://pub.dev" source: hosted - version: "1.16.0" + version: "1.17.0" convert: dependency: transitive description: name: convert - url: "https://pub.dartlang.org" + sha256: f08428ad63615f96a27e34221c65e1a451439b5f26030f78d790f461c686d65d + url: "https://pub.dev" source: hosted version: "3.0.1" coverage: dependency: transitive description: name: coverage - url: "https://pub.dartlang.org" + sha256: "2fb815080e44a09b85e0f2ca8a820b15053982b2e714b59267719e8a9ff17097" + url: "https://pub.dev" source: hosted - version: "1.2.0" + version: "1.6.3" crypto: dependency: transitive description: name: crypto - url: "https://pub.dartlang.org" + sha256: aa274aa7774f8964e4f4f38cc994db7b6158dd36e9187aaceaddc994b35c6c67 + url: "https://pub.dev" source: hosted - version: "3.0.1" + version: "3.0.2" csslib: dependency: transitive description: name: csslib - url: "https://pub.dartlang.org" + sha256: d1cd6d6e4b39a4ad295204722b8608f19981677b223f3e942c0b5a33dcf57ec0 + url: "https://pub.dev" source: hosted version: "0.17.1" dart_code_metrics: dependency: transitive description: name: dart_code_metrics - url: "https://pub.dartlang.org" + sha256: "219607f5abbf4c0d254ca39ee009f9ff28df91c40aef26718fde15af6b7a6c24" + url: "https://pub.dev" source: hosted - version: "4.11.0" + version: "4.21.3" dart_style: dependency: transitive description: name: dart_style - url: "https://pub.dartlang.org" + sha256: "5be16bf1707658e4c03078d4a9b90208ded217fb02c163e207d334082412f2fb" + url: "https://pub.dev" source: hosted - version: "2.2.1" + version: "2.2.5" dio: dependency: "direct main" description: name: dio - url: "https://pub.dartlang.org" + sha256: "5fd6e152bdbc876bc6e81910e16a2bd36e0c68e23d87316e8da67a1ec8fd7b1c" + url: "https://pub.dev" source: hosted version: "4.0.4" dio_cache_interceptor: dependency: "direct main" description: name: dio_cache_interceptor - url: "https://pub.dartlang.org" + sha256: "2842b2859036d1c0fe5069273c30997de4f822a2655c8a66ffe5feeca424a95a" + url: "https://pub.dev" source: hosted version: "3.2.6" dio_cache_interceptor_hive_store: dependency: "direct main" description: name: dio_cache_interceptor_hive_store - url: "https://pub.dartlang.org" + sha256: e378ba39b2a5cb59e48e6a12ec513147ea491b0d8ebc0c1f480ea50c023302c8 + url: "https://pub.dev" source: hosted version: "3.1.1" elementary: dependency: "direct main" description: name: elementary - url: "https://pub.dartlang.org" + sha256: fee394e567e2ffd7f1fadb07fe4ac58b6174bf84a8a52e11550de1abb13c17c9 + url: "https://pub.dev" source: hosted version: "1.1.0" elementary_test: dependency: "direct main" description: name: elementary_test - url: "https://pub.dartlang.org" + sha256: a2b4b1a9190cffed9ad18fd7d10c179d35829118f8505d0593eb0ebaef85814f + url: "https://pub.dev" source: hosted version: "1.1.0" fake_async: dependency: transitive description: name: fake_async - url: "https://pub.dartlang.org" + sha256: "511392330127add0b769b75a987850d136345d9227c6b94c96a04cf4a391bf78" + url: "https://pub.dev" source: hosted - version: "1.3.0" + version: "1.3.1" ffi: dependency: transitive description: name: ffi - url: "https://pub.dartlang.org" + sha256: a38574032c5f1dd06c4aee541789906c12ccaab8ba01446e800d9c5b79c4a978 + url: "https://pub.dev" source: hosted version: "2.0.1" file: dependency: transitive description: name: file - url: "https://pub.dartlang.org" + sha256: "1b92bec4fc2a72f59a8e15af5f52cd441e4a7860b49499d69dfa817af20e925d" + url: "https://pub.dev" source: hosted - version: "6.1.2" + version: "6.1.4" flutter: dependency: "direct main" description: flutter @@ -211,14 +231,16 @@ packages: dependency: "direct main" description: name: flutter_launcher_icons - url: "https://pub.dartlang.org" + sha256: "559c600f056e7c704bd843723c21e01b5fba47e8824bd02422165bcc02a5de1d" + url: "https://pub.dev" source: hosted version: "0.9.3" flutter_lints: dependency: transitive description: name: flutter_lints - url: "https://pub.dartlang.org" + sha256: b543301ad291598523947dc534aaddc5aaad597b709d2426d3a0e0d44c5cb493 + url: "https://pub.dev" source: hosted version: "1.0.4" flutter_test: @@ -230,7 +252,8 @@ packages: dependency: transitive description: name: frontend_server_client - url: "https://pub.dartlang.org" + sha256: "6d2930621b9377f6a4b7d260fce525d48dd77a334f0d5d4177d07b0dcb76c032" + url: "https://pub.dev" source: hosted version: "2.1.2" fuchsia_remote_debug_protocol: @@ -242,42 +265,56 @@ packages: dependency: transitive description: name: glob - url: "https://pub.dartlang.org" + sha256: "8321dd2c0ab0683a91a51307fa844c6db4aa8e3981219b78961672aaab434658" + url: "https://pub.dev" source: hosted version: "2.0.2" hive: dependency: transitive description: name: hive - url: "https://pub.dartlang.org" + sha256: "8dcf6db979d7933da8217edcec84e9df1bdb4e4edc7fc77dbd5aa74356d6d941" + url: "https://pub.dev" source: hosted version: "2.2.3" html: dependency: transitive description: name: html - url: "https://pub.dartlang.org" + sha256: bfef906cbd4e78ef49ae511d9074aebd1d2251482ef601a280973e8b58b51bbf + url: "https://pub.dev" source: hosted version: "0.15.0" + http: + dependency: transitive + description: + name: http + sha256: "6aa2946395183537c8b880962d935877325d6a09a2867c3970c05c0fed6ac482" + url: "https://pub.dev" + source: hosted + version: "0.13.5" http_multi_server: dependency: transitive description: name: http_multi_server - url: "https://pub.dartlang.org" + sha256: ab298ef2b2acd283bd36837df7801dcf6e6b925f8da6e09efb81111230aa9037 + url: "https://pub.dev" source: hosted version: "3.2.0" http_parser: dependency: transitive description: name: http_parser - url: "https://pub.dartlang.org" + sha256: e362d639ba3bc07d5a71faebb98cde68c05bfbcfbbb444b60b6f60bb67719185 + url: "https://pub.dev" source: hosted version: "4.0.0" image: dependency: transitive description: name: image - url: "https://pub.dartlang.org" + sha256: "8e9d133755c3e84c73288363e6343157c383a0c6c56fc51afcc5d4d7180306d6" + url: "https://pub.dev" source: hosted version: "3.3.0" integration_test: @@ -289,217 +326,264 @@ packages: dependency: transitive description: name: io - url: "https://pub.dartlang.org" + sha256: "0d4c73c3653ab85bf696d51a9657604c900a370549196a91f33e4c39af760852" + url: "https://pub.dev" source: hosted version: "1.0.3" js: dependency: transitive description: name: js - url: "https://pub.dartlang.org" + sha256: "5528c2f391ededb7775ec1daa69e65a2d61276f7552de2b5f7b8d34ee9fd4ab7" + url: "https://pub.dev" + source: hosted + version: "0.6.5" + json_annotation: + dependency: transitive + description: + name: json_annotation + sha256: c33da08e136c3df0190bd5bbe51ae1df4a7d96e7954d1d7249fea2968a72d317 + url: "https://pub.dev" source: hosted - version: "0.6.4" + version: "4.8.0" lints: dependency: transitive description: name: lints - url: "https://pub.dartlang.org" + sha256: a2c3d198cb5ea2e179926622d433331d8b58374ab8f29cdda6e863bd62fd369c + url: "https://pub.dev" source: hosted version: "1.0.1" logging: dependency: transitive description: name: logging - url: "https://pub.dartlang.org" + sha256: "293ae2d49fd79d4c04944c3a26dfd313382d5f52e821ec57119230ae16031ad4" + url: "https://pub.dev" source: hosted version: "1.0.2" matcher: dependency: transitive description: name: matcher - url: "https://pub.dartlang.org" + sha256: "16db949ceee371e9b99d22f88fa3a73c4e59fd0afed0bd25fc336eb76c198b72" + url: "https://pub.dev" source: hosted - version: "0.12.11" + version: "0.12.13" material_color_utilities: dependency: transitive description: name: material_color_utilities - url: "https://pub.dartlang.org" + sha256: d92141dc6fe1dad30722f9aa826c7fbc896d021d792f80678280601aff8cf724 + url: "https://pub.dev" source: hosted - version: "0.1.4" + version: "0.2.0" meta: dependency: transitive description: name: meta - url: "https://pub.dartlang.org" + sha256: "6c268b42ed578a53088d834796959e4a1814b5e9e164f147f580a386e5decf42" + url: "https://pub.dev" source: hosted - version: "1.7.0" + version: "1.8.0" mime: dependency: transitive description: name: mime - url: "https://pub.dartlang.org" + sha256: fd5f81041e6a9fc9b9d7fa2cb8a01123f9f5d5d49136e06cb9dc7d33689529f4 + url: "https://pub.dev" source: hosted version: "1.0.1" mocktail: dependency: "direct main" description: name: mocktail - url: "https://pub.dartlang.org" + sha256: dd85ca5229cf677079fd9ac740aebfc34d9287cdf294e6b2ba9fae25c39e4dc2 + url: "https://pub.dev" source: hosted version: "0.2.0" nested: dependency: transitive description: name: nested - url: "https://pub.dartlang.org" + sha256: "03bac4c528c64c95c722ec99280375a6f2fc708eec17c7b3f07253b626cd2a20" + url: "https://pub.dev" source: hosted version: "1.0.0" node_preamble: dependency: transitive description: name: node_preamble - url: "https://pub.dartlang.org" + sha256: "8ebdbaa3b96d5285d068f80772390d27c21e1fa10fb2df6627b1b9415043608d" + url: "https://pub.dev" source: hosted version: "2.0.1" package_config: dependency: transitive description: name: package_config - url: "https://pub.dartlang.org" + sha256: a4d5ede5ca9c3d88a2fef1147a078570c861714c806485c596b109819135bc12 + url: "https://pub.dev" source: hosted version: "2.0.2" path: dependency: transitive description: name: path - url: "https://pub.dartlang.org" + sha256: db9d4f58c908a4ba5953fcee2ae317c94889433e5024c27ce74a37f94267945b + url: "https://pub.dev" source: hosted - version: "1.8.1" + version: "1.8.2" path_provider: dependency: "direct main" description: name: path_provider - url: "https://pub.dartlang.org" + sha256: "04890b994ee89bfa80bf3080bfec40d5a92c5c7a785ebb02c13084a099d2b6f9" + url: "https://pub.dev" source: hosted version: "2.0.13" path_provider_android: dependency: transitive description: name: path_provider_android - url: "https://pub.dartlang.org" + sha256: "7623b7d4be0f0f7d9a8b5ee6879fc13e4522d4c875ab86801dee4af32b54b83e" + url: "https://pub.dev" source: hosted version: "2.0.23" path_provider_foundation: dependency: transitive description: name: path_provider_foundation - url: "https://pub.dartlang.org" + sha256: eec003594f19fe2456ea965ae36b3fc967bc5005f508890aafe31fa75e41d972 + url: "https://pub.dev" source: hosted version: "2.1.2" path_provider_linux: dependency: transitive description: name: path_provider_linux - url: "https://pub.dartlang.org" + sha256: "525ad5e07622d19447ad740b1ed5070031f7a5437f44355ae915ff56e986429a" + url: "https://pub.dev" source: hosted version: "2.1.9" path_provider_platform_interface: dependency: transitive description: name: path_provider_platform_interface - url: "https://pub.dartlang.org" + sha256: "57585299a729335f1298b43245842678cb9f43a6310351b18fb577d6e33165ec" + url: "https://pub.dev" source: hosted version: "2.0.6" path_provider_windows: dependency: transitive description: name: path_provider_windows - url: "https://pub.dartlang.org" + sha256: "642ddf65fde5404f83267e8459ddb4556316d3ee6d511ed193357e25caa3632d" + url: "https://pub.dev" source: hosted version: "2.1.4" petitparser: dependency: transitive description: name: petitparser - url: "https://pub.dartlang.org" + sha256: "2ebb289dc4764ec397f5cd3ca9881c6d17196130a7d646ed022a0dd9c2e25a71" + url: "https://pub.dev" source: hosted version: "5.0.0" platform: dependency: transitive description: name: platform - url: "https://pub.dartlang.org" + sha256: "4a451831508d7d6ca779f7ac6e212b4023dd5a7d08a27a63da33756410e32b76" + url: "https://pub.dev" source: hosted version: "3.1.0" plugin_platform_interface: dependency: transitive description: name: plugin_platform_interface - url: "https://pub.dartlang.org" + sha256: "6a2128648c854906c53fa8e33986fc0247a1116122f9534dd20e3ab9e16a32bc" + url: "https://pub.dev" source: hosted version: "2.1.4" pool: dependency: transitive description: name: pool - url: "https://pub.dartlang.org" + sha256: "05955e3de2683e1746222efd14b775df7131139e07695dc8e24650f6b4204504" + url: "https://pub.dev" source: hosted version: "1.5.0" process: dependency: transitive description: name: process - url: "https://pub.dartlang.org" + sha256: "53fd8db9cec1d37b0574e12f07520d582019cb6c44abf5479a01505099a34a09" + url: "https://pub.dev" source: hosted version: "4.2.4" provider: dependency: "direct main" description: name: provider - url: "https://pub.dartlang.org" + sha256: cdbe7530b12ecd9eb455bdaa2fcb8d4dad22e80b8afb4798b41479d5ce26847f + url: "https://pub.dev" source: hosted version: "6.0.5" pub_semver: dependency: transitive description: name: pub_semver - url: "https://pub.dartlang.org" + sha256: b5a5fcc6425ea43704852ba4453ba94b08c2226c63418a260240c3a054579014 + url: "https://pub.dev" source: hosted version: "2.1.0" + pub_updater: + dependency: transitive + description: + name: pub_updater + sha256: "42890302ab2672adf567dc2b20e55b4ecc29d7e19c63b6b98143ab68dd717d3a" + url: "https://pub.dev" + source: hosted + version: "0.2.4" shelf: dependency: transitive description: name: shelf - url: "https://pub.dartlang.org" + sha256: c240984c924796e055e831a0a36db23be8cb04f170b26df572931ab36418421d + url: "https://pub.dev" source: hosted version: "1.2.0" shelf_packages_handler: dependency: transitive description: name: shelf_packages_handler - url: "https://pub.dartlang.org" + sha256: e0b44ebddec91e70a713e13adf93c1b2100821303b86a18e1ef1d082bd8bd9b8 + url: "https://pub.dev" source: hosted version: "3.0.0" shelf_static: dependency: transitive description: name: shelf_static - url: "https://pub.dartlang.org" + sha256: "4a0d12cd512aa4fc55fed5f6280f02ef183f47ba29b4b0dfd621b1c99b7e6361" + url: "https://pub.dev" source: hosted version: "1.1.0" shelf_web_socket: dependency: transitive description: name: shelf_web_socket - url: "https://pub.dartlang.org" + sha256: fd84910bf7d58db109082edf7326b75322b8f186162028482f53dc892f00332d + url: "https://pub.dev" source: hosted version: "1.0.1" shimmer: dependency: "direct main" description: name: shimmer - url: "https://pub.dartlang.org" + sha256: "1f1009b5845a1f88f1c5630212279540486f97409e9fc3f63883e71070d107bf" + url: "https://pub.dev" source: hosted version: "2.0.0" sky_engine: @@ -511,170 +595,194 @@ packages: dependency: transitive description: name: source_map_stack_trace - url: "https://pub.dartlang.org" + sha256: "8c463326277f68a628abab20580047b419c2ff66756fd0affd451f73f9508c11" + url: "https://pub.dev" source: hosted version: "2.1.0" source_maps: dependency: transitive description: name: source_maps - url: "https://pub.dartlang.org" + sha256: "52de2200bb098de739794c82d09c41ac27b2e42fd7e23cce7b9c74bf653c7296" + url: "https://pub.dev" source: hosted version: "0.10.10" source_span: dependency: transitive description: name: source_span - url: "https://pub.dartlang.org" + sha256: dd904f795d4b4f3b870833847c461801f6750a9fa8e61ea5ac53f9422b31f250 + url: "https://pub.dev" source: hosted - version: "1.8.2" + version: "1.9.1" stack_trace: dependency: transitive description: name: stack_trace - url: "https://pub.dartlang.org" + sha256: c3c7d8edb15bee7f0f74debd4b9c5f3c2ea86766fe4178eb2a18eb30a0bdaed5 + url: "https://pub.dev" source: hosted - version: "1.10.0" + version: "1.11.0" stream_channel: dependency: transitive description: name: stream_channel - url: "https://pub.dartlang.org" + sha256: "83615bee9045c1d322bbbd1ba209b7a749c2cbcdcb3fdd1df8eb488b3279c1c8" + url: "https://pub.dev" source: hosted - version: "2.1.0" + version: "2.1.1" string_scanner: dependency: transitive description: name: string_scanner - url: "https://pub.dartlang.org" + sha256: "556692adab6cfa87322a115640c11f13cb77b3f076ddcc5d6ae3c20242bedcde" + url: "https://pub.dev" source: hosted - version: "1.1.0" + version: "1.2.0" surf_lint_rules: dependency: "direct main" description: name: surf_lint_rules - url: "https://pub.dartlang.org" + sha256: "6e21e6057fc29c65ea49c8042996249aa25556d9ba083cc46a8f11fc13b5fefa" + url: "https://pub.dev" source: hosted version: "1.4.1" sync_http: dependency: transitive description: name: sync_http - url: "https://pub.dartlang.org" + sha256: "7f0cd72eca000d2e026bcd6f990b81d0ca06022ef4e32fb257b30d3d1014a961" + url: "https://pub.dev" source: hosted - version: "0.3.0" + version: "0.3.1" term_glyph: dependency: transitive description: name: term_glyph - url: "https://pub.dartlang.org" + sha256: a29248a84fbb7c79282b40b8c72a1209db169a2e0542bce341da992fe1bc7e84 + url: "https://pub.dev" source: hosted - version: "1.2.0" + version: "1.2.1" test: dependency: transitive description: name: test - url: "https://pub.dartlang.org" + sha256: a5fcd2d25eeadbb6589e80198a47d6a464ba3e2049da473943b8af9797900c2d + url: "https://pub.dev" source: hosted - version: "1.20.2" + version: "1.22.0" test_api: dependency: transitive description: name: test_api - url: "https://pub.dartlang.org" + sha256: ad540f65f92caa91bf21dfc8ffb8c589d6e4dc0c2267818b4cc2792857706206 + url: "https://pub.dev" source: hosted - version: "0.4.9" + version: "0.4.16" test_core: dependency: transitive description: name: test_core - url: "https://pub.dartlang.org" + sha256: "0ef9755ec6d746951ba0aabe62f874b707690b5ede0fecc818b138fcc9b14888" + url: "https://pub.dev" source: hosted - version: "0.4.11" + version: "0.4.20" typed_data: dependency: transitive description: name: typed_data - url: "https://pub.dartlang.org" + sha256: "26f87ade979c47a150c9eaab93ccd2bebe70a27dc0b4b29517f2904f04eb11a5" + url: "https://pub.dev" source: hosted - version: "1.3.0" + version: "1.3.1" uuid: dependency: transitive description: name: uuid - url: "https://pub.dartlang.org" + sha256: "2469694ad079893e3b434a627970c33f2fa5adc46dfe03c9617546969a9a8afc" + url: "https://pub.dev" source: hosted version: "3.0.6" vector_math: dependency: transitive description: name: vector_math - url: "https://pub.dartlang.org" + sha256: "80b3257d1492ce4d091729e3a67a60407d227c27241d6927be0130c98e741803" + url: "https://pub.dev" source: hosted - version: "2.1.2" + version: "2.1.4" vm_service: dependency: transitive description: name: vm_service - url: "https://pub.dartlang.org" + sha256: e7fb6c2282f7631712b69c19d1bff82f3767eea33a2321c14fa59ad67ea391c7 + url: "https://pub.dev" source: hosted - version: "8.2.2" + version: "9.4.0" watcher: dependency: transitive description: name: watcher - url: "https://pub.dartlang.org" + sha256: e42dfcc48f67618344da967b10f62de57e04bae01d9d3af4c2596f3712a88c99 + url: "https://pub.dev" source: hosted version: "1.0.1" web_socket_channel: dependency: transitive description: name: web_socket_channel - url: "https://pub.dartlang.org" + sha256: "0c2ada1b1aeb2ad031ca81872add6be049b8cb479262c6ad3c4b0f9c24eaab2f" + url: "https://pub.dev" source: hosted version: "2.1.0" webdriver: dependency: transitive description: name: webdriver - url: "https://pub.dartlang.org" + sha256: ef67178f0cc7e32c1494645b11639dd1335f1d18814aa8435113a92e9ef9d841 + url: "https://pub.dev" source: hosted - version: "3.0.0" + version: "3.0.1" webkit_inspection_protocol: dependency: transitive description: name: webkit_inspection_protocol - url: "https://pub.dartlang.org" + sha256: "5adb6ab8ed14e22bb907aae7338f0c206ea21e7a27004e97664b16c120306f00" + url: "https://pub.dev" source: hosted version: "1.0.0" win32: dependency: transitive description: name: win32 - url: "https://pub.dartlang.org" + sha256: c9ebe7ee4ab0c2194e65d3a07d8c54c5d00bb001b76081c4a04cdb8448b59e46 + url: "https://pub.dev" source: hosted version: "3.1.3" xdg_directories: dependency: transitive description: name: xdg_directories - url: "https://pub.dartlang.org" + sha256: ee1505df1426458f7f60aac270645098d318a8b4766d85fde75f76f2e21807d1 + url: "https://pub.dev" source: hosted version: "1.0.0" xml: dependency: transitive description: name: xml - url: "https://pub.dartlang.org" + sha256: ac0e3f4bf00ba2708c33fbabbbe766300e509f8c82dbd4ab6525039813f7e2fb + url: "https://pub.dev" source: hosted version: "6.1.0" yaml: dependency: transitive description: name: yaml - url: "https://pub.dartlang.org" + sha256: "3cee79b1715110341012d27756d9bae38e650588acd38d3f3c610822e1337ace" + url: "https://pub.dev" source: hosted version: "3.1.0" sdks: - dart: ">=2.17.0 <3.0.0" + dart: ">=2.18.0 <3.0.0" flutter: ">=3.0.0" diff --git a/pubspec.yaml b/pubspec.yaml index c88c11a..cc03e29 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -8,7 +8,7 @@ environment: sdk: ">=2.16.1 <3.0.0" dependencies: - bottom_sheet: ^2.0.0 + bottom_sheet: 1.0.5 dio: ^4.0.4 dio_cache_interceptor: ^3.2.6 dio_cache_interceptor_hive_store: ^3.1.1