diff --git a/.github/actions/setup-fvm/action.yml b/.github/actions/setup-fvm/action.yml deleted file mode 100644 index 3a8312dfd..000000000 --- a/.github/actions/setup-fvm/action.yml +++ /dev/null @@ -1,45 +0,0 @@ -name: Setup Flutter FVM Environment -description: "Setup FVM, Flutter for building Flutter apps." - -inputs: - fvm_config: - description: "Path to fvm config file." - required: false - working_dir: - description: "The directory to run these steps in" - required: false - -runs: - using: composite - steps: - - uses: kuhnroyal/flutter-fvm-config-action@v2 - id: fvm-config-action - with: - path: ${{ inputs.fvm_config }} - - - uses: subosito/flutter-action@v2 - with: - cache: true - flutter-version: ${{ steps.fvm-config-action.outputs.FLUTTER_VERSION }} - channel: ${{ steps.fvm-config-action.outputs.FLUTTER_CHANNEL }} - - - name: install fvm (linux) - if: runner.os == 'Linux' - shell: bash - working-directory: ${{inputs.working_dir}} - run: | - eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)" - brew tap leoafarias/fvm - brew install fvm - echo "/home/linuxbrew/.linuxbrew/bin" >> $GITHUB_PATH - fvm install - - - name: install fvm (macos) - if: runner.os == 'macOS' - shell: bash - working-directory: ${{inputs.working_dir}} - run: | - brew tap leoafarias/fvm - brew install fvm - echo "/opt/homebrew/bin" >> $GITHUB_PATH - fvm install diff --git a/.github/workflows/android-fastlane.yml b/.github/workflows/android-fastlane.yml index 792b27929..7198ea4bb 100644 --- a/.github/workflows/android-fastlane.yml +++ b/.github/workflows/android-fastlane.yml @@ -81,10 +81,13 @@ jobs: - name: List used Xcode version run: /usr/bin/xcodebuild -version - - uses: ./.github/actions/setup-fvm + - uses: subosito/flutter-action@v2 with: - fvm_config: ./mobile/.fvmrc - working_dir: ./mobile + flutter-version: ${{ env.FLUTTER_VERSION }} + channel: "stable" + cache: true + cache-key: flutter-${{ env.FLUTTER_VERSION }} + cache-path: ${{ runner.tool_cache }}/flutter - name: Install just run: cargo install just --force diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 14b139449..4a69d4606 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -7,6 +7,7 @@ on: env: CARGO_INCREMENTAL: 0 CARGO_TERM_COLOR: always + FLUTTER_VERSION: "3.22.1" jobs: formatting-dprint: @@ -26,10 +27,13 @@ jobs: - name: Setup rust toolchain run: rustup show - uses: Swatinem/rust-cache@v2.2.0 - - uses: ./.github/actions/setup-fvm + - uses: subosito/flutter-action@v2 with: - fvm_config: ./mobile/.fvmrc - working_dir: ./mobile + flutter-version: ${{ env.FLUTTER_VERSION }} + channel: "stable" + cache: true + cache-key: flutter-${{ env.FLUTTER_VERSION }} + cache-path: ${{ runner.tool_cache }}/flutter - name: Install FFI bindings run: just deps-gen - name: Generate FFI bindings @@ -90,15 +94,13 @@ jobs: steps: - uses: actions/checkout@v3 - uses: extractions/setup-just@v1 - - uses: ./.github/actions/setup-fvm + - uses: subosito/flutter-action@v2 with: - fvm_config: ./mobile/.fvmrc - working_dir: ./mobile - - - uses: ./.github/actions/setup-fvm - with: - fvm_config: ./webapp/frontend/.fvmrc - working_dir: ./webapp/frontend + flutter-version: ${{ env.FLUTTER_VERSION }} + channel: "stable" + cache: true + cache-key: flutter-${{ env.FLUTTER_VERSION }} + cache-path: ${{ runner.tool_cache }}/flutter - name: Download Dart mocks directory uses: actions/download-artifact@v2 with: @@ -125,10 +127,13 @@ jobs: - name: Setup rust toolchain run: rustup show - uses: Swatinem/rust-cache@v2.2.0 - - uses: ./.github/actions/setup-fvm + - uses: subosito/flutter-action@v2 with: - fvm_config: ./mobile/.fvmrc - working_dir: ./mobile + flutter-version: ${{ env.FLUTTER_VERSION }} + channel: "stable" + cache: true + cache-key: flutter-${{ env.FLUTTER_VERSION }} + cache-path: ${{ runner.tool_cache }}/flutter - name: Download Rust generated FFI flutter bindings uses: actions/download-artifact@v2 with: diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index ea86f0a4f..af700455f 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -10,6 +10,7 @@ on: env: REGISTRY: ghcr.io + FLUTTER_VERSION: "3.22.1" jobs: docker: @@ -62,10 +63,14 @@ jobs: - uses: extractions/setup-just@v1 if: matrix.bin == 'webapp' - - uses: ./.github/actions/setup-fvm + - uses: subosito/flutter-action@v2 + if: matrix.bin == 'webapp' with: - fvm_config: ./webapp/frontend/.fvmrc - working_dir: ./webapp/frontend + flutter-version: ${{ env.FLUTTER_VERSION }} + channel: "stable" + cache: true + cache-key: flutter-${{ env.FLUTTER_VERSION }} + cache-path: ${{ runner.tool_cache }}/flutter - name: build flutter for webapp if: matrix.bin == 'webapp' diff --git a/.github/workflows/ios-fastlane.yml b/.github/workflows/ios-fastlane.yml index 07567f2ac..edc34e9e3 100644 --- a/.github/workflows/ios-fastlane.yml +++ b/.github/workflows/ios-fastlane.yml @@ -101,10 +101,13 @@ jobs: - name: List used Xcode version run: /usr/bin/xcodebuild -version - - uses: ./.github/actions/setup-fvm + - uses: subosito/flutter-action@v2 with: - fvm_config: ./mobile/.fvmrc - working_dir: ./mobile + flutter-version: ${{ env.FLUTTER_VERSION }} + channel: "stable" + cache: true + cache-key: flutter-${{ env.FLUTTER_VERSION }} + cache-path: ${{ runner.tool_cache }}/flutter - name: Check cocoapods version run: /usr/local/bin/pod --version diff --git a/.github/workflows/testflight-for-review.yml b/.github/workflows/testflight-for-review.yml index 7f85fb771..7f86c1cb2 100644 --- a/.github/workflows/testflight-for-review.yml +++ b/.github/workflows/testflight-for-review.yml @@ -20,10 +20,13 @@ jobs: - name: List used Xcode version run: /usr/bin/xcodebuild -version - - uses: ./.github/actions/setup-fvm + - uses: subosito/flutter-action@v2 with: - fvm_config: ./mobile/.fvmrc - working_dir: ./mobile + flutter-version: ${{ env.FLUTTER_VERSION }} + channel: "stable" + cache: true + cache-key: flutter-${{ env.FLUTTER_VERSION }} + cache-path: ${{ runner.tool_cache }}/flutter - name: Check cocoapods version run: /usr/local/bin/pod --version diff --git a/README.md b/README.md index 9968e38d1..437882a6a 100644 --- a/README.md +++ b/README.md @@ -13,7 +13,6 @@ To begin, ensure that you have a working installation of the following items: - [Docker](https://docs.docker.com/) and docker-compose -- [Flutter Version Manager (FVM)](https://fvm.app/) - [Rust language](https://rustup.rs/) - Appropriate [Rust targets](https://rust-lang.github.io/rustup/cross-compilation.html) for cross-compiling to your device - For Android targets: @@ -28,18 +27,6 @@ echo "ANDROID_NDK=.." >> ~/.gradle/gradle.properties - XCode - Cocoapods -## FVM (Flutter Version Manager) - -We use FVM to be able to easily switch between different Flutter versions. -Make sure to install it locally. -Once installed, you can use your favorite flutter commands as before, just add `fvm` before, e.g. - -```bash -fvm flutter run -``` - -You can see whether you have all the sufficient dependencies for your platform by running `flutter doctor`. - ## Contributing We encourage community contributions whether it be a bug fix or an improvement to the documentation. diff --git a/justfile b/justfile index 6752d0253..edaa2b002 100644 --- a/justfile +++ b/justfile @@ -54,18 +54,12 @@ deps-ios: cargo install cargo-lipo rustup target add aarch64-apple-ios x86_64-apple-ios -gen flutter_channel="": +gen: #!/usr/bin/env bash set -euxo pipefail cd mobile - if [ -n "{{flutter_channel}}" ]; then - echo "Flutter channel is set to: {{flutter_channel}}" - fvm spawn {{flutter_channel}} pub get - else - echo "Flutter channel is default" - fvm flutter pub get - fi + flutter pub get RUST_LOG={{ rust_log_for_frb }} flutter_rust_bridge_codegen \ --rust-input native/src/api.rs \ @@ -90,13 +84,13 @@ android-release: # Build flutter webapp for cargo run --bin webapp build-web args="": - cd webapp/frontend && fvm flutter build web {{args}} + cd webapp/frontend && flutter build web {{args}} build-web-release: - cd webapp/frontend && fvm flutter build web --release + cd webapp/frontend && flutter build web --release run-web: - cd webapp/frontend && fvm flutter run -d chrome --web-browser-flag "--disable-web-security" + cd webapp/frontend && flutter run -d chrome --web-browser-flag "--disable-web-security" run-web-backend: cargo run --bin web @@ -115,7 +109,7 @@ ios-release: run args="": #!/usr/bin/env bash cd mobile && \ - fvm flutter run {{args}} \ + flutter run {{args}} \ --dart-define="COMMIT=$(git rev-parse HEAD)" \ --dart-define="BRANCH=$(git rev-parse --abbrev-ref HEAD)" \ --dart-define="REGTEST_FAUCET=http://localhost:8080" \ @@ -126,7 +120,7 @@ run args="": run-regtest args="": #!/usr/bin/env bash cd mobile && \ - fvm flutter run {{args}} \ + flutter run {{args}} \ --dart-define="COMMIT=$(git rev-parse HEAD)" \ --dart-define="BRANCH=$(git rev-parse --abbrev-ref HEAD)" \ --dart-define="ELECTRS_ENDPOINT={{public_regtest_electrs}}" \ @@ -140,7 +134,7 @@ run-regtest args="": run-mainnet args="": #!/usr/bin/env bash cd mobile && \ - fvm flutter run {{args}} \ + flutter run {{args}} \ --dart-define="COMMIT=$(git rev-parse HEAD)" \ --dart-define="BRANCH=$(git rev-parse --abbrev-ref HEAD)" \ --dart-define="ELECTRS_ENDPOINT=http://api.10101.finance:3000" \ @@ -155,7 +149,7 @@ run-mainnet args="": run-regtest-android args="": #!/usr/bin/env bash cd mobile && \ - fvm flutter run {{args}} \ + flutter run {{args}} \ --dart-define="COMMIT=$(git rev-parse HEAD)" \ --dart-define="BRANCH=$(git rev-parse --abbrev-ref HEAD)" \ --dart-define="ELECTRS_ENDPOINT={{public_regtest_electrs}}" \ @@ -172,7 +166,7 @@ run-local-android args="": LOCAL_IP=$({{get_local_ip}}) echo "Android app will connect to $LOCAL_IP for 10101 services" cd mobile && \ - fvm flutter run {{args}} \ + flutter run {{args}} \ --dart-define="COMMIT=$(git rev-parse HEAD)" \ --dart-define="BRANCH=$(git rev-parse --abbrev-ref HEAD)" \ --dart-define="ELECTRS_ENDPOINT=http://${LOCAL_IP}:3000" \ @@ -195,7 +189,7 @@ clean: set -euxo pipefail cd mobile rm -rf mobile/android/app/src/main/jniLibs/* - fvm flutter clean + flutter clean cd native && cargo clean # Wipes everything @@ -282,8 +276,8 @@ cargo-clippy: cargo clippy --all-targets -- -D warnings lint-flutter: - cd mobile && fvm flutter analyze --fatal-infos . - cd webapp/frontend && fvm flutter analyze --fatal-infos . + cd mobile && flutter analyze --fatal-infos . + cd webapp/frontend && flutter analyze --fatal-infos . alias flutter-lint := lint-flutter @@ -327,7 +321,8 @@ lnd-mock: cargo run --package lnd-bridge --example mock flutter-test: - cd mobile && fvm flutter pub run build_runner build --delete-conflicting-outputs && fvm flutter test + cd mobile && flutter pub get + cd mobile && flutter pub run build_runner build --delete-conflicting-outputs && flutter test # Tests for the `native` crate native-test: @@ -520,7 +515,7 @@ build-ipa args="": args+=(--flavor test) fi - cd mobile && fvm flutter build ipa "${args[@]}" \ + cd mobile && flutter build ipa "${args[@]}" \ --dart-define="ELECTRS_ENDPOINT=${ELECTRS_ENDPOINT}" \ --dart-define="COORDINATOR_P2P_ENDPOINT=${COORDINATOR_P2P_ENDPOINT}" \ --dart-define="NETWORK=${NETWORK}" \ @@ -547,7 +542,7 @@ publish-testflight-fastlane: release-testflight: gen ios build-ipa publish-testflight version: - cargo --version && rustc --version && fvm flutter --version + cargo --version && rustc --version && flutter --version build-apk-regtest: #!/usr/bin/env bash @@ -555,7 +550,7 @@ build-apk-regtest: BUILD_NUMBER=$(git rev-list HEAD --count) echo "build name: ${BUILD_NAME}" echo "build number: ${BUILD_NUMBER}" - cd mobile && fvm flutter build apk \ + cd mobile && flutter build apk \ --build-name=${BUILD_NAME} \ --build-number=${BUILD_NUMBER} \ --release \ @@ -577,7 +572,7 @@ build-app-bundle-regtest: BUILD_NUMBER=$(git rev-list HEAD --count) echo "build name: ${BUILD_NAME}" echo "build number: ${BUILD_NUMBER}" - cd mobile && fvm flutter build appbundle \ + cd mobile && flutter build appbundle \ --build-name=${BUILD_NAME} \ --build-number=${BUILD_NUMBER} \ --release \ @@ -610,7 +605,7 @@ build-android-app-bundle: os={{os()}} echo "building on '$os' for '$NETWORK'" - cd mobile && fvm flutter build appbundle \ + cd mobile && flutter build appbundle \ --build-name=${BUILD_NAME} \ --build-number=${BUILD_NUMBER} \ --release \ @@ -643,7 +638,7 @@ build-android-app-apk args="": os={{os()}} echo "building on '$os' for '$NETWORK'" - cd mobile && fvm flutter build apk {{args}} \ + cd mobile && flutter build apk {{args}} \ --build-name=${BUILD_NAME} \ --build-number=${BUILD_NUMBER} \ --release \ diff --git a/mobile/.fvmrc b/mobile/.fvmrc deleted file mode 100644 index 7bca6a5bc..000000000 --- a/mobile/.fvmrc +++ /dev/null @@ -1,3 +0,0 @@ -{ - "flutter": "3.19.4" -} diff --git a/mobile/lib/common/poll_widget.dart b/mobile/lib/common/poll_widget.dart index 18f399ac8..f5bfe0467 100644 --- a/mobile/lib/common/poll_widget.dart +++ b/mobile/lib/common/poll_widget.dart @@ -82,8 +82,8 @@ class _PollWidgetState extends State { }, style: ButtonStyle( padding: - MaterialStateProperty.all(const EdgeInsets.all(15)), - backgroundColor: MaterialStateProperty.all(Colors.white), + WidgetStateProperty.all(const EdgeInsets.all(15)), + backgroundColor: WidgetStateProperty.all(Colors.white), ), child: Row( mainAxisAlignment: MainAxisAlignment.start, diff --git a/mobile/lib/common/settings/emergency_kit_screen.dart b/mobile/lib/common/settings/emergency_kit_screen.dart index e928e3700..f1565e19e 100644 --- a/mobile/lib/common/settings/emergency_kit_screen.dart +++ b/mobile/lib/common/settings/emergency_kit_screen.dart @@ -284,19 +284,19 @@ class EmergencyKitButton extends StatelessWidget { }); }, style: ButtonStyle( - fixedSize: MaterialStateProperty.all(const Size(double.infinity, 50)), - iconSize: MaterialStateProperty.all(20.0), - elevation: MaterialStateProperty.all(0), - side: MaterialStateProperty.all(const BorderSide(width: 1.0, color: tenTenOnePurple)), - padding: MaterialStateProperty.all( + fixedSize: WidgetStateProperty.all(const Size(double.infinity, 50)), + iconSize: WidgetStateProperty.all(20.0), + elevation: WidgetStateProperty.all(0), + side: WidgetStateProperty.all(const BorderSide(width: 1.0, color: tenTenOnePurple)), + padding: WidgetStateProperty.all( const EdgeInsets.fromLTRB(20, 12, 20, 12), ), - shape: MaterialStateProperty.all( + shape: WidgetStateProperty.all( RoundedRectangleBorder( borderRadius: BorderRadius.circular(8.0), ), ), - backgroundColor: MaterialStateProperty.all(Colors.transparent), + backgroundColor: WidgetStateProperty.all(Colors.transparent), ), child: Row(mainAxisAlignment: MainAxisAlignment.center, children: [ icon, diff --git a/mobile/lib/features/trade/trade_tabs.dart b/mobile/lib/features/trade/trade_tabs.dart index 40b6ebcee..8979e6c01 100644 --- a/mobile/lib/features/trade/trade_tabs.dart +++ b/mobile/lib/features/trade/trade_tabs.dart @@ -63,7 +63,7 @@ class TradeTabs extends StatelessWidget { isScrollable: true, tabAlignment: TabAlignment.start, // suppress overlay color (used for e.g. mouse-over) because it looks weird in this tab setup - overlayColor: MaterialStateColor.resolveWith((states) => Colors.transparent), + overlayColor: WidgetStateColor.resolveWith((states) => Colors.transparent), // We don't have a bottom indicator; set to 0 to avoid it taking space when being unseleced. indicatorWeight: 0, diff --git a/mobile/lib/features/wallet/receive_screen.dart b/mobile/lib/features/wallet/receive_screen.dart index 14f50d3ce..bd463af41 100644 --- a/mobile/lib/features/wallet/receive_screen.dart +++ b/mobile/lib/features/wallet/receive_screen.dart @@ -4,10 +4,11 @@ import 'package:bitcoin_icons/bitcoin_icons.dart'; import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; import 'package:font_awesome_flutter/font_awesome_flutter.dart'; -import 'package:get_10101/common/custom_app_bar.dart'; +import 'package:get_10101/bridge_generated/bridge_definitions.dart' as bridge; import 'package:get_10101/common/amount_text.dart'; import 'package:get_10101/common/application/switch.dart'; import 'package:get_10101/common/color.dart'; +import 'package:get_10101/common/custom_app_bar.dart'; import 'package:get_10101/common/custom_qr_code.dart'; import 'package:get_10101/common/dlc_channel_change_notifier.dart'; import 'package:get_10101/common/domain/model.dart'; @@ -22,7 +23,6 @@ import 'package:get_10101/features/wallet/wallet_screen.dart'; import 'package:get_10101/logger/logger.dart'; import 'package:go_router/go_router.dart'; import 'package:provider/provider.dart'; -import 'package:get_10101/bridge_generated/bridge_definitions.dart' as bridge; import 'package:share_plus/share_plus.dart'; class ReceiveScreen extends StatefulWidget { @@ -384,12 +384,12 @@ class ReceiveActionButton extends StatelessWidget { return ElevatedButton( onPressed: onPressed, style: ButtonStyle( - backgroundColor: MaterialStateProperty.all(Colors.grey.shade200), - elevation: MaterialStateProperty.all(1), // this reduces the shade - padding: MaterialStateProperty.all( + backgroundColor: WidgetStateProperty.all(Colors.grey.shade200), + elevation: WidgetStateProperty.all(1), // this reduces the shade + padding: WidgetStateProperty.all( const EdgeInsets.fromLTRB(24, 12, 24, 12), ), - shape: MaterialStateProperty.all( + shape: WidgetStateProperty.all( RoundedRectangleBorder( borderRadius: BorderRadius.circular(8.0), ), @@ -479,22 +479,22 @@ class SelectableButton extends StatelessWidget { return OutlinedButton.icon( onPressed: onPressed, style: ButtonStyle( - iconSize: MaterialStateProperty.all(20.0), - elevation: MaterialStateProperty.all(0), - side: MaterialStateProperty.all(BorderSide( + iconSize: WidgetStateProperty.all(20.0), + elevation: WidgetStateProperty.all(0), + side: WidgetStateProperty.all(BorderSide( width: isSelected ? 1.0 : 0, color: isSelected ? selectedColor.withOpacity(1) : Colors.grey.shade300)), - padding: MaterialStateProperty.all( + padding: WidgetStateProperty.all( const EdgeInsets.fromLTRB(20, 12, 20, 12), ), - shape: MaterialStateProperty.all( + shape: WidgetStateProperty.all( RoundedRectangleBorder( borderRadius: BorderRadius.circular(8.0), ), ), backgroundColor: isSelected - ? MaterialStateProperty.all(selectedColor.withOpacity(0.05)) - : MaterialStateProperty.all(Colors.grey.shade200), + ? WidgetStateProperty.all(selectedColor.withOpacity(0.05)) + : WidgetStateProperty.all(Colors.grey.shade200), ), icon: Icon(icon, color: isSelected ? selectedColor.withOpacity(1) : Colors.grey), label: Text(buttonText, @@ -621,21 +621,21 @@ class _InvoiceDrawerScreen extends State { child: OutlinedButton( onPressed: () => widget.onConfirm(_amount ?? 0, _description), style: ButtonStyle( - fixedSize: MaterialStateProperty.all(const Size(double.infinity, 50)), - iconSize: MaterialStateProperty.all(20.0), - elevation: MaterialStateProperty.all(0), + fixedSize: WidgetStateProperty.all(const Size(double.infinity, 50)), + iconSize: WidgetStateProperty.all(20.0), + elevation: WidgetStateProperty.all(0), // this reduces the shade - side: MaterialStateProperty.all( + side: WidgetStateProperty.all( const BorderSide(width: 1.0, color: tenTenOnePurple)), - padding: MaterialStateProperty.all( + padding: WidgetStateProperty.all( const EdgeInsets.fromLTRB(20, 12, 20, 12), ), - shape: MaterialStateProperty.all( + shape: WidgetStateProperty.all( RoundedRectangleBorder( borderRadius: BorderRadius.circular(8.0), ), ), - backgroundColor: MaterialStateProperty.all(Colors.transparent), + backgroundColor: WidgetStateProperty.all(Colors.transparent), ), child: const Text("Continue"), ), diff --git a/mobile/lib/features/wallet/scanner_screen.dart b/mobile/lib/features/wallet/scanner_screen.dart index 21ba0bfce..e5d89be1b 100644 --- a/mobile/lib/features/wallet/scanner_screen.dart +++ b/mobile/lib/features/wallet/scanner_screen.dart @@ -199,16 +199,16 @@ class _ScannerScreenState extends State { }); }, style: ButtonStyle( - padding: MaterialStateProperty.all(const EdgeInsets.all(15)), - backgroundColor: MaterialStateProperty.resolveWith((states) { - if (states.contains(MaterialState.disabled)) { + padding: WidgetStateProperty.all(const EdgeInsets.all(15)), + backgroundColor: WidgetStateProperty.resolveWith((states) { + if (states.contains(WidgetState.disabled)) { return tenTenOnePurple.shade100; } else { return tenTenOnePurple; } }), - shape: MaterialStateProperty.resolveWith((states) { - if (states.contains(MaterialState.disabled)) { + shape: WidgetStateProperty.resolveWith((states) { + if (states.contains(WidgetState.disabled)) { return RoundedRectangleBorder( borderRadius: BorderRadius.circular(30.0), side: BorderSide(color: tenTenOnePurple.shade100), diff --git a/mobile/lib/features/wallet/send/send_onchain_screen.dart b/mobile/lib/features/wallet/send/send_onchain_screen.dart index d251b32a2..887bb9cbf 100644 --- a/mobile/lib/features/wallet/send/send_onchain_screen.dart +++ b/mobile/lib/features/wallet/send/send_onchain_screen.dart @@ -1,6 +1,6 @@ import 'package:flutter/material.dart'; -import 'package:get_10101/common/custom_app_bar.dart'; import 'package:get_10101/common/color.dart'; +import 'package:get_10101/common/custom_app_bar.dart'; import 'package:get_10101/common/domain/model.dart'; import 'package:get_10101/common/scrollable_safe_area.dart'; import 'package:get_10101/features/wallet/application/util.dart'; @@ -345,16 +345,16 @@ class _SendOnChainScreenState extends State { : null, style: ButtonStyle( padding: - MaterialStateProperty.all(const EdgeInsets.all(15)), - backgroundColor: MaterialStateProperty.resolveWith((states) { - if (states.contains(MaterialState.disabled)) { + WidgetStateProperty.all(const EdgeInsets.all(15)), + backgroundColor: WidgetStateProperty.resolveWith((states) { + if (states.contains(WidgetState.disabled)) { return tenTenOnePurple.shade100; } else { return tenTenOnePurple; } }), - shape: MaterialStateProperty.resolveWith((states) { - if (states.contains(MaterialState.disabled)) { + shape: WidgetStateProperty.resolveWith((states) { + if (states.contains(WidgetState.disabled)) { return RoundedRectangleBorder( borderRadius: BorderRadius.circular(30.0), side: BorderSide(color: tenTenOnePurple.shade100), diff --git a/mobile/lib/features/welcome/onboarding.dart b/mobile/lib/features/welcome/onboarding.dart index 576964fe5..63175a9b5 100644 --- a/mobile/lib/features/welcome/onboarding.dart +++ b/mobile/lib/features/welcome/onboarding.dart @@ -147,9 +147,9 @@ class _Onboarding extends State { child: ElevatedButton( onPressed: () => GoRouter.of(context).go(WelcomeScreen.route), style: ButtonStyle( - padding: MaterialStateProperty.all(const EdgeInsets.all(15)), - backgroundColor: MaterialStateProperty.all(tenTenOnePurple), - shape: MaterialStateProperty.all( + padding: WidgetStateProperty.all(const EdgeInsets.all(15)), + backgroundColor: WidgetStateProperty.all(tenTenOnePurple), + shape: WidgetStateProperty.all( RoundedRectangleBorder( borderRadius: BorderRadius.circular(40.0), side: const BorderSide(color: tenTenOnePurple), @@ -171,8 +171,8 @@ class _Onboarding extends State { child: TextButton( onPressed: () => GoRouter.of(context).go(SeedPhraseImporter.route), style: ButtonStyle( - padding: MaterialStateProperty.all(const EdgeInsets.all(15)), - backgroundColor: MaterialStateProperty.all(Colors.white), + padding: WidgetStateProperty.all(const EdgeInsets.all(15)), + backgroundColor: WidgetStateProperty.all(Colors.white), ), child: const Wrap( children: [ diff --git a/mobile/lib/features/welcome/seed_import_screen.dart b/mobile/lib/features/welcome/seed_import_screen.dart index d15d0b653..670849b09 100644 --- a/mobile/lib/features/welcome/seed_import_screen.dart +++ b/mobile/lib/features/welcome/seed_import_screen.dart @@ -97,7 +97,7 @@ class SeedPhraseImporterState extends State { width: 120, child: ElevatedButton( style: ButtonStyle( - padding: MaterialStateProperty.all( + padding: WidgetStateProperty.all( const EdgeInsets.fromLTRB(20, 10, 20, 10)), ), onPressed: () { @@ -116,18 +116,18 @@ class SeedPhraseImporterState extends State { width: 120, child: ElevatedButton( style: ButtonStyle( - padding: MaterialStateProperty.all( + padding: WidgetStateProperty.all( const EdgeInsets.fromLTRB(20, 10, 20, 10)), backgroundColor: - MaterialStateProperty.resolveWith((Set states) { - if (states.contains(MaterialState.disabled)) { + WidgetStateProperty.resolveWith((Set states) { + if (states.contains(WidgetState.disabled)) { return Colors.grey; // Change to the desired disabled color } return tenTenOnePurple; // Change to the desired enabled color }), foregroundColor: - MaterialStateProperty.resolveWith((Set states) { - if (states.contains(MaterialState.disabled)) { + WidgetStateProperty.resolveWith((Set states) { + if (states.contains(WidgetState.disabled)) { return Colors.black; // Change to the desired disabled text color } return Colors.white; // Change to the desired enabled text color diff --git a/mobile/lib/features/welcome/welcome_screen.dart b/mobile/lib/features/welcome/welcome_screen.dart index 1b22b221a..1b1d01fdd 100644 --- a/mobile/lib/features/welcome/welcome_screen.dart +++ b/mobile/lib/features/welcome/welcome_screen.dart @@ -1,14 +1,14 @@ -import 'package:get_10101/util/environment.dart'; +import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; import 'package:get_10101/common/application/switch.dart'; import 'package:get_10101/common/color.dart'; import 'package:get_10101/features/welcome/loading_screen.dart'; +import 'package:get_10101/ffi.dart'; import 'package:get_10101/logger/logger.dart'; -import 'package:flutter/material.dart'; +import 'package:get_10101/util/environment.dart'; import 'package:get_10101/util/file.dart'; import 'package:get_10101/util/preferences.dart'; import 'package:go_router/go_router.dart'; -import 'package:get_10101/ffi.dart'; class WelcomeScreen extends StatefulWidget { static const route = "/welcome"; @@ -211,17 +211,17 @@ class _WelcomeScreenState extends State { } }, style: ButtonStyle( - padding: MaterialStateProperty.all( + padding: WidgetStateProperty.all( const EdgeInsets.all(15)), - backgroundColor: MaterialStateProperty.resolveWith((states) { - if (states.contains(MaterialState.disabled)) { + backgroundColor: WidgetStateProperty.resolveWith((states) { + if (states.contains(WidgetState.disabled)) { return tenTenOnePurple.shade100; } else { return tenTenOnePurple; } }), - shape: MaterialStateProperty.resolveWith((states) { - if (states.contains(MaterialState.disabled)) { + shape: WidgetStateProperty.resolveWith((states) { + if (states.contains(WidgetState.disabled)) { return RoundedRectangleBorder( borderRadius: BorderRadius.circular(30.0), side: BorderSide(color: tenTenOnePurple.shade100), diff --git a/mobile/lib/main.dart b/mobile/lib/main.dart index 5663c760f..4576365f6 100644 --- a/mobile/lib/main.dart +++ b/mobile/lib/main.dart @@ -6,10 +6,10 @@ import 'package:get_10101/common/init_service.dart'; import 'package:get_10101/common/routes.dart'; import 'package:get_10101/features/trade/trade_theme.dart'; import 'package:get_10101/features/wallet/wallet_theme.dart'; +import 'package:get_10101/logger/logger.dart'; import 'package:get_10101/util/notifications.dart'; import 'package:go_router/go_router.dart'; import 'package:provider/provider.dart'; -import 'package:get_10101/logger/logger.dart'; const Color appBackgroundColor = Color(0xFFFAFAFA); @@ -81,10 +81,10 @@ class _TenTenOneAppState extends State with WidgetsBindingObserver elevatedButtonTheme: ElevatedButtonThemeData( style: ButtonStyle( // this is the button background color - backgroundColor: MaterialStateProperty.all(tenTenOnePurple), + backgroundColor: WidgetStateProperty.all(tenTenOnePurple), // this is the button text color - foregroundColor: MaterialStateProperty.all(Colors.white), - shape: MaterialStateProperty.all( + foregroundColor: WidgetStateProperty.all(Colors.white), + shape: WidgetStateProperty.all( RoundedRectangleBorder( borderRadius: BorderRadius.circular(5.0), ), @@ -92,12 +92,12 @@ class _TenTenOneAppState extends State with WidgetsBindingObserver ), ), inputDecorationTheme: InputDecorationTheme( - prefixIconColor: MaterialStateColor.resolveWith( - (Set states) { - if (states.contains(MaterialState.focused)) { + prefixIconColor: WidgetStateColor.resolveWith( + (Set states) { + if (states.contains(WidgetState.focused)) { return tenTenOnePurple; } - if (states.contains(MaterialState.error)) { + if (states.contains(WidgetState.error)) { return Colors.red; } return Colors.grey; diff --git a/mobile/pubspec.lock b/mobile/pubspec.lock index 7d6fd1535..5b1e7757f 100644 --- a/mobile/pubspec.lock +++ b/mobile/pubspec.lock @@ -668,26 +668,26 @@ packages: dependency: transitive description: name: leak_tracker - sha256: "78eb209deea09858f5269f5a5b02be4049535f568c07b275096836f01ea323fa" + sha256: "7f0df31977cb2c0b88585095d168e689669a2cc9b97c309665e3386f3e9d341a" url: "https://pub.dev" source: hosted - version: "10.0.0" + version: "10.0.4" leak_tracker_flutter_testing: dependency: transitive description: name: leak_tracker_flutter_testing - sha256: b46c5e37c19120a8a01918cfaf293547f47269f7cb4b0058f21531c2465d6ef0 + sha256: "06e98f569d004c1315b991ded39924b21af84cf14cc94791b8aea337d25b57f8" url: "https://pub.dev" source: hosted - version: "2.0.1" + version: "3.0.3" leak_tracker_testing: dependency: transitive description: name: leak_tracker_testing - sha256: a597f72a664dbd293f3bfc51f9ba69816f84dcd403cdac7066cb3f6003f3ab47 + sha256: "6ba465d5d76e67ddf503e1161d1f4a6bc42306f9d66ca1e8f079a47290fb06d3" url: "https://pub.dev" source: hosted - version: "2.0.1" + version: "3.0.1" lints: dependency: transitive description: @@ -732,10 +732,10 @@ packages: dependency: "direct main" description: name: meta - sha256: d584fa6707a52763a52446f02cc621b077888fb63b93bbcb1143a7be5a0c0c04 + sha256: "7687075e408b093f36e6bbf6c91878cc0d4cd10f409506f7bc996f68220b9136" url: "https://pub.dev" source: hosted - version: "1.11.0" + version: "1.12.0" mime: dependency: transitive description: @@ -980,10 +980,10 @@ packages: dependency: "direct main" description: name: screenshot - sha256: "455284ff1f5b911d94a43c25e1385485cf6b4f288293eba68f15dad711c7b81c" + sha256: "63817697a7835e6ce82add4228e15d233b74d42975c143ad8cfe07009fab866b" url: "https://pub.dev" source: hosted - version: "2.1.0" + version: "3.0.0" share_plus: dependency: "direct main" description: @@ -1201,26 +1201,26 @@ packages: dependency: "direct main" description: name: test - sha256: a1f7595805820fcc05e5c52e3a231aedd0b72972cb333e8c738a8b1239448b6f + sha256: "7ee446762c2c50b3bd4ea96fe13ffac69919352bd3b4b17bac3f3465edc58073" url: "https://pub.dev" source: hosted - version: "1.24.9" + version: "1.25.2" test_api: dependency: transitive description: name: test_api - sha256: "5c2f730018264d276c20e4f1503fd1308dfbbae39ec8ee63c5236311ac06954b" + sha256: "9955ae474176f7ac8ee4e989dadfb411a58c30415bcfb648fa04b2b8a03afa7f" url: "https://pub.dev" source: hosted - version: "0.6.1" + version: "0.7.0" test_core: dependency: transitive description: name: test_core - sha256: a757b14fc47507060a162cc2530d9a4a2f92f5100a952c7443b5cad5ef5b106a + sha256: "2bc4b4ecddd75309300d8096f781c0e3280ca1ef85beda558d33fcbedc2eead4" url: "https://pub.dev" source: hosted - version: "0.5.9" + version: "0.6.0" timeago: dependency: "direct main" description: @@ -1385,10 +1385,10 @@ packages: dependency: transitive description: name: vm_service - sha256: b3d56ff4341b8f182b96aceb2fa20e3dcb336b9f867bc0eafc0de10f1048e957 + sha256: "3923c89304b715fb1eb6423f017651664a03bf5f4b29983627c4da791f74a4ec" url: "https://pub.dev" source: hosted - version: "13.0.0" + version: "14.2.1" watcher: dependency: transitive description: @@ -1486,5 +1486,5 @@ packages: source: hosted version: "2.1.1" sdks: - dart: ">=3.2.3 <4.0.0" - flutter: ">=3.16.6" + dart: ">=3.3.0 <4.0.0" + flutter: ">=3.22.1" diff --git a/mobile/pubspec.yaml b/mobile/pubspec.yaml index 7e5907ccc..6cdc2417d 100644 --- a/mobile/pubspec.yaml +++ b/mobile/pubspec.yaml @@ -4,6 +4,7 @@ publish_to: none version: 2.4.4 environment: sdk: '>=3.1.2 <4.0.0' + flutter: '3.22.1' dependencies: flutter: sdk: flutter @@ -45,7 +46,7 @@ dependencies: qr_code_scanner: ^1.0.1 fl_chart: 0.64.0 card_swiper: ^3.0.1 - screenshot: ^2.1.0 + screenshot: ^3.0.0 syncfusion_flutter_sliders: ^24.2.9 syncfusion_flutter_core: ^24.2.9 html: ^0.15.4 diff --git a/webapp/frontend/.fvmrc b/webapp/frontend/.fvmrc deleted file mode 100644 index 17ec8c19c..000000000 --- a/webapp/frontend/.fvmrc +++ /dev/null @@ -1,3 +0,0 @@ -{ - "flutter": "3.22.0" -} diff --git a/webapp/frontend/pubspec.yaml b/webapp/frontend/pubspec.yaml index b50e9f09c..a72ee3023 100644 --- a/webapp/frontend/pubspec.yaml +++ b/webapp/frontend/pubspec.yaml @@ -20,6 +20,7 @@ version: 1.0.0+1 environment: sdk: '>=3.1.2 <4.0.0' + flutter: '3.22.1' # Dependencies specify other packages that your package needs in order to work. # To automatically upgrade your package dependencies to the latest versions