diff --git a/.env.dev b/.env.dev index 3aa5a596..3622c245 100644 --- a/.env.dev +++ b/.env.dev @@ -1,2 +1,4 @@ OPEN_WEATHER_API_KEY=YOUR_API_KEY -OPEN_WEATHER_BASE_URL=https://api.openweathermap.org/ \ No newline at end of file +OPEN_WEATHER_BASE_URL=https://api.openweathermap.org/ +SHOW_LOGS=true +LOG_SQL=true \ No newline at end of file diff --git a/.env.qa b/.env.qa index 3aa5a596..3622c245 100644 --- a/.env.qa +++ b/.env.qa @@ -1,2 +1,4 @@ OPEN_WEATHER_API_KEY=YOUR_API_KEY -OPEN_WEATHER_BASE_URL=https://api.openweathermap.org/ \ No newline at end of file +OPEN_WEATHER_BASE_URL=https://api.openweathermap.org/ +SHOW_LOGS=true +LOG_SQL=true \ No newline at end of file diff --git a/.github/workflows/cd.yml b/.github/workflows/cd.yml index 215b679d..a4823860 100644 --- a/.github/workflows/cd.yml +++ b/.github/workflows/cd.yml @@ -2,7 +2,7 @@ name: CD on: push: branches: - - main + - release workflow_dispatch: jobs: @@ -17,10 +17,17 @@ jobs: with: token: ${{ secrets.SHOUNAK_GITHUB_TOKEN }} + - uses: actions/setup-java@v4 + with: + distribution: 'corretto' + java-version: '17' + - uses: subosito/flutter-action@v2 with: channel: 'stable' cache: true + cache-key: "flutterCacheV1-:os:-:channel:-:version:-:arch:-:hash:" + pub-cache-key: "flutterPubCacheV1-:os:-:channel:-:version:-:arch:-:hash:" - name: Setup .env.qa env: @@ -41,9 +48,6 @@ jobs: - name: Run build_runner run: derry build_runner - - name: Bump Build Number - run: scripts/bump-build-number.sh - - name: Decode Keystore id: decode_keystore uses: timheuer/base64-to-file@v1 @@ -88,85 +92,83 @@ jobs: name: Release iOS to TestFlight runs-on: macos-latest steps: - - uses: actions/checkout@v3 - with: - token: ${{ secrets.SHOUNAK_GITHUB_TOKEN }} - - - uses: subosito/flutter-action@v2 - with: - channel: 'stable' - cache: true - - - name: Setup .env.qa - env: - ENV_FILE: ${{ secrets.ENV_QA }} - run: echo -n $ENV_FILE | base64 --decode > .env.qa - - - name: Setup .env.prod - env: - ENV_FILE: ${{ secrets.ENV_PROD }} - run: echo -n $ENV_FILE | base64 --decode > .env.prod - - - name: Activate derry - run: flutter pub global activate derry - - - name: Get Dependencies - run: flutter pub get - - - name: Run build_runner - run: derry build_runner - - - uses: maxim-lobanov/setup-xcode@v1 - with: - xcode-version: latest-stable - - - name: Bump Build Number - run: scripts/bump-build-number.sh - - - name: Install the Apple certificate and provisioning profile - env: - BUILD_CERTIFICATE_BASE64: ${{ secrets.BUILD_CERTIFICATE_BASE64 }} - P12_PASSWORD: ${{ secrets.P12_PASSWORD }} - BUILD_PROVISION_PROFILE_BASE64: ${{ secrets.BUILD_PROVISION_PROFILE_BASE64 }} - KEYCHAIN_PASSWORD: ${{ secrets.KEYCHAIN_PASSWORD }} - run: chmod u+x scripts/install_certs.sh && scripts/install_certs.sh - - - name: Retrieve Export-Options.plist from secrets - env: - PLIST: ${{ secrets.IOS_PLIST }} - PLIST_PATH: ${{ runner.temp }}/options.plist - run: echo -n "$PLIST" | base64 --decode --output $PLIST_PATH - - - name: Build the signed ipa - # TODO: Move to derry - run: chmod u+x scripts/build.sh && scripts/build.sh ipa prod --release - - - name: Upload the signed ipa to TestFlight - env: - PASSWORD: ${{ secrets.APPSTORE_PASSWORD }} - IPA_PATH: build/ios/ipa/prod.ipa - run: xcrun altool --upload-app --file $IPA_PATH --username "ios@wednesday.is" --password $PASSWORD --type ios --verbose + - name: iOS build disabled + run: echo Uncomment "build-ios" job to build and deploy ios app. + +# - uses: actions/checkout@v3 +# with: +# token: ${{ secrets.SHOUNAK_GITHUB_TOKEN }} +# +# - uses: subosito/flutter-action@v2 +# with: +# channel: 'stable' +# cache: true +# +# - name: Setup .env.qa +# env: +# ENV_FILE: ${{ secrets.ENV_QA }} +# run: echo -n $ENV_FILE | base64 --decode > .env.qa +# +# - name: Setup .env.prod +# env: +# ENV_FILE: ${{ secrets.ENV_PROD }} +# run: echo -n $ENV_FILE | base64 --decode > .env.prod +# +# - name: Activate derry +# run: flutter pub global activate derry +# +# - name: Get Dependencies +# run: flutter pub get +# +# - name: Run build_runner +# run: derry build_runner +# +# - uses: maxim-lobanov/setup-xcode@v1 +# with: +# xcode-version: latest-stable +# +# - name: Install the Apple certificate and provisioning profile +# env: +# BUILD_CERTIFICATE_BASE64: ${{ secrets.BUILD_CERTIFICATE_BASE64 }} +# P12_PASSWORD: ${{ secrets.P12_PASSWORD }} +# BUILD_PROVISION_PROFILE_BASE64: ${{ secrets.BUILD_PROVISION_PROFILE_BASE64 }} +# KEYCHAIN_PASSWORD: ${{ secrets.KEYCHAIN_PASSWORD }} +# run: chmod u+x scripts/install_certs.sh && scripts/install_certs.sh +# +# - name: Retrieve Export-Options.plist from secrets +# env: +# PLIST: ${{ secrets.IOS_PLIST }} +# PLIST_PATH: ${{ runner.temp }}/options.plist +# run: echo -n "$PLIST" | base64 --decode --output $PLIST_PATH +# +# - name: Build the signed ipa +# # TODO: Move to derry +# run: chmod u+x scripts/build.sh && scripts/build.sh ipa prod --release +# +# - name: Upload the signed ipa to TestFlight +# env: +# PASSWORD: ${{ secrets.APPSTORE_PASSWORD }} +# IPA_PATH: build/ios/ipa/prod.ipa +# run: xcrun altool --upload-app --file $IPA_PATH --username "ios@wednesday.is" --password $PASSWORD --type ios --verbose commit-version-update: - name: Commit Version Change - runs-on: ubuntu-latest - needs: [ build-android, build-ios ] - if: | - always() && - (needs.build-android.result == 'success' || needs.build-ios.result == 'success') - steps: - - uses: actions/checkout@v3 - # Replace with your Personal Access Token - with: - token: ${{ secrets.SHOUNAK_GITHUB_TOKEN }} - - - name: Bump Version - run: scripts/bump-build-number.sh - - - name: Configure Git - run: | - git config user.name "Github Actions CD" - git config user.email "<>" + name: Commit Version Change + runs-on: ubuntu-latest + needs: [ build-android, build-ios ] + steps: + - uses: actions/checkout@v3 + # Replace with your Personal Access Token + with: + token: ${{ secrets.SHOUNAK_GITHUB_TOKEN }} + + - name: Bump Version + run: scripts/bump-build-number.sh + + - name: Configure Git + run: | + git config user.name "Github Actions CD" + git config user.email "<>" + + - name: Commit Version Change + run: scripts/commit-version.sh - - name: Commit Version Change - run: scripts/commit-version.sh \ No newline at end of file diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a28adac3..476787dc 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -17,6 +17,8 @@ jobs: with: channel: 'stable' cache: true + cache-key: "flutterCacheV1-:os:-:channel:-:version:-:arch:-:hash:" + pub-cache-key: "flutterPubCacheV1-:os:-:channel:-:version:-:arch:-:hash:" - name: Setup .env.dev env: @@ -54,10 +56,17 @@ jobs: steps: - uses: actions/checkout@v3 + - uses: actions/setup-java@v4 + with: + distribution: 'corretto' + java-version: '17' + - uses: subosito/flutter-action@v2 with: channel: 'stable' cache: true + cache-key: "flutterCacheV1-:os:-:channel:-:version:-:arch:-:hash:" + pub-cache-key: "flutterPubCacheV1-:os:-:channel:-:version:-:arch:-:hash:" - name: Setup .env.dev env: @@ -88,6 +97,8 @@ jobs: with: channel: 'stable' cache: true + cache-key: "flutterCacheV1-:os:-:channel:-:version:-:arch:-:hash:" + pub-cache-key: "flutterPubCacheV1-:os:-:channel:-:version:-:arch:-:hash:" - name: Setup .env.dev env: @@ -140,6 +151,8 @@ jobs: with: channel: 'stable' cache: true + cache-key: "flutterCacheV1-:os:-:channel:-:version:-:arch:-:hash:" + pub-cache-key: "flutterPubCacheV1-:os:-:channel:-:version:-:arch:-:hash:" - name: Setup .env.dev env: diff --git a/.github/workflows/e2e.yml b/.github/workflows/e2e.yml new file mode 100644 index 00000000..d40321bd --- /dev/null +++ b/.github/workflows/e2e.yml @@ -0,0 +1,62 @@ +name: E2E +on: + workflow_dispatch: + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +jobs: + e2e: + name: E2E + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + + - uses: actions/setup-java@v4 + with: + distribution: 'corretto' + java-version: '17' + + - uses: subosito/flutter-action@v2 + with: + channel: 'stable' + cache: true + cache-key: "flutterCacheV1-:os:-:channel:-:version:-:arch:-:hash:" + pub-cache-key: "flutterPubCacheV1-:os:-:channel:-:version:-:arch:-:hash:" + + - name: Setup .env.qa + env: + ENV_FILE: ${{ secrets.ENV_QA }} + run: echo -n $ENV_FILE | base64 --decode > .env.qa + + - name: Activate derry + run: dart pub global activate derry + + - name: Get Dependencies + run: flutter pub get + + - name: Run build_runner + run: derry build_runner + + - name: Activate patrol + run: dart pub global activate patrol_cli + + - name: Setup android + run: flutter build apk --config-only + + - name: Generate Test apks + run: patrol build android --flavor=qa --dart-define=flavor=qa --verbose + + - id: 'auth' + name: 'Authenticate to Google Cloud' + uses: 'google-github-actions/auth@v1' + with: + credentials_json: '${{ secrets.GOOGLE_CLOUD_TEST_LAB_CREDS }}' + + - name: 'Set up Cloud SDK' + uses: 'google-github-actions/setup-gcloud@v1' + + - name: Firebase Test Lab + run: gcloud firebase test android run --type instrumentation --app ./build/app/outputs/apk/qa/debug/app-qa-debug.apk --test ./build/app/outputs/apk/androidTest/qa/debug/app-qa-debug-androidTest.apk --device model=panther,version=33 --environment-variables clearPackageData=true --use-orchestrator + diff --git a/.github/workflows/update_goldens.yml b/.github/workflows/update_goldens.yml index 8f46a15f..b354c9ed 100644 --- a/.github/workflows/update_goldens.yml +++ b/.github/workflows/update_goldens.yml @@ -13,6 +13,8 @@ jobs: with: channel: 'stable' cache: true + cache-key: "flutterCacheV1-:os:-:channel:-:version:-:arch:-:hash:" + pub-cache-key: "flutterPubCacheV1-:os:-:channel:-:version:-:arch:-:hash:" - name: Setup .env.dev env: diff --git a/README.md b/README.md index 926df952..ea4f7df6 100644 --- a/README.md +++ b/README.md @@ -227,6 +227,7 @@ The template also includes a testing setup for - [`Unit Tests`](test/repository). - [`Widget Tests`](test/presentation/integration) - [`Golden Tests`](test/presentation/goldens) +- [`Integration / E2E tests`](integration_test) using [Patrol](https://patrol.leancode.co/) The test coverage and code quality reporting is done using [`sonarqube`](https://docs.sonarqube.org/latest/). You can read the documentation about integrating `sonarqube` in you CI workflow [here](https://docs.sonarqube.org/latest/devops-platform-integration/github-integration/#analyzing-projects-with-github-actions). diff --git a/android/app/build.gradle b/android/app/build.gradle index 4d7a7d4b..f0c930d1 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -1,3 +1,9 @@ +plugins { + id "com.android.application" + id "kotlin-android" + id "dev.flutter.flutter-gradle-plugin" +} + def localProperties = new Properties() def localPropertiesFile = rootProject.file('local.properties') if (localPropertiesFile.exists()) { @@ -6,11 +12,6 @@ if (localPropertiesFile.exists()) { } } -def flutterRoot = localProperties.getProperty('flutter.sdk') -if (flutterRoot == null) { - throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.") -} - def flutterVersionCode = localProperties.getProperty('flutter.versionCode') if (flutterVersionCode == null) { flutterVersionCode = '1' @@ -21,11 +22,9 @@ if (flutterVersionName == null) { flutterVersionName = '1.0' } -apply plugin: 'com.android.application' -apply plugin: 'kotlin-android' -apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle" android { + namespace "com.wednesday.flutter_template" compileSdkVersion project.properties['flutter.compileSdkVersion'].toInteger() compileOptions { @@ -111,7 +110,7 @@ flutter { } dependencies { - implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" + implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.9.23" implementation 'androidx.core:core-splashscreen:1.0.0-beta01' diff --git a/android/app/src/androidTest/java/MainActivityTest.java b/android/app/src/androidTest/java/MainActivityTest.java index 1350d4ad..df322e5d 100644 --- a/android/app/src/androidTest/java/MainActivityTest.java +++ b/android/app/src/androidTest/java/MainActivityTest.java @@ -1,6 +1,7 @@ import androidx.test.platform.app.InstrumentationRegistry; -import com.example.flutter_template.MainActivity; +import com.wednesday.flutter_template +.MainActivity; import org.junit.Test; import org.junit.runner.RunWith; diff --git a/android/app/src/debug/AndroidManifest.xml b/android/app/src/debug/AndroidManifest.xml index 400255ce..f880684a 100644 --- a/android/app/src/debug/AndroidManifest.xml +++ b/android/app/src/debug/AndroidManifest.xml @@ -1,5 +1,4 @@ - + diff --git a/android/app/src/main/AndroidManifest.xml b/android/app/src/main/AndroidManifest.xml index f0d1dbca..a3d14e50 100644 --- a/android/app/src/main/AndroidManifest.xml +++ b/android/app/src/main/AndroidManifest.xml @@ -1,5 +1,4 @@ - + diff --git a/android/app/src/main/kotlin/com/example/flutter_template/MainActivity.kt b/android/app/src/main/kotlin/com/example/flutter_template/MainActivity.kt index 65768931..a587bdae 100644 --- a/android/app/src/main/kotlin/com/example/flutter_template/MainActivity.kt +++ b/android/app/src/main/kotlin/com/example/flutter_template/MainActivity.kt @@ -1,4 +1,5 @@ -package com.example.flutter_template +package com.wednesday.flutter_template + import android.os.Bundle import androidx.core.splashscreen.SplashScreen.Companion.installSplashScreen diff --git a/android/app/src/profile/AndroidManifest.xml b/android/app/src/profile/AndroidManifest.xml index 400255ce..f880684a 100644 --- a/android/app/src/profile/AndroidManifest.xml +++ b/android/app/src/profile/AndroidManifest.xml @@ -1,5 +1,4 @@ - + diff --git a/android/build.gradle b/android/build.gradle index 8b75747c..bc157bd1 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -1,16 +1,3 @@ -buildscript { - ext.kotlin_version = '1.6.10' - repositories { - google() - mavenCentral() - } - - dependencies { - classpath 'com.android.tools.build:gradle:7.4.2' - classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" - } -} - allprojects { repositories { google() diff --git a/android/gradle.properties b/android/gradle.properties index febaef16..b66c2561 100644 --- a/android/gradle.properties +++ b/android/gradle.properties @@ -3,5 +3,5 @@ android.useAndroidX=true android.enableJetifier=true # Flutter specific properties flutter.minSdkVersion=23 -flutter.targetSdkVersion=33 -flutter.compileSdkVersion=33 +flutter.targetSdkVersion=34 +flutter.compileSdkVersion=34 diff --git a/android/gradle/wrapper/gradle-wrapper.properties b/android/gradle/wrapper/gradle-wrapper.properties index cb046be6..628d33c2 100644 --- a/android/gradle/wrapper/gradle-wrapper.properties +++ b/android/gradle/wrapper/gradle-wrapper.properties @@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-7.6.2-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.6-all.zip diff --git a/android/settings.gradle b/android/settings.gradle index 44e62bcf..9e87bc8d 100644 --- a/android/settings.gradle +++ b/android/settings.gradle @@ -1,11 +1,25 @@ -include ':app' +pluginManagement { + def flutterSdkPath = { + def properties = new Properties() + file("local.properties").withInputStream { properties.load(it) } + def flutterSdkPath = properties.getProperty("flutter.sdk") + assert flutterSdkPath != null, "flutter.sdk not set in local.properties" + return flutterSdkPath + }() -def localPropertiesFile = new File(rootProject.projectDir, "local.properties") -def properties = new Properties() + includeBuild("$flutterSdkPath/packages/flutter_tools/gradle") -assert localPropertiesFile.exists() -localPropertiesFile.withReader("UTF-8") { reader -> properties.load(reader) } + repositories { + google() + mavenCentral() + gradlePluginPortal() + } +} -def flutterSdkPath = properties.getProperty("flutter.sdk") -assert flutterSdkPath != null, "flutter.sdk not set in local.properties" -apply from: "$flutterSdkPath/packages/flutter_tools/gradle/app_plugin_loader.gradle" +plugins { + id "dev.flutter.flutter-plugin-loader" version "1.0.0" + id "com.android.application" version "8.3.0" apply false + id "org.jetbrains.kotlin.android" version "1.9.23" apply false +} + +include ":app" diff --git a/integration_test/app_setup.dart b/integration_test/app_setup.dart index 287cf85f..0c238027 100644 --- a/integration_test/app_setup.dart +++ b/integration_test/app_setup.dart @@ -25,4 +25,4 @@ Future setupApp(PatrolIntegrationTester patrol) async { child: TemplateApp(), ), ); -} \ No newline at end of file +} diff --git a/integration_test/favorites_test.dart b/integration_test/favorites_test.dart index 5589a81c..dfb89d8b 100644 --- a/integration_test/favorites_test.dart +++ b/integration_test/favorites_test.dart @@ -8,13 +8,12 @@ import 'test_actions.dart'; void main() { patrolTest( 'user can search cities and add or remove them from favorites', - // ignore: deprecated_member_use - nativeAutomation: true, (patrol) async { await setupApp(patrol); await _navigateSearchForBengaluruAndMarkFavorite(patrol); await patrol.tap(find.byIcon(Icons.arrow_back)); + await Future.delayed(const Duration(seconds: 1)); expect(find.text("Bengaluru, IN"), findsOneWidget); await _navigateSearchForBengaluruAndMarkFavorite( patrol, @@ -44,4 +43,4 @@ Future _navigateSearchForBengaluruAndMarkFavorite( settlePolicy: SettlePolicy.settle, ); } -} \ No newline at end of file +} diff --git a/integration_test/language_test.dart b/integration_test/language_test.dart index 518a105c..1b211080 100644 --- a/integration_test/language_test.dart +++ b/integration_test/language_test.dart @@ -10,8 +10,6 @@ import 'test_actions.dart'; void main() { patrolTest( "users are able to change the language of the app", - // ignore: deprecated_member_use - nativeAutomation: true, (patrol) async { await setupApp(patrol); diff --git a/integration_test/test_actions.dart b/integration_test/test_actions.dart index 7fe0eabb..3e389829 100644 --- a/integration_test/test_actions.dart +++ b/integration_test/test_actions.dart @@ -4,4 +4,4 @@ import 'package:patrol/patrol.dart'; Future navigateToSearch(PatrolIntegrationTester patrol) async { await patrol.tap(find.byIcon(Icons.search)); -} \ No newline at end of file +} diff --git a/integration_test/test_bundle.dart b/integration_test/test_bundle.dart index ee7a6e3c..dad90547 100644 --- a/integration_test/test_bundle.dart +++ b/integration_test/test_bundle.dart @@ -5,7 +5,7 @@ import 'dart:async'; import 'package:flutter_test/flutter_test.dart'; import 'package:patrol/patrol.dart'; -import 'package:patrol/src/native/contracts/contracts.pbgrpc.dart'; +import 'package:patrol/src/native/contracts/contracts.dart'; import 'package:test_api/src/backend/invoker.dart'; // START: GENERATED TEST IMPORTS @@ -48,18 +48,22 @@ Future main() async { final nativeAutomator = NativeAutomator(config: NativeAutomatorConfig()); await nativeAutomator.initialize(); - final binding = PatrolBinding.ensureInitialized(); - final testExplorationCompleter = Completer(); + final binding = PatrolBinding.ensureInitialized(NativeAutomatorConfig()); + final testExplorationCompleter = Completer(); - // A special test to expore the hierarchy of groups and tests. This is a hack + // A special test to explore the hierarchy of groups and tests. This is a hack // around https://github.com/dart-lang/test/issues/1998. // // This test must be the first to run. If not, the native side likely won't // receive any tests, and everything will fall apart. test('patrol_test_explorer', () { + // Maybe somewhat counterintuitively, this callback runs *after* the calls + // to group() below. final topLevelGroup = Invoker.current!.liveTest.groups.first; final dartTestGroup = createDartTestGroup(topLevelGroup); testExplorationCompleter.complete(dartTestGroup); + print('patrol_test_explorer: obtained Dart-side test hierarchy:'); + printGroupStructure(dartTestGroup); }); // START: GENERATED TEST GROUPS diff --git a/ios/Podfile b/ios/Podfile index 7fec35a0..618422ce 100644 --- a/ios/Podfile +++ b/ios/Podfile @@ -1,5 +1,5 @@ # Uncomment this line to define a global platform for your project -# platform :ios, '11.0' +# platform :ios, '12.0' # CocoaPods analytics sends network stats synchronously affecting flutter build latency. ENV['COCOAPODS_DISABLE_STATS'] = 'true' diff --git a/ios/Runner.xcodeproj/project.pbxproj b/ios/Runner.xcodeproj/project.pbxproj index 2e047870..33bdb16e 100644 --- a/ios/Runner.xcodeproj/project.pbxproj +++ b/ios/Runner.xcodeproj/project.pbxproj @@ -255,7 +255,7 @@ 97C146E61CF9000F007C117D /* Project object */ = { isa = PBXProject; attributes = { - LastUpgradeCheck = 1430; + LastUpgradeCheck = 1510; ORGANIZATIONNAME = ""; TargetAttributes = { 8B53BCC62A8F2FA9005EF812 = { diff --git a/lib/core/entity/result.dart b/lib/core/entity/result.dart new file mode 100644 index 00000000..22ed0f90 --- /dev/null +++ b/lib/core/entity/result.dart @@ -0,0 +1,55 @@ +import 'package:equatable/equatable.dart'; + +sealed class Result extends Equatable { + const Result(); + + R when({ + required R Function(T) success, + required R Function(Exception?) error, + }) { + switch (this) { + case Success(): + return success((this as Success).data); + case Error(): + return error((this as Error).exception); + } + } + + R? successOrNull({ + required R Function(T) success, + }) { + if (this is Success) { + return success((this as Success).data); + } else { + return null; + } + } + + R? errorOrNull({ + required R Function(Exception?) error, + }) { + if (this is Error) { + return error((this as Error).exception); + } else { + return null; + } + } +} + +class Success extends Result { + final T data; + + const Success({required this.data}) : super(); + + @override + List get props => [data]; +} + +class Error extends Result { + final Exception? exception; + + const Error({required this.exception}) : super(); + + @override + List get props => [exception]; +} diff --git a/lib/domain/base/usecase/base_async_use_case.dart b/lib/domain/base/usecase/base_async_use_case.dart index 1ce4c5ec..a01bd5a7 100644 --- a/lib/domain/base/usecase/base_async_use_case.dart +++ b/lib/domain/base/usecase/base_async_use_case.dart @@ -1,5 +1,5 @@ import 'package:flutter_template/domain/base/exception/unknown_object_thrown_exception.dart'; -import 'package:flutter_template/domain/entity/base/result/result.dart'; +import 'package:flutter_template/core/entity/result.dart'; import 'package:flutter_template/foundation/extensions/object_ext.dart'; abstract class BaseAsyncUseCase { @@ -9,7 +9,7 @@ abstract class BaseAsyncUseCase { logD("call: param = $param"); try { final result = await callInternal(param); - return Result.success(result); + return Success(data: result); } catch (error) { final Exception exception; @@ -18,7 +18,7 @@ abstract class BaseAsyncUseCase { } else { exception = UnknownObjectThrownException(object: error); } - return Result.error(exception); + return Error(exception: exception); } } } diff --git a/lib/domain/base/usecase/base_use_case.dart b/lib/domain/base/usecase/base_use_case.dart index 523905ab..45025ed8 100644 --- a/lib/domain/base/usecase/base_use_case.dart +++ b/lib/domain/base/usecase/base_use_case.dart @@ -1,5 +1,5 @@ import 'package:flutter_template/domain/base/exception/unknown_object_thrown_exception.dart'; -import 'package:flutter_template/domain/entity/base/result/result.dart'; +import 'package:flutter_template/core/entity/result.dart'; import 'package:flutter_template/foundation/extensions/object_ext.dart'; abstract class BaseUseCase { @@ -9,7 +9,7 @@ abstract class BaseUseCase { logD("call = $param"); try { final result = callInternal(param); - return Result.success(result); + return Success(data: result); } catch (error) { final Exception exception; @@ -18,7 +18,7 @@ abstract class BaseUseCase { } else { exception = UnknownObjectThrownException(object: error); } - return Result.error(exception); + return Error(exception: exception); } } } diff --git a/lib/domain/entity/base/result/result.dart b/lib/domain/entity/base/result/result.dart deleted file mode 100644 index 0a5945c2..00000000 --- a/lib/domain/entity/base/result/result.dart +++ /dev/null @@ -1,10 +0,0 @@ -import 'package:freezed_annotation/freezed_annotation.dart'; - -part 'result.freezed.dart'; - -@freezed -class Result with _$Result { - factory Result.success(T data) = Success; - - factory Result.error(Exception? exception) = Error; -} diff --git a/lib/domain/entity/weather/city.dart b/lib/domain/entity/weather/city.dart index 62b58d19..023b78e0 100644 --- a/lib/domain/entity/weather/city.dart +++ b/lib/domain/entity/weather/city.dart @@ -14,4 +14,9 @@ class City { required this.lat, required this.lon, }); + + @override + String toString() { + return 'City{id: $id, title: $title, country: $country, state: $state, lat: $lat, lon: $lon}'; + } } diff --git a/lib/domain/entity/weather/day_weather.dart b/lib/domain/entity/weather/day_weather.dart index c35a6446..ddc0af32 100644 --- a/lib/domain/entity/weather/day_weather.dart +++ b/lib/domain/entity/weather/day_weather.dart @@ -14,4 +14,9 @@ class DayWeather { required this.date, required this.isToday, }); + + @override + String toString() { + return 'DayWeather{minTemp: $minTemp, maxTemp: $maxTemp, temp: $temp, date: $date, isToday: $isToday}'; + } } diff --git a/lib/domain/entity/weather/weather.dart b/lib/domain/entity/weather/weather.dart index 3a6ea7e3..eabf0374 100644 --- a/lib/domain/entity/weather/weather.dart +++ b/lib/domain/entity/weather/weather.dart @@ -20,4 +20,9 @@ class Weather { required this.feelsLike, required this.iconUrl, }); + + @override + String toString() { + return 'Weather{title: $title, description: $description, lat: $lat, lon: $lon, minTemp: $minTemp, maxTemp: $maxTemp, temp: $temp, feelsLike: $feelsLike, iconUrl: $iconUrl}'; + } } diff --git a/lib/flavors/flavor_values.dart b/lib/flavors/flavor_values.dart index 1d3983b3..dbd64f37 100644 --- a/lib/flavors/flavor_values.dart +++ b/lib/flavors/flavor_values.dart @@ -27,6 +27,8 @@ class FlavorValues { return FlavorValues( apiBaseUrl: dotenv.get("OPEN_WEATHER_BASE_URL"), openWeatherApiKey: dotenv.get("OPEN_WEATHER_API_KEY"), + showLogs: dotenv.getBoolOrDefault("SHOW_LOGS", fallback: false), + logSqlStatements: dotenv.getBoolOrDefault("LOG_SQL", fallback: false), useGoogleFonts: dotenv.getBoolOrDefault("USE_GOOGLE_FONTS", fallback: true), renderFontsInTest: diff --git a/lib/foundation/extensions/object_ext.dart b/lib/foundation/extensions/object_ext.dart index 7117ee5b..e87a2882 100644 --- a/lib/foundation/extensions/object_ext.dart +++ b/lib/foundation/extensions/object_ext.dart @@ -4,4 +4,8 @@ extension ObjectExt on Object { void logD(String message) { log.d("$runtimeType: $message"); } + + void logE(Object? error, {StackTrace? stacktrace}) { + log.e(error, stackTrace: stacktrace); + } } diff --git a/lib/interactor/base/base_interactor.dart b/lib/interactor/base/base_interactor.dart index af97dc33..6d4a2547 100644 --- a/lib/interactor/base/base_interactor.dart +++ b/lib/interactor/base/base_interactor.dart @@ -1,13 +1 @@ -import 'package:flutter/material.dart'; -import 'package:flutter_template/domain/entity/base/result/result.dart'; -import 'package:flutter_template/presentation/entity/base/ui_result.dart'; - -abstract class BaseInteractor { - @protected - UIResult mapResult(Result result) { - return result.when( - success: (data) => UIResult.success(data), - error: (error) => UIResult.error(error), - ); - } -} +abstract class BaseInteractor {} diff --git a/lib/interactor/theme/theme_interactor_impl.dart b/lib/interactor/theme/theme_interactor_impl.dart index af400063..7e9a7c02 100644 --- a/lib/interactor/theme/theme_interactor_impl.dart +++ b/lib/interactor/theme/theme_interactor_impl.dart @@ -26,6 +26,7 @@ class ThemeInteractorImpl implements ThemeInteractor { @override ThemeMode getThemeMode() { final appThemeMode = getThemeModeUseCase(unit); + return appThemeMode.when( success: (mode) => themeModeMapper.map(mode), error: (error) { diff --git a/lib/interactor/weather/favorite/favorite_weather_interactor.dart b/lib/interactor/weather/favorite/favorite_weather_interactor.dart index d8ac218a..9f536e40 100644 --- a/lib/interactor/weather/favorite/favorite_weather_interactor.dart +++ b/lib/interactor/weather/favorite/favorite_weather_interactor.dart @@ -1,15 +1,15 @@ +import 'package:flutter_template/core/entity/result.dart'; import 'package:flutter_template/presentation/entity/base/ui_list_item.dart'; -import 'package:flutter_template/presentation/entity/base/ui_result.dart'; import 'package:flutter_template/presentation/entity/weather/ui_city.dart'; abstract class FavoriteWeatherInteractor { - Future> setCityFavorite(UICity uiCity); + Future> setCityFavorite(UICity uiCity); - Future> removeCityFavorite(UICity uiCity); + Future> removeCityFavorite(UICity uiCity); Stream> getFavoriteWeatherUIList(); Stream> getFavoriteCitiesStream(); - Future> fetchFavouriteCitiesWeather(); + Future> fetchFavouriteCitiesWeather(); } diff --git a/lib/interactor/weather/favorite/favorite_weather_interactor_impl.dart b/lib/interactor/weather/favorite/favorite_weather_interactor_impl.dart index 04f8577a..38932431 100644 --- a/lib/interactor/weather/favorite/favorite_weather_interactor_impl.dart +++ b/lib/interactor/weather/favorite/favorite_weather_interactor_impl.dart @@ -1,3 +1,4 @@ +import 'package:flutter_template/core/entity/result.dart'; import 'package:flutter_template/domain/weather/fetch_favorite_cities_weather_use_case.dart'; import 'package:flutter_template/domain/weather/get_favorite_cities_stream_use_case.dart'; import 'package:flutter_template/domain/weather/get_favorite_cities_weather_stream_use_case.dart'; @@ -10,7 +11,6 @@ import 'package:flutter_template/interactor/weather/favorite/favorite_weather_in import 'package:flutter_template/interactor/weather/favorite/ui_weather_list_mapper.dart'; import 'package:flutter_template/interactor/weather/search/ui_city_mapper.dart'; import 'package:flutter_template/presentation/entity/base/ui_list_item.dart'; -import 'package:flutter_template/presentation/entity/base/ui_result.dart'; import 'package:flutter_template/presentation/entity/weather/ui_city.dart'; class FavoriteWeatherInteractorImpl extends BaseInteractor @@ -35,9 +35,9 @@ class FavoriteWeatherInteractorImpl extends BaseInteractor }); @override - Future> fetchFavouriteCitiesWeather() async { + Future> fetchFavouriteCitiesWeather() async { logD("fetchFavouriteCitiesWeather"); - return mapResult(await fetchFavoriteCitiesWeatherUseCase(param: unit)); + return await fetchFavoriteCitiesWeatherUseCase(param: unit); } @override @@ -55,18 +55,18 @@ class FavoriteWeatherInteractorImpl extends BaseInteractor } @override - Future> removeCityFavorite(UICity uiCity) async { + Future> removeCityFavorite(UICity uiCity) async { logD("removeCityFavorite: uiCity = $uiCity"); - return mapResult(await removeFavoriteCityUseCase( + return await removeFavoriteCityUseCase( param: uiCityMapper.mapCity(uiCity), - )); + ); } @override - Future> setCityFavorite(UICity uiCity) async { + Future> setCityFavorite(UICity uiCity) async { logD("setCityFavorite: uiCity = $uiCity"); - return mapResult(await setCityFavoriteUseCase( + return await setCityFavoriteUseCase( param: uiCityMapper.mapCity(uiCity), - )); + ); } } diff --git a/lib/presentation/base/page/base_page.dart b/lib/presentation/base/page/base_page.dart index 6c1517f1..56900895 100644 --- a/lib/presentation/base/page/base_page.dart +++ b/lib/presentation/base/page/base_page.dart @@ -28,7 +28,7 @@ class BasePage, final Widget? loading; const _BasePageContent({ - Key? key, + super.key, required this.onAppBarBackPressed, required this.appBarActions, required this.body, required this.loading, required this.hideDefaultLoading, - }) : super(key: key); + }); @override Widget build(BuildContext context, WidgetRef ref) { diff --git a/lib/presentation/base/view_model_provider/base_view_model.dart b/lib/presentation/base/view_model_provider/base_view_model.dart index 6095c77d..96e536cb 100644 --- a/lib/presentation/base/view_model_provider/base_view_model.dart +++ b/lib/presentation/base/view_model_provider/base_view_model.dart @@ -26,7 +26,7 @@ abstract class BaseViewModel, final AutoDisposeStateNotifierProvider provider; const ViewModelProvider({ - Key? key, - required Widget child, + super.key, + required super.child, required this.provider, - }) : super(key: key, child: child); + }); static ViewModelProvider of< VIEW_MODEL extends BaseViewModel, diff --git a/lib/presentation/base/widgets/appbar/app_bar_back_button.dart b/lib/presentation/base/widgets/appbar/app_bar_back_button.dart index 1e07df85..620603e0 100644 --- a/lib/presentation/base/widgets/appbar/app_bar_back_button.dart +++ b/lib/presentation/base/widgets/appbar/app_bar_back_button.dart @@ -10,9 +10,9 @@ class AppBarBackButton, final Function() onBackPressed; const AppBarBackButton({ - Key? key, + super.key, required this.onBackPressed, - }) : super(key: key); + }); @override Widget build(BuildContext context, WidgetRef ref) { diff --git a/lib/presentation/base/widgets/appbar/app_bar_title.dart b/lib/presentation/base/widgets/appbar/app_bar_title.dart index 1c35d58f..360581df 100644 --- a/lib/presentation/base/widgets/appbar/app_bar_title.dart +++ b/lib/presentation/base/widgets/appbar/app_bar_title.dart @@ -9,8 +9,8 @@ import 'package:flutter_template/presentation/entity/screen/screen_state.dart'; class AppBarTitle, SCREEN_STATE extends ScreenState> extends ConsumerWidget { const AppBarTitle({ - Key? key, - }) : super(key: key); + super.key, + }); @override Widget build(BuildContext context, WidgetRef ref) { diff --git a/lib/presentation/base/widgets/list/ui_list.dart b/lib/presentation/base/widgets/list/ui_list.dart index f200c755..79cff0a2 100644 --- a/lib/presentation/base/widgets/list/ui_list.dart +++ b/lib/presentation/base/widgets/list/ui_list.dart @@ -19,7 +19,7 @@ class UIList extends StatefulWidget { final SliverGridDelegate? gridDelegate; const UIList({ - Key? key, + super.key, required this.renderers, required this.intentHandler, required this.items, @@ -28,7 +28,7 @@ class UIList extends StatefulWidget { this.physics, this.numberOfColumns = 1, this.gridDelegate, - }) : super(key: key); + }); @override State createState() => _UIListState(); diff --git a/lib/presentation/base/widgets/responsive/responsive_builder.dart b/lib/presentation/base/widgets/responsive/responsive_builder.dart index eb402590..d17ef973 100644 --- a/lib/presentation/base/widgets/responsive/responsive_builder.dart +++ b/lib/presentation/base/widgets/responsive/responsive_builder.dart @@ -4,7 +4,7 @@ class ResponsiveBuilder extends StatelessWidget { final Widget Function(BuildContext context, MediaQueryData mediaQueryData, BoxConstraints boxConstraints) builder; - const ResponsiveBuilder({Key? key, required this.builder}) : super(key: key); + const ResponsiveBuilder({super.key, required this.builder}); @override Widget build(BuildContext context) { diff --git a/lib/presentation/base/widgets/responsive/responsive_screen_type_builder.dart b/lib/presentation/base/widgets/responsive/responsive_screen_type_builder.dart index 21f95d5b..8922e475 100644 --- a/lib/presentation/base/widgets/responsive/responsive_screen_type_builder.dart +++ b/lib/presentation/base/widgets/responsive/responsive_screen_type_builder.dart @@ -12,14 +12,14 @@ class ResponsiveScreenTypeBuilder extends StatelessWidget { final Widget Function(BuildContext context)? desktop; const ResponsiveScreenTypeBuilder({ - Key? key, + super.key, this.breakpoints = ResponsiveBreakpoints.defaults, required this.mobile, this.mobileLandscape, this.tablet, this.tabletLandscape, this.desktop, - }) : super(key: key); + }); @override Widget build(BuildContext context) { diff --git a/lib/presentation/base/widgets/scaffold/scaffold_body_with_loading_indicator.dart b/lib/presentation/base/widgets/scaffold/scaffold_body_with_loading_indicator.dart index fcb35be8..f36626a8 100644 --- a/lib/presentation/base/widgets/scaffold/scaffold_body_with_loading_indicator.dart +++ b/lib/presentation/base/widgets/scaffold/scaffold_body_with_loading_indicator.dart @@ -9,11 +9,11 @@ class ScaffoldBodyWithLoadingIndicator< VIEW_MODEL extends BaseViewModel, SCREEN_STATE extends ScreenState> extends ConsumerWidget { const ScaffoldBodyWithLoadingIndicator({ - Key? key, + super.key, required this.body, this.loading, this.hideDefaultLoading = false, - }) : super(key: key); + }); final Widget body; final Widget? loading; diff --git a/lib/presentation/base/widgets/theme/dynamic_theme_switch/dynamic_theme_switch.dart b/lib/presentation/base/widgets/theme/dynamic_theme_switch/dynamic_theme_switch.dart index c8ba52c1..cd5cf1a4 100644 --- a/lib/presentation/base/widgets/theme/dynamic_theme_switch/dynamic_theme_switch.dart +++ b/lib/presentation/base/widgets/theme/dynamic_theme_switch/dynamic_theme_switch.dart @@ -5,7 +5,7 @@ import 'package:flutter_template/presentation/base/theme/theme_view_model.dart'; import 'package:flutter_template/presentation/base/widgets/theme/dynamic_theme_switch/dynamic_theme_switch_content.dart'; class DynamicThemeSwitch extends ConsumerWidget { - const DynamicThemeSwitch({Key? key}) : super(key: key); + const DynamicThemeSwitch({super.key}); @override Widget build(BuildContext context, WidgetRef ref) { diff --git a/lib/presentation/base/widgets/theme/dynamic_theme_switch/dynamic_theme_switch_content.dart b/lib/presentation/base/widgets/theme/dynamic_theme_switch/dynamic_theme_switch_content.dart index e9aa6cb1..87066577 100644 --- a/lib/presentation/base/widgets/theme/dynamic_theme_switch/dynamic_theme_switch_content.dart +++ b/lib/presentation/base/widgets/theme/dynamic_theme_switch/dynamic_theme_switch_content.dart @@ -7,10 +7,10 @@ class DynamicThemeSwitchContent extends StatelessWidget { final void Function(bool) onIsDynamicToggled; const DynamicThemeSwitchContent({ - Key? key, + super.key, required this.isDynamic, required this.onIsDynamicToggled, - }) : super(key: key); + }); @override Widget build(BuildContext context) { diff --git a/lib/presentation/base/widgets/theme/theme_listener.dart b/lib/presentation/base/widgets/theme/theme_listener.dart index e31f11aa..9f83439d 100644 --- a/lib/presentation/base/widgets/theme/theme_listener.dart +++ b/lib/presentation/base/widgets/theme/theme_listener.dart @@ -6,7 +6,7 @@ import 'package:flutter_template/presentation/base/theme/theme_view_model.dart'; class ThemeStateListener extends ConsumerWidget { final Widget Function(ThemeState themeState) builder; - const ThemeStateListener({Key? key, required this.builder}) : super(key: key); + const ThemeStateListener({super.key, required this.builder}); @override Widget build(BuildContext context, WidgetRef ref) { diff --git a/lib/presentation/base/widgets/theme/theme_picker/theme_picker.dart b/lib/presentation/base/widgets/theme/theme_picker/theme_picker.dart index 35bd59bc..742dbd43 100644 --- a/lib/presentation/base/widgets/theme/theme_picker/theme_picker.dart +++ b/lib/presentation/base/widgets/theme/theme_picker/theme_picker.dart @@ -5,7 +5,7 @@ import 'package:flutter_template/presentation/base/theme/theme_view_model.dart'; import 'package:flutter_template/presentation/base/widgets/theme/theme_picker/theme_picker_content.dart'; class ThemePicker extends ConsumerWidget { - const ThemePicker({Key? key}) : super(key: key); + const ThemePicker({super.key}); @override Widget build(BuildContext context, WidgetRef ref) { diff --git a/lib/presentation/base/widgets/theme/theme_picker/theme_picker_content.dart b/lib/presentation/base/widgets/theme/theme_picker/theme_picker_content.dart index c49324a3..1b8cabd9 100644 --- a/lib/presentation/base/widgets/theme/theme_picker/theme_picker_content.dart +++ b/lib/presentation/base/widgets/theme/theme_picker/theme_picker_content.dart @@ -6,10 +6,10 @@ class ThemePickerContent extends StatelessWidget { final ThemeMode themeMode; const ThemePickerContent({ - Key? key, + super.key, required this.onThemeModeSelected, required this.themeMode, - }) : super(key: key); + }); @override Widget build(BuildContext context) { diff --git a/lib/presentation/destinations/weather/home/home_page.dart b/lib/presentation/destinations/weather/home/home_page.dart index 4436adcc..f255c5a7 100644 --- a/lib/presentation/destinations/weather/home/home_page.dart +++ b/lib/presentation/destinations/weather/home/home_page.dart @@ -16,9 +16,9 @@ class HomePage extends ConsumerWidget { final HomeScreen homeScreen; const HomePage({ - Key? key, + super.key, this.homeScreen = const HomeScreen(), - }) : super(key: key); + }); @override Widget build(BuildContext context, WidgetRef ref) { diff --git a/lib/presentation/destinations/weather/home/home_view_model.dart b/lib/presentation/destinations/weather/home/home_view_model.dart index 1cc1aeea..54219cb8 100644 --- a/lib/presentation/destinations/weather/home/home_view_model.dart +++ b/lib/presentation/destinations/weather/home/home_view_model.dart @@ -12,5 +12,5 @@ final homeViewModelProvider = abstract class HomeViewModel extends BaseViewModel implements IntentHandler { - HomeViewModel(HomeScreenState state) : super(state); + HomeViewModel(super.state); } diff --git a/lib/presentation/destinations/weather/home/widgets/home_page_body/home_page_body.dart b/lib/presentation/destinations/weather/home/widgets/home_page_body/home_page_body.dart index 9ee96679..d730e216 100644 --- a/lib/presentation/destinations/weather/home/widgets/home_page_body/home_page_body.dart +++ b/lib/presentation/destinations/weather/home/widgets/home_page_body/home_page_body.dart @@ -5,8 +5,8 @@ import 'package:flutter_template/presentation/destinations/weather/home/widgets/ class HomePageBody extends ConsumerWidget { const HomePageBody({ - Key? key, - }) : super(key: key); + super.key, + }); @override Widget build(BuildContext context, WidgetRef ref) { diff --git a/lib/presentation/destinations/weather/home/widgets/list/ui_day_weather_heading_list_item.dart b/lib/presentation/destinations/weather/home/widgets/list/ui_day_weather_heading_list_item.dart index 8bdb8a84..24fd0b98 100644 --- a/lib/presentation/destinations/weather/home/widgets/list/ui_day_weather_heading_list_item.dart +++ b/lib/presentation/destinations/weather/home/widgets/list/ui_day_weather_heading_list_item.dart @@ -5,9 +5,9 @@ class UIDayWeatherHeadingListItem extends StatelessWidget { final UIDayWeatherHeading heading; const UIDayWeatherHeadingListItem({ - Key? key, + super.key, required this.heading, - }) : super(key: key); + }); @override Widget build(BuildContext context) { diff --git a/lib/presentation/destinations/weather/home/widgets/list/ui_weather_list_item.dart b/lib/presentation/destinations/weather/home/widgets/list/ui_weather_list_item.dart index 5fa2000b..c6643863 100644 --- a/lib/presentation/destinations/weather/home/widgets/list/ui_weather_list_item.dart +++ b/lib/presentation/destinations/weather/home/widgets/list/ui_weather_list_item.dart @@ -7,9 +7,9 @@ class UIWeatherListItem extends StatelessWidget { final UIWeather weather; const UIWeatherListItem({ - Key? key, + super.key, required this.weather, - }) : super(key: key); + }); @override Widget build(BuildContext context) { diff --git a/lib/presentation/destinations/weather/search/search_page.dart b/lib/presentation/destinations/weather/search/search_page.dart index 3b369683..13c7229e 100644 --- a/lib/presentation/destinations/weather/search/search_page.dart +++ b/lib/presentation/destinations/weather/search/search_page.dart @@ -14,7 +14,7 @@ import 'package:flutter_template/presentation/entity/effect/effect.dart'; class SearchPage extends StatelessWidget { final SearchScreen searchScreen; - const SearchPage({Key? key, required this.searchScreen}) : super(key: key); + const SearchPage({super.key, required this.searchScreen}); @override Widget build(BuildContext context) { diff --git a/lib/presentation/destinations/weather/search/search_view_model.dart b/lib/presentation/destinations/weather/search/search_view_model.dart index bd60b712..f00026e6 100644 --- a/lib/presentation/destinations/weather/search/search_view_model.dart +++ b/lib/presentation/destinations/weather/search/search_view_model.dart @@ -13,7 +13,7 @@ final searchViewModelProvider = abstract class SearchViewModel extends BaseViewModel implements IntentHandler { - SearchViewModel(SearchScreenState state) : super(state); + SearchViewModel(super.state); String get searchTerm; } diff --git a/lib/presentation/destinations/weather/search/widgets/list/ui_city_list_item.dart b/lib/presentation/destinations/weather/search/widgets/list/ui_city_list_item.dart index 679c5cf4..fb74fcaa 100644 --- a/lib/presentation/destinations/weather/search/widgets/list/ui_city_list_item.dart +++ b/lib/presentation/destinations/weather/search/widgets/list/ui_city_list_item.dart @@ -9,10 +9,10 @@ class UICityListItem extends StatelessWidget { final StreamSink sink; const UICityListItem({ - Key? key, + super.key, required this.city, required this.sink, - }) : super(key: key); + }); @override Widget build(BuildContext context) { diff --git a/lib/presentation/destinations/weather/search/widgets/search_page_body/search_page_body.dart b/lib/presentation/destinations/weather/search/widgets/search_page_body/search_page_body.dart index 6e8d881b..0138fcf2 100644 --- a/lib/presentation/destinations/weather/search/widgets/search_page_body/search_page_body.dart +++ b/lib/presentation/destinations/weather/search/widgets/search_page_body/search_page_body.dart @@ -10,8 +10,8 @@ import 'package:hooks_riverpod/hooks_riverpod.dart'; class SearchPageBody extends HookConsumerWidget { const SearchPageBody({ - Key? key, - }) : super(key: key); + super.key, + }); @override Widget build(BuildContext context, WidgetRef ref) { diff --git a/lib/presentation/destinations/weather/search/widgets/search_page_body/search_page_body_content.dart b/lib/presentation/destinations/weather/search/widgets/search_page_body/search_page_body_content.dart index 6830a48b..f29769f3 100644 --- a/lib/presentation/destinations/weather/search/widgets/search_page_body/search_page_body_content.dart +++ b/lib/presentation/destinations/weather/search/widgets/search_page_body/search_page_body_content.dart @@ -6,11 +6,11 @@ class SearchPageBodyContent extends StatelessWidget { final Widget child; const SearchPageBodyContent({ - Key? key, + super.key, required this.textController, required this.searchHint, required this.child, - }) : super(key: key); + }); @override Widget build(BuildContext context) { diff --git a/lib/presentation/destinations/weather/search/widgets/search_page_loading_shimmer/search_page_loading_shimmer.dart b/lib/presentation/destinations/weather/search/widgets/search_page_loading_shimmer/search_page_loading_shimmer.dart index b58294e5..bc9d223a 100644 --- a/lib/presentation/destinations/weather/search/widgets/search_page_loading_shimmer/search_page_loading_shimmer.dart +++ b/lib/presentation/destinations/weather/search/widgets/search_page_loading_shimmer/search_page_loading_shimmer.dart @@ -3,7 +3,7 @@ import 'package:flutter_template/foundation/extensions/theme_ext.dart'; import 'package:shimmer/shimmer.dart'; class SearchPageLoadingShimmer extends StatelessWidget { - const SearchPageLoadingShimmer({Key? key}) : super(key: key); + const SearchPageLoadingShimmer({super.key}); @override Widget build(BuildContext context) { diff --git a/lib/presentation/destinations/weather/search/widgets/search_page_results/search_page_results.dart b/lib/presentation/destinations/weather/search/widgets/search_page_results/search_page_results.dart index 7438ee2a..3515c521 100644 --- a/lib/presentation/destinations/weather/search/widgets/search_page_results/search_page_results.dart +++ b/lib/presentation/destinations/weather/search/widgets/search_page_results/search_page_results.dart @@ -8,8 +8,8 @@ import 'package:tuple/tuple.dart'; class SearchPageResults extends ConsumerWidget { const SearchPageResults({ - Key? key, - }) : super(key: key); + super.key, + }); @override Widget build(BuildContext context, WidgetRef ref) { diff --git a/lib/presentation/destinations/weather/search/widgets/search_page_results/search_page_results_content.dart b/lib/presentation/destinations/weather/search/widgets/search_page_results/search_page_results_content.dart index 1522e4b9..e7aa8907 100644 --- a/lib/presentation/destinations/weather/search/widgets/search_page_results/search_page_results_content.dart +++ b/lib/presentation/destinations/weather/search/widgets/search_page_results/search_page_results_content.dart @@ -17,14 +17,14 @@ class SearchPageResultsContent extends StatelessWidget { final String noResultsPlaceholder; const SearchPageResultsContent({ - Key? key, + super.key, required this.showLoading, required this.searchList, required this.searchTerm, required this.intentHandlerCallback, required this.searchResultsPlaceholder, required this.noResultsPlaceholder, - }) : super(key: key); + }); @override Widget build(BuildContext context) { diff --git a/lib/presentation/entity/base/ui_result.dart b/lib/presentation/entity/base/ui_result.dart deleted file mode 100644 index 83a25fef..00000000 --- a/lib/presentation/entity/base/ui_result.dart +++ /dev/null @@ -1,10 +0,0 @@ -import 'package:freezed_annotation/freezed_annotation.dart'; - -part 'ui_result.freezed.dart'; - -@freezed -class UIResult with _$UIResult { - factory UIResult.success(T data) = _Success; - - factory UIResult.error(Exception? exception) = _Error; -} diff --git a/lib/presentation/template_app.dart b/lib/presentation/template_app.dart index f8586321..eddf03a8 100644 --- a/lib/presentation/template_app.dart +++ b/lib/presentation/template_app.dart @@ -9,7 +9,7 @@ import 'package:flutter_template/presentation/base/widgets/theme/theme_listener. import 'package:get_it/get_it.dart'; class TemplateApp extends StatelessWidget { - TemplateApp({Key? key}) : super(key: key); + TemplateApp({super.key}); final AppRouter _appRouter = GetIt.I.get(); diff --git a/lib/repository/weather/local_city_mapper.dart b/lib/repository/weather/local_city_mapper.dart index 9e09cc94..7e553f49 100644 --- a/lib/repository/weather/local_city_mapper.dart +++ b/lib/repository/weather/local_city_mapper.dart @@ -11,10 +11,11 @@ class LocalCityMapperImpl extends LocalCityMapper { LocalLocationCompanion map(City from) { logD("map: from = $from"); return LocalLocationCompanion( - country: Value(from.country), - lat: Value(from.lat), - lon: Value(from.lon), - name: Value(from.title), - state: Value.ofNullable(from.state)); + country: Value(from.country), + lat: Value(from.lat), + lon: Value(from.lon), + name: Value(from.title), + state: Value(from.state), + ); } } diff --git a/lib/services/base/database/app_database.dart b/lib/services/base/database/app_database.dart index 4834a151..f96f5478 100644 --- a/lib/services/base/database/app_database.dart +++ b/lib/services/base/database/app_database.dart @@ -11,7 +11,7 @@ part 'app_database.g.dart'; tables: [LocalLocation, LocalCurrentWeather], daos: [WeatherLocalServiceImpl]) class AppDatabase extends _$AppDatabase { - AppDatabase(QueryExecutor e) : super(e); + AppDatabase(super.e); @override int get schemaVersion => 1; diff --git a/lib/services/weather/local/weather_local_service_impl.dart b/lib/services/weather/local/weather_local_service_impl.dart index 478e0dd4..5e191729 100644 --- a/lib/services/weather/local/weather_local_service_impl.dart +++ b/lib/services/weather/local/weather_local_service_impl.dart @@ -14,8 +14,7 @@ part 'weather_local_service_impl.g.dart'; class WeatherLocalServiceImpl extends DatabaseAccessor with _$WeatherLocalServiceImplMixin implements WeatherLocalService { - WeatherLocalServiceImpl(AppDatabase attachedDatabase) - : super(attachedDatabase); + WeatherLocalServiceImpl(super.attachedDatabase); @override Future deleteFavoriteCity({required LocalLocationCompanion city}) { diff --git a/pubspec.lock b/pubspec.lock index 93401800..68b3a5be 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -5,34 +5,34 @@ packages: dependency: transitive description: name: _fe_analyzer_shared - sha256: ae92f5d747aee634b87f89d9946000c2de774be1d6ac3e58268224348cd0101a + sha256: "0b2f2bd91ba804e53a61d757b986f89f1f9eaed5b11e4b2f5a2468d86d6c9fc7" url: "https://pub.dev" source: hosted - version: "61.0.0" + version: "67.0.0" analyzer: dependency: transitive description: name: analyzer - sha256: ea3d8652bda62982addfd92fdc2d0214e5f82e43325104990d4f4c4a2a313562 + sha256: "37577842a27e4338429a1cbc32679d508836510b056f1eedf0c8d20e39c1383d" url: "https://pub.dev" source: hosted - version: "5.13.0" + version: "6.4.1" analyzer_plugin: dependency: transitive description: name: analyzer_plugin - sha256: c1d5f167683de03d5ab6c3b53fc9aeefc5d59476e7810ba7bbddff50c6f4392d + sha256: "9661b30b13a685efaee9f02e5d01ed9f2b423bd889d28a304d02d704aee69161" url: "https://pub.dev" source: hosted - version: "0.11.2" + version: "0.11.3" archive: dependency: transitive description: name: archive - sha256: "0c8368c9b3f0abbc193b9d6133649a614204b528982bebc7026372d61677ce3a" + sha256: "22600aa1e926be775fa5fe7e6894e7fb3df9efda8891c73f70fb3262399a432d" url: "https://pub.dev" source: hosted - version: "3.3.7" + version: "3.4.10" args: dependency: transitive description: @@ -53,18 +53,18 @@ packages: dependency: "direct main" description: name: auto_route - sha256: "46037eb6acfefcb3627f1baeef1ea0ce4eed2d01dba26e060d4a231dc4f3c29c" + sha256: f04022b2a5c4d255f7feb139a75cb3d100ccd2f8918a75036fe09456309a13a3 url: "https://pub.dev" source: hosted - version: "7.7.1" + version: "8.0.3" auto_route_generator: dependency: "direct dev" description: name: auto_route_generator - sha256: e9245cc56f04a4473c281346d194efa2c89a0f8e4f1c02a5b3b43e242c3e1c75 + sha256: ba28133d3a3bf0a66772bcc98dade5843753cd9f1a8fb4802b842895515b67d3 url: "https://pub.dev" source: hosted - version: "7.2.0" + version: "8.0.0" boolean_selector: dependency: transitive description: @@ -93,34 +93,34 @@ packages: dependency: transitive description: name: build_daemon - sha256: "5f02d73eb2ba16483e693f80bee4f088563a820e47d1027d4cdfe62b5bb43e65" + sha256: "0343061a33da9c5810b2d6cee51945127d8f4c060b7fbdd9d54917f0a3feaaa1" url: "https://pub.dev" source: hosted - version: "4.0.0" + version: "4.0.1" build_resolvers: dependency: transitive description: name: build_resolvers - sha256: "6c4dd11d05d056e76320b828a1db0fc01ccd376922526f8e9d6c796a5adbac20" + sha256: "339086358431fa15d7eca8b6a36e5d783728cf025e559b834f4609a1fcfb7b0a" url: "https://pub.dev" source: hosted - version: "2.2.1" + version: "2.4.2" build_runner: dependency: "direct dev" description: name: build_runner - sha256: "10c6bcdbf9d049a0b666702cf1cee4ddfdc38f02a19d35ae392863b47519848b" + sha256: "3ac61a79bfb6f6cc11f693591063a7f19a7af628dc52f141743edac5c16e8c22" url: "https://pub.dev" source: hosted - version: "2.4.6" + version: "2.4.9" build_runner_core: dependency: transitive description: name: build_runner_core - sha256: "6d6ee4276b1c5f34f21fdf39425202712d2be82019983d52f351c94aafbc2c41" + sha256: "4ae8ffe5ac758da294ecf1802f2aff01558d8b1b00616aa7538ea9a8a5d50799" url: "https://pub.dev" source: hosted - version: "7.2.10" + version: "7.3.0" built_collection: dependency: transitive description: @@ -133,34 +133,34 @@ packages: dependency: transitive description: name: built_value - sha256: "598a2a682e2a7a90f08ba39c0aaa9374c5112340f0a2e275f61b59389543d166" + sha256: c7913a9737ee4007efedaffc968c049fd0f3d0e49109e778edc10de9426005cb url: "https://pub.dev" source: hosted - version: "8.6.1" + version: "8.9.2" cached_network_image: dependency: "direct main" description: name: cached_network_image - sha256: fd3d0dc1d451f9a252b32d95d3f0c3c487bc41a75eba2e6097cb0b9c71491b15 + sha256: "28ea9690a8207179c319965c13cd8df184d5ee721ae2ce60f398ced1219cea1f" url: "https://pub.dev" source: hosted - version: "3.2.3" + version: "3.3.1" cached_network_image_platform_interface: dependency: transitive description: name: cached_network_image_platform_interface - sha256: bb2b8403b4ccdc60ef5f25c70dead1f3d32d24b9d6117cfc087f496b178594a7 + sha256: "9e90e78ae72caa874a323d78fa6301b3fb8fa7ea76a8f96dc5b5bf79f283bf2f" url: "https://pub.dev" source: hosted - version: "2.0.0" + version: "4.0.0" cached_network_image_web: dependency: transitive description: name: cached_network_image_web - sha256: b8eb814ebfcb4dea049680f8c1ffb2df399e4d03bf7a352c775e26fa06e02fa0 + sha256: "42a835caa27c220d1294311ac409a43361088625a4f23c820b006dd9bffb3316" url: "https://pub.dev" source: hosted - version: "1.0.2" + version: "1.1.1" characters: dependency: transitive description: @@ -189,10 +189,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: @@ -205,18 +205,18 @@ packages: dependency: transitive description: name: code_builder - sha256: "4ad01d6e56db961d29661561effde45e519939fdaeb46c351275b182eac70189" + sha256: f692079e25e7869c14132d39f223f8eec9830eb76131925143b2129c4bb01b37 url: "https://pub.dev" source: hosted - version: "4.5.0" + version: "4.10.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" convert: dependency: transitive description: @@ -225,14 +225,6 @@ packages: url: "https://pub.dev" source: hosted version: "3.1.1" - coverage: - dependency: transitive - description: - name: coverage - sha256: "2fb815080e44a09b85e0f2ca8a820b15053982b2e714b59267719e8a9ff17097" - url: "https://pub.dev" - source: hosted - version: "1.6.3" crypto: dependency: transitive description: @@ -245,58 +237,58 @@ packages: dependency: "direct main" description: name: cupertino_icons - sha256: e35129dc44c9118cee2a5603506d823bab99c68393879edb440e0090d07586be + sha256: d57953e10f9f8327ce64a508a355f0b1ec902193f66288e8cb5070e7c47eeb2d url: "https://pub.dev" source: hosted - version: "1.0.5" + version: "1.0.6" dart_style: dependency: transitive description: name: dart_style - sha256: "1efa911ca7086affd35f463ca2fc1799584fb6aa89883cf0af8e3664d6a02d55" + sha256: "99e066ce75c89d6b29903d788a7bb9369cf754f7b24bf70bf4b6d6d6b26853b9" url: "https://pub.dev" source: hosted - version: "2.3.2" + version: "2.3.6" dio: dependency: "direct main" description: name: dio - sha256: "3866d67f93523161b643187af65f5ac08bc991a5bcdaf41a2d587fe4ccb49993" + sha256: "0978e9a3e45305a80a7210dbeaf79d6ee8bee33f70c8e542dc654c952070217f" url: "https://pub.dev" source: hosted - version: "5.3.0" + version: "5.4.2+1" drift: dependency: "direct main" description: name: drift - sha256: "01e7237766b3404f08489ed0dc531a2fa5f5a42d7fa7787da6cc0a10e8d2632f" + sha256: "3b276c838ff7f8e19aac18a51f9b388715268f3534eaaf8047c8455ef3c1738d" url: "https://pub.dev" source: hosted - version: "2.10.0" + version: "2.16.0" drift_dev: dependency: "direct dev" description: name: drift_dev - sha256: "407eb1f149332238c567f06cc89b6aaee848de00d9031c76dc372dc16d993bca" + sha256: "66cf3e397448f855523d7b6b7b3789db232b211db96543a42285464d05f3bf72" url: "https://pub.dev" source: hosted - version: "2.10.0" + version: "2.16.0" dynamic_color: dependency: "direct main" description: name: dynamic_color - sha256: de4798a7069121aee12d5895315680258415de9b00e717723a1bd73d58f0126d + sha256: eae98052fa6e2826bdac3dd2e921c6ce2903be15c6b7f8b6d8a5d49b5086298d url: "https://pub.dev" source: hosted - version: "1.6.6" + version: "1.7.0" easy_localization: dependency: "direct main" description: name: easy_localization - sha256: "30ebf25448ffe169e0bd9bc4b5da94faa8398967a2ad2ca09f438be8b6953645" + sha256: c145aeb6584aedc7c862ab8c737c3277788f47488bfdf9bae0fe112bd0a4789c url: "https://pub.dev" source: hosted - version: "3.0.2" + version: "3.0.5" easy_logger: dependency: "direct main" description: @@ -305,6 +297,14 @@ packages: url: "https://pub.dev" source: hosted version: "0.0.2" + equatable: + dependency: "direct main" + description: + name: equatable + sha256: c2b87cb7756efdf69892005af546c56c0b5037f54d2a88269b4f347a505e3ca2 + url: "https://pub.dev" + source: hosted + version: "2.0.5" fake_async: dependency: transitive description: @@ -325,18 +325,18 @@ packages: dependency: transitive description: name: ffi - sha256: ed5337a5660c506388a9f012be0288fb38b49020ce2b45fe1f8b8323fe429f99 + sha256: "493f37e7df1804778ff3a53bd691d8692ddf69702cf4c1c1096a2e41b4779e21" url: "https://pub.dev" source: hosted - version: "2.0.2" + version: "2.1.2" file: dependency: transitive description: name: file - sha256: "1b92bec4fc2a72f59a8e15af5f52cd441e4a7860b49499d69dfa817af20e925d" + sha256: "5fc22d7c25582e38ad9a8515372cd9a93834027aacf1801cf01164dac0ffa08c" url: "https://pub.dev" source: hosted - version: "6.1.4" + version: "7.0.0" fixnum: dependency: transitive description: @@ -350,14 +350,6 @@ packages: description: flutter source: sdk version: "0.0.0" - flutter_blurhash: - dependency: transitive - description: - name: flutter_blurhash - sha256: "05001537bd3fac7644fa6558b09ec8c0a3f2eba78c0765f88912882b1331a5c6" - url: "https://pub.dev" - source: hosted - version: "0.7.0" flutter_cache_manager: dependency: transitive description: @@ -382,27 +374,22 @@ packages: url: "https://pub.dev" source: hosted version: "5.1.0" - flutter_driver: - dependency: transitive - description: flutter - source: sdk - version: "0.0.0" flutter_hooks: dependency: "direct main" description: name: flutter_hooks - sha256: "9eab8fd7aa752c3c1c0a364f9825851d410eb935243411682f4b1b0a4c569d71" + sha256: cde36b12f7188c85286fba9b38cc5a902e7279f36dd676967106c041dc9dde70 url: "https://pub.dev" source: hosted - version: "0.20.0" + version: "0.20.5" flutter_lints: dependency: "direct dev" description: name: flutter_lints - sha256: "2118df84ef0c3ca93f96123a616ae8540879991b8b57af2f81b76a7ada49b2a4" + sha256: "9e8c3858111da373efc5aa341de011d9bd23e2c5c5e0c62bccf32438e192d7b1" url: "https://pub.dev" source: hosted - version: "2.0.2" + version: "3.0.2" flutter_localizations: dependency: transitive description: flutter @@ -412,26 +399,26 @@ packages: dependency: "direct main" description: name: flutter_riverpod - sha256: b83ac5827baadefd331ea1d85110f34645827ea234ccabf53a655f41901a9bf4 + sha256: "0f1974eff5bbe774bf1d870e406fc6f29e3d6f1c46bd9c58e7172ff68a785d7d" url: "https://pub.dev" source: hosted - version: "2.3.6" + version: "2.5.1" flutter_staggered_grid_view: dependency: "direct main" description: name: flutter_staggered_grid_view - sha256: "1312314293acceb65b92754298754801b0e1f26a1845833b740b30415bbbcf07" + sha256: "19e7abb550c96fbfeb546b23f3ff356ee7c59a019a651f8f102a4ba9b7349395" url: "https://pub.dev" source: hosted - version: "0.6.2" + version: "0.7.0" flutter_state_notifier: dependency: "direct main" description: name: flutter_state_notifier - sha256: "4a1d282df8ab549d0c6aed0a2cdb486111c830778028f14048980c886bbb74fa" + sha256: bd8d4eabd4b74f11733409305369c112fa2f7989290f73ee75ae2cbfcf04b8a3 url: "https://pub.dev" source: hosted - version: "0.7.3" + version: "1.0.0" flutter_test: dependency: "direct dev" description: flutter @@ -446,10 +433,10 @@ packages: dependency: "direct dev" description: name: freezed - sha256: "2df89855fe181baae3b6d714dc3c4317acf4fccd495a6f36e5e00f24144c6c3b" + sha256: "91bce569d4805ea5bad6619a3e8690df8ad062a235165af4c0c5d928dda15eaf" url: "https://pub.dev" source: hosted - version: "2.4.1" + version: "2.5.1" freezed_annotation: dependency: "direct main" description: @@ -462,23 +449,18 @@ packages: dependency: transitive description: name: frontend_server_client - sha256: "408e3ca148b31c20282ad6f37ebfa6f4bdc8fede5b74bc2f08d9d92b55db3612" + sha256: f64a0333a82f30b0cca061bc3d143813a486dc086b574bfb233b7c1372427694 url: "https://pub.dev" source: hosted - version: "3.2.0" - fuchsia_remote_debug_protocol: - dependency: transitive - description: flutter - source: sdk - version: "0.0.0" + version: "4.0.0" get_it: dependency: "direct main" description: name: get_it - sha256: "529de303c739fca98cd7ece5fca500d8ff89649f1bb4b4e94fb20954abcd7468" + sha256: "36524bfb3f0b4ec952c3202466fdd69ad1f7ac1dd9b0a7564177707e45bfaeb9" url: "https://pub.dev" source: hosted - version: "7.6.0" + version: "7.6.8" glob: dependency: transitive description: @@ -499,18 +481,10 @@ packages: dependency: "direct main" description: name: google_fonts - sha256: e20ff62b158b96f392bfc8afe29dee1503c94fbea2cbe8186fd59b756b8ae982 + sha256: b1ac0fe2832c9cc95e5e88b57d627c5e68c223b9657f4b96e1487aa9098c7b82 url: "https://pub.dev" source: hosted - version: "5.1.0" - googleapis_auth: - dependency: transitive - description: - name: googleapis_auth - sha256: af7c3a3edf9d0de2e1e0a77e994fae0a581c525fa7012af4fa0d4a52ed9484da - url: "https://pub.dev" - source: hosted - version: "1.4.1" + version: "6.2.1" graphs: dependency: transitive description: @@ -519,38 +493,22 @@ packages: url: "https://pub.dev" source: hosted version: "2.3.1" - grpc: - dependency: transitive - description: - name: grpc - sha256: "220ffb2218288f4e7dea487242e08b9c6277596d9b6f3f10ba50be96771a032d" - url: "https://pub.dev" - source: hosted - version: "3.2.3" hooks_riverpod: dependency: "direct main" description: name: hooks_riverpod - sha256: "117edbe7e5cfc02e31a94f97e2acd4581f54bc37fcda9dce1f606f8ac851ba24" + sha256: "45b2030a18bcd6dbd680c2c91bc3b33e3fe7c323e3acb5ecec93a613e2fbaa8a" url: "https://pub.dev" source: hosted - version: "2.3.7" + version: "2.5.1" http: dependency: transitive description: name: http - sha256: "759d1a329847dd0f39226c688d3e06a6b8679668e350e2891a6474f8b4bb8525" - url: "https://pub.dev" - source: hosted - version: "1.1.0" - http2: - dependency: transitive - description: - name: http2 - sha256: "38db0c4aa9f1cd238a5d2e86aa0cc7cc91c77e0c6c94ba64bbe85e4ff732a952" + sha256: "761a297c042deedc1ffbb156d6e2af13886bb305c2a343a4d972504cd67dd938" url: "https://pub.dev" source: hosted - version: "2.2.0" + version: "1.2.1" http_multi_server: dependency: transitive description: @@ -567,11 +525,6 @@ packages: url: "https://pub.dev" source: hosted version: "4.0.2" - integration_test: - dependency: transitive - description: flutter - source: sdk - version: "0.0.0" intl: dependency: transitive description: @@ -592,10 +545,10 @@ packages: dependency: transitive description: name: js - sha256: f2c445dce49627136094980615a031419f7f3eb393237e4ecd97ac15dea343f3 + sha256: c1b2e9b5ea78c45e1a0788d29606ba27dc5f71f019f32ca5140f61ef071838cf url: "https://pub.dev" source: hosted - version: "0.6.7" + version: "0.7.1" json_annotation: dependency: "direct main" description: @@ -612,22 +565,46 @@ packages: url: "https://pub.dev" source: hosted version: "6.7.1" + leak_tracker: + dependency: transitive + description: + name: leak_tracker + sha256: "78eb209deea09858f5269f5a5b02be4049535f568c07b275096836f01ea323fa" + url: "https://pub.dev" + source: hosted + version: "10.0.0" + leak_tracker_flutter_testing: + dependency: transitive + description: + name: leak_tracker_flutter_testing + sha256: b46c5e37c19120a8a01918cfaf293547f47269f7cb4b0058f21531c2465d6ef0 + url: "https://pub.dev" + source: hosted + version: "2.0.1" + leak_tracker_testing: + dependency: transitive + description: + name: leak_tracker_testing + sha256: a597f72a664dbd293f3bfc51f9ba69816f84dcd403cdac7066cb3f6003f3ab47 + url: "https://pub.dev" + source: hosted + version: "2.0.1" lints: dependency: transitive description: name: lints - sha256: "0a217c6c989d21039f1498c3ed9f3ed71b354e69873f13a8dfc3c9fe76f1b452" + sha256: cbf8d4b858bb0134ef3ef87841abdf8d63bfc255c266b7bf6b39daa1085c4290 url: "https://pub.dev" source: hosted - version: "2.1.1" + version: "3.0.0" logger: dependency: "direct main" description: name: logger - sha256: "66cb048220ca51cf9011da69fa581e4ee2bed4be6e82870d9e9baae75739da49" + sha256: "8c94b8c219e7e50194efc8771cd0e9f10807d8d3e219af473d89b06cc2ee4e04" url: "https://pub.dev" source: hosted - version: "2.0.1" + version: "2.2.0" logging: dependency: transitive description: @@ -640,58 +617,58 @@ packages: dependency: "direct dev" description: name: mason - sha256: fdc9ea905e7c690fe39d2f9946b7aead86fd976f8edf97d2521a65d260bbf509 + sha256: f4ea713a0f4142e20abb3a5b1352c0475c04cb880a1e33e2028793d60c83fd5c url: "https://pub.dev" source: hosted - version: "0.1.0-dev.50" + version: "0.1.0-dev.52" mason_logger: dependency: transitive description: name: mason_logger - sha256: ba82162ab33d58324f040e37f9270bc1b7c00710315b385d1dc2f14917263cbb + sha256: "0e90e637dcfcb7fb6c30b38e71cd41fa0e4e3df6f1da177f8251ac3f15147e9f" url: "https://pub.dev" source: hosted - version: "0.2.7" + version: "0.2.12" matcher: dependency: transitive description: name: matcher - sha256: "1803e76e6653768d64ed8ff2e1e67bea3ad4b923eb5c56a295c3e634bad5960e" + sha256: d2323aa2060500f906aa31a895b4030b6da3ebdcc5619d14ce1aada65cd161cb url: "https://pub.dev" source: hosted - version: "0.12.16" + version: "0.12.16+1" material_color_utilities: dependency: transitive description: name: material_color_utilities - sha256: "9528f2f296073ff54cb9fee677df673ace1218163c3bc7628093e7eed5203d41" + sha256: "0e0a020085b65b6083975e499759762399b4475f766c21668c4ecca34ea74e5a" url: "https://pub.dev" source: hosted - version: "0.5.0" + version: "0.8.0" meta: dependency: "direct dev" description: name: meta - sha256: "3c74dbf8763d36539f114c799d8a2d87343b5067e9d796ca22b5eb8437090ee3" + sha256: d584fa6707a52763a52446f02cc621b077888fb63b93bbcb1143a7be5a0c0c04 url: "https://pub.dev" source: hosted - version: "1.9.1" + version: "1.11.0" mime: dependency: transitive description: name: mime - sha256: e4ff8e8564c03f255408decd16e7899da1733852a9110a58fe6d1b817684a63e + sha256: "2e123074287cc9fd6c09de8336dae606d1ddb88d9ac47358826db698c176a1f2" url: "https://pub.dev" source: hosted - version: "1.0.4" + version: "1.0.5" mocktail: dependency: "direct dev" description: name: mocktail - sha256: "80a996cd9a69284b3dc521ce185ffe9150cde69767c2d3a0720147d93c0cef53" + sha256: c4b5007d91ca4f67256e720cb1b6d704e79a510183a12fa551021f652577dce6 url: "https://pub.dev" source: hosted - version: "0.3.0" + version: "1.0.3" mustache_template: dependency: transitive description: @@ -708,22 +685,14 @@ packages: url: "https://pub.dev" source: hosted version: "1.0.0" - node_preamble: - dependency: transitive - description: - name: node_preamble - sha256: "6e7eac89047ab8a8d26cf16127b5ed26de65209847630400f9aefd7cd5c730db" - url: "https://pub.dev" - source: hosted - version: "2.0.2" octo_image: dependency: transitive description: name: octo_image - sha256: "107f3ed1330006a3bea63615e81cf637433f5135a52466c7caa0e7152bca9143" + sha256: "45b40f99622f11901238e18d48f5f12ea36426d8eced9f4cbf58479c7aa2430d" url: "https://pub.dev" source: hosted - version: "1.0.2" + version: "2.0.0" package_config: dependency: transitive description: @@ -736,106 +705,106 @@ packages: dependency: "direct main" description: name: path - sha256: "8829d8a55c13fc0e37127c29fedf290c102f4e40ae94ada574091fe0ff96c917" + sha256: "087ce49c3f0dc39180befefc60fdb4acd8f8620e5682fe2476afd0b3688bb4af" url: "https://pub.dev" source: hosted - version: "1.8.3" + version: "1.9.0" path_provider: dependency: "direct main" description: name: path_provider - sha256: "3087813781ab814e4157b172f1a11c46be20179fcc9bea043e0fba36bc0acaa2" + sha256: b27217933eeeba8ff24845c34003b003b2b22151de3c908d0e679e8fe1aa078b url: "https://pub.dev" source: hosted - version: "2.0.15" + version: "2.1.2" path_provider_android: dependency: transitive description: name: path_provider_android - sha256: "2cec049d282c7f13c594b4a73976b0b4f2d7a1838a6dd5aaf7bd9719196bee86" + sha256: "477184d672607c0a3bf68fbbf601805f92ef79c82b64b4d6eb318cbca4c48668" url: "https://pub.dev" source: hosted - version: "2.0.27" + version: "2.2.2" path_provider_foundation: dependency: transitive description: name: path_provider_foundation - sha256: "916731ccbdce44d545414dd9961f26ba5fbaa74bcbb55237d8e65a623a8c7297" + sha256: "5a7999be66e000916500be4f15a3633ebceb8302719b47b9cc49ce924125350f" url: "https://pub.dev" source: hosted - version: "2.2.4" + version: "2.3.2" path_provider_linux: dependency: transitive description: name: path_provider_linux - sha256: ffbb8cc9ed2c9ec0e4b7a541e56fd79b138e8f47d2fb86815f15358a349b3b57 + sha256: f7a1fe3a634fe7734c8d3f2766ad746ae2a2884abe22e241a8b301bf5cac3279 url: "https://pub.dev" source: hosted - version: "2.1.11" + version: "2.2.1" path_provider_platform_interface: dependency: transitive description: name: path_provider_platform_interface - sha256: "57585299a729335f1298b43245842678cb9f43a6310351b18fb577d6e33165ec" + sha256: "88f5779f72ba699763fa3a3b06aa4bf6de76c8e5de842cf6f29e2e06476c2334" url: "https://pub.dev" source: hosted - version: "2.0.6" + version: "2.1.2" path_provider_windows: dependency: transitive description: name: path_provider_windows - sha256: "1cb68ba4cd3a795033de62ba1b7b4564dace301f952de6bfb3cd91b202b6ee96" + sha256: "8bc9f22eee8690981c22aa7fc602f5c85b497a6fb2ceb35ee5a5e5ed85ad8170" url: "https://pub.dev" source: hosted - version: "2.1.7" + version: "2.2.1" patrol: dependency: "direct dev" description: name: patrol - sha256: f00be47d5b1c9554eeb21a4bbc22e086eca99a91af48e5bac266ca83c86c4857 + sha256: fefd5687993c4a8345666a8666f8d4c2135a8808a8767084156b4667c8634f15 url: "https://pub.dev" source: hosted - version: "2.2.3" + version: "3.6.1" patrol_finders: dependency: transitive description: name: patrol_finders - sha256: "9de6b2c873843db6811c3def4a2d9f023968b1428a9fdc9127d5f089015df569" + sha256: ac33527cc1b63e3aa131dbd7107cfda8ee2df0fb4a4a423c067174a2e60db77b url: "https://pub.dev" source: hosted - version: "1.0.0" + version: "2.0.2" petitparser: dependency: transitive description: name: petitparser - sha256: cb3798bef7fc021ac45b308f4b51208a152792445cce0448c9a4ba5879dd8750 + sha256: c15605cd28af66339f8eb6fbe0e541bfe2d1b72d5825efc6598f3e0a31b9ad27 url: "https://pub.dev" source: hosted - version: "5.4.0" + version: "6.0.2" platform: dependency: transitive description: name: platform - sha256: "4a451831508d7d6ca779f7ac6e212b4023dd5a7d08a27a63da33756410e32b76" + sha256: "12220bb4b65720483f8fa9450b4332347737cf8213dd2840d8b2c823e47243ec" url: "https://pub.dev" source: hosted - version: "3.1.0" + version: "3.1.4" plugin_platform_interface: dependency: transitive description: name: plugin_platform_interface - sha256: "43798d895c929056255600343db8f049921cbec94d31ec87f1dc5c16c01935dd" + sha256: "4820fbfdb9478b1ebae27888254d445073732dae3d6ea81f0b7e06d5dedc3f02" url: "https://pub.dev" source: hosted - version: "2.1.5" + version: "2.1.8" pointycastle: dependency: transitive description: name: pointycastle - sha256: "7c1e5f0d23c9016c5bbd8b1473d0d3fb3fc851b876046039509e18e0c7485f2c" + sha256: "70fe966348fe08c34bf929582f1d8247d9d9408130723206472b4687227e4333" url: "https://pub.dev" source: hosted - version: "3.7.3" + version: "3.8.0" pool: dependency: transitive description: @@ -844,30 +813,14 @@ packages: url: "https://pub.dev" source: hosted version: "1.5.1" - process: - dependency: transitive - description: - name: process - sha256: "53fd8db9cec1d37b0574e12f07520d582019cb6c44abf5479a01505099a34a09" - url: "https://pub.dev" - source: hosted - version: "4.2.4" - protobuf: - dependency: transitive - description: - name: protobuf - sha256: "01dd9bd0fa02548bf2ceee13545d4a0ec6046459d847b6b061d8a27237108a08" - url: "https://pub.dev" - source: hosted - version: "2.1.0" provider: dependency: transitive description: name: provider - sha256: cdbe7530b12ecd9eb455bdaa2fcb8d4dad22e80b8afb4798b41479d5ce26847f + sha256: c8a055ee5ce3fd98d6fc872478b03823ffdb448699c6ebdbbc71d59b596fd48c url: "https://pub.dev" source: hosted - version: "6.0.5" + version: "6.1.2" pub_semver: dependency: transitive description: @@ -896,10 +849,10 @@ packages: dependency: transitive description: name: riverpod - sha256: "80e48bebc83010d5e67a11c9514af6b44bbac1ec77b4333c8ea65dbc79e2d8ef" + sha256: f21b32ffd26a36555e501b04f4a5dca43ed59e16343f1a30c13632b2351dfa4d url: "https://pub.dev" source: hosted - version: "2.3.6" + version: "2.5.1" rxdart: dependency: "direct main" description: @@ -912,58 +865,58 @@ packages: dependency: "direct main" description: name: shared_preferences - sha256: "0344316c947ffeb3a529eac929e1978fcd37c26be4e8468628bac399365a3ca1" + sha256: "81429e4481e1ccfb51ede496e916348668fd0921627779233bd24cc3ff6abd02" url: "https://pub.dev" source: hosted - version: "2.2.0" + version: "2.2.2" shared_preferences_android: dependency: transitive description: name: shared_preferences_android - sha256: fe8401ec5b6dcd739a0fe9588802069e608c3fdbfd3c3c93e546cf2f90438076 + sha256: "8568a389334b6e83415b6aae55378e158fbc2314e074983362d20c562780fb06" url: "https://pub.dev" source: hosted - version: "2.2.0" + version: "2.2.1" shared_preferences_foundation: dependency: transitive description: name: shared_preferences_foundation - sha256: f39696b83e844923b642ce9dd4bd31736c17e697f6731a5adf445b1274cf3cd4 + sha256: "7708d83064f38060c7b39db12aefe449cb8cdc031d6062280087bc4cdb988f5c" url: "https://pub.dev" source: hosted - version: "2.3.2" + version: "2.3.5" shared_preferences_linux: dependency: transitive description: name: shared_preferences_linux - sha256: "71d6806d1449b0a9d4e85e0c7a917771e672a3d5dc61149cc9fac871115018e1" + sha256: "9f2cbcf46d4270ea8be39fa156d86379077c8a5228d9dfdb1164ae0bb93f1faa" url: "https://pub.dev" source: hosted - version: "2.3.0" + version: "2.3.2" shared_preferences_platform_interface: dependency: transitive description: name: shared_preferences_platform_interface - sha256: "23b052f17a25b90ff2b61aad4cc962154da76fb62848a9ce088efe30d7c50ab1" + sha256: "22e2ecac9419b4246d7c22bfbbda589e3acf5c0351137d87dd2939d984d37c3b" url: "https://pub.dev" source: hosted - version: "2.3.0" + version: "2.3.2" shared_preferences_web: dependency: transitive description: name: shared_preferences_web - sha256: "7347b194fb0bbeb4058e6a4e87ee70350b6b2b90f8ac5f8bd5b3a01548f6d33a" + sha256: "9aee1089b36bd2aafe06582b7d7817fd317ef05fc30e6ba14bff247d0933042a" url: "https://pub.dev" source: hosted - version: "2.2.0" + version: "2.3.0" shared_preferences_windows: dependency: transitive description: name: shared_preferences_windows - sha256: f95e6a43162bce43c9c3405f3eb6f39e5b5d11f65fab19196cf8225e2777624d + sha256: "841ad54f3c8381c480d0c9b508b89a34036f512482c407e6df7a9c4aa2ef8f59" url: "https://pub.dev" source: hosted - version: "2.3.0" + version: "2.3.2" shelf: dependency: transitive description: @@ -972,22 +925,6 @@ packages: url: "https://pub.dev" source: hosted version: "1.4.1" - shelf_packages_handler: - dependency: transitive - description: - name: shelf_packages_handler - sha256: "89f967eca29607c933ba9571d838be31d67f53f6e4ee15147d5dc2934fee1b1e" - url: "https://pub.dev" - source: hosted - version: "3.0.2" - shelf_static: - dependency: transitive - description: - name: shelf_static - sha256: a41d3f53c4adf0f57480578c1d61d90342cd617de7fc8077b1304643c2d85c1e - url: "https://pub.dev" - source: hosted - version: "1.1.2" shelf_web_socket: dependency: transitive description: @@ -1013,10 +950,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_helper: dependency: transitive description: @@ -1025,22 +962,6 @@ packages: url: "https://pub.dev" source: hosted version: "1.3.4" - source_map_stack_trace: - dependency: transitive - description: - name: source_map_stack_trace - sha256: "84cf769ad83aa6bb61e0aa5a18e53aea683395f196a6f39c4c881fb90ed4f7ae" - url: "https://pub.dev" - source: hosted - version: "2.1.1" - source_maps: - dependency: transitive - description: - name: source_maps - sha256: "708b3f6b97248e5781f493b765c3337db11c5d2c81c3094f10904bfa8004c703" - url: "https://pub.dev" - source: hosted - version: "0.10.12" source_span: dependency: transitive description: @@ -1049,70 +970,78 @@ packages: url: "https://pub.dev" source: hosted version: "1.10.0" + sprintf: + dependency: transitive + description: + name: sprintf + sha256: "1fc9ffe69d4df602376b52949af107d8f5703b77cda567c4d7d86a0693120f23" + url: "https://pub.dev" + source: hosted + version: "7.0.0" sqflite: dependency: transitive description: name: sqflite - sha256: "591f1602816e9c31377d5f008c2d9ef7b8aca8941c3f89cc5fd9d84da0c38a9a" + sha256: "5ce2e1a15e822c3b4bfb5400455775e421da7098eed8adc8f26298ada7c9308c" url: "https://pub.dev" source: hosted - version: "2.3.0" + version: "2.3.3" sqflite_common: dependency: transitive description: name: sqflite_common - sha256: "1b92f368f44b0dee2425bb861cfa17b6f6cf3961f762ff6f941d20b33355660a" + sha256: "3da423ce7baf868be70e2c0976c28a1bb2f73644268b7ffa7d2e08eab71f16a4" url: "https://pub.dev" source: hosted - version: "2.5.0" + version: "2.5.4" sqlite3: dependency: transitive description: name: sqlite3 - sha256: db65233e6b99e99b2548932f55a987961bc06d82a31a0665451fa0b4fff4c3fb + sha256: "1abbeb84bf2b1a10e5e1138c913123c8aa9d83cd64e5f9a0dd847b3c83063202" url: "https://pub.dev" source: hosted - version: "2.1.0" + version: "2.4.2" sqlite3_flutter_libs: dependency: "direct main" description: name: sqlite3_flutter_libs - sha256: "1e20a88d5c7ae8400e009f38ddbe8b001800a6dffa37832481a86a219bc904c7" + sha256: d6c31c8511c441d1f12f20b607343df1afe4eddf24a1cf85021677c8eea26060 url: "https://pub.dev" source: hosted - version: "0.5.15" + version: "0.5.20" sqlparser: dependency: transitive description: name: sqlparser - sha256: "9611f46d30a4e8286e54d17a1b5182d132512dc6fc3da90c45ad8ec2828a58b1" + sha256: "7b20045d1ccfb7bc1df7e8f9fee5ae58673fce6ff62cefbb0e0fd7214e90e5a0" url: "https://pub.dev" source: hosted - version: "0.30.3" + version: "0.34.1" 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" state_notifier: dependency: transitive description: name: state_notifier - sha256: "8fe42610f179b843b12371e40db58c9444f8757f8b69d181c97e50787caed289" + sha256: b8677376aa54f2d7c58280d5a007f9e8774f1968d1fb1c096adcb4792fba29bb url: "https://pub.dev" source: hosted - version: "0.7.2+1" + version: "1.0.0" 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: @@ -1129,22 +1058,14 @@ packages: url: "https://pub.dev" source: hosted version: "1.2.0" - sync_http: - dependency: transitive - description: - name: sync_http - sha256: "7f0cd72eca000d2e026bcd6f990b81d0ca06022ef4e32fb257b30d3d1014a961" - url: "https://pub.dev" - source: hosted - version: "0.3.1" synchronized: 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: @@ -1153,30 +1074,14 @@ packages: url: "https://pub.dev" source: hosted version: "1.2.1" - test: - dependency: transitive - description: - name: test - sha256: "13b41f318e2a5751c3169137103b60c584297353d4b1761b66029bae6411fe46" - url: "https://pub.dev" - source: hosted - version: "1.24.3" test_api: dependency: transitive description: name: test_api - sha256: "75760ffd7786fffdfb9597c35c5b27eaeec82be8edfb6d71d32651128ed7aab8" + sha256: "5c2f730018264d276c20e4f1503fd1308dfbbae39ec8ee63c5236311ac06954b" url: "https://pub.dev" source: hosted - version: "0.6.0" - test_core: - dependency: transitive - description: - name: test_core - sha256: "99806e9e6d95c7b059b7a0fc08f07fc53fabe54a829497f0d9676299f1e8637e" - url: "https://pub.dev" - source: hosted - version: "0.5.3" + version: "0.6.1" timing: dependency: transitive description: @@ -1205,10 +1110,10 @@ packages: dependency: "direct main" description: name: uuid - sha256: "648e103079f7c64a36dc7d39369cabb358d377078a051d6ae2ad3aa539519313" + sha256: cd210a09f7c18cbe5a02511718e0334de6559871052c90a90c0cca46a4aa81c8 url: "https://pub.dev" source: hosted - version: "3.0.7" + version: "4.3.3" vector_math: dependency: transitive description: @@ -1221,10 +1126,10 @@ packages: dependency: transitive description: name: vm_service - sha256: c620a6f783fa22436da68e42db7ebbf18b8c44b9a46ab911f666ff09ffd9153f + sha256: b3d56ff4341b8f182b96aceb2fa20e3dcb336b9f867bc0eafc0de10f1048e957 url: "https://pub.dev" source: hosted - version: "11.7.1" + version: "13.0.0" watcher: dependency: transitive description: @@ -1237,58 +1142,42 @@ packages: dependency: transitive description: name: web - sha256: dc8ccd225a2005c1be616fe02951e2e342092edf968cf0844220383757ef8f10 + sha256: "97da13628db363c635202ad97068d47c5b8aa555808e7a9411963c533b449b27" url: "https://pub.dev" source: hosted - version: "0.1.4-beta" + version: "0.5.1" web_socket_channel: dependency: transitive description: name: web_socket_channel - sha256: d88238e5eac9a42bb43ca4e721edba3c08c6354d4a53063afaa568516217621b + sha256: "1d8e795e2a8b3730c41b8a98a2dff2e0fb57ae6f0764a1c46ec5915387d257b2" url: "https://pub.dev" source: hosted - version: "2.4.0" - webdriver: - dependency: transitive - description: - name: webdriver - sha256: "3c923e918918feeb90c4c9fdf1fe39220fa4c0e8e2c0fffaded174498ef86c49" - url: "https://pub.dev" - source: hosted - version: "3.0.2" - webkit_inspection_protocol: - dependency: transitive - description: - name: webkit_inspection_protocol - sha256: "67d3a8b6c79e1987d19d848b0892e582dbb0c66c57cc1fef58a177dd2aa2823d" - url: "https://pub.dev" - source: hosted - version: "1.2.0" + version: "2.4.4" win32: dependency: transitive description: name: win32 - sha256: f2add6fa510d3ae152903412227bda57d0d5a8da61d2c39c1fb022c9429a41c0 + sha256: "0a989dc7ca2bb51eac91e8fd00851297cfffd641aa7538b165c62637ca0eaa4a" url: "https://pub.dev" source: hosted - version: "5.0.6" + version: "5.4.0" xdg_directories: dependency: transitive description: name: xdg_directories - sha256: e0b1147eec179d3911f1f19b59206448f78195ca1d20514134e10641b7d7fbff + sha256: faea9dee56b520b55a566385b84f2e8de55e7496104adada9962e0bd11bcff1d url: "https://pub.dev" source: hosted - version: "1.0.1" + version: "1.0.4" xml: 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: @@ -1298,5 +1187,5 @@ packages: source: hosted version: "3.1.2" sdks: - dart: ">=3.1.0-185.0.dev <4.0.0" - flutter: ">=3.4.0-17.0.pre" + dart: ">=3.3.0 <4.0.0" + flutter: ">=3.19.2" diff --git a/pubspec.yaml b/pubspec.yaml index f6bd59e7..0e0d4da2 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -34,6 +34,7 @@ scripts: exclude-goldens: flutter test --exclude-tags=golden goldens: flutter test --tags=golden test/presentation/goldens update-goldens: flutter test --tags=golden test/presentation/goldens --update-goldens + e2e: patrol test --flavor=qa --dart-define=flavor=qa analyze: flutter analyze --fatal-infos --fatal-warnings format: dart format --set-exit-if-changed lib fix: dart fix --apply @@ -60,7 +61,7 @@ scripts: dependencies: - auto_route: ^7.7.1 + auto_route: ^8.0.3 collection: ^1.17.1 cupertino_icons: ^1.0.5 dio: ^5.0.3 @@ -71,8 +72,8 @@ dependencies: flutter_displaymode: ^0.6.0 flutter_hooks: ^0.20.0 flutter_riverpod: ^2.3.2 - flutter_staggered_grid_view: ^0.6.2 - flutter_state_notifier: ^0.7.3 + flutter_staggered_grid_view: ^0.7.0 + flutter_state_notifier: ^1.0.0 freezed_annotation: ^2.2.0 get_it: ^7.2.0 hooks_riverpod: ^2.3.2 @@ -83,30 +84,31 @@ dependencies: rxdart: ^0.27.7 shared_preferences: ^2.0.18 shimmer: ^3.0.0 - sqlite3_flutter_libs: ^0.5.13 + sqlite3_flutter_libs: ^0.5.20 tuple: ^2.0.1 - uuid: ^3.0.7 - google_fonts: ^5.1.0 + uuid: ^4.3.3 + google_fonts: ^6.2.1 easy_logger: ^0.0.2 path_provider: ^2.0.13 dynamic_color: ^1.6.6 faker: ^2.1.0 cached_network_image: ^3.2.3 flutter_dotenv: ^5.0.2 + equatable: ^2.0.5 dev_dependencies: - auto_route_generator: ^7.2.0 + auto_route_generator: ^8.0.0 build_runner: ^2.3.3 drift_dev: ^2.5.2 - flutter_lints: ^2.0.1 + flutter_lints: ^3.0.1 flutter_test: sdk: flutter freezed: ^2.3.2 golden_toolkit: ^0.15.0 - meta: ^1.8.0 - mocktail: ^0.3.0 + meta: ^1.11.0 + mocktail: ^1.0.3 mason: ^0.1.0-dev.47 - patrol: ^2.2.3 + patrol: ^3.6.1 flutter: uses-material-design: true diff --git a/test/domain/weather/set_city_favorite_use_case_impl_test.dart b/test/domain/weather/set_city_favorite_use_case_impl_test.dart index 583f585b..3b4fd67b 100644 --- a/test/domain/weather/set_city_favorite_use_case_impl_test.dart +++ b/test/domain/weather/set_city_favorite_use_case_impl_test.dart @@ -1,4 +1,4 @@ -import 'package:flutter_template/domain/entity/base/result/result.dart'; +import 'package:flutter_template/core/entity/result.dart'; import 'package:flutter_template/domain/weather/set_city_favorite_use_case_impl.dart'; import 'package:flutter_template/repository/weather/weather_repository.dart'; import 'package:flutter_test/flutter_test.dart'; diff --git a/test/mocks/viewmodels/fake_search_view_model.dart b/test/mocks/viewmodels/fake_search_view_model.dart index d402adae..007ff1cf 100644 --- a/test/mocks/viewmodels/fake_search_view_model.dart +++ b/test/mocks/viewmodels/fake_search_view_model.dart @@ -1,9 +1,8 @@ -import 'package:flutter_template/presentation/destinations/weather/search/search_screen_state.dart'; import 'package:flutter_template/presentation/destinations/weather/search/search_view_model.dart'; import 'package:mocktail/mocktail.dart'; class FakeSearchViewModel extends SearchViewModel with Mock { - FakeSearchViewModel(SearchScreenState state) : super(state); + FakeSearchViewModel(super.state); String _searchTerm = ""; diff --git a/test/presentation/goldens/destinations/weather/search/goldens/search_page_loading.iphone11.png b/test/presentation/goldens/destinations/weather/search/goldens/search_page_loading.iphone11.png index d6541054..07f36c28 100644 Binary files a/test/presentation/goldens/destinations/weather/search/goldens/search_page_loading.iphone11.png and b/test/presentation/goldens/destinations/weather/search/goldens/search_page_loading.iphone11.png differ diff --git a/test/presentation/goldens/destinations/weather/search/goldens/search_page_loading.smallPhone.png b/test/presentation/goldens/destinations/weather/search/goldens/search_page_loading.smallPhone.png index 3751cc02..752106b1 100644 Binary files a/test/presentation/goldens/destinations/weather/search/goldens/search_page_loading.smallPhone.png and b/test/presentation/goldens/destinations/weather/search/goldens/search_page_loading.smallPhone.png differ diff --git a/test/presentation/unit/destinations/weather/search/search_view_model_test.dart b/test/presentation/unit/destinations/weather/search/search_view_model_test.dart index e3e3e21b..7628034c 100644 --- a/test/presentation/unit/destinations/weather/search/search_view_model_test.dart +++ b/test/presentation/unit/destinations/weather/search/search_view_model_test.dart @@ -1,5 +1,6 @@ import 'dart:async'; +import 'package:flutter_template/core/entity/result.dart'; import 'package:flutter_template/interactor/weather/favorite/favorite_weather_interactor.dart'; import 'package:flutter_template/interactor/weather/search/search_city_interactor.dart'; import 'package:flutter_template/navigation/weather/search/search_navigator.dart'; @@ -7,7 +8,6 @@ import 'package:flutter_template/presentation/destinations/weather/search/search import 'package:flutter_template/presentation/destinations/weather/search/search_screen_state.dart'; import 'package:flutter_template/presentation/destinations/weather/search/search_view_model.dart'; import 'package:flutter_template/presentation/destinations/weather/search/search_view_model_impl.dart'; -import 'package:flutter_template/presentation/entity/base/ui_result.dart'; import 'package:flutter_template/presentation/entity/base/ui_toolbar.dart'; import 'package:flutter_template/presentation/intl/translations/translation_keys.dart'; import 'package:flutter_test/flutter_test.dart'; @@ -64,7 +64,7 @@ void main() { createViewModel(); // When - final initialState = viewModel.debugState; + final initialState = viewModel.state; // Then expect(initialState, getInitialState()); @@ -165,7 +165,7 @@ void main() { when(() => searchCityInteractor.searchResultsStream) .thenReturnEmptyListStream(); when(() => favoriteWeatherInteractor.setCityFavorite(city)) - .thenAnswer((_) async => UIResult.success(null)); + .thenAnswer((_) async => const Success(data: null)); createViewModel(); // When @@ -184,7 +184,7 @@ void main() { when(() => searchCityInteractor.searchResultsStream) .thenReturnEmptyListStream(); when(() => favoriteWeatherInteractor.removeCityFavorite(city)) - .thenAnswer((_) async => UIResult.success(null)); + .thenAnswer((_) async => const Success(data: null)); createViewModel(); // When