Cw 453 (#1306)
* feat: rebase btc-addr-types, migrate to bitcoin_base
* feat: allow scanning elect-rs using get_tweaks
* feat: scanning and adding addresses working with getTweaks, add btc SP address type
* chore: pubspec.lock
* chore: pubspec.lock
* fix: scan when switching, fix multiple unspents in same tx
* fix: initial scan
* fix: initial scan
* fix: scanning issues
* fix: sync, storing silent unspents
* chore: deps
* fix: label issues, clear spent utxo
* chore: deps
* fix: build
* fix: missing types
* feat: new electrs API & changes, fixes for last block scanning
* feat: Scan Silent Payments homepage toggle
* chore: build configure
* feat: generic fixes, testnet UI improvements, useSSL on bitcoin nodes
* fix: invalid Object in sendData
* feat: improve addresses page & address book displays
* feat: silent payments labeled addresses disclaimer
* fix: missing i18n
* chore: print
* feat: single block scan, rescan by date working for btc mainnet
* feat: new cake features page replace market page, move sp scan toggle, auto switch node pop up alert
* feat: delete silent addresses
* fix: red dot in non ssl nodes
* fix: inconsistent connection states, fix tx history
* fix: tx & balance displays, cpfp sending
* feat: new rust lib
* chore: node path
* fix: check node based on network
* fix: missing txcount from addresses
* style: padding in feature page cards
* fix: restore not getting all wallet addresses by type
* fix: auto switch node broken
* fix: silent payment txs not being restored
* feat: change scanning to subscription model, sync improvements
* fix: scan re-subscription
* fix: default nodes
* fix: improve scanning by date, fix single block scan
* refactor: common function for input tx selection
* fix: nodes & build
* fix: send all with multiple outs
* refactor: unchanged file
* Update pr_test_build.yml
* chore: upgrade
* chore: merge changes
* refactor: unchanged files [skip ci]
* fix: scan fixes, add date, allow sending while scanning
* feat: sync fixes, sp settings
* feat: fix resyncing
* fix: date from height logic, status disconnected & chain tip get
* fix: params
* feat: electrum migration if using cake electrum
* fix nodes
update versions
* re-enable tron
* update sp_scanner to work on iOS [skip ci]
* fix: wrong socket for old electrum nodes
* Fix unchecked wallet type call
* fix: double balance
* feat: node domain
* fix: menu name
* fix: update tip on set scanning
* fix: connection switching back and forth
* feat: check if node is electrs, and supports sp
* chore: fix build
* minor enhancements
* fixes and enhancements
* solve conflicts with main
* fix: status toggle
* minor enhancement
* Monero.com fixes
* update sp_scanner to include windows and linux
---------
Co-authored-by: Omar Hatem <omarh.ismail1@gmail.com>
2024-05-29 11:43:48 -03:00
|
|
|
import 'package:cake_wallet/bitcoin/bitcoin.dart';
|
2025-03-04 03:58:56 +02:00
|
|
|
import 'package:cake_wallet/core/address_validator.dart';
|
2023-08-04 14:49:26 +01:00
|
|
|
import 'package:cake_wallet/core/auth_service.dart';
|
2024-03-20 00:44:00 +02:00
|
|
|
import 'package:cake_wallet/entities/contact_record.dart';
|
2024-05-04 20:44:50 -05:00
|
|
|
import 'package:cake_wallet/core/execution_state.dart';
|
2022-05-03 13:44:13 +03:00
|
|
|
import 'package:cake_wallet/entities/fiat_currency.dart';
|
2023-08-01 19:19:04 -03:00
|
|
|
import 'package:cake_wallet/entities/template.dart';
|
2025-01-04 05:28:04 +01:00
|
|
|
import 'package:cake_wallet/monero/monero.dart';
|
2024-02-23 19:09:24 +02:00
|
|
|
import 'package:cake_wallet/reactions/wallet_connect.dart';
|
2024-05-04 20:44:50 -05:00
|
|
|
import 'package:cake_wallet/generated/i18n.dart';
|
|
|
|
import 'package:cake_wallet/routes.dart';
|
|
|
|
import 'package:cake_wallet/src/screens/base_page.dart';
|
|
|
|
import 'package:cake_wallet/src/screens/connect_device/connect_device_page.dart';
|
2022-03-15 10:11:53 +01:00
|
|
|
import 'package:cake_wallet/src/screens/dashboard/widgets/sync_indicator_icon.dart';
|
2021-07-16 12:32:36 +03:00
|
|
|
import 'package:cake_wallet/src/screens/send/widgets/send_card.dart';
|
2025-03-10 16:37:23 -07:00
|
|
|
import 'package:cake_wallet/src/widgets/adaptable_page_view.dart';
|
2023-04-14 06:39:08 +02:00
|
|
|
import 'package:cake_wallet/src/widgets/add_template_button.dart';
|
2024-05-04 20:44:50 -05:00
|
|
|
import 'package:cake_wallet/src/widgets/alert_with_one_action.dart';
|
2020-10-07 08:58:22 +03:00
|
|
|
import 'package:cake_wallet/src/widgets/alert_with_two_actions.dart';
|
2025-03-21 05:24:22 +02:00
|
|
|
import 'package:cake_wallet/src/widgets/bottom_sheet/confirm_sending_bottom_sheet_widget.dart';
|
|
|
|
import 'package:cake_wallet/src/widgets/bottom_sheet/info_bottom_sheet_widget.dart';
|
2025-03-10 16:37:23 -07:00
|
|
|
import 'package:cake_wallet/src/widgets/keyboard_done_button.dart';
|
2022-03-30 17:57:04 +02:00
|
|
|
import 'package:cake_wallet/src/widgets/picker.dart';
|
2024-05-04 20:44:50 -05:00
|
|
|
import 'package:cake_wallet/src/widgets/primary_button.dart';
|
|
|
|
import 'package:cake_wallet/src/widgets/scollable_with_bottom_section.dart';
|
2020-10-07 08:58:22 +03:00
|
|
|
import 'package:cake_wallet/src/widgets/template_tile.dart';
|
2024-05-04 20:44:50 -05:00
|
|
|
import 'package:cake_wallet/src/widgets/trail_button.dart';
|
2022-08-09 15:47:41 +02:00
|
|
|
import 'package:cake_wallet/utils/payment_request.dart';
|
2023-04-17 21:06:58 +03:00
|
|
|
import 'package:cake_wallet/utils/request_review_handler.dart';
|
2023-04-14 06:39:08 +02:00
|
|
|
import 'package:cake_wallet/utils/responsive_layout_util.dart';
|
2024-05-04 20:44:50 -05:00
|
|
|
import 'package:cake_wallet/utils/show_pop_up.dart';
|
2021-08-10 17:52:35 +03:00
|
|
|
import 'package:cake_wallet/view_model/send/output.dart';
|
2024-12-09 12:23:59 -06:00
|
|
|
import 'package:cw_core/utils/print_verbose.dart';
|
CW-555-Add-Solana-Wallet (#1272)
* chore: Create cw_solana package and clean up files
* feat: Add Solana Wallet - Create, Restore form seed, restore from Key, Restore from QR, Send, Receive, transaction history, spl tokens
* fix: Make transactions file specific to solana only for solana transactions
* chore: Revert inject app details script
* fix: Fix issue with node and switch current node to main beta instead of testnet
* fix: Fix merge conflicts and adjust migration version
* fix: Fetch spl token error
Signed-off-by: Blazebrain <davidadegoke16@gmail.com>
* fix: Diplay and activate spl tokens bug
* fix: Review and fixes
* fix: reverted formatting for cryptocurrency class
* fix: Review comments, split sending flow into signing and sending separately, fix issues
* fix: Revert throwing unimplenented error
* chore: Fix comment
* chore: Fix comment
* fix: Errors in flow
* Update provider_types.dart [skip ci]
* fix: Issues with solana wallet
* Update solana_wallet.dart [skip ci]
* fix: Review comments
* fix: Date time config
* fix: Revert bash script for app details
* fix: Error with balance, displaying fees, fixing sent or received identifier bug, displaying token symbol with token transaction item in transactions list
* fix: Issues with address validation when sending spl tokens and walletconnect initial setup
* fix: Issues with sending, fetching transactions history, almost wrapping up walletconnect
* fix: Adjust imports that would affect monerocom building successfully
* fix: Refine transaction direction and continue work on walletconnect
* feat: Display SPL token transfers in the transaction history and finally settle the transaction direction
* fix: Delay in transactions history dispaly, show native token transactions first, then process spl token transactions
* feat: Switch node and revert solana chain id to previous id
* fix: Remove print statement
* fix: Remove await for transactions, fetch all transaction histories instantly and adjust solana send success message
* chore: Code refactoring and streamlined wallet type check for solana send success message
* fix: Make timeout error for node silent and add spl token images
---------
Signed-off-by: Blazebrain <davidadegoke16@gmail.com>
Co-authored-by: Omar Hatem <omarh.ismail1@gmail.com>
2024-02-23 14:39:19 +01:00
|
|
|
import 'package:cw_core/wallet_type.dart';
|
2024-05-04 20:44:50 -05:00
|
|
|
import 'package:cake_wallet/view_model/send/send_view_model.dart';
|
|
|
|
import 'package:cake_wallet/view_model/send/send_view_model_state.dart';
|
|
|
|
import 'package:cw_core/crypto_currency.dart';
|
2020-09-29 20:56:11 +03:00
|
|
|
import 'package:flutter/material.dart';
|
|
|
|
import 'package:flutter_mobx/flutter_mobx.dart';
|
2025-03-10 16:37:23 -07:00
|
|
|
import 'package:keyboard_actions/keyboard_actions.dart';
|
2020-09-29 20:56:11 +03:00
|
|
|
import 'package:mobx/mobx.dart';
|
2021-07-16 12:32:36 +03:00
|
|
|
import 'package:smooth_page_indicator/smooth_page_indicator.dart';
|
2024-05-07 17:00:01 -07:00
|
|
|
import 'package:url_launcher/url_launcher.dart';
|
2020-08-25 19:32:40 +03:00
|
|
|
|
2020-01-04 21:31:52 +02:00
|
|
|
class SendPage extends BasePage {
|
2022-08-09 15:47:41 +02:00
|
|
|
SendPage({
|
2022-11-08 14:44:58 +02:00
|
|
|
required this.sendViewModel,
|
2023-08-04 14:49:26 +01:00
|
|
|
required this.authService,
|
2022-08-09 15:47:41 +02:00
|
|
|
this.initialPaymentRequest,
|
2022-12-12 18:01:42 +02:00
|
|
|
}) : _formKey = GlobalKey<FormState>();
|
2021-01-13 18:27:30 +02:00
|
|
|
|
2020-07-06 23:09:03 +03:00
|
|
|
final SendViewModel sendViewModel;
|
2023-08-04 14:49:26 +01:00
|
|
|
final AuthService authService;
|
2020-10-02 20:28:29 +03:00
|
|
|
final GlobalKey<FormState> _formKey;
|
2021-07-16 12:32:36 +03:00
|
|
|
final controller = PageController(initialPage: 0);
|
2022-11-08 14:44:58 +02:00
|
|
|
final PaymentRequest? initialPaymentRequest;
|
2020-09-21 22:01:45 +03:00
|
|
|
|
|
|
|
bool _effectsInstalled = false;
|
2024-03-20 00:44:00 +02:00
|
|
|
ContactRecord? newContactAddress;
|
2020-07-06 23:09:03 +03:00
|
|
|
|
2020-01-08 14:26:34 +02:00
|
|
|
@override
|
2020-09-21 22:01:45 +03:00
|
|
|
String get title => S.current.send;
|
2020-01-08 14:26:34 +02:00
|
|
|
|
|
|
|
@override
|
2023-08-17 12:28:31 -03:00
|
|
|
bool get gradientAll => true;
|
2020-05-29 18:10:11 +03:00
|
|
|
|
2020-01-08 14:26:34 +02:00
|
|
|
@override
|
2021-04-12 21:22:22 +03:00
|
|
|
bool get resizeToAvoidBottomInset => false;
|
2020-01-04 21:31:52 +02:00
|
|
|
|
2020-05-11 11:22:03 +03:00
|
|
|
@override
|
2020-09-22 21:32:43 +03:00
|
|
|
bool get extendBodyBehindAppBar => true;
|
2020-09-01 14:18:07 +03:00
|
|
|
|
2024-05-31 14:57:40 +00:00
|
|
|
@override
|
|
|
|
Function(BuildContext)? get pushToNextWidget => (context) {
|
2024-09-20 14:24:25 +00:00
|
|
|
FocusScopeNode currentFocus = FocusScope.of(context);
|
|
|
|
if (!currentFocus.hasPrimaryFocus) {
|
|
|
|
currentFocus.focusedChild?.unfocus();
|
|
|
|
}
|
|
|
|
};
|
2024-05-31 14:57:40 +00:00
|
|
|
|
2023-04-14 06:39:08 +02:00
|
|
|
@override
|
2023-04-26 14:59:27 +02:00
|
|
|
Widget? leading(BuildContext context) {
|
2023-08-04 14:49:26 +01:00
|
|
|
final _backButton = Icon(
|
|
|
|
Icons.arrow_back_ios,
|
New themes (#2239)
* Add theme base v2
* Initial new theme base files
* Typos
* Fixes
* Update theme files
* feat: Migrate to Material 3 Theming
Foundation, Theme Data Refactor, and First Extension Cleanup Batch.
This commit completes the first major phase of migrating to Material 3 theming by setting up the foundations for material 3 integration and begins the initial migration, removing custom theme extensions, updating theme data, and refactoring all relevant widget and page theming to use Material 3’s built-in color and typography tokens.
These changes:
- Lays the groundwork for Material 3 theming by restructuring the app’s theme configuration to use Material 3’s ColorScheme and TextTheme as the primary sources of color and typography throughout the app.
- Refactors the core theme config files by removing legacy custom color roles ensuring all color definitions now map directly to Material 3’s role.
- Begins the first batch migration of custom theme extensions (InfoTheme, PlaceholderTheme, KeyboardTheme, PinCodeTheme) and updates all affected widgets and pages to use Material 3 color and typography tokens instead of the custom properties.
- Cleans up the codebase by deleting the files of the initial set of migrated extensions and eliminating all related imports and usages.
* feat: Migrate to Material 3 Theming.
This change:
- Updates the themes README.md file to reflect the current structure and give more information based on the first major phase that was completed.
* feat: Migrate to Material 3 Theming
Deleting previous theme extensions
* feat: Migrate to Material 3 Theming
Another batch of migrations from existing extensions
* feat: Migration to Material 3 Theming
Third Migration batch for theme extensions
* fwat: Migration to Material 3 Theming
Final Migration batch for previous theme extensions
* Update onboarding hero
* Update button radius
* Add surfaceContainer to light theme
* feat(themes): Migrate to Material 3 Theming
This change:
- Adds new set of hero images
- Modifies the core structure for the themes
- Add missing color tokens to the theme classes
- Adds a CustomThemeColor class for custom color tokens
- Modifies the themelist to have a fall back for previous theme implementation
- Adds localization for some texts
- Modifies the flow for loading the theme on app start
- Add a WidgetsBindingObserver that listens for changes in the device theme and updates the app theme when there is a change
- Registers the themeStore as a Singleton for codebase wide use
* feat(themes): Migrate to Material 3 theming
This change:
- Migrates UI flows across the app to the new themes
- Confirms styling and typography of components across the app uses the new themes
- Remove instances of Palette use
- Switch TextStyles across the app to use theme text styles
* feat(themes): Migrate to Material 3 Theming.
This change:
- Adjusts bottomsheets styling and removes duplicate close button
- Removes more themedata extensions from the previous implementation
* - Remove outlines from cards and dock
- Update menu colors
- Update padding/divider size for cards
* - Update PIN screen
- Fix navigation dock shadow
- Update wallet screen colors
* Update border radius --skip-ci
* feat(themes): Migrate to Material 3 Theming.
This change:
- Adds gradient backgrounds to the dashbaord and balance cards.
- Migrates the input fields across the app to BaseTextFormFields.
- Removes dependence of input fields on individual styling, focusing instead on using theme defined InputDecoration styling with adjustments on individual components where needed.
- Applies new theme styling to BaseTextFormField, AddressTextField and CurrencyAmountTextField.
* - Switch some hero images to PNG
- Fix nagivation_dock shadow
- Minor fixes
* feat: Add fallback to previous underline styling in central widgets
This change:
- Adds a fallback to CurrencyAmountTextField, AddressTextField, and BaseTextFormField, allowing them use the previous theme styling.
- Adds localization for new texts
* feat(themes): Update warning box colors for dark and light themes
* feat(themes): Relaod themes when user restores from backup, ensuring the user previous theme preference is used.
* feat(themes): Handle themes logic during restore from backup
This change:
- Refactors theme loading logic to handle backup restore edgecase
- Refreshes the theme based on the user saved preference during restore from backup flow
* Fix card gradients and spacing
* Fix even more radiuses
Test new icons for navigation_dock.dart
* Update onboarding flow backgrounds
Fix swap icon clipping
Fix some text colors
Add more hero images
* Fix incorrect color for light theme
* Fix more hero images and cleanup
* Update text field icons
Fix info box CTA colors
Fix sync indicator colors
* Update toggle colors
Update dark theme colors (minor)
Update crypto_balance_widget.dart icon
* Update page transitions in router.dart
Fix some colors
* feat(themes): Display label by default for filled textfields
* feat(themes): Refactor theme handling across various components
This change:
- Fixes issue with themeMode resetting to system mode when app is restarted causing a UI glitch
- Updates theme checks from `currentTheme.type == ThemeType.dark` to `currentTheme.isDark` for consistency
- Adjusts UI components to use the theme directly from the themeStore
* feat(themes): Add animating tagline to the create pin welcome screen
* Revert text fields label temporarily, fix a couple colors, and cleanup some images
---------
Co-authored-by: OmarHatem <omarh.ismail1@gmail.com>
Co-authored-by: Blazebrain <davidadegoke16@gmail.com>
2025-05-25 20:11:45 +00:00
|
|
|
color: Theme.of(context).colorScheme.primary,
|
2023-04-26 14:59:27 +02:00
|
|
|
size: 16,
|
|
|
|
);
|
New themes (#2239)
* Add theme base v2
* Initial new theme base files
* Typos
* Fixes
* Update theme files
* feat: Migrate to Material 3 Theming
Foundation, Theme Data Refactor, and First Extension Cleanup Batch.
This commit completes the first major phase of migrating to Material 3 theming by setting up the foundations for material 3 integration and begins the initial migration, removing custom theme extensions, updating theme data, and refactoring all relevant widget and page theming to use Material 3’s built-in color and typography tokens.
These changes:
- Lays the groundwork for Material 3 theming by restructuring the app’s theme configuration to use Material 3’s ColorScheme and TextTheme as the primary sources of color and typography throughout the app.
- Refactors the core theme config files by removing legacy custom color roles ensuring all color definitions now map directly to Material 3’s role.
- Begins the first batch migration of custom theme extensions (InfoTheme, PlaceholderTheme, KeyboardTheme, PinCodeTheme) and updates all affected widgets and pages to use Material 3 color and typography tokens instead of the custom properties.
- Cleans up the codebase by deleting the files of the initial set of migrated extensions and eliminating all related imports and usages.
* feat: Migrate to Material 3 Theming.
This change:
- Updates the themes README.md file to reflect the current structure and give more information based on the first major phase that was completed.
* feat: Migrate to Material 3 Theming
Deleting previous theme extensions
* feat: Migrate to Material 3 Theming
Another batch of migrations from existing extensions
* feat: Migration to Material 3 Theming
Third Migration batch for theme extensions
* fwat: Migration to Material 3 Theming
Final Migration batch for previous theme extensions
* Update onboarding hero
* Update button radius
* Add surfaceContainer to light theme
* feat(themes): Migrate to Material 3 Theming
This change:
- Adds new set of hero images
- Modifies the core structure for the themes
- Add missing color tokens to the theme classes
- Adds a CustomThemeColor class for custom color tokens
- Modifies the themelist to have a fall back for previous theme implementation
- Adds localization for some texts
- Modifies the flow for loading the theme on app start
- Add a WidgetsBindingObserver that listens for changes in the device theme and updates the app theme when there is a change
- Registers the themeStore as a Singleton for codebase wide use
* feat(themes): Migrate to Material 3 theming
This change:
- Migrates UI flows across the app to the new themes
- Confirms styling and typography of components across the app uses the new themes
- Remove instances of Palette use
- Switch TextStyles across the app to use theme text styles
* feat(themes): Migrate to Material 3 Theming.
This change:
- Adjusts bottomsheets styling and removes duplicate close button
- Removes more themedata extensions from the previous implementation
* - Remove outlines from cards and dock
- Update menu colors
- Update padding/divider size for cards
* - Update PIN screen
- Fix navigation dock shadow
- Update wallet screen colors
* Update border radius --skip-ci
* feat(themes): Migrate to Material 3 Theming.
This change:
- Adds gradient backgrounds to the dashbaord and balance cards.
- Migrates the input fields across the app to BaseTextFormFields.
- Removes dependence of input fields on individual styling, focusing instead on using theme defined InputDecoration styling with adjustments on individual components where needed.
- Applies new theme styling to BaseTextFormField, AddressTextField and CurrencyAmountTextField.
* - Switch some hero images to PNG
- Fix nagivation_dock shadow
- Minor fixes
* feat: Add fallback to previous underline styling in central widgets
This change:
- Adds a fallback to CurrencyAmountTextField, AddressTextField, and BaseTextFormField, allowing them use the previous theme styling.
- Adds localization for new texts
* feat(themes): Update warning box colors for dark and light themes
* feat(themes): Relaod themes when user restores from backup, ensuring the user previous theme preference is used.
* feat(themes): Handle themes logic during restore from backup
This change:
- Refactors theme loading logic to handle backup restore edgecase
- Refreshes the theme based on the user saved preference during restore from backup flow
* Fix card gradients and spacing
* Fix even more radiuses
Test new icons for navigation_dock.dart
* Update onboarding flow backgrounds
Fix swap icon clipping
Fix some text colors
Add more hero images
* Fix incorrect color for light theme
* Fix more hero images and cleanup
* Update text field icons
Fix info box CTA colors
Fix sync indicator colors
* Update toggle colors
Update dark theme colors (minor)
Update crypto_balance_widget.dart icon
* Update page transitions in router.dart
Fix some colors
* feat(themes): Display label by default for filled textfields
* feat(themes): Refactor theme handling across various components
This change:
- Fixes issue with themeMode resetting to system mode when app is restarted causing a UI glitch
- Updates theme checks from `currentTheme.type == ThemeType.dark` to `currentTheme.isDark` for consistency
- Adjusts UI components to use the theme directly from the themeStore
* feat(themes): Add animating tagline to the create pin welcome screen
* Revert text fields label temporarily, fix a couple colors, and cleanup some images
---------
Co-authored-by: OmarHatem <omarh.ismail1@gmail.com>
Co-authored-by: Blazebrain <davidadegoke16@gmail.com>
2025-05-25 20:11:45 +00:00
|
|
|
final _closeButton = currentTheme.isDark ? closeButtonImageDarkTheme : closeButtonImage;
|
2023-04-26 14:59:27 +02:00
|
|
|
|
2023-11-03 07:42:18 +02:00
|
|
|
bool isMobileView = responsiveLayoutUtil.shouldRenderMobileUI;
|
2023-04-26 14:59:27 +02:00
|
|
|
|
|
|
|
return MergeSemantics(
|
|
|
|
child: SizedBox(
|
|
|
|
height: isMobileView ? 37 : 45,
|
2025-04-07 18:12:39 +02:00
|
|
|
width: isMobileView ? 47 : 45,
|
2023-04-26 14:59:27 +02:00
|
|
|
child: ButtonTheme(
|
|
|
|
minWidth: double.minPositive,
|
|
|
|
child: Semantics(
|
2023-09-18 14:57:57 -04:00
|
|
|
label: !isMobileView ? S.of(context).close : S.of(context).seed_alert_back,
|
2023-04-26 14:59:27 +02:00
|
|
|
child: TextButton(
|
|
|
|
style: ButtonStyle(
|
New themes (#2239)
* Add theme base v2
* Initial new theme base files
* Typos
* Fixes
* Update theme files
* feat: Migrate to Material 3 Theming
Foundation, Theme Data Refactor, and First Extension Cleanup Batch.
This commit completes the first major phase of migrating to Material 3 theming by setting up the foundations for material 3 integration and begins the initial migration, removing custom theme extensions, updating theme data, and refactoring all relevant widget and page theming to use Material 3’s built-in color and typography tokens.
These changes:
- Lays the groundwork for Material 3 theming by restructuring the app’s theme configuration to use Material 3’s ColorScheme and TextTheme as the primary sources of color and typography throughout the app.
- Refactors the core theme config files by removing legacy custom color roles ensuring all color definitions now map directly to Material 3’s role.
- Begins the first batch migration of custom theme extensions (InfoTheme, PlaceholderTheme, KeyboardTheme, PinCodeTheme) and updates all affected widgets and pages to use Material 3 color and typography tokens instead of the custom properties.
- Cleans up the codebase by deleting the files of the initial set of migrated extensions and eliminating all related imports and usages.
* feat: Migrate to Material 3 Theming.
This change:
- Updates the themes README.md file to reflect the current structure and give more information based on the first major phase that was completed.
* feat: Migrate to Material 3 Theming
Deleting previous theme extensions
* feat: Migrate to Material 3 Theming
Another batch of migrations from existing extensions
* feat: Migration to Material 3 Theming
Third Migration batch for theme extensions
* fwat: Migration to Material 3 Theming
Final Migration batch for previous theme extensions
* Update onboarding hero
* Update button radius
* Add surfaceContainer to light theme
* feat(themes): Migrate to Material 3 Theming
This change:
- Adds new set of hero images
- Modifies the core structure for the themes
- Add missing color tokens to the theme classes
- Adds a CustomThemeColor class for custom color tokens
- Modifies the themelist to have a fall back for previous theme implementation
- Adds localization for some texts
- Modifies the flow for loading the theme on app start
- Add a WidgetsBindingObserver that listens for changes in the device theme and updates the app theme when there is a change
- Registers the themeStore as a Singleton for codebase wide use
* feat(themes): Migrate to Material 3 theming
This change:
- Migrates UI flows across the app to the new themes
- Confirms styling and typography of components across the app uses the new themes
- Remove instances of Palette use
- Switch TextStyles across the app to use theme text styles
* feat(themes): Migrate to Material 3 Theming.
This change:
- Adjusts bottomsheets styling and removes duplicate close button
- Removes more themedata extensions from the previous implementation
* - Remove outlines from cards and dock
- Update menu colors
- Update padding/divider size for cards
* - Update PIN screen
- Fix navigation dock shadow
- Update wallet screen colors
* Update border radius --skip-ci
* feat(themes): Migrate to Material 3 Theming.
This change:
- Adds gradient backgrounds to the dashbaord and balance cards.
- Migrates the input fields across the app to BaseTextFormFields.
- Removes dependence of input fields on individual styling, focusing instead on using theme defined InputDecoration styling with adjustments on individual components where needed.
- Applies new theme styling to BaseTextFormField, AddressTextField and CurrencyAmountTextField.
* - Switch some hero images to PNG
- Fix nagivation_dock shadow
- Minor fixes
* feat: Add fallback to previous underline styling in central widgets
This change:
- Adds a fallback to CurrencyAmountTextField, AddressTextField, and BaseTextFormField, allowing them use the previous theme styling.
- Adds localization for new texts
* feat(themes): Update warning box colors for dark and light themes
* feat(themes): Relaod themes when user restores from backup, ensuring the user previous theme preference is used.
* feat(themes): Handle themes logic during restore from backup
This change:
- Refactors theme loading logic to handle backup restore edgecase
- Refreshes the theme based on the user saved preference during restore from backup flow
* Fix card gradients and spacing
* Fix even more radiuses
Test new icons for navigation_dock.dart
* Update onboarding flow backgrounds
Fix swap icon clipping
Fix some text colors
Add more hero images
* Fix incorrect color for light theme
* Fix more hero images and cleanup
* Update text field icons
Fix info box CTA colors
Fix sync indicator colors
* Update toggle colors
Update dark theme colors (minor)
Update crypto_balance_widget.dart icon
* Update page transitions in router.dart
Fix some colors
* feat(themes): Display label by default for filled textfields
* feat(themes): Refactor theme handling across various components
This change:
- Fixes issue with themeMode resetting to system mode when app is restarted causing a UI glitch
- Updates theme checks from `currentTheme.type == ThemeType.dark` to `currentTheme.isDark` for consistency
- Adjusts UI components to use the theme directly from the themeStore
* feat(themes): Add animating tagline to the create pin welcome screen
* Revert text fields label temporarily, fix a couple colors, and cleanup some images
---------
Co-authored-by: OmarHatem <omarh.ismail1@gmail.com>
Co-authored-by: Blazebrain <davidadegoke16@gmail.com>
2025-05-25 20:11:45 +00:00
|
|
|
overlayColor: WidgetStateColor.resolveWith((states) => Colors.transparent),
|
2023-04-26 14:59:27 +02:00
|
|
|
),
|
|
|
|
onPressed: () => onClose(context),
|
|
|
|
child: !isMobileView ? _closeButton : _backButton,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
);
|
|
|
|
}
|
2023-04-14 06:39:08 +02:00
|
|
|
|
2020-09-02 11:47:41 +03:00
|
|
|
@override
|
2020-09-22 21:32:43 +03:00
|
|
|
AppBarStyle get appBarStyle => AppBarStyle.transparent;
|
2020-09-02 11:47:41 +03:00
|
|
|
|
2022-05-03 13:44:13 +03:00
|
|
|
@override
|
|
|
|
void onClose(BuildContext context) {
|
2022-11-25 22:51:07 +02:00
|
|
|
sendViewModel.onClose();
|
2022-05-03 13:44:13 +03:00
|
|
|
Navigator.of(context).pop();
|
|
|
|
}
|
|
|
|
|
2022-02-21 16:30:48 +02:00
|
|
|
@override
|
2022-10-12 13:09:57 -04:00
|
|
|
Widget? middle(BuildContext context) {
|
|
|
|
final supMiddle = super.middle(context);
|
|
|
|
return Row(
|
2022-02-21 16:30:48 +02:00
|
|
|
mainAxisAlignment: MainAxisAlignment.center,
|
|
|
|
children: [
|
|
|
|
Padding(
|
2023-08-04 14:49:26 +01:00
|
|
|
padding: const EdgeInsets.only(right: 8.0),
|
|
|
|
child: Observer(
|
2023-09-18 14:57:57 -04:00
|
|
|
builder: (_) => SyncIndicatorIcon(isSynced: sendViewModel.isReadyForSend),
|
2023-08-04 14:49:26 +01:00
|
|
|
),
|
2022-10-12 13:09:57 -04:00
|
|
|
),
|
2023-08-04 14:49:26 +01:00
|
|
|
if (supMiddle != null) supMiddle
|
2022-02-21 16:30:48 +02:00
|
|
|
],
|
|
|
|
);
|
2022-10-12 13:09:57 -04:00
|
|
|
}
|
2022-02-21 16:30:48 +02:00
|
|
|
|
2020-09-02 11:47:41 +03:00
|
|
|
@override
|
New themes (#2239)
* Add theme base v2
* Initial new theme base files
* Typos
* Fixes
* Update theme files
* feat: Migrate to Material 3 Theming
Foundation, Theme Data Refactor, and First Extension Cleanup Batch.
This commit completes the first major phase of migrating to Material 3 theming by setting up the foundations for material 3 integration and begins the initial migration, removing custom theme extensions, updating theme data, and refactoring all relevant widget and page theming to use Material 3’s built-in color and typography tokens.
These changes:
- Lays the groundwork for Material 3 theming by restructuring the app’s theme configuration to use Material 3’s ColorScheme and TextTheme as the primary sources of color and typography throughout the app.
- Refactors the core theme config files by removing legacy custom color roles ensuring all color definitions now map directly to Material 3’s role.
- Begins the first batch migration of custom theme extensions (InfoTheme, PlaceholderTheme, KeyboardTheme, PinCodeTheme) and updates all affected widgets and pages to use Material 3 color and typography tokens instead of the custom properties.
- Cleans up the codebase by deleting the files of the initial set of migrated extensions and eliminating all related imports and usages.
* feat: Migrate to Material 3 Theming.
This change:
- Updates the themes README.md file to reflect the current structure and give more information based on the first major phase that was completed.
* feat: Migrate to Material 3 Theming
Deleting previous theme extensions
* feat: Migrate to Material 3 Theming
Another batch of migrations from existing extensions
* feat: Migration to Material 3 Theming
Third Migration batch for theme extensions
* fwat: Migration to Material 3 Theming
Final Migration batch for previous theme extensions
* Update onboarding hero
* Update button radius
* Add surfaceContainer to light theme
* feat(themes): Migrate to Material 3 Theming
This change:
- Adds new set of hero images
- Modifies the core structure for the themes
- Add missing color tokens to the theme classes
- Adds a CustomThemeColor class for custom color tokens
- Modifies the themelist to have a fall back for previous theme implementation
- Adds localization for some texts
- Modifies the flow for loading the theme on app start
- Add a WidgetsBindingObserver that listens for changes in the device theme and updates the app theme when there is a change
- Registers the themeStore as a Singleton for codebase wide use
* feat(themes): Migrate to Material 3 theming
This change:
- Migrates UI flows across the app to the new themes
- Confirms styling and typography of components across the app uses the new themes
- Remove instances of Palette use
- Switch TextStyles across the app to use theme text styles
* feat(themes): Migrate to Material 3 Theming.
This change:
- Adjusts bottomsheets styling and removes duplicate close button
- Removes more themedata extensions from the previous implementation
* - Remove outlines from cards and dock
- Update menu colors
- Update padding/divider size for cards
* - Update PIN screen
- Fix navigation dock shadow
- Update wallet screen colors
* Update border radius --skip-ci
* feat(themes): Migrate to Material 3 Theming.
This change:
- Adds gradient backgrounds to the dashbaord and balance cards.
- Migrates the input fields across the app to BaseTextFormFields.
- Removes dependence of input fields on individual styling, focusing instead on using theme defined InputDecoration styling with adjustments on individual components where needed.
- Applies new theme styling to BaseTextFormField, AddressTextField and CurrencyAmountTextField.
* - Switch some hero images to PNG
- Fix nagivation_dock shadow
- Minor fixes
* feat: Add fallback to previous underline styling in central widgets
This change:
- Adds a fallback to CurrencyAmountTextField, AddressTextField, and BaseTextFormField, allowing them use the previous theme styling.
- Adds localization for new texts
* feat(themes): Update warning box colors for dark and light themes
* feat(themes): Relaod themes when user restores from backup, ensuring the user previous theme preference is used.
* feat(themes): Handle themes logic during restore from backup
This change:
- Refactors theme loading logic to handle backup restore edgecase
- Refreshes the theme based on the user saved preference during restore from backup flow
* Fix card gradients and spacing
* Fix even more radiuses
Test new icons for navigation_dock.dart
* Update onboarding flow backgrounds
Fix swap icon clipping
Fix some text colors
Add more hero images
* Fix incorrect color for light theme
* Fix more hero images and cleanup
* Update text field icons
Fix info box CTA colors
Fix sync indicator colors
* Update toggle colors
Update dark theme colors (minor)
Update crypto_balance_widget.dart icon
* Update page transitions in router.dart
Fix some colors
* feat(themes): Display label by default for filled textfields
* feat(themes): Refactor theme handling across various components
This change:
- Fixes issue with themeMode resetting to system mode when app is restarted causing a UI glitch
- Updates theme checks from `currentTheme.type == ThemeType.dark` to `currentTheme.isDark` for consistency
- Adjusts UI components to use the theme directly from the themeStore
* feat(themes): Add animating tagline to the create pin welcome screen
* Revert text fields label temporarily, fix a couple colors, and cleanup some images
---------
Co-authored-by: OmarHatem <omarh.ismail1@gmail.com>
Co-authored-by: Blazebrain <davidadegoke16@gmail.com>
2025-05-25 20:11:45 +00:00
|
|
|
Widget trailing(context) => Observer(
|
|
|
|
builder: (_) {
|
|
|
|
return sendViewModel.isBatchSending
|
|
|
|
? TrailButton(
|
|
|
|
caption: S.of(context).remove,
|
|
|
|
onPressed: () {
|
|
|
|
var pageToJump = (controller.page?.round() ?? 0) - 1;
|
|
|
|
pageToJump = pageToJump > 0 ? pageToJump : 0;
|
|
|
|
final output = _defineCurrentOutput();
|
|
|
|
sendViewModel.removeOutput(output);
|
|
|
|
controller.jumpToPage(pageToJump);
|
|
|
|
},
|
|
|
|
)
|
|
|
|
: TrailButton(
|
|
|
|
caption: S.of(context).clear,
|
|
|
|
onPressed: () {
|
|
|
|
final output = _defineCurrentOutput();
|
|
|
|
_formKey.currentState?.reset();
|
|
|
|
output.reset();
|
|
|
|
},
|
|
|
|
);
|
|
|
|
},
|
|
|
|
);
|
2020-09-02 11:47:41 +03:00
|
|
|
|
2020-09-21 22:01:45 +03:00
|
|
|
@override
|
|
|
|
Widget body(BuildContext context) {
|
|
|
|
_setEffects(context);
|
|
|
|
|
2025-03-10 16:37:23 -07:00
|
|
|
return Observer(builder: (_) {
|
|
|
|
List<Widget> sendCards = [];
|
|
|
|
List<KeyboardActionsItem> keyboardActions = [];
|
|
|
|
for (var output in sendViewModel.outputs) {
|
|
|
|
var cryptoAmountFocus = FocusNode();
|
|
|
|
var fiatAmountFocus = FocusNode();
|
New themes (#2239)
* Add theme base v2
* Initial new theme base files
* Typos
* Fixes
* Update theme files
* feat: Migrate to Material 3 Theming
Foundation, Theme Data Refactor, and First Extension Cleanup Batch.
This commit completes the first major phase of migrating to Material 3 theming by setting up the foundations for material 3 integration and begins the initial migration, removing custom theme extensions, updating theme data, and refactoring all relevant widget and page theming to use Material 3’s built-in color and typography tokens.
These changes:
- Lays the groundwork for Material 3 theming by restructuring the app’s theme configuration to use Material 3’s ColorScheme and TextTheme as the primary sources of color and typography throughout the app.
- Refactors the core theme config files by removing legacy custom color roles ensuring all color definitions now map directly to Material 3’s role.
- Begins the first batch migration of custom theme extensions (InfoTheme, PlaceholderTheme, KeyboardTheme, PinCodeTheme) and updates all affected widgets and pages to use Material 3 color and typography tokens instead of the custom properties.
- Cleans up the codebase by deleting the files of the initial set of migrated extensions and eliminating all related imports and usages.
* feat: Migrate to Material 3 Theming.
This change:
- Updates the themes README.md file to reflect the current structure and give more information based on the first major phase that was completed.
* feat: Migrate to Material 3 Theming
Deleting previous theme extensions
* feat: Migrate to Material 3 Theming
Another batch of migrations from existing extensions
* feat: Migration to Material 3 Theming
Third Migration batch for theme extensions
* fwat: Migration to Material 3 Theming
Final Migration batch for previous theme extensions
* Update onboarding hero
* Update button radius
* Add surfaceContainer to light theme
* feat(themes): Migrate to Material 3 Theming
This change:
- Adds new set of hero images
- Modifies the core structure for the themes
- Add missing color tokens to the theme classes
- Adds a CustomThemeColor class for custom color tokens
- Modifies the themelist to have a fall back for previous theme implementation
- Adds localization for some texts
- Modifies the flow for loading the theme on app start
- Add a WidgetsBindingObserver that listens for changes in the device theme and updates the app theme when there is a change
- Registers the themeStore as a Singleton for codebase wide use
* feat(themes): Migrate to Material 3 theming
This change:
- Migrates UI flows across the app to the new themes
- Confirms styling and typography of components across the app uses the new themes
- Remove instances of Palette use
- Switch TextStyles across the app to use theme text styles
* feat(themes): Migrate to Material 3 Theming.
This change:
- Adjusts bottomsheets styling and removes duplicate close button
- Removes more themedata extensions from the previous implementation
* - Remove outlines from cards and dock
- Update menu colors
- Update padding/divider size for cards
* - Update PIN screen
- Fix navigation dock shadow
- Update wallet screen colors
* Update border radius --skip-ci
* feat(themes): Migrate to Material 3 Theming.
This change:
- Adds gradient backgrounds to the dashbaord and balance cards.
- Migrates the input fields across the app to BaseTextFormFields.
- Removes dependence of input fields on individual styling, focusing instead on using theme defined InputDecoration styling with adjustments on individual components where needed.
- Applies new theme styling to BaseTextFormField, AddressTextField and CurrencyAmountTextField.
* - Switch some hero images to PNG
- Fix nagivation_dock shadow
- Minor fixes
* feat: Add fallback to previous underline styling in central widgets
This change:
- Adds a fallback to CurrencyAmountTextField, AddressTextField, and BaseTextFormField, allowing them use the previous theme styling.
- Adds localization for new texts
* feat(themes): Update warning box colors for dark and light themes
* feat(themes): Relaod themes when user restores from backup, ensuring the user previous theme preference is used.
* feat(themes): Handle themes logic during restore from backup
This change:
- Refactors theme loading logic to handle backup restore edgecase
- Refreshes the theme based on the user saved preference during restore from backup flow
* Fix card gradients and spacing
* Fix even more radiuses
Test new icons for navigation_dock.dart
* Update onboarding flow backgrounds
Fix swap icon clipping
Fix some text colors
Add more hero images
* Fix incorrect color for light theme
* Fix more hero images and cleanup
* Update text field icons
Fix info box CTA colors
Fix sync indicator colors
* Update toggle colors
Update dark theme colors (minor)
Update crypto_balance_widget.dart icon
* Update page transitions in router.dart
Fix some colors
* feat(themes): Display label by default for filled textfields
* feat(themes): Refactor theme handling across various components
This change:
- Fixes issue with themeMode resetting to system mode when app is restarted causing a UI glitch
- Updates theme checks from `currentTheme.type == ThemeType.dark` to `currentTheme.isDark` for consistency
- Adjusts UI components to use the theme directly from the themeStore
* feat(themes): Add animating tagline to the create pin welcome screen
* Revert text fields label temporarily, fix a couple colors, and cleanup some images
---------
Co-authored-by: OmarHatem <omarh.ismail1@gmail.com>
Co-authored-by: Blazebrain <davidadegoke16@gmail.com>
2025-05-25 20:11:45 +00:00
|
|
|
sendCards.add(
|
|
|
|
SendCard(
|
|
|
|
currentTheme: currentTheme,
|
|
|
|
key: output.key,
|
|
|
|
output: output,
|
|
|
|
sendViewModel: sendViewModel,
|
|
|
|
initialPaymentRequest: initialPaymentRequest,
|
|
|
|
cryptoAmountFocus: cryptoAmountFocus,
|
|
|
|
fiatAmountFocus: fiatAmountFocus,
|
|
|
|
),
|
|
|
|
);
|
|
|
|
keyboardActions.add(
|
|
|
|
KeyboardActionsItem(
|
|
|
|
focusNode: cryptoAmountFocus,
|
|
|
|
toolbarButtons: [(_) => KeyboardDoneButton()],
|
|
|
|
),
|
|
|
|
);
|
|
|
|
keyboardActions.add(
|
|
|
|
KeyboardActionsItem(
|
|
|
|
focusNode: fiatAmountFocus,
|
|
|
|
toolbarButtons: [(_) => KeyboardDoneButton()],
|
|
|
|
),
|
|
|
|
);
|
2025-03-10 16:37:23 -07:00
|
|
|
}
|
|
|
|
return Stack(
|
|
|
|
children: [
|
|
|
|
KeyboardActions(
|
|
|
|
config: KeyboardActionsConfig(
|
|
|
|
keyboardActionsPlatform: KeyboardActionsPlatform.ALL,
|
New themes (#2239)
* Add theme base v2
* Initial new theme base files
* Typos
* Fixes
* Update theme files
* feat: Migrate to Material 3 Theming
Foundation, Theme Data Refactor, and First Extension Cleanup Batch.
This commit completes the first major phase of migrating to Material 3 theming by setting up the foundations for material 3 integration and begins the initial migration, removing custom theme extensions, updating theme data, and refactoring all relevant widget and page theming to use Material 3’s built-in color and typography tokens.
These changes:
- Lays the groundwork for Material 3 theming by restructuring the app’s theme configuration to use Material 3’s ColorScheme and TextTheme as the primary sources of color and typography throughout the app.
- Refactors the core theme config files by removing legacy custom color roles ensuring all color definitions now map directly to Material 3’s role.
- Begins the first batch migration of custom theme extensions (InfoTheme, PlaceholderTheme, KeyboardTheme, PinCodeTheme) and updates all affected widgets and pages to use Material 3 color and typography tokens instead of the custom properties.
- Cleans up the codebase by deleting the files of the initial set of migrated extensions and eliminating all related imports and usages.
* feat: Migrate to Material 3 Theming.
This change:
- Updates the themes README.md file to reflect the current structure and give more information based on the first major phase that was completed.
* feat: Migrate to Material 3 Theming
Deleting previous theme extensions
* feat: Migrate to Material 3 Theming
Another batch of migrations from existing extensions
* feat: Migration to Material 3 Theming
Third Migration batch for theme extensions
* fwat: Migration to Material 3 Theming
Final Migration batch for previous theme extensions
* Update onboarding hero
* Update button radius
* Add surfaceContainer to light theme
* feat(themes): Migrate to Material 3 Theming
This change:
- Adds new set of hero images
- Modifies the core structure for the themes
- Add missing color tokens to the theme classes
- Adds a CustomThemeColor class for custom color tokens
- Modifies the themelist to have a fall back for previous theme implementation
- Adds localization for some texts
- Modifies the flow for loading the theme on app start
- Add a WidgetsBindingObserver that listens for changes in the device theme and updates the app theme when there is a change
- Registers the themeStore as a Singleton for codebase wide use
* feat(themes): Migrate to Material 3 theming
This change:
- Migrates UI flows across the app to the new themes
- Confirms styling and typography of components across the app uses the new themes
- Remove instances of Palette use
- Switch TextStyles across the app to use theme text styles
* feat(themes): Migrate to Material 3 Theming.
This change:
- Adjusts bottomsheets styling and removes duplicate close button
- Removes more themedata extensions from the previous implementation
* - Remove outlines from cards and dock
- Update menu colors
- Update padding/divider size for cards
* - Update PIN screen
- Fix navigation dock shadow
- Update wallet screen colors
* Update border radius --skip-ci
* feat(themes): Migrate to Material 3 Theming.
This change:
- Adds gradient backgrounds to the dashbaord and balance cards.
- Migrates the input fields across the app to BaseTextFormFields.
- Removes dependence of input fields on individual styling, focusing instead on using theme defined InputDecoration styling with adjustments on individual components where needed.
- Applies new theme styling to BaseTextFormField, AddressTextField and CurrencyAmountTextField.
* - Switch some hero images to PNG
- Fix nagivation_dock shadow
- Minor fixes
* feat: Add fallback to previous underline styling in central widgets
This change:
- Adds a fallback to CurrencyAmountTextField, AddressTextField, and BaseTextFormField, allowing them use the previous theme styling.
- Adds localization for new texts
* feat(themes): Update warning box colors for dark and light themes
* feat(themes): Relaod themes when user restores from backup, ensuring the user previous theme preference is used.
* feat(themes): Handle themes logic during restore from backup
This change:
- Refactors theme loading logic to handle backup restore edgecase
- Refreshes the theme based on the user saved preference during restore from backup flow
* Fix card gradients and spacing
* Fix even more radiuses
Test new icons for navigation_dock.dart
* Update onboarding flow backgrounds
Fix swap icon clipping
Fix some text colors
Add more hero images
* Fix incorrect color for light theme
* Fix more hero images and cleanup
* Update text field icons
Fix info box CTA colors
Fix sync indicator colors
* Update toggle colors
Update dark theme colors (minor)
Update crypto_balance_widget.dart icon
* Update page transitions in router.dart
Fix some colors
* feat(themes): Display label by default for filled textfields
* feat(themes): Refactor theme handling across various components
This change:
- Fixes issue with themeMode resetting to system mode when app is restarted causing a UI glitch
- Updates theme checks from `currentTheme.type == ThemeType.dark` to `currentTheme.isDark` for consistency
- Adjusts UI components to use the theme directly from the themeStore
* feat(themes): Add animating tagline to the create pin welcome screen
* Revert text fields label temporarily, fix a couple colors, and cleanup some images
---------
Co-authored-by: OmarHatem <omarh.ismail1@gmail.com>
Co-authored-by: Blazebrain <davidadegoke16@gmail.com>
2025-05-25 20:11:45 +00:00
|
|
|
keyboardBarColor: Theme.of(context).colorScheme.surface,
|
2025-03-10 16:37:23 -07:00
|
|
|
nextFocus: false,
|
|
|
|
actions: keyboardActions,
|
|
|
|
),
|
|
|
|
child: Container(
|
|
|
|
height: 0,
|
|
|
|
color: Colors.transparent,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
GestureDetector(
|
|
|
|
onLongPress: () => sendViewModel.balanceViewModel.isReversing =
|
|
|
|
!sendViewModel.balanceViewModel.isReversing,
|
|
|
|
onLongPressUp: () => sendViewModel.balanceViewModel.isReversing =
|
|
|
|
!sendViewModel.balanceViewModel.isReversing,
|
|
|
|
child: Form(
|
|
|
|
key: _formKey,
|
|
|
|
child: ScrollableWithBottomSection(
|
|
|
|
contentPadding: EdgeInsets.only(bottom: 24),
|
|
|
|
content: FocusTraversalGroup(
|
|
|
|
policy: OrderedTraversalPolicy(),
|
|
|
|
child: Column(
|
|
|
|
children: <Widget>[
|
|
|
|
PageViewHeightAdaptable(
|
|
|
|
controller: controller,
|
|
|
|
children: sendCards,
|
|
|
|
),
|
|
|
|
SizedBox(height: 10),
|
|
|
|
Padding(
|
|
|
|
padding: EdgeInsets.only(left: 24, right: 24, bottom: 10),
|
|
|
|
child: Container(
|
|
|
|
height: 10,
|
|
|
|
child: Observer(
|
|
|
|
builder: (_) {
|
|
|
|
final count = sendViewModel.outputs.length;
|
|
|
|
|
|
|
|
return count > 1
|
|
|
|
? Semantics(
|
|
|
|
label: 'Page Indicator',
|
|
|
|
hint: 'Swipe to change receiver',
|
|
|
|
excludeSemantics: true,
|
|
|
|
child: SmoothPageIndicator(
|
|
|
|
controller: controller,
|
|
|
|
count: count,
|
|
|
|
effect: ScrollingDotsEffect(
|
New themes (#2239)
* Add theme base v2
* Initial new theme base files
* Typos
* Fixes
* Update theme files
* feat: Migrate to Material 3 Theming
Foundation, Theme Data Refactor, and First Extension Cleanup Batch.
This commit completes the first major phase of migrating to Material 3 theming by setting up the foundations for material 3 integration and begins the initial migration, removing custom theme extensions, updating theme data, and refactoring all relevant widget and page theming to use Material 3’s built-in color and typography tokens.
These changes:
- Lays the groundwork for Material 3 theming by restructuring the app’s theme configuration to use Material 3’s ColorScheme and TextTheme as the primary sources of color and typography throughout the app.
- Refactors the core theme config files by removing legacy custom color roles ensuring all color definitions now map directly to Material 3’s role.
- Begins the first batch migration of custom theme extensions (InfoTheme, PlaceholderTheme, KeyboardTheme, PinCodeTheme) and updates all affected widgets and pages to use Material 3 color and typography tokens instead of the custom properties.
- Cleans up the codebase by deleting the files of the initial set of migrated extensions and eliminating all related imports and usages.
* feat: Migrate to Material 3 Theming.
This change:
- Updates the themes README.md file to reflect the current structure and give more information based on the first major phase that was completed.
* feat: Migrate to Material 3 Theming
Deleting previous theme extensions
* feat: Migrate to Material 3 Theming
Another batch of migrations from existing extensions
* feat: Migration to Material 3 Theming
Third Migration batch for theme extensions
* fwat: Migration to Material 3 Theming
Final Migration batch for previous theme extensions
* Update onboarding hero
* Update button radius
* Add surfaceContainer to light theme
* feat(themes): Migrate to Material 3 Theming
This change:
- Adds new set of hero images
- Modifies the core structure for the themes
- Add missing color tokens to the theme classes
- Adds a CustomThemeColor class for custom color tokens
- Modifies the themelist to have a fall back for previous theme implementation
- Adds localization for some texts
- Modifies the flow for loading the theme on app start
- Add a WidgetsBindingObserver that listens for changes in the device theme and updates the app theme when there is a change
- Registers the themeStore as a Singleton for codebase wide use
* feat(themes): Migrate to Material 3 theming
This change:
- Migrates UI flows across the app to the new themes
- Confirms styling and typography of components across the app uses the new themes
- Remove instances of Palette use
- Switch TextStyles across the app to use theme text styles
* feat(themes): Migrate to Material 3 Theming.
This change:
- Adjusts bottomsheets styling and removes duplicate close button
- Removes more themedata extensions from the previous implementation
* - Remove outlines from cards and dock
- Update menu colors
- Update padding/divider size for cards
* - Update PIN screen
- Fix navigation dock shadow
- Update wallet screen colors
* Update border radius --skip-ci
* feat(themes): Migrate to Material 3 Theming.
This change:
- Adds gradient backgrounds to the dashbaord and balance cards.
- Migrates the input fields across the app to BaseTextFormFields.
- Removes dependence of input fields on individual styling, focusing instead on using theme defined InputDecoration styling with adjustments on individual components where needed.
- Applies new theme styling to BaseTextFormField, AddressTextField and CurrencyAmountTextField.
* - Switch some hero images to PNG
- Fix nagivation_dock shadow
- Minor fixes
* feat: Add fallback to previous underline styling in central widgets
This change:
- Adds a fallback to CurrencyAmountTextField, AddressTextField, and BaseTextFormField, allowing them use the previous theme styling.
- Adds localization for new texts
* feat(themes): Update warning box colors for dark and light themes
* feat(themes): Relaod themes when user restores from backup, ensuring the user previous theme preference is used.
* feat(themes): Handle themes logic during restore from backup
This change:
- Refactors theme loading logic to handle backup restore edgecase
- Refreshes the theme based on the user saved preference during restore from backup flow
* Fix card gradients and spacing
* Fix even more radiuses
Test new icons for navigation_dock.dart
* Update onboarding flow backgrounds
Fix swap icon clipping
Fix some text colors
Add more hero images
* Fix incorrect color for light theme
* Fix more hero images and cleanup
* Update text field icons
Fix info box CTA colors
Fix sync indicator colors
* Update toggle colors
Update dark theme colors (minor)
Update crypto_balance_widget.dart icon
* Update page transitions in router.dart
Fix some colors
* feat(themes): Display label by default for filled textfields
* feat(themes): Refactor theme handling across various components
This change:
- Fixes issue with themeMode resetting to system mode when app is restarted causing a UI glitch
- Updates theme checks from `currentTheme.type == ThemeType.dark` to `currentTheme.isDark` for consistency
- Adjusts UI components to use the theme directly from the themeStore
* feat(themes): Add animating tagline to the create pin welcome screen
* Revert text fields label temporarily, fix a couple colors, and cleanup some images
---------
Co-authored-by: OmarHatem <omarh.ismail1@gmail.com>
Co-authored-by: Blazebrain <davidadegoke16@gmail.com>
2025-05-25 20:11:45 +00:00
|
|
|
spacing: 6.0,
|
|
|
|
radius: 6.0,
|
|
|
|
dotWidth: 6.0,
|
|
|
|
dotHeight: 6.0,
|
|
|
|
dotColor: Theme.of(context)
|
|
|
|
.colorScheme
|
|
|
|
.primary
|
|
|
|
.withOpacity(0.4),
|
|
|
|
activeDotColor: Theme.of(context).colorScheme.primary,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
)
|
2025-03-10 16:37:23 -07:00
|
|
|
: Offstage();
|
|
|
|
},
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
Container(
|
|
|
|
height: 40,
|
|
|
|
width: double.infinity,
|
|
|
|
padding: EdgeInsets.only(left: 24),
|
|
|
|
child: SingleChildScrollView(
|
|
|
|
scrollDirection: Axis.horizontal,
|
|
|
|
child: Observer(
|
|
|
|
builder: (_) {
|
|
|
|
final templates = sendViewModel.templates;
|
|
|
|
final itemCount = templates.length;
|
|
|
|
|
|
|
|
return Row(
|
|
|
|
children: <Widget>[
|
|
|
|
AddTemplateButton(
|
|
|
|
key: ValueKey('send_page_add_template_button_key'),
|
|
|
|
onTap: () =>
|
|
|
|
Navigator.of(context).pushNamed(Routes.sendTemplate),
|
|
|
|
currentTemplatesLength: templates.length,
|
|
|
|
),
|
|
|
|
ListView.builder(
|
|
|
|
scrollDirection: Axis.horizontal,
|
|
|
|
shrinkWrap: true,
|
|
|
|
physics: NeverScrollableScrollPhysics(),
|
|
|
|
itemCount: itemCount,
|
|
|
|
itemBuilder: (context, index) {
|
|
|
|
final template = templates[index];
|
|
|
|
return TemplateTile(
|
|
|
|
key: UniqueKey(),
|
|
|
|
to: template.name,
|
|
|
|
hasMultipleRecipients:
|
|
|
|
template.additionalRecipients != null &&
|
|
|
|
template.additionalRecipients!.length > 1,
|
|
|
|
amount: template.isCurrencySelected
|
|
|
|
? template.amount
|
|
|
|
: template.amountFiat,
|
|
|
|
from: template.isCurrencySelected
|
|
|
|
? template.cryptoCurrency
|
|
|
|
: template.fiatCurrency,
|
|
|
|
onTap: () async {
|
2025-03-21 05:24:22 +02:00
|
|
|
sendViewModel.state = LoadingTemplateExecutingState();
|
2025-03-10 16:37:23 -07:00
|
|
|
if (template.additionalRecipients?.isNotEmpty ??
|
|
|
|
false) {
|
|
|
|
sendViewModel.clearOutputs();
|
|
|
|
|
|
|
|
for (int i = 0;
|
|
|
|
i < template.additionalRecipients!.length;
|
|
|
|
i++) {
|
|
|
|
Output output;
|
|
|
|
try {
|
|
|
|
output = sendViewModel.outputs[i];
|
|
|
|
} catch (e) {
|
|
|
|
sendViewModel.addOutput();
|
|
|
|
output = sendViewModel.outputs[i];
|
|
|
|
}
|
|
|
|
|
|
|
|
await _setInputsFromTemplate(
|
|
|
|
context,
|
|
|
|
output: output,
|
|
|
|
template: template.additionalRecipients![i],
|
|
|
|
);
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
final output = _defineCurrentOutput();
|
|
|
|
await _setInputsFromTemplate(
|
|
|
|
context,
|
|
|
|
output: output,
|
|
|
|
template: template,
|
|
|
|
);
|
|
|
|
}
|
|
|
|
sendViewModel.state = InitialExecutionState();
|
|
|
|
},
|
|
|
|
onRemove: () {
|
|
|
|
showPopUp<void>(
|
|
|
|
context: context,
|
|
|
|
builder: (dialogContext) {
|
|
|
|
return AlertWithTwoActions(
|
|
|
|
alertTitle: S.of(context).template,
|
|
|
|
alertContent:
|
|
|
|
S.of(context).confirm_delete_template,
|
|
|
|
rightButtonText: S.of(context).delete,
|
|
|
|
leftButtonText: S.of(context).cancel,
|
|
|
|
actionRightButton: () {
|
|
|
|
Navigator.of(dialogContext).pop();
|
|
|
|
sendViewModel.sendTemplateViewModel
|
|
|
|
.removeTemplate(template: template);
|
|
|
|
},
|
|
|
|
actionLeftButton: () =>
|
|
|
|
Navigator.of(dialogContext).pop());
|
|
|
|
},
|
|
|
|
);
|
|
|
|
},
|
|
|
|
);
|
|
|
|
},
|
|
|
|
),
|
|
|
|
],
|
2023-04-14 06:39:08 +02:00
|
|
|
);
|
2025-03-10 16:37:23 -07:00
|
|
|
},
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
],
|
2023-04-14 06:39:08 +02:00
|
|
|
),
|
|
|
|
),
|
2025-03-10 16:37:23 -07:00
|
|
|
bottomSectionPadding: EdgeInsets.only(left: 24, right: 24, bottom: 24),
|
|
|
|
bottomSection: Column(
|
|
|
|
children: [
|
|
|
|
if (sendViewModel.hasCurrecyChanger)
|
|
|
|
Observer(
|
|
|
|
builder: (_) => Padding(
|
|
|
|
padding: EdgeInsets.only(bottom: 12),
|
|
|
|
child: PrimaryButton(
|
|
|
|
key: ValueKey('send_page_change_asset_button_key'),
|
|
|
|
onPressed: () => presentCurrencyPicker(context),
|
|
|
|
text: 'Change your asset (${sendViewModel.selectedCryptoCurrency})',
|
|
|
|
color: Colors.transparent,
|
New themes (#2239)
* Add theme base v2
* Initial new theme base files
* Typos
* Fixes
* Update theme files
* feat: Migrate to Material 3 Theming
Foundation, Theme Data Refactor, and First Extension Cleanup Batch.
This commit completes the first major phase of migrating to Material 3 theming by setting up the foundations for material 3 integration and begins the initial migration, removing custom theme extensions, updating theme data, and refactoring all relevant widget and page theming to use Material 3’s built-in color and typography tokens.
These changes:
- Lays the groundwork for Material 3 theming by restructuring the app’s theme configuration to use Material 3’s ColorScheme and TextTheme as the primary sources of color and typography throughout the app.
- Refactors the core theme config files by removing legacy custom color roles ensuring all color definitions now map directly to Material 3’s role.
- Begins the first batch migration of custom theme extensions (InfoTheme, PlaceholderTheme, KeyboardTheme, PinCodeTheme) and updates all affected widgets and pages to use Material 3 color and typography tokens instead of the custom properties.
- Cleans up the codebase by deleting the files of the initial set of migrated extensions and eliminating all related imports and usages.
* feat: Migrate to Material 3 Theming.
This change:
- Updates the themes README.md file to reflect the current structure and give more information based on the first major phase that was completed.
* feat: Migrate to Material 3 Theming
Deleting previous theme extensions
* feat: Migrate to Material 3 Theming
Another batch of migrations from existing extensions
* feat: Migration to Material 3 Theming
Third Migration batch for theme extensions
* fwat: Migration to Material 3 Theming
Final Migration batch for previous theme extensions
* Update onboarding hero
* Update button radius
* Add surfaceContainer to light theme
* feat(themes): Migrate to Material 3 Theming
This change:
- Adds new set of hero images
- Modifies the core structure for the themes
- Add missing color tokens to the theme classes
- Adds a CustomThemeColor class for custom color tokens
- Modifies the themelist to have a fall back for previous theme implementation
- Adds localization for some texts
- Modifies the flow for loading the theme on app start
- Add a WidgetsBindingObserver that listens for changes in the device theme and updates the app theme when there is a change
- Registers the themeStore as a Singleton for codebase wide use
* feat(themes): Migrate to Material 3 theming
This change:
- Migrates UI flows across the app to the new themes
- Confirms styling and typography of components across the app uses the new themes
- Remove instances of Palette use
- Switch TextStyles across the app to use theme text styles
* feat(themes): Migrate to Material 3 Theming.
This change:
- Adjusts bottomsheets styling and removes duplicate close button
- Removes more themedata extensions from the previous implementation
* - Remove outlines from cards and dock
- Update menu colors
- Update padding/divider size for cards
* - Update PIN screen
- Fix navigation dock shadow
- Update wallet screen colors
* Update border radius --skip-ci
* feat(themes): Migrate to Material 3 Theming.
This change:
- Adds gradient backgrounds to the dashbaord and balance cards.
- Migrates the input fields across the app to BaseTextFormFields.
- Removes dependence of input fields on individual styling, focusing instead on using theme defined InputDecoration styling with adjustments on individual components where needed.
- Applies new theme styling to BaseTextFormField, AddressTextField and CurrencyAmountTextField.
* - Switch some hero images to PNG
- Fix nagivation_dock shadow
- Minor fixes
* feat: Add fallback to previous underline styling in central widgets
This change:
- Adds a fallback to CurrencyAmountTextField, AddressTextField, and BaseTextFormField, allowing them use the previous theme styling.
- Adds localization for new texts
* feat(themes): Update warning box colors for dark and light themes
* feat(themes): Relaod themes when user restores from backup, ensuring the user previous theme preference is used.
* feat(themes): Handle themes logic during restore from backup
This change:
- Refactors theme loading logic to handle backup restore edgecase
- Refreshes the theme based on the user saved preference during restore from backup flow
* Fix card gradients and spacing
* Fix even more radiuses
Test new icons for navigation_dock.dart
* Update onboarding flow backgrounds
Fix swap icon clipping
Fix some text colors
Add more hero images
* Fix incorrect color for light theme
* Fix more hero images and cleanup
* Update text field icons
Fix info box CTA colors
Fix sync indicator colors
* Update toggle colors
Update dark theme colors (minor)
Update crypto_balance_widget.dart icon
* Update page transitions in router.dart
Fix some colors
* feat(themes): Display label by default for filled textfields
* feat(themes): Refactor theme handling across various components
This change:
- Fixes issue with themeMode resetting to system mode when app is restarted causing a UI glitch
- Updates theme checks from `currentTheme.type == ThemeType.dark` to `currentTheme.isDark` for consistency
- Adjusts UI components to use the theme directly from the themeStore
* feat(themes): Add animating tagline to the create pin welcome screen
* Revert text fields label temporarily, fix a couple colors, and cleanup some images
---------
Co-authored-by: OmarHatem <omarh.ismail1@gmail.com>
Co-authored-by: Blazebrain <davidadegoke16@gmail.com>
2025-05-25 20:11:45 +00:00
|
|
|
textColor: Theme.of(context).colorScheme.onSurfaceVariant,
|
2025-03-10 16:37:23 -07:00
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
if (sendViewModel.sendTemplateViewModel.hasMultiRecipient)
|
|
|
|
Padding(
|
|
|
|
padding: EdgeInsets.only(bottom: 12),
|
|
|
|
child: PrimaryButton(
|
|
|
|
key: ValueKey('send_page_add_receiver_button_key'),
|
|
|
|
onPressed: () {
|
|
|
|
sendViewModel.addOutput();
|
|
|
|
Future.delayed(const Duration(milliseconds: 250), () {
|
|
|
|
controller.jumpToPage(sendViewModel.outputs.length - 1);
|
|
|
|
});
|
|
|
|
},
|
|
|
|
text: S.of(context).add_receiver,
|
|
|
|
color: Colors.transparent,
|
New themes (#2239)
* Add theme base v2
* Initial new theme base files
* Typos
* Fixes
* Update theme files
* feat: Migrate to Material 3 Theming
Foundation, Theme Data Refactor, and First Extension Cleanup Batch.
This commit completes the first major phase of migrating to Material 3 theming by setting up the foundations for material 3 integration and begins the initial migration, removing custom theme extensions, updating theme data, and refactoring all relevant widget and page theming to use Material 3’s built-in color and typography tokens.
These changes:
- Lays the groundwork for Material 3 theming by restructuring the app’s theme configuration to use Material 3’s ColorScheme and TextTheme as the primary sources of color and typography throughout the app.
- Refactors the core theme config files by removing legacy custom color roles ensuring all color definitions now map directly to Material 3’s role.
- Begins the first batch migration of custom theme extensions (InfoTheme, PlaceholderTheme, KeyboardTheme, PinCodeTheme) and updates all affected widgets and pages to use Material 3 color and typography tokens instead of the custom properties.
- Cleans up the codebase by deleting the files of the initial set of migrated extensions and eliminating all related imports and usages.
* feat: Migrate to Material 3 Theming.
This change:
- Updates the themes README.md file to reflect the current structure and give more information based on the first major phase that was completed.
* feat: Migrate to Material 3 Theming
Deleting previous theme extensions
* feat: Migrate to Material 3 Theming
Another batch of migrations from existing extensions
* feat: Migration to Material 3 Theming
Third Migration batch for theme extensions
* fwat: Migration to Material 3 Theming
Final Migration batch for previous theme extensions
* Update onboarding hero
* Update button radius
* Add surfaceContainer to light theme
* feat(themes): Migrate to Material 3 Theming
This change:
- Adds new set of hero images
- Modifies the core structure for the themes
- Add missing color tokens to the theme classes
- Adds a CustomThemeColor class for custom color tokens
- Modifies the themelist to have a fall back for previous theme implementation
- Adds localization for some texts
- Modifies the flow for loading the theme on app start
- Add a WidgetsBindingObserver that listens for changes in the device theme and updates the app theme when there is a change
- Registers the themeStore as a Singleton for codebase wide use
* feat(themes): Migrate to Material 3 theming
This change:
- Migrates UI flows across the app to the new themes
- Confirms styling and typography of components across the app uses the new themes
- Remove instances of Palette use
- Switch TextStyles across the app to use theme text styles
* feat(themes): Migrate to Material 3 Theming.
This change:
- Adjusts bottomsheets styling and removes duplicate close button
- Removes more themedata extensions from the previous implementation
* - Remove outlines from cards and dock
- Update menu colors
- Update padding/divider size for cards
* - Update PIN screen
- Fix navigation dock shadow
- Update wallet screen colors
* Update border radius --skip-ci
* feat(themes): Migrate to Material 3 Theming.
This change:
- Adds gradient backgrounds to the dashbaord and balance cards.
- Migrates the input fields across the app to BaseTextFormFields.
- Removes dependence of input fields on individual styling, focusing instead on using theme defined InputDecoration styling with adjustments on individual components where needed.
- Applies new theme styling to BaseTextFormField, AddressTextField and CurrencyAmountTextField.
* - Switch some hero images to PNG
- Fix nagivation_dock shadow
- Minor fixes
* feat: Add fallback to previous underline styling in central widgets
This change:
- Adds a fallback to CurrencyAmountTextField, AddressTextField, and BaseTextFormField, allowing them use the previous theme styling.
- Adds localization for new texts
* feat(themes): Update warning box colors for dark and light themes
* feat(themes): Relaod themes when user restores from backup, ensuring the user previous theme preference is used.
* feat(themes): Handle themes logic during restore from backup
This change:
- Refactors theme loading logic to handle backup restore edgecase
- Refreshes the theme based on the user saved preference during restore from backup flow
* Fix card gradients and spacing
* Fix even more radiuses
Test new icons for navigation_dock.dart
* Update onboarding flow backgrounds
Fix swap icon clipping
Fix some text colors
Add more hero images
* Fix incorrect color for light theme
* Fix more hero images and cleanup
* Update text field icons
Fix info box CTA colors
Fix sync indicator colors
* Update toggle colors
Update dark theme colors (minor)
Update crypto_balance_widget.dart icon
* Update page transitions in router.dart
Fix some colors
* feat(themes): Display label by default for filled textfields
* feat(themes): Refactor theme handling across various components
This change:
- Fixes issue with themeMode resetting to system mode when app is restarted causing a UI glitch
- Updates theme checks from `currentTheme.type == ThemeType.dark` to `currentTheme.isDark` for consistency
- Adjusts UI components to use the theme directly from the themeStore
* feat(themes): Add animating tagline to the create pin welcome screen
* Revert text fields label temporarily, fix a couple colors, and cleanup some images
---------
Co-authored-by: OmarHatem <omarh.ismail1@gmail.com>
Co-authored-by: Blazebrain <davidadegoke16@gmail.com>
2025-05-25 20:11:45 +00:00
|
|
|
textColor: Theme.of(context).colorScheme.onSurfaceVariant,
|
2025-03-10 16:37:23 -07:00
|
|
|
isDottedBorder: true,
|
New themes (#2239)
* Add theme base v2
* Initial new theme base files
* Typos
* Fixes
* Update theme files
* feat: Migrate to Material 3 Theming
Foundation, Theme Data Refactor, and First Extension Cleanup Batch.
This commit completes the first major phase of migrating to Material 3 theming by setting up the foundations for material 3 integration and begins the initial migration, removing custom theme extensions, updating theme data, and refactoring all relevant widget and page theming to use Material 3’s built-in color and typography tokens.
These changes:
- Lays the groundwork for Material 3 theming by restructuring the app’s theme configuration to use Material 3’s ColorScheme and TextTheme as the primary sources of color and typography throughout the app.
- Refactors the core theme config files by removing legacy custom color roles ensuring all color definitions now map directly to Material 3’s role.
- Begins the first batch migration of custom theme extensions (InfoTheme, PlaceholderTheme, KeyboardTheme, PinCodeTheme) and updates all affected widgets and pages to use Material 3 color and typography tokens instead of the custom properties.
- Cleans up the codebase by deleting the files of the initial set of migrated extensions and eliminating all related imports and usages.
* feat: Migrate to Material 3 Theming.
This change:
- Updates the themes README.md file to reflect the current structure and give more information based on the first major phase that was completed.
* feat: Migrate to Material 3 Theming
Deleting previous theme extensions
* feat: Migrate to Material 3 Theming
Another batch of migrations from existing extensions
* feat: Migration to Material 3 Theming
Third Migration batch for theme extensions
* fwat: Migration to Material 3 Theming
Final Migration batch for previous theme extensions
* Update onboarding hero
* Update button radius
* Add surfaceContainer to light theme
* feat(themes): Migrate to Material 3 Theming
This change:
- Adds new set of hero images
- Modifies the core structure for the themes
- Add missing color tokens to the theme classes
- Adds a CustomThemeColor class for custom color tokens
- Modifies the themelist to have a fall back for previous theme implementation
- Adds localization for some texts
- Modifies the flow for loading the theme on app start
- Add a WidgetsBindingObserver that listens for changes in the device theme and updates the app theme when there is a change
- Registers the themeStore as a Singleton for codebase wide use
* feat(themes): Migrate to Material 3 theming
This change:
- Migrates UI flows across the app to the new themes
- Confirms styling and typography of components across the app uses the new themes
- Remove instances of Palette use
- Switch TextStyles across the app to use theme text styles
* feat(themes): Migrate to Material 3 Theming.
This change:
- Adjusts bottomsheets styling and removes duplicate close button
- Removes more themedata extensions from the previous implementation
* - Remove outlines from cards and dock
- Update menu colors
- Update padding/divider size for cards
* - Update PIN screen
- Fix navigation dock shadow
- Update wallet screen colors
* Update border radius --skip-ci
* feat(themes): Migrate to Material 3 Theming.
This change:
- Adds gradient backgrounds to the dashbaord and balance cards.
- Migrates the input fields across the app to BaseTextFormFields.
- Removes dependence of input fields on individual styling, focusing instead on using theme defined InputDecoration styling with adjustments on individual components where needed.
- Applies new theme styling to BaseTextFormField, AddressTextField and CurrencyAmountTextField.
* - Switch some hero images to PNG
- Fix nagivation_dock shadow
- Minor fixes
* feat: Add fallback to previous underline styling in central widgets
This change:
- Adds a fallback to CurrencyAmountTextField, AddressTextField, and BaseTextFormField, allowing them use the previous theme styling.
- Adds localization for new texts
* feat(themes): Update warning box colors for dark and light themes
* feat(themes): Relaod themes when user restores from backup, ensuring the user previous theme preference is used.
* feat(themes): Handle themes logic during restore from backup
This change:
- Refactors theme loading logic to handle backup restore edgecase
- Refreshes the theme based on the user saved preference during restore from backup flow
* Fix card gradients and spacing
* Fix even more radiuses
Test new icons for navigation_dock.dart
* Update onboarding flow backgrounds
Fix swap icon clipping
Fix some text colors
Add more hero images
* Fix incorrect color for light theme
* Fix more hero images and cleanup
* Update text field icons
Fix info box CTA colors
Fix sync indicator colors
* Update toggle colors
Update dark theme colors (minor)
Update crypto_balance_widget.dart icon
* Update page transitions in router.dart
Fix some colors
* feat(themes): Display label by default for filled textfields
* feat(themes): Refactor theme handling across various components
This change:
- Fixes issue with themeMode resetting to system mode when app is restarted causing a UI glitch
- Updates theme checks from `currentTheme.type == ThemeType.dark` to `currentTheme.isDark` for consistency
- Adjusts UI components to use the theme directly from the themeStore
* feat(themes): Add animating tagline to the create pin welcome screen
* Revert text fields label temporarily, fix a couple colors, and cleanup some images
---------
Co-authored-by: OmarHatem <omarh.ismail1@gmail.com>
Co-authored-by: Blazebrain <davidadegoke16@gmail.com>
2025-05-25 20:11:45 +00:00
|
|
|
borderColor: Theme.of(context).colorScheme.outline,
|
2025-03-10 16:37:23 -07:00
|
|
|
)),
|
|
|
|
Observer(
|
2023-08-04 20:01:49 +03:00
|
|
|
builder: (_) {
|
2025-03-10 16:37:23 -07:00
|
|
|
return LoadingPrimaryButton(
|
|
|
|
key: ValueKey('send_page_send_button_key'),
|
|
|
|
onPressed: () async {
|
2025-03-28 00:18:50 +02:00
|
|
|
//Request dummy node to get the focus out of the text fields
|
|
|
|
FocusScope.of(context).requestFocus(FocusNode());
|
|
|
|
|
2025-03-10 16:37:23 -07:00
|
|
|
if (sendViewModel.state is IsExecutingState) return;
|
|
|
|
if (_formKey.currentState != null &&
|
|
|
|
!_formKey.currentState!.validate()) {
|
|
|
|
if (sendViewModel.outputs.length > 1) {
|
|
|
|
showErrorValidationAlert(context);
|
|
|
|
}
|
|
|
|
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
final notValidItems = sendViewModel.outputs
|
|
|
|
.where(
|
|
|
|
(item) => item.address.isEmpty || item.cryptoAmount.isEmpty)
|
|
|
|
.toList();
|
|
|
|
|
|
|
|
if (notValidItems.isNotEmpty) {
|
|
|
|
showErrorValidationAlert(context);
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
if (sendViewModel.wallet.isHardwareWallet) {
|
|
|
|
if (!sendViewModel.ledgerViewModel!.isConnected) {
|
|
|
|
await Navigator.of(context).pushNamed(Routes.connectDevices,
|
|
|
|
arguments: ConnectDevicePageParams(
|
|
|
|
walletType: sendViewModel.walletType,
|
|
|
|
onConnectDevice: (BuildContext context, _) {
|
|
|
|
sendViewModel.ledgerViewModel!
|
|
|
|
.setLedger(sendViewModel.wallet);
|
|
|
|
Navigator.of(context).pop();
|
2023-08-04 20:01:49 +03:00
|
|
|
},
|
2025-03-10 16:37:23 -07:00
|
|
|
));
|
|
|
|
} else {
|
|
|
|
sendViewModel.ledgerViewModel!.setLedger(sendViewModel.wallet);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
if (sendViewModel.wallet.type == WalletType.monero) {
|
|
|
|
int amount = 0;
|
|
|
|
for (var item in sendViewModel.outputs) {
|
|
|
|
amount += item.formattedCryptoAmount;
|
|
|
|
}
|
|
|
|
if (monero!.needExportOutputs(sendViewModel.wallet, amount)) {
|
|
|
|
await Navigator.of(context).pushNamed(Routes.urqrAnimatedPage,
|
|
|
|
arguments: 'export-outputs');
|
|
|
|
await Future.delayed(
|
|
|
|
Duration(seconds: 1)); // wait for monero to refresh the state
|
|
|
|
}
|
|
|
|
if (monero!.needExportOutputs(sendViewModel.wallet, amount)) {
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
final check = sendViewModel.shouldDisplayTotp();
|
|
|
|
authService.authenticateAction(
|
|
|
|
context,
|
|
|
|
conditionToDetermineIfToUse2FA: check,
|
|
|
|
onAuthSuccess: (value) async {
|
|
|
|
if (value) {
|
|
|
|
await sendViewModel.createTransaction();
|
|
|
|
}
|
2023-08-04 20:01:49 +03:00
|
|
|
},
|
2025-03-10 16:37:23 -07:00
|
|
|
);
|
|
|
|
},
|
New themes (#2239)
* Add theme base v2
* Initial new theme base files
* Typos
* Fixes
* Update theme files
* feat: Migrate to Material 3 Theming
Foundation, Theme Data Refactor, and First Extension Cleanup Batch.
This commit completes the first major phase of migrating to Material 3 theming by setting up the foundations for material 3 integration and begins the initial migration, removing custom theme extensions, updating theme data, and refactoring all relevant widget and page theming to use Material 3’s built-in color and typography tokens.
These changes:
- Lays the groundwork for Material 3 theming by restructuring the app’s theme configuration to use Material 3’s ColorScheme and TextTheme as the primary sources of color and typography throughout the app.
- Refactors the core theme config files by removing legacy custom color roles ensuring all color definitions now map directly to Material 3’s role.
- Begins the first batch migration of custom theme extensions (InfoTheme, PlaceholderTheme, KeyboardTheme, PinCodeTheme) and updates all affected widgets and pages to use Material 3 color and typography tokens instead of the custom properties.
- Cleans up the codebase by deleting the files of the initial set of migrated extensions and eliminating all related imports and usages.
* feat: Migrate to Material 3 Theming.
This change:
- Updates the themes README.md file to reflect the current structure and give more information based on the first major phase that was completed.
* feat: Migrate to Material 3 Theming
Deleting previous theme extensions
* feat: Migrate to Material 3 Theming
Another batch of migrations from existing extensions
* feat: Migration to Material 3 Theming
Third Migration batch for theme extensions
* fwat: Migration to Material 3 Theming
Final Migration batch for previous theme extensions
* Update onboarding hero
* Update button radius
* Add surfaceContainer to light theme
* feat(themes): Migrate to Material 3 Theming
This change:
- Adds new set of hero images
- Modifies the core structure for the themes
- Add missing color tokens to the theme classes
- Adds a CustomThemeColor class for custom color tokens
- Modifies the themelist to have a fall back for previous theme implementation
- Adds localization for some texts
- Modifies the flow for loading the theme on app start
- Add a WidgetsBindingObserver that listens for changes in the device theme and updates the app theme when there is a change
- Registers the themeStore as a Singleton for codebase wide use
* feat(themes): Migrate to Material 3 theming
This change:
- Migrates UI flows across the app to the new themes
- Confirms styling and typography of components across the app uses the new themes
- Remove instances of Palette use
- Switch TextStyles across the app to use theme text styles
* feat(themes): Migrate to Material 3 Theming.
This change:
- Adjusts bottomsheets styling and removes duplicate close button
- Removes more themedata extensions from the previous implementation
* - Remove outlines from cards and dock
- Update menu colors
- Update padding/divider size for cards
* - Update PIN screen
- Fix navigation dock shadow
- Update wallet screen colors
* Update border radius --skip-ci
* feat(themes): Migrate to Material 3 Theming.
This change:
- Adds gradient backgrounds to the dashbaord and balance cards.
- Migrates the input fields across the app to BaseTextFormFields.
- Removes dependence of input fields on individual styling, focusing instead on using theme defined InputDecoration styling with adjustments on individual components where needed.
- Applies new theme styling to BaseTextFormField, AddressTextField and CurrencyAmountTextField.
* - Switch some hero images to PNG
- Fix nagivation_dock shadow
- Minor fixes
* feat: Add fallback to previous underline styling in central widgets
This change:
- Adds a fallback to CurrencyAmountTextField, AddressTextField, and BaseTextFormField, allowing them use the previous theme styling.
- Adds localization for new texts
* feat(themes): Update warning box colors for dark and light themes
* feat(themes): Relaod themes when user restores from backup, ensuring the user previous theme preference is used.
* feat(themes): Handle themes logic during restore from backup
This change:
- Refactors theme loading logic to handle backup restore edgecase
- Refreshes the theme based on the user saved preference during restore from backup flow
* Fix card gradients and spacing
* Fix even more radiuses
Test new icons for navigation_dock.dart
* Update onboarding flow backgrounds
Fix swap icon clipping
Fix some text colors
Add more hero images
* Fix incorrect color for light theme
* Fix more hero images and cleanup
* Update text field icons
Fix info box CTA colors
Fix sync indicator colors
* Update toggle colors
Update dark theme colors (minor)
Update crypto_balance_widget.dart icon
* Update page transitions in router.dart
Fix some colors
* feat(themes): Display label by default for filled textfields
* feat(themes): Refactor theme handling across various components
This change:
- Fixes issue with themeMode resetting to system mode when app is restarted causing a UI glitch
- Updates theme checks from `currentTheme.type == ThemeType.dark` to `currentTheme.isDark` for consistency
- Adjusts UI components to use the theme directly from the themeStore
* feat(themes): Add animating tagline to the create pin welcome screen
* Revert text fields label temporarily, fix a couple colors, and cleanup some images
---------
Co-authored-by: OmarHatem <omarh.ismail1@gmail.com>
Co-authored-by: Blazebrain <davidadegoke16@gmail.com>
2025-05-25 20:11:45 +00:00
|
|
|
text: sendViewModel.payjoinUri != null
|
|
|
|
? S.of(context).send_payjoin
|
|
|
|
: S.of(context).send,
|
|
|
|
color: Theme.of(context).colorScheme.primary,
|
|
|
|
textColor: Theme.of(context).colorScheme.onPrimary,
|
2025-03-10 16:37:23 -07:00
|
|
|
isLoading: sendViewModel.state is IsExecutingState ||
|
|
|
|
sendViewModel.state is TransactionCommitting ||
|
2025-03-21 05:24:22 +02:00
|
|
|
sendViewModel.state is IsAwaitingDeviceResponseState ||
|
|
|
|
sendViewModel.state is LoadingTemplateExecutingState,
|
2025-03-10 16:37:23 -07:00
|
|
|
isDisabled: !sendViewModel.isReadyForSend,
|
2023-08-04 20:01:49 +03:00
|
|
|
);
|
|
|
|
},
|
2025-03-10 16:37:23 -07:00
|
|
|
)
|
|
|
|
],
|
|
|
|
)),
|
2023-04-14 06:39:08 +02:00
|
|
|
),
|
2025-03-10 16:37:23 -07:00
|
|
|
),
|
|
|
|
],
|
|
|
|
);
|
|
|
|
});
|
2020-09-21 22:01:45 +03:00
|
|
|
}
|
|
|
|
|
2024-05-04 20:44:50 -05:00
|
|
|
BuildContext? dialogContext;
|
2025-03-21 05:24:22 +02:00
|
|
|
BuildContext? loadingBottomSheetContext;
|
2024-05-04 20:44:50 -05:00
|
|
|
|
2020-09-21 22:01:45 +03:00
|
|
|
void _setEffects(BuildContext context) {
|
|
|
|
if (_effectsInstalled) {
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
Cw 453 (#1306)
* feat: rebase btc-addr-types, migrate to bitcoin_base
* feat: allow scanning elect-rs using get_tweaks
* feat: scanning and adding addresses working with getTweaks, add btc SP address type
* chore: pubspec.lock
* chore: pubspec.lock
* fix: scan when switching, fix multiple unspents in same tx
* fix: initial scan
* fix: initial scan
* fix: scanning issues
* fix: sync, storing silent unspents
* chore: deps
* fix: label issues, clear spent utxo
* chore: deps
* fix: build
* fix: missing types
* feat: new electrs API & changes, fixes for last block scanning
* feat: Scan Silent Payments homepage toggle
* chore: build configure
* feat: generic fixes, testnet UI improvements, useSSL on bitcoin nodes
* fix: invalid Object in sendData
* feat: improve addresses page & address book displays
* feat: silent payments labeled addresses disclaimer
* fix: missing i18n
* chore: print
* feat: single block scan, rescan by date working for btc mainnet
* feat: new cake features page replace market page, move sp scan toggle, auto switch node pop up alert
* feat: delete silent addresses
* fix: red dot in non ssl nodes
* fix: inconsistent connection states, fix tx history
* fix: tx & balance displays, cpfp sending
* feat: new rust lib
* chore: node path
* fix: check node based on network
* fix: missing txcount from addresses
* style: padding in feature page cards
* fix: restore not getting all wallet addresses by type
* fix: auto switch node broken
* fix: silent payment txs not being restored
* feat: change scanning to subscription model, sync improvements
* fix: scan re-subscription
* fix: default nodes
* fix: improve scanning by date, fix single block scan
* refactor: common function for input tx selection
* fix: nodes & build
* fix: send all with multiple outs
* refactor: unchanged file
* Update pr_test_build.yml
* chore: upgrade
* chore: merge changes
* refactor: unchanged files [skip ci]
* fix: scan fixes, add date, allow sending while scanning
* feat: sync fixes, sp settings
* feat: fix resyncing
* fix: date from height logic, status disconnected & chain tip get
* fix: params
* feat: electrum migration if using cake electrum
* fix nodes
update versions
* re-enable tron
* update sp_scanner to work on iOS [skip ci]
* fix: wrong socket for old electrum nodes
* Fix unchecked wallet type call
* fix: double balance
* feat: node domain
* fix: menu name
* fix: update tip on set scanning
* fix: connection switching back and forth
* feat: check if node is electrs, and supports sp
* chore: fix build
* minor enhancements
* fixes and enhancements
* solve conflicts with main
* fix: status toggle
* minor enhancement
* Monero.com fixes
* update sp_scanner to include windows and linux
---------
Co-authored-by: Omar Hatem <omarh.ismail1@gmail.com>
2024-05-29 11:43:48 -03:00
|
|
|
if (sendViewModel.isElectrumWallet) {
|
|
|
|
bitcoin!.updateFeeRates(sendViewModel.wallet);
|
|
|
|
}
|
|
|
|
|
2025-04-03 17:34:07 +03:00
|
|
|
reaction((_) => sendViewModel.state, (ExecutionState state) async {
|
2024-05-04 20:44:50 -05:00
|
|
|
if (dialogContext != null && dialogContext?.mounted == true) {
|
|
|
|
Navigator.of(dialogContext!).pop();
|
|
|
|
}
|
|
|
|
|
2025-03-21 05:24:22 +02:00
|
|
|
if (state is! IsExecutingState &&
|
|
|
|
loadingBottomSheetContext != null &&
|
|
|
|
loadingBottomSheetContext!.mounted) {
|
|
|
|
Navigator.of(loadingBottomSheetContext!).pop();
|
|
|
|
}
|
|
|
|
|
2020-09-22 22:26:20 +03:00
|
|
|
if (state is FailureState) {
|
New themes (#2239)
* Add theme base v2
* Initial new theme base files
* Typos
* Fixes
* Update theme files
* feat: Migrate to Material 3 Theming
Foundation, Theme Data Refactor, and First Extension Cleanup Batch.
This commit completes the first major phase of migrating to Material 3 theming by setting up the foundations for material 3 integration and begins the initial migration, removing custom theme extensions, updating theme data, and refactoring all relevant widget and page theming to use Material 3’s built-in color and typography tokens.
These changes:
- Lays the groundwork for Material 3 theming by restructuring the app’s theme configuration to use Material 3’s ColorScheme and TextTheme as the primary sources of color and typography throughout the app.
- Refactors the core theme config files by removing legacy custom color roles ensuring all color definitions now map directly to Material 3’s role.
- Begins the first batch migration of custom theme extensions (InfoTheme, PlaceholderTheme, KeyboardTheme, PinCodeTheme) and updates all affected widgets and pages to use Material 3 color and typography tokens instead of the custom properties.
- Cleans up the codebase by deleting the files of the initial set of migrated extensions and eliminating all related imports and usages.
* feat: Migrate to Material 3 Theming.
This change:
- Updates the themes README.md file to reflect the current structure and give more information based on the first major phase that was completed.
* feat: Migrate to Material 3 Theming
Deleting previous theme extensions
* feat: Migrate to Material 3 Theming
Another batch of migrations from existing extensions
* feat: Migration to Material 3 Theming
Third Migration batch for theme extensions
* fwat: Migration to Material 3 Theming
Final Migration batch for previous theme extensions
* Update onboarding hero
* Update button radius
* Add surfaceContainer to light theme
* feat(themes): Migrate to Material 3 Theming
This change:
- Adds new set of hero images
- Modifies the core structure for the themes
- Add missing color tokens to the theme classes
- Adds a CustomThemeColor class for custom color tokens
- Modifies the themelist to have a fall back for previous theme implementation
- Adds localization for some texts
- Modifies the flow for loading the theme on app start
- Add a WidgetsBindingObserver that listens for changes in the device theme and updates the app theme when there is a change
- Registers the themeStore as a Singleton for codebase wide use
* feat(themes): Migrate to Material 3 theming
This change:
- Migrates UI flows across the app to the new themes
- Confirms styling and typography of components across the app uses the new themes
- Remove instances of Palette use
- Switch TextStyles across the app to use theme text styles
* feat(themes): Migrate to Material 3 Theming.
This change:
- Adjusts bottomsheets styling and removes duplicate close button
- Removes more themedata extensions from the previous implementation
* - Remove outlines from cards and dock
- Update menu colors
- Update padding/divider size for cards
* - Update PIN screen
- Fix navigation dock shadow
- Update wallet screen colors
* Update border radius --skip-ci
* feat(themes): Migrate to Material 3 Theming.
This change:
- Adds gradient backgrounds to the dashbaord and balance cards.
- Migrates the input fields across the app to BaseTextFormFields.
- Removes dependence of input fields on individual styling, focusing instead on using theme defined InputDecoration styling with adjustments on individual components where needed.
- Applies new theme styling to BaseTextFormField, AddressTextField and CurrencyAmountTextField.
* - Switch some hero images to PNG
- Fix nagivation_dock shadow
- Minor fixes
* feat: Add fallback to previous underline styling in central widgets
This change:
- Adds a fallback to CurrencyAmountTextField, AddressTextField, and BaseTextFormField, allowing them use the previous theme styling.
- Adds localization for new texts
* feat(themes): Update warning box colors for dark and light themes
* feat(themes): Relaod themes when user restores from backup, ensuring the user previous theme preference is used.
* feat(themes): Handle themes logic during restore from backup
This change:
- Refactors theme loading logic to handle backup restore edgecase
- Refreshes the theme based on the user saved preference during restore from backup flow
* Fix card gradients and spacing
* Fix even more radiuses
Test new icons for navigation_dock.dart
* Update onboarding flow backgrounds
Fix swap icon clipping
Fix some text colors
Add more hero images
* Fix incorrect color for light theme
* Fix more hero images and cleanup
* Update text field icons
Fix info box CTA colors
Fix sync indicator colors
* Update toggle colors
Update dark theme colors (minor)
Update crypto_balance_widget.dart icon
* Update page transitions in router.dart
Fix some colors
* feat(themes): Display label by default for filled textfields
* feat(themes): Refactor theme handling across various components
This change:
- Fixes issue with themeMode resetting to system mode when app is restarted causing a UI glitch
- Updates theme checks from `currentTheme.type == ThemeType.dark` to `currentTheme.isDark` for consistency
- Adjusts UI components to use the theme directly from the themeStore
* feat(themes): Add animating tagline to the create pin welcome screen
* Revert text fields label temporarily, fix a couple colors, and cleanup some images
---------
Co-authored-by: OmarHatem <omarh.ismail1@gmail.com>
Co-authored-by: Blazebrain <davidadegoke16@gmail.com>
2025-05-25 20:11:45 +00:00
|
|
|
WidgetsBinding.instance.addPostFrameCallback(
|
|
|
|
(_) {
|
|
|
|
showPopUp<void>(
|
2023-02-07 18:03:31 +02:00
|
|
|
context: context,
|
|
|
|
builder: (BuildContext context) {
|
|
|
|
return AlertWithOneAction(
|
New themes (#2239)
* Add theme base v2
* Initial new theme base files
* Typos
* Fixes
* Update theme files
* feat: Migrate to Material 3 Theming
Foundation, Theme Data Refactor, and First Extension Cleanup Batch.
This commit completes the first major phase of migrating to Material 3 theming by setting up the foundations for material 3 integration and begins the initial migration, removing custom theme extensions, updating theme data, and refactoring all relevant widget and page theming to use Material 3’s built-in color and typography tokens.
These changes:
- Lays the groundwork for Material 3 theming by restructuring the app’s theme configuration to use Material 3’s ColorScheme and TextTheme as the primary sources of color and typography throughout the app.
- Refactors the core theme config files by removing legacy custom color roles ensuring all color definitions now map directly to Material 3’s role.
- Begins the first batch migration of custom theme extensions (InfoTheme, PlaceholderTheme, KeyboardTheme, PinCodeTheme) and updates all affected widgets and pages to use Material 3 color and typography tokens instead of the custom properties.
- Cleans up the codebase by deleting the files of the initial set of migrated extensions and eliminating all related imports and usages.
* feat: Migrate to Material 3 Theming.
This change:
- Updates the themes README.md file to reflect the current structure and give more information based on the first major phase that was completed.
* feat: Migrate to Material 3 Theming
Deleting previous theme extensions
* feat: Migrate to Material 3 Theming
Another batch of migrations from existing extensions
* feat: Migration to Material 3 Theming
Third Migration batch for theme extensions
* fwat: Migration to Material 3 Theming
Final Migration batch for previous theme extensions
* Update onboarding hero
* Update button radius
* Add surfaceContainer to light theme
* feat(themes): Migrate to Material 3 Theming
This change:
- Adds new set of hero images
- Modifies the core structure for the themes
- Add missing color tokens to the theme classes
- Adds a CustomThemeColor class for custom color tokens
- Modifies the themelist to have a fall back for previous theme implementation
- Adds localization for some texts
- Modifies the flow for loading the theme on app start
- Add a WidgetsBindingObserver that listens for changes in the device theme and updates the app theme when there is a change
- Registers the themeStore as a Singleton for codebase wide use
* feat(themes): Migrate to Material 3 theming
This change:
- Migrates UI flows across the app to the new themes
- Confirms styling and typography of components across the app uses the new themes
- Remove instances of Palette use
- Switch TextStyles across the app to use theme text styles
* feat(themes): Migrate to Material 3 Theming.
This change:
- Adjusts bottomsheets styling and removes duplicate close button
- Removes more themedata extensions from the previous implementation
* - Remove outlines from cards and dock
- Update menu colors
- Update padding/divider size for cards
* - Update PIN screen
- Fix navigation dock shadow
- Update wallet screen colors
* Update border radius --skip-ci
* feat(themes): Migrate to Material 3 Theming.
This change:
- Adds gradient backgrounds to the dashbaord and balance cards.
- Migrates the input fields across the app to BaseTextFormFields.
- Removes dependence of input fields on individual styling, focusing instead on using theme defined InputDecoration styling with adjustments on individual components where needed.
- Applies new theme styling to BaseTextFormField, AddressTextField and CurrencyAmountTextField.
* - Switch some hero images to PNG
- Fix nagivation_dock shadow
- Minor fixes
* feat: Add fallback to previous underline styling in central widgets
This change:
- Adds a fallback to CurrencyAmountTextField, AddressTextField, and BaseTextFormField, allowing them use the previous theme styling.
- Adds localization for new texts
* feat(themes): Update warning box colors for dark and light themes
* feat(themes): Relaod themes when user restores from backup, ensuring the user previous theme preference is used.
* feat(themes): Handle themes logic during restore from backup
This change:
- Refactors theme loading logic to handle backup restore edgecase
- Refreshes the theme based on the user saved preference during restore from backup flow
* Fix card gradients and spacing
* Fix even more radiuses
Test new icons for navigation_dock.dart
* Update onboarding flow backgrounds
Fix swap icon clipping
Fix some text colors
Add more hero images
* Fix incorrect color for light theme
* Fix more hero images and cleanup
* Update text field icons
Fix info box CTA colors
Fix sync indicator colors
* Update toggle colors
Update dark theme colors (minor)
Update crypto_balance_widget.dart icon
* Update page transitions in router.dart
Fix some colors
* feat(themes): Display label by default for filled textfields
* feat(themes): Refactor theme handling across various components
This change:
- Fixes issue with themeMode resetting to system mode when app is restarted causing a UI glitch
- Updates theme checks from `currentTheme.type == ThemeType.dark` to `currentTheme.isDark` for consistency
- Adjusts UI components to use the theme directly from the themeStore
* feat(themes): Add animating tagline to the create pin welcome screen
* Revert text fields label temporarily, fix a couple colors, and cleanup some images
---------
Co-authored-by: OmarHatem <omarh.ismail1@gmail.com>
Co-authored-by: Blazebrain <davidadegoke16@gmail.com>
2025-05-25 20:11:45 +00:00
|
|
|
key: ValueKey('send_page_send_failure_dialog_key'),
|
|
|
|
buttonKey: ValueKey('send_page_send_failure_dialog_button_key'),
|
|
|
|
alertTitle: S.of(context).error,
|
|
|
|
alertContent: state.error,
|
|
|
|
buttonText: S.of(context).ok,
|
|
|
|
buttonAction: () => Navigator.of(context).pop(),
|
|
|
|
);
|
|
|
|
},
|
|
|
|
);
|
|
|
|
},
|
|
|
|
);
|
2020-09-21 22:01:45 +03:00
|
|
|
}
|
|
|
|
|
2025-03-21 05:24:22 +02:00
|
|
|
if (state is IsExecutingState) {
|
2025-04-03 17:34:07 +03:00
|
|
|
// wait a bit to avoid showing the loading dialog if transaction is failed
|
|
|
|
await Future.delayed(const Duration(milliseconds: 300));
|
|
|
|
final currentState = sendViewModel.state;
|
|
|
|
if (currentState is ExecutedSuccessfullyState || currentState is FailureState) {
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
2025-03-21 05:24:22 +02:00
|
|
|
WidgetsBinding.instance.addPostFrameCallback((_) {
|
|
|
|
if (context.mounted) {
|
|
|
|
showModalBottomSheet<void>(
|
|
|
|
context: context,
|
|
|
|
isDismissible: false,
|
|
|
|
builder: (BuildContext context) {
|
|
|
|
loadingBottomSheetContext = context;
|
|
|
|
return LoadingBottomSheet(
|
2025-03-21 19:11:26 +02:00
|
|
|
titleText: S.of(context).generating_transaction,
|
2025-03-21 05:24:22 +02:00
|
|
|
);
|
|
|
|
},
|
|
|
|
);
|
|
|
|
}
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
2022-04-01 13:48:55 +01:00
|
|
|
if (state is ExecutedSuccessfullyState) {
|
2025-04-10 04:03:06 +02:00
|
|
|
WidgetsBinding.instance.addPostFrameCallback((_) async {
|
2023-02-27 15:59:20 +02:00
|
|
|
if (context.mounted) {
|
2025-04-10 04:03:06 +02:00
|
|
|
final result = await showModalBottomSheet<bool>(
|
2025-03-21 05:24:22 +02:00
|
|
|
context: context,
|
|
|
|
isDismissible: false,
|
|
|
|
isScrollControlled: true,
|
|
|
|
builder: (BuildContext bottomSheetContext) {
|
|
|
|
return ConfirmSendingBottomSheet(
|
|
|
|
key: ValueKey('send_page_confirm_sending_dialog_key'),
|
2025-03-21 19:11:26 +02:00
|
|
|
titleText: S.of(bottomSheetContext).confirm_transaction,
|
2025-03-21 05:24:22 +02:00
|
|
|
currentTheme: currentTheme,
|
2025-04-10 17:16:43 +03:00
|
|
|
walletType: sendViewModel.walletType,
|
2025-03-21 05:24:22 +02:00
|
|
|
titleIconPath: sendViewModel.selectedCryptoCurrency.iconPath,
|
|
|
|
currency: sendViewModel.selectedCryptoCurrency,
|
|
|
|
amount: S.of(bottomSheetContext).send_amount,
|
|
|
|
amountValue: sendViewModel.pendingTransaction!.amountFormatted,
|
|
|
|
fiatAmountValue: sendViewModel.pendingTransactionFiatAmountFormatted,
|
|
|
|
fee: isEVMCompatibleChain(sendViewModel.walletType)
|
|
|
|
? S.of(bottomSheetContext).send_estimated_fee
|
|
|
|
: S.of(bottomSheetContext).send_fee,
|
|
|
|
feeValue: sendViewModel.pendingTransaction!.feeFormatted,
|
|
|
|
feeFiatAmount: sendViewModel.pendingTransactionFeeFiatAmountFormatted,
|
|
|
|
outputs: sendViewModel.outputs,
|
|
|
|
onSlideComplete: () async {
|
2025-04-10 04:03:06 +02:00
|
|
|
Navigator.of(bottomSheetContext).pop(true);
|
2025-03-21 05:24:22 +02:00
|
|
|
sendViewModel.commitTransaction(context);
|
|
|
|
},
|
|
|
|
change: sendViewModel.pendingTransaction!.change,
|
2025-04-10 04:03:06 +02:00
|
|
|
isOpenCryptoPay: sendViewModel.ocpRequest != null,
|
2025-03-21 05:24:22 +02:00
|
|
|
);
|
|
|
|
},
|
|
|
|
);
|
2025-04-10 04:03:06 +02:00
|
|
|
|
|
|
|
if (result == null) sendViewModel.dismissTransaction();
|
2023-02-27 15:59:20 +02:00
|
|
|
}
|
2020-09-21 22:01:45 +03:00
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
if (state is TransactionCommitted) {
|
2024-12-14 01:27:46 +02:00
|
|
|
WidgetsBinding.instance.addPostFrameCallback((_) async {
|
2025-01-13 13:06:43 +02:00
|
|
|
if (!context.mounted) {
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
2024-12-14 01:27:46 +02:00
|
|
|
newContactAddress = newContactAddress ?? sendViewModel.newContactAddress();
|
2025-03-21 05:24:22 +02:00
|
|
|
|
2025-04-07 18:12:39 +02:00
|
|
|
if (newContactAddress?.address != null &&
|
|
|
|
isRegularElectrumAddress(newContactAddress!.address)) {
|
2025-03-04 03:58:56 +02:00
|
|
|
newContactAddress = null;
|
|
|
|
}
|
|
|
|
|
2025-04-03 17:34:07 +03:00
|
|
|
bool showContactSheet = (newContactAddress != null && sendViewModel.showAddressBookPopup);
|
|
|
|
|
2025-03-21 05:24:22 +02:00
|
|
|
await showModalBottomSheet<void>(
|
|
|
|
context: context,
|
|
|
|
isDismissible: false,
|
|
|
|
builder: (BuildContext bottomSheetContext) {
|
New themes (#2239)
* Add theme base v2
* Initial new theme base files
* Typos
* Fixes
* Update theme files
* feat: Migrate to Material 3 Theming
Foundation, Theme Data Refactor, and First Extension Cleanup Batch.
This commit completes the first major phase of migrating to Material 3 theming by setting up the foundations for material 3 integration and begins the initial migration, removing custom theme extensions, updating theme data, and refactoring all relevant widget and page theming to use Material 3’s built-in color and typography tokens.
These changes:
- Lays the groundwork for Material 3 theming by restructuring the app’s theme configuration to use Material 3’s ColorScheme and TextTheme as the primary sources of color and typography throughout the app.
- Refactors the core theme config files by removing legacy custom color roles ensuring all color definitions now map directly to Material 3’s role.
- Begins the first batch migration of custom theme extensions (InfoTheme, PlaceholderTheme, KeyboardTheme, PinCodeTheme) and updates all affected widgets and pages to use Material 3 color and typography tokens instead of the custom properties.
- Cleans up the codebase by deleting the files of the initial set of migrated extensions and eliminating all related imports and usages.
* feat: Migrate to Material 3 Theming.
This change:
- Updates the themes README.md file to reflect the current structure and give more information based on the first major phase that was completed.
* feat: Migrate to Material 3 Theming
Deleting previous theme extensions
* feat: Migrate to Material 3 Theming
Another batch of migrations from existing extensions
* feat: Migration to Material 3 Theming
Third Migration batch for theme extensions
* fwat: Migration to Material 3 Theming
Final Migration batch for previous theme extensions
* Update onboarding hero
* Update button radius
* Add surfaceContainer to light theme
* feat(themes): Migrate to Material 3 Theming
This change:
- Adds new set of hero images
- Modifies the core structure for the themes
- Add missing color tokens to the theme classes
- Adds a CustomThemeColor class for custom color tokens
- Modifies the themelist to have a fall back for previous theme implementation
- Adds localization for some texts
- Modifies the flow for loading the theme on app start
- Add a WidgetsBindingObserver that listens for changes in the device theme and updates the app theme when there is a change
- Registers the themeStore as a Singleton for codebase wide use
* feat(themes): Migrate to Material 3 theming
This change:
- Migrates UI flows across the app to the new themes
- Confirms styling and typography of components across the app uses the new themes
- Remove instances of Palette use
- Switch TextStyles across the app to use theme text styles
* feat(themes): Migrate to Material 3 Theming.
This change:
- Adjusts bottomsheets styling and removes duplicate close button
- Removes more themedata extensions from the previous implementation
* - Remove outlines from cards and dock
- Update menu colors
- Update padding/divider size for cards
* - Update PIN screen
- Fix navigation dock shadow
- Update wallet screen colors
* Update border radius --skip-ci
* feat(themes): Migrate to Material 3 Theming.
This change:
- Adds gradient backgrounds to the dashbaord and balance cards.
- Migrates the input fields across the app to BaseTextFormFields.
- Removes dependence of input fields on individual styling, focusing instead on using theme defined InputDecoration styling with adjustments on individual components where needed.
- Applies new theme styling to BaseTextFormField, AddressTextField and CurrencyAmountTextField.
* - Switch some hero images to PNG
- Fix nagivation_dock shadow
- Minor fixes
* feat: Add fallback to previous underline styling in central widgets
This change:
- Adds a fallback to CurrencyAmountTextField, AddressTextField, and BaseTextFormField, allowing them use the previous theme styling.
- Adds localization for new texts
* feat(themes): Update warning box colors for dark and light themes
* feat(themes): Relaod themes when user restores from backup, ensuring the user previous theme preference is used.
* feat(themes): Handle themes logic during restore from backup
This change:
- Refactors theme loading logic to handle backup restore edgecase
- Refreshes the theme based on the user saved preference during restore from backup flow
* Fix card gradients and spacing
* Fix even more radiuses
Test new icons for navigation_dock.dart
* Update onboarding flow backgrounds
Fix swap icon clipping
Fix some text colors
Add more hero images
* Fix incorrect color for light theme
* Fix more hero images and cleanup
* Update text field icons
Fix info box CTA colors
Fix sync indicator colors
* Update toggle colors
Update dark theme colors (minor)
Update crypto_balance_widget.dart icon
* Update page transitions in router.dart
Fix some colors
* feat(themes): Display label by default for filled textfields
* feat(themes): Refactor theme handling across various components
This change:
- Fixes issue with themeMode resetting to system mode when app is restarted causing a UI glitch
- Updates theme checks from `currentTheme.type == ThemeType.dark` to `currentTheme.isDark` for consistency
- Adjusts UI components to use the theme directly from the themeStore
* feat(themes): Add animating tagline to the create pin welcome screen
* Revert text fields label temporarily, fix a couple colors, and cleanup some images
---------
Co-authored-by: OmarHatem <omarh.ismail1@gmail.com>
Co-authored-by: Blazebrain <davidadegoke16@gmail.com>
2025-05-25 20:11:45 +00:00
|
|
|
return showContactSheet && sendViewModel.ocpRequest == null
|
2025-03-21 05:24:22 +02:00
|
|
|
? InfoBottomSheet(
|
2025-04-07 18:12:39 +02:00
|
|
|
currentTheme: currentTheme,
|
|
|
|
showDontAskMeCheckbox: true,
|
|
|
|
onCheckboxChanged: (value) => sendViewModel.setShowAddressBookPopup(!value),
|
|
|
|
titleText: S.of(bottomSheetContext).transaction_sent,
|
New themes (#2239)
* Add theme base v2
* Initial new theme base files
* Typos
* Fixes
* Update theme files
* feat: Migrate to Material 3 Theming
Foundation, Theme Data Refactor, and First Extension Cleanup Batch.
This commit completes the first major phase of migrating to Material 3 theming by setting up the foundations for material 3 integration and begins the initial migration, removing custom theme extensions, updating theme data, and refactoring all relevant widget and page theming to use Material 3’s built-in color and typography tokens.
These changes:
- Lays the groundwork for Material 3 theming by restructuring the app’s theme configuration to use Material 3’s ColorScheme and TextTheme as the primary sources of color and typography throughout the app.
- Refactors the core theme config files by removing legacy custom color roles ensuring all color definitions now map directly to Material 3’s role.
- Begins the first batch migration of custom theme extensions (InfoTheme, PlaceholderTheme, KeyboardTheme, PinCodeTheme) and updates all affected widgets and pages to use Material 3 color and typography tokens instead of the custom properties.
- Cleans up the codebase by deleting the files of the initial set of migrated extensions and eliminating all related imports and usages.
* feat: Migrate to Material 3 Theming.
This change:
- Updates the themes README.md file to reflect the current structure and give more information based on the first major phase that was completed.
* feat: Migrate to Material 3 Theming
Deleting previous theme extensions
* feat: Migrate to Material 3 Theming
Another batch of migrations from existing extensions
* feat: Migration to Material 3 Theming
Third Migration batch for theme extensions
* fwat: Migration to Material 3 Theming
Final Migration batch for previous theme extensions
* Update onboarding hero
* Update button radius
* Add surfaceContainer to light theme
* feat(themes): Migrate to Material 3 Theming
This change:
- Adds new set of hero images
- Modifies the core structure for the themes
- Add missing color tokens to the theme classes
- Adds a CustomThemeColor class for custom color tokens
- Modifies the themelist to have a fall back for previous theme implementation
- Adds localization for some texts
- Modifies the flow for loading the theme on app start
- Add a WidgetsBindingObserver that listens for changes in the device theme and updates the app theme when there is a change
- Registers the themeStore as a Singleton for codebase wide use
* feat(themes): Migrate to Material 3 theming
This change:
- Migrates UI flows across the app to the new themes
- Confirms styling and typography of components across the app uses the new themes
- Remove instances of Palette use
- Switch TextStyles across the app to use theme text styles
* feat(themes): Migrate to Material 3 Theming.
This change:
- Adjusts bottomsheets styling and removes duplicate close button
- Removes more themedata extensions from the previous implementation
* - Remove outlines from cards and dock
- Update menu colors
- Update padding/divider size for cards
* - Update PIN screen
- Fix navigation dock shadow
- Update wallet screen colors
* Update border radius --skip-ci
* feat(themes): Migrate to Material 3 Theming.
This change:
- Adds gradient backgrounds to the dashbaord and balance cards.
- Migrates the input fields across the app to BaseTextFormFields.
- Removes dependence of input fields on individual styling, focusing instead on using theme defined InputDecoration styling with adjustments on individual components where needed.
- Applies new theme styling to BaseTextFormField, AddressTextField and CurrencyAmountTextField.
* - Switch some hero images to PNG
- Fix nagivation_dock shadow
- Minor fixes
* feat: Add fallback to previous underline styling in central widgets
This change:
- Adds a fallback to CurrencyAmountTextField, AddressTextField, and BaseTextFormField, allowing them use the previous theme styling.
- Adds localization for new texts
* feat(themes): Update warning box colors for dark and light themes
* feat(themes): Relaod themes when user restores from backup, ensuring the user previous theme preference is used.
* feat(themes): Handle themes logic during restore from backup
This change:
- Refactors theme loading logic to handle backup restore edgecase
- Refreshes the theme based on the user saved preference during restore from backup flow
* Fix card gradients and spacing
* Fix even more radiuses
Test new icons for navigation_dock.dart
* Update onboarding flow backgrounds
Fix swap icon clipping
Fix some text colors
Add more hero images
* Fix incorrect color for light theme
* Fix more hero images and cleanup
* Update text field icons
Fix info box CTA colors
Fix sync indicator colors
* Update toggle colors
Update dark theme colors (minor)
Update crypto_balance_widget.dart icon
* Update page transitions in router.dart
Fix some colors
* feat(themes): Display label by default for filled textfields
* feat(themes): Refactor theme handling across various components
This change:
- Fixes issue with themeMode resetting to system mode when app is restarted causing a UI glitch
- Updates theme checks from `currentTheme.type == ThemeType.dark` to `currentTheme.isDark` for consistency
- Adjusts UI components to use the theme directly from the themeStore
* feat(themes): Add animating tagline to the create pin welcome screen
* Revert text fields label temporarily, fix a couple colors, and cleanup some images
---------
Co-authored-by: OmarHatem <omarh.ismail1@gmail.com>
Co-authored-by: Blazebrain <davidadegoke16@gmail.com>
2025-05-25 20:11:45 +00:00
|
|
|
contentImage: 'assets/images/contact.png',
|
|
|
|
contentImageColor: Theme.of(context).colorScheme.onSurface,
|
2025-04-07 18:12:39 +02:00
|
|
|
content: S.of(bottomSheetContext).add_contact_to_address_book,
|
|
|
|
isTwoAction: true,
|
|
|
|
leftButtonText: 'No',
|
|
|
|
rightButtonText: 'Yes',
|
|
|
|
actionLeftButton: () {
|
|
|
|
Navigator.of(bottomSheetContext).pop();
|
|
|
|
if (context.mounted) {
|
|
|
|
Navigator.of(context)
|
|
|
|
.pushNamedAndRemoveUntil(Routes.dashboard, (route) => false);
|
|
|
|
}
|
|
|
|
RequestReviewHandler.requestReview();
|
|
|
|
newContactAddress = null;
|
|
|
|
},
|
|
|
|
actionRightButton: () {
|
|
|
|
Navigator.of(bottomSheetContext).pop();
|
|
|
|
RequestReviewHandler.requestReview();
|
|
|
|
if (context.mounted) {
|
|
|
|
Navigator.of(context).pushNamed(Routes.addressBookAddContact,
|
|
|
|
arguments: newContactAddress);
|
|
|
|
}
|
|
|
|
newContactAddress = null;
|
|
|
|
},
|
|
|
|
)
|
2025-03-21 05:24:22 +02:00
|
|
|
: InfoBottomSheet(
|
2025-04-07 18:12:39 +02:00
|
|
|
currentTheme: currentTheme,
|
|
|
|
titleText: S.of(bottomSheetContext).transaction_sent,
|
New themes (#2239)
* Add theme base v2
* Initial new theme base files
* Typos
* Fixes
* Update theme files
* feat: Migrate to Material 3 Theming
Foundation, Theme Data Refactor, and First Extension Cleanup Batch.
This commit completes the first major phase of migrating to Material 3 theming by setting up the foundations for material 3 integration and begins the initial migration, removing custom theme extensions, updating theme data, and refactoring all relevant widget and page theming to use Material 3’s built-in color and typography tokens.
These changes:
- Lays the groundwork for Material 3 theming by restructuring the app’s theme configuration to use Material 3’s ColorScheme and TextTheme as the primary sources of color and typography throughout the app.
- Refactors the core theme config files by removing legacy custom color roles ensuring all color definitions now map directly to Material 3’s role.
- Begins the first batch migration of custom theme extensions (InfoTheme, PlaceholderTheme, KeyboardTheme, PinCodeTheme) and updates all affected widgets and pages to use Material 3 color and typography tokens instead of the custom properties.
- Cleans up the codebase by deleting the files of the initial set of migrated extensions and eliminating all related imports and usages.
* feat: Migrate to Material 3 Theming.
This change:
- Updates the themes README.md file to reflect the current structure and give more information based on the first major phase that was completed.
* feat: Migrate to Material 3 Theming
Deleting previous theme extensions
* feat: Migrate to Material 3 Theming
Another batch of migrations from existing extensions
* feat: Migration to Material 3 Theming
Third Migration batch for theme extensions
* fwat: Migration to Material 3 Theming
Final Migration batch for previous theme extensions
* Update onboarding hero
* Update button radius
* Add surfaceContainer to light theme
* feat(themes): Migrate to Material 3 Theming
This change:
- Adds new set of hero images
- Modifies the core structure for the themes
- Add missing color tokens to the theme classes
- Adds a CustomThemeColor class for custom color tokens
- Modifies the themelist to have a fall back for previous theme implementation
- Adds localization for some texts
- Modifies the flow for loading the theme on app start
- Add a WidgetsBindingObserver that listens for changes in the device theme and updates the app theme when there is a change
- Registers the themeStore as a Singleton for codebase wide use
* feat(themes): Migrate to Material 3 theming
This change:
- Migrates UI flows across the app to the new themes
- Confirms styling and typography of components across the app uses the new themes
- Remove instances of Palette use
- Switch TextStyles across the app to use theme text styles
* feat(themes): Migrate to Material 3 Theming.
This change:
- Adjusts bottomsheets styling and removes duplicate close button
- Removes more themedata extensions from the previous implementation
* - Remove outlines from cards and dock
- Update menu colors
- Update padding/divider size for cards
* - Update PIN screen
- Fix navigation dock shadow
- Update wallet screen colors
* Update border radius --skip-ci
* feat(themes): Migrate to Material 3 Theming.
This change:
- Adds gradient backgrounds to the dashbaord and balance cards.
- Migrates the input fields across the app to BaseTextFormFields.
- Removes dependence of input fields on individual styling, focusing instead on using theme defined InputDecoration styling with adjustments on individual components where needed.
- Applies new theme styling to BaseTextFormField, AddressTextField and CurrencyAmountTextField.
* - Switch some hero images to PNG
- Fix nagivation_dock shadow
- Minor fixes
* feat: Add fallback to previous underline styling in central widgets
This change:
- Adds a fallback to CurrencyAmountTextField, AddressTextField, and BaseTextFormField, allowing them use the previous theme styling.
- Adds localization for new texts
* feat(themes): Update warning box colors for dark and light themes
* feat(themes): Relaod themes when user restores from backup, ensuring the user previous theme preference is used.
* feat(themes): Handle themes logic during restore from backup
This change:
- Refactors theme loading logic to handle backup restore edgecase
- Refreshes the theme based on the user saved preference during restore from backup flow
* Fix card gradients and spacing
* Fix even more radiuses
Test new icons for navigation_dock.dart
* Update onboarding flow backgrounds
Fix swap icon clipping
Fix some text colors
Add more hero images
* Fix incorrect color for light theme
* Fix more hero images and cleanup
* Update text field icons
Fix info box CTA colors
Fix sync indicator colors
* Update toggle colors
Update dark theme colors (minor)
Update crypto_balance_widget.dart icon
* Update page transitions in router.dart
Fix some colors
* feat(themes): Display label by default for filled textfields
* feat(themes): Refactor theme handling across various components
This change:
- Fixes issue with themeMode resetting to system mode when app is restarted causing a UI glitch
- Updates theme checks from `currentTheme.type == ThemeType.dark` to `currentTheme.isDark` for consistency
- Adjusts UI components to use the theme directly from the themeStore
* feat(themes): Add animating tagline to the create pin welcome screen
* Revert text fields label temporarily, fix a couple colors, and cleanup some images
---------
Co-authored-by: OmarHatem <omarh.ismail1@gmail.com>
Co-authored-by: Blazebrain <davidadegoke16@gmail.com>
2025-05-25 20:11:45 +00:00
|
|
|
contentImage: 'assets/images/birthday_cake.png',
|
2025-04-07 18:12:39 +02:00
|
|
|
actionButtonText: S.of(bottomSheetContext).close,
|
|
|
|
actionButtonKey: ValueKey('send_page_sent_dialog_ok_button_key'),
|
|
|
|
actionButton: () {
|
|
|
|
Navigator.of(bottomSheetContext).pop();
|
2025-04-08 20:04:16 +03:00
|
|
|
Future.delayed(Duration.zero, () {
|
|
|
|
if (context.mounted) {
|
|
|
|
Navigator.of(context)
|
|
|
|
.pushNamedAndRemoveUntil(Routes.dashboard, (route) => false);
|
|
|
|
}
|
|
|
|
RequestReviewHandler.requestReview();
|
|
|
|
newContactAddress = null;
|
|
|
|
});
|
2025-04-07 18:12:39 +02:00
|
|
|
},
|
|
|
|
);
|
2025-03-21 05:24:22 +02:00
|
|
|
},
|
|
|
|
);
|
2024-12-14 01:27:46 +02:00
|
|
|
|
|
|
|
if (initialPaymentRequest?.callbackUrl?.isNotEmpty ?? false) {
|
|
|
|
// wait a second so it's not as jarring:
|
|
|
|
await Future.delayed(Duration(seconds: 1));
|
|
|
|
try {
|
|
|
|
launchUrl(
|
|
|
|
Uri.parse(initialPaymentRequest!.callbackUrl!),
|
|
|
|
mode: LaunchMode.externalApplication,
|
|
|
|
);
|
|
|
|
} catch (e) {
|
|
|
|
printV(e);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-08-10 17:52:35 +03:00
|
|
|
sendViewModel.clearOutputs();
|
2020-09-21 22:01:45 +03:00
|
|
|
});
|
|
|
|
}
|
2024-05-04 20:44:50 -05:00
|
|
|
|
2025-05-26 17:38:51 +02:00
|
|
|
if (state is IsDeviceSigningResponseState) {
|
2024-05-04 20:44:50 -05:00
|
|
|
WidgetsBinding.instance.addPostFrameCallback((_) {
|
2025-04-02 18:18:24 +02:00
|
|
|
if (!context.mounted) return;
|
|
|
|
|
|
|
|
showModalBottomSheet<void>(
|
|
|
|
context: context,
|
|
|
|
isDismissible: false,
|
2025-05-26 17:38:51 +02:00
|
|
|
builder: (context) {
|
|
|
|
dialogContext = context;
|
2025-05-27 19:35:30 +03:00
|
|
|
return LoadingBottomSheet(titleText: S.of(context).processing_signed_tx);
|
2025-05-26 17:38:51 +02:00
|
|
|
},
|
2025-04-02 18:18:24 +02:00
|
|
|
);
|
2024-05-04 20:44:50 -05:00
|
|
|
});
|
|
|
|
}
|
2025-05-26 17:38:51 +02:00
|
|
|
|
|
|
|
if (state is IsAwaitingDeviceResponseState) {
|
|
|
|
WidgetsBinding.instance.addPostFrameCallback((_) {
|
|
|
|
if (!context.mounted) return;
|
|
|
|
|
|
|
|
showModalBottomSheet<void>(
|
|
|
|
context: context,
|
|
|
|
isDismissible: false,
|
|
|
|
builder: (context) {
|
|
|
|
dialogContext = context;
|
|
|
|
return InfoBottomSheet(
|
|
|
|
currentTheme: currentTheme,
|
|
|
|
titleText: S.of(context).proceed_on_device,
|
|
|
|
contentImage:
|
|
|
|
'assets/images/hardware_wallet/ledger_nano_x.png',
|
|
|
|
contentImageColor: Theme.of(context).colorScheme.onSurface,
|
|
|
|
content: S.of(context).proceed_on_device_description,
|
|
|
|
isTwoAction: false,
|
|
|
|
actionButtonText: S.of(context).cancel,
|
|
|
|
actionButton: () {
|
|
|
|
sendViewModel.state = InitialExecutionState();
|
|
|
|
Navigator.of(context).pop();
|
|
|
|
},
|
|
|
|
);
|
|
|
|
});
|
|
|
|
});
|
|
|
|
}
|
2020-09-21 22:01:45 +03:00
|
|
|
});
|
|
|
|
|
|
|
|
_effectsInstalled = true;
|
|
|
|
}
|
|
|
|
|
2023-08-01 19:19:04 -03:00
|
|
|
Future<void> _setInputsFromTemplate(BuildContext context,
|
|
|
|
{required Output output, required Template template}) async {
|
|
|
|
output.address = template.address;
|
|
|
|
|
|
|
|
if (template.isCurrencySelected) {
|
2023-08-04 20:01:49 +03:00
|
|
|
sendViewModel.setSelectedCryptoCurrency(template.cryptoCurrency);
|
2023-08-01 19:19:04 -03:00
|
|
|
output.setCryptoAmount(template.amount);
|
|
|
|
} else {
|
2023-11-03 21:24:45 +02:00
|
|
|
final fiatFromTemplate =
|
|
|
|
FiatCurrency.all.singleWhere((element) => element.title == template.fiatCurrency);
|
|
|
|
|
2023-08-01 19:19:04 -03:00
|
|
|
sendViewModel.setFiatCurrency(fiatFromTemplate);
|
|
|
|
output.setFiatAmount(template.amountFiat);
|
|
|
|
}
|
|
|
|
|
|
|
|
output.resetParsedAddress();
|
|
|
|
await output.fetchParsedAddress(context);
|
|
|
|
}
|
|
|
|
|
2021-08-10 17:52:35 +03:00
|
|
|
Output _defineCurrentOutput() {
|
2022-10-12 13:09:57 -04:00
|
|
|
if (controller.page == null) {
|
|
|
|
throw Exception('Controller page is null');
|
|
|
|
}
|
|
|
|
final itemCount = controller.page!.round();
|
2021-08-10 17:52:35 +03:00
|
|
|
return sendViewModel.outputs[itemCount];
|
2020-09-21 22:01:45 +03:00
|
|
|
}
|
2021-07-20 18:03:49 +03:00
|
|
|
|
|
|
|
void showErrorValidationAlert(BuildContext context) async {
|
|
|
|
await showPopUp<void>(
|
|
|
|
context: context,
|
|
|
|
builder: (BuildContext context) {
|
|
|
|
return AlertWithOneAction(
|
|
|
|
alertTitle: S.of(context).error,
|
|
|
|
alertContent: 'Please, check receiver forms',
|
|
|
|
buttonText: S.of(context).ok,
|
2022-01-12 18:58:54 +01:00
|
|
|
buttonAction: () => Navigator.of(context).pop());
|
2021-07-20 18:03:49 +03:00
|
|
|
});
|
|
|
|
}
|
2022-03-30 17:57:04 +02:00
|
|
|
|
2023-06-09 19:29:34 -03:00
|
|
|
void presentCurrencyPicker(BuildContext context) async {
|
2022-03-30 17:57:04 +02:00
|
|
|
await showPopUp<CryptoCurrency>(
|
|
|
|
builder: (_) => Picker(
|
2023-06-09 19:29:34 -03:00
|
|
|
items: sendViewModel.currencies,
|
|
|
|
displayItem: (Object item) => item.toString(),
|
2023-09-18 14:57:57 -04:00
|
|
|
selectedAtIndex:
|
|
|
|
sendViewModel.currencies.indexOf(sendViewModel.selectedCryptoCurrency),
|
2023-06-09 19:29:34 -03:00
|
|
|
title: S.of(context).please_select,
|
|
|
|
mainAxisAlignment: MainAxisAlignment.center,
|
2023-09-18 14:57:57 -04:00
|
|
|
onItemSelected: (CryptoCurrency cur) => sendViewModel.selectedCryptoCurrency = cur,
|
2023-06-09 19:29:34 -03:00
|
|
|
),
|
2022-03-30 17:57:04 +02:00
|
|
|
context: context);
|
|
|
|
}
|
2025-03-04 03:58:56 +02:00
|
|
|
|
|
|
|
bool isRegularElectrumAddress(String address) {
|
|
|
|
final supportedTypes = [CryptoCurrency.btc, CryptoCurrency.ltc, CryptoCurrency.bch];
|
|
|
|
final excludedPatterns = [
|
|
|
|
RegExp(AddressValidator.silentPaymentAddressPattern),
|
|
|
|
RegExp(AddressValidator.mWebAddressPattern)
|
|
|
|
];
|
|
|
|
|
|
|
|
final trimmed = address.trim();
|
|
|
|
|
|
|
|
bool isValid = false;
|
|
|
|
for (var type in supportedTypes) {
|
|
|
|
final addressPattern = AddressValidator.getAddressFromStringPattern(type);
|
|
|
|
if (addressPattern != null) {
|
|
|
|
final regex = RegExp('^$addressPattern\$');
|
|
|
|
if (regex.hasMatch(trimmed)) {
|
|
|
|
isValid = true;
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
for (var pattern in excludedPatterns) {
|
|
|
|
if (pattern.hasMatch(trimmed)) {
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
return isValid;
|
|
|
|
}
|
2020-01-04 21:31:52 +02:00
|
|
|
}
|