diff --git a/.github/workflows/android-fastlane.yml b/.github/workflows/android-fastlane.yml index 74269ef96..bfe7bc370 100644 --- a/.github/workflows/android-fastlane.yml +++ b/.github/workflows/android-fastlane.yml @@ -67,7 +67,7 @@ on: type: string env: - FLUTTER_VERSION: "3.13.4" + FLUTTER_VERSION: "3.19.1" jobs: build: diff --git a/.github/workflows/build-release-binaries.yml b/.github/workflows/build-release-binaries.yml index 4a0f39ed1..14cfae7d8 100644 --- a/.github/workflows/build-release-binaries.yml +++ b/.github/workflows/build-release-binaries.yml @@ -11,7 +11,7 @@ on: env: - FLUTTER_VERSION: "3.13.4" + FLUTTER_VERSION: "3.19.1" RUST_VERSION: "1.70.0" jobs: diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e607ee974..f40069b93 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -11,7 +11,7 @@ on: env: CARGO_INCREMENTAL: 0 CARGO_TERM_COLOR: always - FLUTTER_VERSION: "3.13.4" + FLUTTER_VERSION: "3.19.1" jobs: formatting-dprint: diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index b74f6f5f0..8f92f6551 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -10,7 +10,7 @@ on: env: REGISTRY: ghcr.io - FLUTTER_VERSION: "3.13.4" + FLUTTER_VERSION: "3.19.1" jobs: docker: diff --git a/.github/workflows/ios-fastlane.yml b/.github/workflows/ios-fastlane.yml index 501beadfe..fae359cfa 100644 --- a/.github/workflows/ios-fastlane.yml +++ b/.github/workflows/ios-fastlane.yml @@ -83,7 +83,7 @@ on: type: string env: - FLUTTER_VERSION: "3.13.4" + FLUTTER_VERSION: "3.19.1" jobs: build: diff --git a/justfile b/justfile index fa207b6b0..9b8999a7f 100644 --- a/justfile +++ b/justfile @@ -80,10 +80,10 @@ android-release: # Build flutter webapp for cargo run --bin webapp build-web args="": - cd webapp/frontend && flutter build web {{args}} + cd webapp/frontend && flutter build web --web-renderer html {{args}} build-web-release: - cd webapp/frontend && flutter build web --release + cd webapp/frontend && flutter build web --web-renderer html --release run-web: cd webapp/frontend && flutter run -d chrome --web-browser-flag "--disable-web-security" diff --git a/mobile/analysis_options.yaml b/mobile/analysis_options.yaml index 177640ace..45c36c31a 100644 --- a/mobile/analysis_options.yaml +++ b/mobile/analysis_options.yaml @@ -9,6 +9,9 @@ # packages, and plugins designed to encourage good coding practices. include: package:flutter_lints/flutter.yaml +analyzer: + exclude: [lib/bridge_generated/*] + linter: # The lint rules applied to this project can be customized in the # section below to disable rules from the `package:flutter_lints/flutter.yaml` diff --git a/mobile/ios/Podfile.lock b/mobile/ios/Podfile.lock index ce1168cf0..9feac5c96 100644 --- a/mobile/ios/Podfile.lock +++ b/mobile/ios/Podfile.lock @@ -143,7 +143,7 @@ SPEC CHECKSUMS: FirebaseCoreInternal: 2f4bee5ed00301b5e56da0849268797a2dd31fb4 FirebaseInstallations: cae95cab0f965ce05b805189de1d4c70b11c76fb FirebaseMessaging: bb2c4f6422a753038fe137d90ae7c1af57251316 - Flutter: f04841e97a9d0b0a8025694d0796dd46242b2854 + Flutter: e0871f40cf51350855a761d2e70bf5af5b9b5de7 flutter_local_notifications: 0c0b1ae97e741e1521e4c1629a459d04b9aec743 flutter_native_splash: 52501b97d1c0a5f898d687f1646226c1f93c56ef GoogleDataTransport: 54dee9d48d14580407f8f5fbf2f496e92437a2f2 diff --git a/mobile/ios/Runner.xcodeproj/project.pbxproj b/mobile/ios/Runner.xcodeproj/project.pbxproj index 16ca5d837..262ad7bb8 100644 --- a/mobile/ios/Runner.xcodeproj/project.pbxproj +++ b/mobile/ios/Runner.xcodeproj/project.pbxproj @@ -207,7 +207,7 @@ 97C146E61CF9000F007C117D /* Project object */ = { isa = PBXProject; attributes = { - LastUpgradeCheck = 1430; + LastUpgradeCheck = 1510; ORGANIZATIONNAME = ""; TargetAttributes = { 97C146ED1CF9000F007C117D = { diff --git a/mobile/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme b/mobile/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme index 5ad3f165e..0e89eb958 100644 --- a/mobile/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme +++ b/mobile/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme @@ -1,6 +1,6 @@ showEditModal( } }, child: SingleChildScrollView( - child: IntrinsicHeight( - child: builder(context, (newVal) => val = newVal), - ), + child: builder(context, (newVal) => val = newVal), ), )))); }).then((res) => res ?? val); diff --git a/mobile/lib/common/poll_widget.dart b/mobile/lib/common/poll_widget.dart index 643f2c1ec..37e73eda7 100644 --- a/mobile/lib/common/poll_widget.dart +++ b/mobile/lib/common/poll_widget.dart @@ -29,6 +29,7 @@ class _PollWidgetState extends State { child: Stack( children: [ ExpansionTile( + backgroundColor: Colors.white, trailing: const SizedBox.shrink(), title: const Text("Time for a quick survey?"), children: [ diff --git a/mobile/lib/common/scaffold_with_nav_bar.dart b/mobile/lib/common/scaffold_with_nav_bar.dart index 392c3ca0b..7e6c13ea5 100644 --- a/mobile/lib/common/scaffold_with_nav_bar.dart +++ b/mobile/lib/common/scaffold_with_nav_bar.dart @@ -1,6 +1,7 @@ import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; import 'package:get_10101/common/app_bar_wrapper.dart'; +import 'package:get_10101/common/color.dart'; import 'package:get_10101/features/trade/trade_screen.dart'; import 'package:get_10101/features/wallet/wallet_screen.dart'; import 'package:get_10101/util/constants.dart'; @@ -24,6 +25,8 @@ class ScaffoldWithNavBar extends StatelessWidget { appBar: const PreferredSize( preferredSize: Size.fromHeight(40), child: SafeArea(child: AppBarWrapper())), bottomNavigationBar: BottomNavigationBar( + selectedItemColor: tenTenOnePurple, + unselectedItemColor: Colors.grey, items: [ BottomNavigationBarItem( icon: Container(key: tabWallet, child: const Icon(Icons.wallet)), diff --git a/mobile/lib/common/task_status_dialog.dart b/mobile/lib/common/task_status_dialog.dart index ce78f5b23..566b0c611 100644 --- a/mobile/lib/common/task_status_dialog.dart +++ b/mobile/lib/common/task_status_dialog.dart @@ -130,7 +130,10 @@ class _TaskStatusDialog extends State { // If pending, prevent use of back button if (isPending) { - return WillPopScope(child: dialog, onWillPop: () async => false); + return PopScope( + canPop: false, + child: dialog, + ); } else { return dialog; } diff --git a/mobile/lib/features/trade/channel_configuration.dart b/mobile/lib/features/trade/channel_configuration.dart index ee07b9e35..c07bb7928 100644 --- a/mobile/lib/features/trade/channel_configuration.dart +++ b/mobile/lib/features/trade/channel_configuration.dart @@ -2,6 +2,7 @@ import 'package:flutter/material.dart'; import 'package:get_10101/common/amount_text_field.dart'; import 'package:get_10101/common/amount_text_input_form_field.dart'; import 'package:get_10101/common/application/lsp_change_notifier.dart'; +import 'package:get_10101/common/color.dart'; import 'package:get_10101/common/domain/model.dart'; import 'package:get_10101/common/value_data_row.dart'; import 'package:get_10101/features/trade/domain/channel_opening_params.dart'; @@ -32,28 +33,30 @@ channelConfiguration({ useRootNavigator: true, barrierColor: Colors.black.withOpacity(0), context: context, + useSafeArea: true, builder: (BuildContext context) { return SafeArea( - child: Padding( - padding: EdgeInsets.only(bottom: MediaQuery.of(context).viewInsets.bottom), - // the GestureDetector ensures that we can close the keyboard by tapping into the modal - child: GestureDetector( - onTap: () { - FocusScopeNode currentFocus = FocusScope.of(context); - - if (!currentFocus.hasPrimaryFocus) { - currentFocus.unfocus(); - } - }, - child: SingleChildScrollView( - child: SizedBox( - height: 450, - child: ChannelConfiguration( - tradeValues: tradeValues, - onConfirmation: onConfirmation, - ), - ), - )))); + child: Padding( + padding: EdgeInsets.only(bottom: MediaQuery.of(context).viewInsets.bottom), + child: GestureDetector( + onTap: () { + FocusScopeNode currentFocus = FocusScope.of(context); + + if (!currentFocus.hasPrimaryFocus) { + currentFocus.unfocus(); + } + }, + child: SingleChildScrollView( + child: SizedBox( + height: 520, + child: ChannelConfiguration( + tradeValues: tradeValues, + onConfirmation: onConfirmation, + ), + ), + )), + ), + ); }); } @@ -219,19 +222,27 @@ class _ChannelConfiguration extends State { crossAxisAlignment: CrossAxisAlignment.stretch, mainAxisAlignment: MainAxisAlignment.end, children: [ - ElevatedButton( - key: tradeScreenBottomSheetChannelConfigurationConfirmButton, - onPressed: - _formKey.currentState != null && _formKey.currentState!.validate() - ? () { - GoRouter.of(context).pop(); - widget.onConfirmation(ChannelOpeningParams( - coordinatorCollateral: counterpartyCollateral, - traderCollateral: ownTotalCollateral)); - } - : null, - style: ElevatedButton.styleFrom(minimumSize: const Size.fromHeight(50)), - child: const Text("Confirm"), + Padding( + padding: const EdgeInsets.all(8.0), + child: ElevatedButton( + key: tradeScreenBottomSheetChannelConfigurationConfirmButton, + onPressed: + _formKey.currentState != null && _formKey.currentState!.validate() + ? () { + GoRouter.of(context).pop(); + widget.onConfirmation(ChannelOpeningParams( + coordinatorCollateral: counterpartyCollateral, + traderCollateral: ownTotalCollateral)); + } + : null, + style: ElevatedButton.styleFrom( + minimumSize: const Size.fromHeight(50), + backgroundColor: tenTenOnePurple), + child: const Text( + "Confirm", + style: TextStyle(color: Colors.white), + ), + ), ), ], ) diff --git a/mobile/lib/features/trade/leverage_slider.dart b/mobile/lib/features/trade/leverage_slider.dart index b7f3374f8..a3b164019 100644 --- a/mobile/lib/features/trade/leverage_slider.dart +++ b/mobile/lib/features/trade/leverage_slider.dart @@ -140,7 +140,10 @@ class LeverageButton extends StatelessWidget { padding: EdgeInsets.zero, backgroundColor: tradeTheme.leverageMinusButtonColor), onPressed: () => onPressed(), - child: Text(label)), + child: Text( + label, + style: const TextStyle(color: Colors.white), + )), ); } } diff --git a/mobile/lib/features/trade/position_list_item.dart b/mobile/lib/features/trade/position_list_item.dart index 44eed3707..82a886114 100644 --- a/mobile/lib/features/trade/position_list_item.dart +++ b/mobile/lib/features/trade/position_list_item.dart @@ -179,7 +179,10 @@ class _PositionListItemState extends State { Text("Closing ...") ], ) - : const Text("Close Position"), + : const Text( + "Close Position", + style: TextStyle(color: Colors.white), + ), ) ], ) diff --git a/mobile/lib/features/trade/trade_bottom_sheet.dart b/mobile/lib/features/trade/trade_bottom_sheet.dart index 5e4f73d3a..01243160b 100644 --- a/mobile/lib/features/trade/trade_bottom_sheet.dart +++ b/mobile/lib/features/trade/trade_bottom_sheet.dart @@ -19,7 +19,6 @@ tradeBottomSheet({required BuildContext context, required Direction direction}) builder: (BuildContext context) { return SafeArea( child: Padding( - // padding: MediaQuery.of(context).viewInsets, padding: EdgeInsets.only(bottom: MediaQuery.of(context).viewInsets.bottom), // the GestureDetector ensures that we can close the keyboard by tapping into the modal child: GestureDetector( @@ -34,7 +33,7 @@ tradeBottomSheet({required BuildContext context, required Direction direction}) child: SizedBox( // TODO: Find a way to make height dynamic depending on the children size // This is needed because otherwise the keyboard does not push the sheet up correctly - height: 450, + height: 470, child: TradeBottomSheet(direction: direction)), ), ), diff --git a/mobile/lib/features/trade/trade_bottom_sheet_tab.dart b/mobile/lib/features/trade/trade_bottom_sheet_tab.dart index 76a8fb1e1..05f25daaa 100644 --- a/mobile/lib/features/trade/trade_bottom_sheet_tab.dart +++ b/mobile/lib/features/trade/trade_bottom_sheet_tab.dart @@ -148,7 +148,10 @@ class _TradeBottomSheetTabState extends State { }, style: ElevatedButton.styleFrom( backgroundColor: color, minimumSize: const Size.fromHeight(50)), - child: Text(label)), + child: Text( + label, + style: const TextStyle(color: Colors.white), + )), ], ) ], diff --git a/mobile/lib/features/trade/trade_screen.dart b/mobile/lib/features/trade/trade_screen.dart index 784677235..7bd5b00e0 100644 --- a/mobile/lib/features/trade/trade_screen.dart +++ b/mobile/lib/features/trade/trade_screen.dart @@ -216,6 +216,7 @@ class TradeScreen extends StatelessWidget { children: [ SizedBox( width: tradeButtonWidth, + height: 50, child: FloatingActionButton.extended( key: tradeScreenButtonBuy, heroTag: "btnBuy", @@ -224,13 +225,17 @@ class TradeScreen extends StatelessWidget { tradeBottomSheet(context: context, direction: Direction.long); } }, - label: const Text("Buy"), + label: const Text( + "Buy", + style: TextStyle(color: Colors.white), + ), shape: tradeButtonShape, backgroundColor: isBuyButtonEnabled ? tradeTheme.buy : tradeTheme.disabled, )), const SizedBox(width: 20), SizedBox( width: tradeButtonWidth, + height: 50, child: FloatingActionButton.extended( key: tradeScreenButtonSell, heroTag: "btnSell", @@ -239,7 +244,10 @@ class TradeScreen extends StatelessWidget { tradeBottomSheet(context: context, direction: Direction.short); } }, - label: const Text("Sell"), + label: const Text( + "Sell", + style: TextStyle(color: Colors.white), + ), shape: tradeButtonShape, backgroundColor: isBuyButtonEnabled ? tradeTheme.sell : tradeTheme.disabled, )), diff --git a/mobile/lib/features/trade/trade_tabs.dart b/mobile/lib/features/trade/trade_tabs.dart index b2046e286..40b6ebcee 100644 --- a/mobile/lib/features/trade/trade_tabs.dart +++ b/mobile/lib/features/trade/trade_tabs.dart @@ -56,10 +56,12 @@ class TradeTabs extends StatelessWidget { crossAxisAlignment: CrossAxisAlignment.center, children: [ TabBar( + // Sets the divider below the tab to transparent + dividerColor: Colors.transparent, // This stops expanding the tab-bar to the right. // This lets us align the tab bar to wherever we want, because it's size is limited to the tabs that it contains. 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), @@ -77,6 +79,8 @@ class TradeTabs extends StatelessWidget { unselectedLabelColor: tradeTheme.tabColor, indicator: BoxDecoration(borderRadius: tabBorderRadius, color: tradeTheme.tabColor), + labelStyle: const TextStyle(color: Colors.white), + splashBorderRadius: BorderRadius.zero, tabs: tabs.asMap().entries.map((entry) { int index = entry.key; String label = entry.value; diff --git a/mobile/lib/features/wallet/receive/receive_usdp_status_dialog.dart b/mobile/lib/features/wallet/receive/receive_usdp_status_dialog.dart index da495e6a7..7fda69bc6 100644 --- a/mobile/lib/features/wallet/receive/receive_usdp_status_dialog.dart +++ b/mobile/lib/features/wallet/receive/receive_usdp_status_dialog.dart @@ -121,7 +121,7 @@ class _TaskStatusDialog extends State { // If pending, prevent use of back button if (isPending) { - return WillPopScope(child: dialog, onWillPop: () async => false); + return PopScope(canPop: false, child: dialog); } else { return dialog; } diff --git a/mobile/lib/features/wallet/wallet_history_item.dart b/mobile/lib/features/wallet/wallet_history_item.dart index dc30acecd..8a7e51cf9 100644 --- a/mobile/lib/features/wallet/wallet_history_item.dart +++ b/mobile/lib/features/wallet/wallet_history_item.dart @@ -97,7 +97,7 @@ abstract class WalletHistoryItem extends StatelessWidget { style: const TextStyle(color: Colors.grey)), ])), trailing: Padding( - padding: const EdgeInsets.only(top: 11.0, bottom: 5.0), + padding: const EdgeInsets.only(top: 11.0, bottom: 2.0), child: Column( mainAxisAlignment: MainAxisAlignment.spaceBetween, crossAxisAlignment: CrossAxisAlignment.end, diff --git a/mobile/lib/main.dart b/mobile/lib/main.dart index 71fa166a0..c69f8b6f6 100644 --- a/mobile/lib/main.dart +++ b/mobile/lib/main.dart @@ -74,6 +74,32 @@ class _TenTenOneAppState extends State with WidgetsBindingObserver scaffoldMessengerKey: scaffoldMessengerKey, theme: ThemeData( primarySwatch: swatch, + elevatedButtonTheme: ElevatedButtonThemeData( + style: ButtonStyle( + // this is the button background color + backgroundColor: MaterialStateProperty.all(tenTenOnePurple), + // this is the button text color + foregroundColor: MaterialStateProperty.all(Colors.white), + shape: MaterialStateProperty.all( + RoundedRectangleBorder( + borderRadius: BorderRadius.circular(5.0), + ), + ), + ), + ), + inputDecorationTheme: InputDecorationTheme( + prefixIconColor: MaterialStateColor.resolveWith( + (Set states) { + if (states.contains(MaterialState.focused)) { + return tenTenOnePurple; + } + if (states.contains(MaterialState.error)) { + return Colors.red; + } + return Colors.grey; + }, + ), + ), iconTheme: IconThemeData( color: tenTenOnePurple.shade800, size: 32, diff --git a/mobile/pubspec.lock b/mobile/pubspec.lock index 2cb018637..822b614b0 100644 --- a/mobile/pubspec.lock +++ b/mobile/pubspec.lock @@ -5,10 +5,10 @@ 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" _flutterfire_internals: dependency: transitive description: @@ -18,13 +18,13 @@ packages: source: hosted version: "1.3.4" analyzer: - dependency: transitive + dependency: "direct dev" description: name: analyzer - sha256: ea3d8652bda62982addfd92fdc2d0214e5f82e43325104990d4f4c4a2a313562 + sha256: "37577842a27e4338429a1cbc32679d508836510b056f1eedf0c8d20e39c1383d" url: "https://pub.dev" source: hosted - version: "5.13.0" + version: "6.4.1" archive: dependency: transitive description: @@ -197,10 +197,10 @@ packages: dependency: transitive description: name: collection - sha256: f092b211a4319e98e5ff58223576de6c2803db36221657b46c82574721240687 + sha256: ee67cb0715911d28db6bf4af1026078bd6f0128b07a5f66fb2ed94ec6783c09a url: "https://pub.dev" source: hosted - version: "1.17.2" + version: "1.18.0" colorize: dependency: transitive description: @@ -229,10 +229,10 @@ packages: dependency: transitive description: name: coverage - sha256: "2fb815080e44a09b85e0f2ca8a820b15053982b2e714b59267719e8a9ff17097" + sha256: "8acabb8306b57a409bf4c83522065672ee13179297a6bb0cb9ead73948df7c76" url: "https://pub.dev" source: hosted - version: "1.6.3" + version: "1.7.2" cross_file: dependency: transitive description: @@ -492,18 +492,18 @@ packages: dependency: "direct dev" description: name: freezed - sha256: a9520490532087cf38bf3f7de478ab6ebeb5f68bb1eb2641546d92719b224445 + sha256: "57247f692f35f068cae297549a46a9a097100685c6780fe67177503eea5ed4e5" url: "https://pub.dev" source: hosted - version: "2.3.5" + version: "2.4.7" freezed_annotation: dependency: "direct main" description: name: freezed_annotation - sha256: aeac15850ef1b38ee368d4c53ba9a847e900bb2c53a4db3f6881cbb3cb684338 + sha256: c3fd9336eb55a38cc1bbd79ab17573113a8deccd0ecbbf926cca3c62803b5c2d url: "https://pub.dev" source: hosted - version: "2.2.0" + version: "2.4.1" frontend_server_client: dependency: transitive description: @@ -616,6 +616,30 @@ packages: url: "https://pub.dev" source: hosted version: "4.8.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: @@ -644,26 +668,26 @@ packages: 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 main" 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: @@ -676,10 +700,10 @@ packages: dependency: "direct dev" description: name: mockito - sha256: "7d5b53bcd556c1bc7ffbe4e4d5a19c3e112b7e925e9e172dd7c6ad0630812616" + sha256: "6841eed20a7befac0ce07df8116c8b8233ed1f4486a7647c7fc5a02ae6163917" url: "https://pub.dev" source: hosted - version: "5.4.2" + version: "5.4.4" nested: dependency: "direct main" description: @@ -724,10 +748,10 @@ packages: dependency: transitive description: name: path - sha256: "8829d8a55c13fc0e37127c29fedf290c102f4e40ae94ada574091fe0ff96c917" + sha256: "087ce49c3f0dc39180befefc60fdb4acd8f8620e5682fe2476afd0b3688bb4af" url: "https://pub.dev" source: hosted - version: "1.8.3" + version: "1.9.0" path_parsing: dependency: transitive description: @@ -1065,18 +1089,18 @@ packages: dependency: transitive description: name: stack_trace - sha256: c3c7d8edb15bee7f0f74debd4b9c5f3c2ea86766fe4178eb2a18eb30a0bdaed5 + sha256: "73713990125a6d93122541237550ee3352a2d84baad52d375a4cad2eb9b7ce0b" url: "https://pub.dev" source: hosted - version: "1.11.0" + version: "1.11.1" stream_channel: dependency: transitive description: name: stream_channel - sha256: "83615bee9045c1d322bbbd1ba209b7a749c2cbcdcb3fdd1df8eb488b3279c1c8" + sha256: ba2aa5d8cc609d96bbb2899c28934f9e1af5cddbd60a827822ea467161eb54e7 url: "https://pub.dev" source: hosted - version: "2.1.1" + version: "2.1.2" stream_transform: dependency: transitive description: @@ -1105,26 +1129,26 @@ packages: dependency: "direct main" description: name: test - sha256: "13b41f318e2a5751c3169137103b60c584297353d4b1761b66029bae6411fe46" + sha256: a1f7595805820fcc05e5c52e3a231aedd0b72972cb333e8c738a8b1239448b6f url: "https://pub.dev" source: hosted - version: "1.24.3" + version: "1.24.9" test_api: dependency: transitive description: name: test_api - sha256: "75760ffd7786fffdfb9597c35c5b27eaeec82be8edfb6d71d32651128ed7aab8" + sha256: "5c2f730018264d276c20e4f1503fd1308dfbbae39ec8ee63c5236311ac06954b" url: "https://pub.dev" source: hosted - version: "0.6.0" + version: "0.6.1" test_core: dependency: transitive description: name: test_core - sha256: "99806e9e6d95c7b059b7a0fc08f07fc53fabe54a829497f0d9676299f1e8637e" + sha256: a757b14fc47507060a162cc2530d9a4a2f92f5100a952c7443b5cad5ef5b106a url: "https://pub.dev" source: hosted - version: "0.5.3" + version: "0.5.9" timeago: dependency: "direct main" description: @@ -1289,10 +1313,10 @@ packages: dependency: transitive description: name: vm_service - sha256: ada49637c27973c183dad90beb6bd781eea4c9f5f955d35da172de0af7bd3440 + sha256: b3d56ff4341b8f182b96aceb2fa20e3dcb336b9f867bc0eafc0de10f1048e957 url: "https://pub.dev" source: hosted - version: "11.8.0" + version: "13.0.0" watcher: dependency: transitive description: @@ -1301,14 +1325,6 @@ packages: url: "https://pub.dev" source: hosted version: "1.1.0" - web: - dependency: transitive - description: - name: web - sha256: dc8ccd225a2005c1be616fe02951e2e342092edf968cf0844220383757ef8f10 - url: "https://pub.dev" - source: hosted - version: "0.1.4-beta" web_socket_channel: dependency: transitive description: @@ -1366,5 +1382,5 @@ packages: source: hosted version: "2.1.1" sdks: - dart: ">=3.1.2 <4.0.0" + dart: ">=3.2.0-0 <4.0.0" flutter: ">=3.10.0" diff --git a/mobile/pubspec.yaml b/mobile/pubspec.yaml index d8b9e5854..8a670b3e8 100644 --- a/mobile/pubspec.yaml +++ b/mobile/pubspec.yaml @@ -48,6 +48,7 @@ dependencies: dependency_overrides: intl: ^0.18.0 dev_dependencies: + analyzer: ^6.4.1 flutter_launcher_icons: ^0.13.1 flutter_test: sdk: flutter diff --git a/webapp/frontend/assets/tradingview.html b/webapp/frontend/assets/tradingview.html index 1affaa1bf..f50bfefdb 100644 --- a/webapp/frontend/assets/tradingview.html +++ b/webapp/frontend/assets/tradingview.html @@ -1,15 +1,9 @@ - - - - Load file or HTML string example - - - - diff --git a/webapp/frontend/lib/auth/login_screen.dart b/webapp/frontend/lib/auth/login_screen.dart index 5ac2f6dda..d69148406 100644 --- a/webapp/frontend/lib/auth/login_screen.dart +++ b/webapp/frontend/lib/auth/login_screen.dart @@ -31,12 +31,11 @@ class _LoginScreenState extends State { Image.asset('assets/10101_logo_icon.png', width: 350, height: 350), SizedBox( width: 500, - height: 150, child: Container( padding: const EdgeInsets.all(18), decoration: BoxDecoration( borderRadius: BorderRadius.circular(8), - color: Colors.grey[100], + // color: Colors.grey[100], ), child: Column( mainAxisAlignment: MainAxisAlignment.center, diff --git a/webapp/frontend/lib/common/amount_text_input_form_field.dart b/webapp/frontend/lib/common/amount_text_input_form_field.dart index bf9faf71c..5bade5e71 100644 --- a/webapp/frontend/lib/common/amount_text_input_form_field.dart +++ b/webapp/frontend/lib/common/amount_text_input_form_field.dart @@ -48,11 +48,7 @@ class AmountInputField extends StatelessWidget { enabled: enabled, controller: controller, textAlign: textAlign, - initialValue: controller != null - ? null - : value != null - ? value!.formatted() - : null, + initialValue: controller != null ? null : value?.formatted(), keyboardType: TextInputType.number, decoration: decoration ?? InputDecoration( diff --git a/webapp/frontend/lib/common/scaffold_with_nav.dart b/webapp/frontend/lib/common/scaffold_with_nav.dart index 14e8477c4..12b2bfb7b 100644 --- a/webapp/frontend/lib/common/scaffold_with_nav.dart +++ b/webapp/frontend/lib/common/scaffold_with_nav.dart @@ -129,6 +129,17 @@ class ScaffoldWithNavigationBar extends StatelessWidget { return Scaffold( body: body, bottomNavigationBar: NavigationBar( + overlayColor: MaterialStateColor.resolveWith( + (Set states) { + if (states.contains(MaterialState.focused)) { + return Colors.green; + } + if (states.contains(MaterialState.error)) { + return Colors.red; + } + return Colors.grey; + }, + ), selectedIndex: selectedIndex, destinations: const [ NavigationDestination(label: 'Trading', icon: Icon(Icons.bar_chart)), @@ -196,7 +207,6 @@ class ScaffoldWithNavigationRail extends StatelessWidget { children: [ Container( decoration: const BoxDecoration( - color: Colors.white, border: Border(bottom: BorderSide(width: 0.5, color: Colors.grey))), padding: const EdgeInsets.all(25), child: Row( diff --git a/webapp/frontend/lib/main.dart b/webapp/frontend/lib/main.dart index 6cc9a6b3b..8e69f93b9 100644 --- a/webapp/frontend/lib/main.dart +++ b/webapp/frontend/lib/main.dart @@ -55,12 +55,58 @@ class _TenTenOneAppState extends State { @override Widget build(BuildContext context) { MaterialColor swatch = tenTenOnePurple; + final ColorScheme customColorScheme = + ColorScheme.fromSwatch(backgroundColor: Colors.grey[50], primarySwatch: tenTenOnePurple); return MaterialApp.router( title: "10101", scaffoldMessengerKey: scaffoldMessengerKey, theme: ThemeData( primarySwatch: swatch, + bottomNavigationBarTheme: const BottomNavigationBarThemeData( + selectedLabelStyle: TextStyle(color: tenTenOnePurple), + ), + navigationRailTheme: const NavigationRailThemeData( + selectedLabelTextStyle: TextStyle( + color: tenTenOnePurple, + ), + ), + inputDecorationTheme: InputDecorationTheme( + prefixIconColor: MaterialStateColor.resolveWith( + (Set states) { + if (states.contains(MaterialState.focused)) { + return tenTenOnePurple; + } + if (states.contains(MaterialState.error)) { + return Colors.red; + } + return Colors.grey; + }, + ), + ), + elevatedButtonTheme: ElevatedButtonThemeData( + style: ButtonStyle( + // this is the button background color + backgroundColor: MaterialStateProperty.resolveWith( + (Set states) { + if (states.contains(MaterialState.disabled)) { + // Return grey color when the button is disabled + return Colors.grey; + } + // Return your default color when button is enabled + return tenTenOnePurple; + }, + ), + // this is the button text color + foregroundColor: MaterialStateProperty.all(Colors.white), + shape: MaterialStateProperty.all( + RoundedRectangleBorder( + borderRadius: BorderRadius.circular(5.0), + ), + ), + ), + ), + colorScheme: customColorScheme, iconTheme: IconThemeData( color: tenTenOnePurple.shade800, size: 32, diff --git a/webapp/frontend/lib/trade/trade_screen.dart b/webapp/frontend/lib/trade/trade_screen.dart index a726e5f41..664ac5622 100644 --- a/webapp/frontend/lib/trade/trade_screen.dart +++ b/webapp/frontend/lib/trade/trade_screen.dart @@ -193,7 +193,7 @@ class NewOrderWidget extends StatelessWidget { ), ), SizedBox( - height: 400, + height: 420, width: 300, child: TabBarView( controller: _tabController, diff --git a/webapp/frontend/lib/trade/tradingview/tradingview.dart b/webapp/frontend/lib/trade/tradingview/tradingview.dart index 48cc46fc1..aceb6edc5 100644 --- a/webapp/frontend/lib/trade/tradingview/tradingview.dart +++ b/webapp/frontend/lib/trade/tradingview/tradingview.dart @@ -18,17 +18,12 @@ class _TradingViewWidgetHtmlState extends State { @override Widget build(BuildContext context) { - return Column(children: [ - Expanded( - child: Stack(children: [ - InAppWebView( - key: webViewKey, - initialFile: "assets/assets/tradingview.html", - onWebViewCreated: (controller) { - webViewController = controller; - }, - ), - ])), - ]); + return InAppWebView( + key: webViewKey, + initialFile: "assets/assets/tradingview.html", + onWebViewCreated: (controller) { + webViewController = controller; + }, + ); } } diff --git a/webapp/frontend/lib/wallet/onchain_payment_history_item.dart b/webapp/frontend/lib/wallet/onchain_payment_history_item.dart index 7fc84276c..4b6e20cfc 100644 --- a/webapp/frontend/lib/wallet/onchain_payment_history_item.dart +++ b/webapp/frontend/lib/wallet/onchain_payment_history_item.dart @@ -57,7 +57,7 @@ class OnChainPaymentHistoryItem extends StatelessWidget { style: const TextStyle(color: Colors.grey)), ])), trailing: Padding( - padding: const EdgeInsets.only(top: 11.0, bottom: 5.0), + padding: const EdgeInsets.only(top: 5.0, bottom: 1.0), child: Column( mainAxisAlignment: MainAxisAlignment.spaceBetween, crossAxisAlignment: CrossAxisAlignment.end, diff --git a/webapp/frontend/pubspec.yaml b/webapp/frontend/pubspec.yaml index a180f835f..7a0de215d 100644 --- a/webapp/frontend/pubspec.yaml +++ b/webapp/frontend/pubspec.yaml @@ -46,7 +46,7 @@ dependencies: logger: ^2.0.2+1 timeago: ^3.3.0 flutter_svg: ^2.0.5 - flutter_inappwebview: ^6.0.0 + flutter_inappwebview: ^6.0.0-beta.23 json_annotation: ^4.8.1 url_launcher: ^6.2.4 diff --git a/webapp/frontend/web/index.html b/webapp/frontend/web/index.html index d3fa9bbbd..f3e7e9bbf 100644 --- a/webapp/frontend/web/index.html +++ b/webapp/frontend/web/index.html @@ -1,62 +1,63 @@ - + - - - - - - - - - - - - - - - - - - - - frontend - - - - - + + + + + + + + + + + + + + + + + + + + frontend + + + + + - +