mirror of
https://github.com/cypherstack/stack_wallet.git
synced 2024-12-22 19:39:22 +00:00
Merge remote-tracking branch 'cypherstack/ui-fixes' into simplex
This commit is contained in:
commit
07247a46b9
72 changed files with 213 additions and 135 deletions
|
@ -1,5 +1,5 @@
|
|||
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M15 21C15 21.5031 14.6859 22.0406 14.1234 22.4156C13.5609 22.7906 12.7547 23 12 23C11.2031 23 10.4391 22.7906 9.87656 22.4156C9.31406 22.0406 9 21.5031 9 21H15Z" fill="#232323"/>
|
||||
<path d="M13.4279 2.38462V3.21538C16.6867 3.85707 19.1419 6.65096 19.1419 10V10.8135C19.1419 12.8514 19.9142 14.8115 21.307 16.3346L21.6373 16.6938C22.0123 17.1048 22.106 17.6846 21.8739 18.1822C21.6418 18.6798 21.1329 19 20.5704 19H3.42848C2.86601 19 2.35582 18.6798 2.12538 18.1822C1.89495 17.6846 1.98712 17.1048 2.36086 16.6938L2.69192 16.3346C4.08648 14.8115 4.85697 12.8514 4.85697 10.8135V10C4.85697 6.65096 7.27202 3.85707 10.5709 3.21538V2.38462C10.5709 1.62005 11.2093 1 11.9994 1C12.7896 1 13.4279 1.62005 13.4279 2.38462Z" fill="#232323"/>
|
||||
<circle cx="20.5" cy="3.5" r="2.5" fill="#C00205"/>
|
||||
<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M12.5 17.5C12.5 17.9193 12.2383 18.3672 11.7695 18.6797C11.3008 18.9922 10.6289 19.1667 10 19.1667C9.33594 19.1667 8.69922 18.9922 8.23047 18.6797C7.76172 18.3672 7.5 17.9193 7.5 17.5H12.5Z" fill="#F95369"/>
|
||||
<path d="M11.1903 1.98716V2.67947C13.9059 3.2142 15.9519 5.54245 15.9519 8.33331V9.0112C15.9519 10.7095 16.5955 12.3429 17.7561 13.6122L18.0314 13.9114C18.3439 14.254 18.422 14.7372 18.2286 15.1518C18.0351 15.5665 17.611 15.8333 17.1423 15.8333H2.85739C2.38867 15.8333 1.96351 15.5665 1.77148 15.1518C1.57945 14.7372 1.65626 14.254 1.96771 13.9114L2.24359 13.6122C3.40573 12.3429 4.0478 10.7095 4.0478 9.0112V8.33331C4.0478 5.54245 6.06034 3.2142 8.80945 2.67947V1.98716C8.80945 1.35002 9.34141 0.833313 9.99986 0.833313C10.6583 0.833313 11.1903 1.35002 11.1903 1.98716Z" fill="#F95369"/>
|
||||
<ellipse cx="17.0833" cy="2.91665" rx="2.08333" ry="2.08333" fill="#1276EB"/>
|
||||
</svg>
|
||||
|
|
Before Width: | Height: | Size: 895 B After Width: | Height: | Size: 987 B |
|
@ -58,6 +58,7 @@ import 'package:stackwallet/utilities/logger.dart';
|
|||
import 'package:stackwallet/utilities/stack_file_system.dart';
|
||||
import 'package:stackwallet/utilities/theme/color_theme.dart';
|
||||
import 'package:stackwallet/utilities/theme/dark_colors.dart';
|
||||
import 'package:stackwallet/utilities/theme/fruit_sorbet_colors.dart';
|
||||
import 'package:stackwallet/utilities/theme/light_colors.dart';
|
||||
import 'package:stackwallet/utilities/theme/ocean_breeze_colors.dart';
|
||||
import 'package:stackwallet/utilities/theme/oled_black_colors.dart';
|
||||
|
@ -339,8 +340,11 @@ class _MaterialAppWithThemeState extends ConsumerState<MaterialAppWithTheme>
|
|||
colorTheme = OceanBreezeColors();
|
||||
break;
|
||||
case "light":
|
||||
default:
|
||||
colorTheme = LightColors();
|
||||
break;
|
||||
case "fruitSorbet":
|
||||
default:
|
||||
colorTheme = FruitSorbetColors();
|
||||
}
|
||||
loadingCompleter = Completer();
|
||||
WidgetsBinding.instance.addObserver(this);
|
||||
|
|
|
@ -38,10 +38,10 @@ class AddWalletNextButton extends ConsumerWidget {
|
|||
style: enabled
|
||||
? Theme.of(context)
|
||||
.extension<StackColors>()!
|
||||
.getPrimaryEnabledButtonColor(context)
|
||||
.getPrimaryEnabledButtonStyle(context)
|
||||
: Theme.of(context)
|
||||
.extension<StackColors>()!
|
||||
.getPrimaryDisabledButtonColor(context),
|
||||
.getPrimaryDisabledButtonStyle(context),
|
||||
child: Text(
|
||||
"Next",
|
||||
style: isDesktop
|
||||
|
|
|
@ -30,7 +30,7 @@ class CreateWalletButtonGroup extends StatelessWidget {
|
|||
child: TextButton(
|
||||
style: Theme.of(context)
|
||||
.extension<StackColors>()!
|
||||
.getPrimaryEnabledButtonColor(context),
|
||||
.getPrimaryEnabledButtonStyle(context),
|
||||
onPressed: () {
|
||||
Navigator.of(context).pushNamed(
|
||||
NameYourWalletView.routeName,
|
||||
|
@ -59,7 +59,7 @@ class CreateWalletButtonGroup extends StatelessWidget {
|
|||
child: TextButton(
|
||||
style: Theme.of(context)
|
||||
.extension<StackColors>()!
|
||||
.getSecondaryEnabledButtonColor(context),
|
||||
.getSecondaryEnabledButtonStyle(context),
|
||||
onPressed: () {
|
||||
Navigator.of(context).pushNamed(
|
||||
NameYourWalletView.routeName,
|
||||
|
|
|
@ -364,10 +364,10 @@ class _NameYourWalletViewState extends ConsumerState<NameYourWalletView> {
|
|||
style: _nextEnabled
|
||||
? Theme.of(context)
|
||||
.extension<StackColors>()!
|
||||
.getPrimaryEnabledButtonColor(context)
|
||||
.getPrimaryEnabledButtonStyle(context)
|
||||
: Theme.of(context)
|
||||
.extension<StackColors>()!
|
||||
.getPrimaryDisabledButtonColor(context),
|
||||
.getPrimaryDisabledButtonStyle(context),
|
||||
child: Text(
|
||||
"Next",
|
||||
style: isDesktop
|
||||
|
|
|
@ -298,7 +298,7 @@ class _NewWalletRecoveryPhraseViewState
|
|||
},
|
||||
style: Theme.of(context)
|
||||
.extension<StackColors>()!
|
||||
.getPrimaryEnabledButtonColor(context),
|
||||
.getPrimaryEnabledButtonStyle(context),
|
||||
child: Text(
|
||||
"I saved my recovery phrase",
|
||||
style: isDesktop
|
||||
|
|
|
@ -512,10 +512,10 @@ class _NewWalletRecoveryPhraseWarningViewState
|
|||
style: ref.read(checkBoxStateProvider.state).state
|
||||
? Theme.of(context)
|
||||
.extension<StackColors>()!
|
||||
.getPrimaryEnabledButtonColor(context)
|
||||
.getPrimaryEnabledButtonStyle(context)
|
||||
: Theme.of(context)
|
||||
.extension<StackColors>()!
|
||||
.getPrimaryDisabledButtonColor(context),
|
||||
.getPrimaryDisabledButtonStyle(context),
|
||||
child: Text(
|
||||
"View recovery phrase",
|
||||
style: isDesktop
|
||||
|
|
|
@ -23,10 +23,10 @@ class RestoreOptionsNextButton extends StatelessWidget {
|
|||
style: onPressed != null
|
||||
? Theme.of(context)
|
||||
.extension<StackColors>()!
|
||||
.getPrimaryEnabledButtonColor(context)
|
||||
.getPrimaryEnabledButtonStyle(context)
|
||||
: Theme.of(context)
|
||||
.extension<StackColors>()!
|
||||
.getPrimaryDisabledButtonColor(context),
|
||||
.getPrimaryDisabledButtonStyle(context),
|
||||
child: Text(
|
||||
"Next",
|
||||
style: STextStyles.button(context),
|
||||
|
|
|
@ -47,7 +47,7 @@ class _RestoreFailedDialogState extends ConsumerState<RestoreFailedDialog> {
|
|||
rightButton: TextButton(
|
||||
style: Theme.of(context)
|
||||
.extension<StackColors>()!
|
||||
.getSecondaryEnabledButtonColor(context),
|
||||
.getSecondaryEnabledButtonStyle(context),
|
||||
child: Text(
|
||||
"Ok",
|
||||
style: STextStyles.itemSubtitle12(context),
|
||||
|
|
|
@ -80,7 +80,7 @@ class RestoreSucceededDialog extends StatelessWidget {
|
|||
rightButton: TextButton(
|
||||
style: Theme.of(context)
|
||||
.extension<StackColors>()!
|
||||
.getSecondaryEnabledButtonColor(context),
|
||||
.getSecondaryEnabledButtonStyle(context),
|
||||
child: Text(
|
||||
"Ok",
|
||||
style: STextStyles.itemSubtitle12(context),
|
||||
|
|
|
@ -139,7 +139,7 @@ class _RestoringDialogState extends State<RestoringDialog>
|
|||
rightButton: TextButton(
|
||||
style: Theme.of(context)
|
||||
.extension<StackColors>()!
|
||||
.getSecondaryEnabledButtonColor(context),
|
||||
.getSecondaryEnabledButtonStyle(context),
|
||||
child: Text(
|
||||
"Cancel",
|
||||
style: STextStyles.itemSubtitle12(context),
|
||||
|
|
|
@ -331,10 +331,10 @@ class _VerifyRecoveryPhraseViewState
|
|||
style: selectedWord.isNotEmpty
|
||||
? Theme.of(context)
|
||||
.extension<StackColors>()!
|
||||
.getPrimaryEnabledButtonColor(context)
|
||||
.getPrimaryEnabledButtonStyle(context)
|
||||
: Theme.of(context)
|
||||
.extension<StackColors>()!
|
||||
.getPrimaryDisabledButtonColor(context),
|
||||
.getPrimaryDisabledButtonStyle(context),
|
||||
child: isDesktop
|
||||
? Text(
|
||||
"Verify",
|
||||
|
|
|
@ -177,7 +177,7 @@ class _ContactDetailsViewState extends ConsumerState<ContactDetailsView> {
|
|||
leftButton: TextButton(
|
||||
style: Theme.of(context)
|
||||
.extension<StackColors>()!
|
||||
.getSecondaryEnabledButtonColor(context),
|
||||
.getSecondaryEnabledButtonStyle(context),
|
||||
child: Text(
|
||||
"Cancel",
|
||||
style: STextStyles.itemSubtitle12(context),
|
||||
|
@ -189,7 +189,7 @@ class _ContactDetailsViewState extends ConsumerState<ContactDetailsView> {
|
|||
rightButton: TextButton(
|
||||
style: Theme.of(context)
|
||||
.extension<StackColors>()!
|
||||
.getPrimaryEnabledButtonColor(context),
|
||||
.getPrimaryEnabledButtonStyle(context),
|
||||
child: Text(
|
||||
"Delete",
|
||||
style: STextStyles.button(context),
|
||||
|
@ -273,7 +273,7 @@ class _ContactDetailsViewState extends ConsumerState<ContactDetailsView> {
|
|||
},
|
||||
style: Theme.of(context)
|
||||
.extension<StackColors>()!
|
||||
.getSecondaryEnabledButtonColor(context)!
|
||||
.getSecondaryEnabledButtonStyle(context)!
|
||||
.copyWith(
|
||||
minimumSize: MaterialStateProperty.all<Size>(
|
||||
const Size(46, 32)),
|
||||
|
|
|
@ -148,7 +148,7 @@ class ContactPopUp extends ConsumerWidget {
|
|||
},
|
||||
style: Theme.of(context)
|
||||
.extension<StackColors>()!
|
||||
.getSecondaryEnabledButtonColor(
|
||||
.getSecondaryEnabledButtonStyle(
|
||||
context)!
|
||||
.copyWith(
|
||||
minimumSize:
|
||||
|
|
|
@ -137,7 +137,7 @@ class _ConfirmChangeNowSendViewState
|
|||
rightButton: TextButton(
|
||||
style: Theme.of(context)
|
||||
.extension<StackColors>()!
|
||||
.getSecondaryEnabledButtonColor(context),
|
||||
.getSecondaryEnabledButtonStyle(context),
|
||||
child: Text(
|
||||
"Ok",
|
||||
style: STextStyles.button(context).copyWith(
|
||||
|
|
|
@ -136,7 +136,7 @@ class _EditNoteViewState extends ConsumerState<EditTradeNoteView> {
|
|||
},
|
||||
style: Theme.of(context)
|
||||
.extension<StackColors>()!
|
||||
.getPrimaryEnabledButtonColor(context),
|
||||
.getPrimaryEnabledButtonStyle(context),
|
||||
child: Text(
|
||||
"Save",
|
||||
style: STextStyles.button(context),
|
||||
|
|
|
@ -144,7 +144,6 @@ class _ExchangeFormState extends ConsumerState<ExchangeForm> {
|
|||
await Future<void>.delayed(const Duration(milliseconds: 300));
|
||||
|
||||
Navigator.of(context, rootNavigator: true).pop();
|
||||
|
||||
} else {
|
||||
final toTicker = ref.read(exchangeFormStateProvider).toTicker ?? "";
|
||||
final fromTicker = ref.read(exchangeFormStateProvider).fromTicker ?? "";
|
||||
|
@ -1017,7 +1016,7 @@ class _ExchangeFormState extends ConsumerState<ExchangeForm> {
|
|||
leftButton: TextButton(
|
||||
style: Theme.of(context)
|
||||
.extension<StackColors>()!
|
||||
.getSecondaryEnabledButtonColor(context),
|
||||
.getSecondaryEnabledButtonStyle(context),
|
||||
child: Text(
|
||||
"Cancel",
|
||||
style: STextStyles.itemSubtitle12(context),
|
||||
|
@ -1030,7 +1029,7 @@ class _ExchangeFormState extends ConsumerState<ExchangeForm> {
|
|||
rightButton: TextButton(
|
||||
style: Theme.of(context)
|
||||
.extension<StackColors>()!
|
||||
.getPrimaryEnabledButtonColor(context),
|
||||
.getPrimaryEnabledButtonStyle(context),
|
||||
child: Text(
|
||||
"Attempt",
|
||||
style: STextStyles.button(context),
|
||||
|
|
|
@ -91,7 +91,7 @@ class _ExchangeLoadingOverlayViewState
|
|||
rightButton: TextButton(
|
||||
style: Theme.of(context)
|
||||
.extension<StackColors>()!
|
||||
.getSecondaryEnabledButtonColor(context),
|
||||
.getSecondaryEnabledButtonStyle(context),
|
||||
child: Text(
|
||||
"OK",
|
||||
style: STextStyles.button(context).copyWith(
|
||||
|
|
|
@ -188,7 +188,7 @@ class _Step1ViewState extends State<Step1View> {
|
|||
},
|
||||
style: Theme.of(context)
|
||||
.extension<StackColors>()!
|
||||
.getPrimaryEnabledButtonColor(context),
|
||||
.getPrimaryEnabledButtonStyle(context),
|
||||
child: Text(
|
||||
"Next",
|
||||
style: STextStyles.button(context),
|
||||
|
|
|
@ -698,7 +698,7 @@ class _Step2ViewState extends ConsumerState<Step2View> {
|
|||
},
|
||||
style: Theme.of(context)
|
||||
.extension<StackColors>()!
|
||||
.getSecondaryEnabledButtonColor(context),
|
||||
.getSecondaryEnabledButtonStyle(context),
|
||||
child: Text(
|
||||
"Back",
|
||||
style: STextStyles.button(context).copyWith(
|
||||
|
|
|
@ -208,7 +208,7 @@ class _Step3ViewState extends ConsumerState<Step3View> {
|
|||
},
|
||||
style: Theme.of(context)
|
||||
.extension<StackColors>()!
|
||||
.getSecondaryEnabledButtonColor(context),
|
||||
.getSecondaryEnabledButtonStyle(context),
|
||||
child: Text(
|
||||
"Back",
|
||||
style: STextStyles.button(context).copyWith(
|
||||
|
@ -322,7 +322,7 @@ class _Step3ViewState extends ConsumerState<Step3View> {
|
|||
},
|
||||
style: Theme.of(context)
|
||||
.extension<StackColors>()!
|
||||
.getPrimaryEnabledButtonColor(context),
|
||||
.getPrimaryEnabledButtonStyle(context),
|
||||
child: Text(
|
||||
"Next",
|
||||
style: STextStyles.button(context),
|
||||
|
|
|
@ -426,7 +426,7 @@ class _Step4ViewState extends ConsumerState<Step4View> {
|
|||
Navigator.of(context).pop(),
|
||||
style: Theme.of(context)
|
||||
.extension<StackColors>()!
|
||||
.getSecondaryEnabledButtonColor(
|
||||
.getSecondaryEnabledButtonStyle(
|
||||
context),
|
||||
child: Text(
|
||||
"Cancel",
|
||||
|
@ -451,7 +451,7 @@ class _Step4ViewState extends ConsumerState<Step4View> {
|
|||
},
|
||||
style: Theme.of(context)
|
||||
.extension<StackColors>()!
|
||||
.getPrimaryEnabledButtonColor(context),
|
||||
.getPrimaryEnabledButtonStyle(context),
|
||||
child: Text(
|
||||
"Show QR Code",
|
||||
style: STextStyles.button(context),
|
||||
|
@ -578,7 +578,7 @@ class _Step4ViewState extends ConsumerState<Step4View> {
|
|||
style: Theme.of(context)
|
||||
.extension<
|
||||
StackColors>()!
|
||||
.getSecondaryEnabledButtonColor(
|
||||
.getSecondaryEnabledButtonStyle(
|
||||
context),
|
||||
child: Text(
|
||||
"Ok",
|
||||
|
@ -628,7 +628,7 @@ class _Step4ViewState extends ConsumerState<Step4View> {
|
|||
},
|
||||
style: Theme.of(context)
|
||||
.extension<StackColors>()!
|
||||
.getSecondaryEnabledButtonColor(context),
|
||||
.getSecondaryEnabledButtonStyle(context),
|
||||
child: Text(
|
||||
buttonTitle,
|
||||
style: STextStyles.button(context).copyWith(
|
||||
|
|
|
@ -338,7 +338,7 @@ class _SendFromCardState extends ConsumerState<SendFromCard> {
|
|||
rightButton: TextButton(
|
||||
style: Theme.of(context)
|
||||
.extension<StackColors>()!
|
||||
.getSecondaryEnabledButtonColor(context),
|
||||
.getSecondaryEnabledButtonStyle(context),
|
||||
child: Text(
|
||||
"Ok",
|
||||
style: STextStyles.button(context).copyWith(
|
||||
|
|
|
@ -713,7 +713,7 @@ class _TradeDetailsViewState extends ConsumerState<TradeDetailsView> {
|
|||
},
|
||||
style: Theme.of(context)
|
||||
.extension<StackColors>()!
|
||||
.getSecondaryEnabledButtonColor(
|
||||
.getSecondaryEnabledButtonStyle(
|
||||
context),
|
||||
child: Text(
|
||||
"Cancel",
|
||||
|
|
|
@ -45,14 +45,14 @@ class _HomeViewButtonBarState extends ConsumerState<HomeViewButtonBar> {
|
|||
style: selectedIndex == 0
|
||||
? Theme.of(context)
|
||||
.extension<StackColors>()!
|
||||
.getPrimaryEnabledButtonColor(context)!
|
||||
.getPrimaryEnabledButtonStyle(context)!
|
||||
.copyWith(
|
||||
minimumSize:
|
||||
MaterialStateProperty.all<Size>(const Size(46, 36)),
|
||||
)
|
||||
: Theme.of(context)
|
||||
.extension<StackColors>()!
|
||||
.getSecondaryEnabledButtonColor(context)!
|
||||
.getSecondaryEnabledButtonStyle(context)!
|
||||
.copyWith(
|
||||
minimumSize:
|
||||
MaterialStateProperty.all<Size>(const Size(46, 36)),
|
||||
|
@ -71,7 +71,9 @@ class _HomeViewButtonBarState extends ConsumerState<HomeViewButtonBar> {
|
|||
? Theme.of(context)
|
||||
.extension<StackColors>()!
|
||||
.buttonTextPrimary
|
||||
: Theme.of(context).extension<StackColors>()!.textDark,
|
||||
: Theme.of(context)
|
||||
.extension<StackColors>()!
|
||||
.buttonTextSecondary,
|
||||
),
|
||||
),
|
||||
),
|
||||
|
@ -84,14 +86,14 @@ class _HomeViewButtonBarState extends ConsumerState<HomeViewButtonBar> {
|
|||
style: selectedIndex == 1
|
||||
? Theme.of(context)
|
||||
.extension<StackColors>()!
|
||||
.getPrimaryEnabledButtonColor(context)!
|
||||
.getPrimaryEnabledButtonStyle(context)!
|
||||
.copyWith(
|
||||
minimumSize:
|
||||
MaterialStateProperty.all<Size>(const Size(46, 36)),
|
||||
)
|
||||
: Theme.of(context)
|
||||
.extension<StackColors>()!
|
||||
.getSecondaryEnabledButtonColor(context)!
|
||||
.getSecondaryEnabledButtonStyle(context)!
|
||||
.copyWith(
|
||||
minimumSize:
|
||||
MaterialStateProperty.all<Size>(const Size(46, 36)),
|
||||
|
@ -118,7 +120,9 @@ class _HomeViewButtonBarState extends ConsumerState<HomeViewButtonBar> {
|
|||
? Theme.of(context)
|
||||
.extension<StackColors>()!
|
||||
.buttonTextPrimary
|
||||
: Theme.of(context).extension<StackColors>()!.textDark,
|
||||
: Theme.of(context)
|
||||
.extension<StackColors>()!
|
||||
.buttonTextSecondary,
|
||||
),
|
||||
),
|
||||
),
|
||||
|
|
|
@ -259,7 +259,7 @@ class GetStartedButton extends StatelessWidget {
|
|||
? TextButton(
|
||||
style: Theme.of(context)
|
||||
.extension<StackColors>()!
|
||||
.getPrimaryEnabledButtonColor(context),
|
||||
.getPrimaryEnabledButtonStyle(context),
|
||||
onPressed: () {
|
||||
Prefs.instance.externalCalls = true;
|
||||
Navigator.of(context).pushNamed(
|
||||
|
@ -278,7 +278,7 @@ class GetStartedButton extends StatelessWidget {
|
|||
child: TextButton(
|
||||
style: Theme.of(context)
|
||||
.extension<StackColors>()!
|
||||
.getPrimaryEnabledButtonColor(context),
|
||||
.getPrimaryEnabledButtonStyle(context),
|
||||
onPressed: () {
|
||||
Navigator.of(context).pushNamed(
|
||||
StackPrivacyCalls.routeName,
|
||||
|
|
|
@ -225,7 +225,7 @@ class _GenerateUriQrCodeViewState extends State<GenerateUriQrCodeView> {
|
|||
},
|
||||
style: Theme.of(context)
|
||||
.extension<StackColors>()!
|
||||
.getSecondaryEnabledButtonColor(context),
|
||||
.getSecondaryEnabledButtonStyle(context),
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
crossAxisAlignment: CrossAxisAlignment.center,
|
||||
|
|
|
@ -206,7 +206,7 @@ class _ReceiveViewState extends ConsumerState<ReceiveView> {
|
|||
onPressed: generateNewAddress,
|
||||
style: Theme.of(context)
|
||||
.extension<StackColors>()!
|
||||
.getSecondaryEnabledButtonColor(context),
|
||||
.getSecondaryEnabledButtonStyle(context),
|
||||
child: Text(
|
||||
"Generate new address",
|
||||
style: STextStyles.button(context).copyWith(
|
||||
|
|
|
@ -196,7 +196,7 @@ class _ConfirmTransactionViewState
|
|||
rightButton: TextButton(
|
||||
style: Theme.of(context)
|
||||
.extension<StackColors>()!
|
||||
.getSecondaryEnabledButtonColor(context),
|
||||
.getSecondaryEnabledButtonStyle(context),
|
||||
child: Text(
|
||||
"Ok",
|
||||
style: STextStyles.button(context).copyWith(
|
||||
|
|
|
@ -1608,7 +1608,7 @@ class _SendViewState extends ConsumerState<SendView> {
|
|||
leftButton: TextButton(
|
||||
style: Theme.of(context)
|
||||
.extension<StackColors>()!
|
||||
.getSecondaryEnabledButtonColor(
|
||||
.getSecondaryEnabledButtonStyle(
|
||||
context),
|
||||
child: Text(
|
||||
"Cancel",
|
||||
|
@ -1628,7 +1628,7 @@ class _SendViewState extends ConsumerState<SendView> {
|
|||
rightButton: TextButton(
|
||||
style: Theme.of(context)
|
||||
.extension<StackColors>()!
|
||||
.getPrimaryEnabledButtonColor(
|
||||
.getPrimaryEnabledButtonStyle(
|
||||
context),
|
||||
child: Text(
|
||||
"Yes",
|
||||
|
@ -1738,7 +1738,7 @@ class _SendViewState extends ConsumerState<SendView> {
|
|||
rightButton: TextButton(
|
||||
style: Theme.of(context)
|
||||
.extension<StackColors>()!
|
||||
.getSecondaryEnabledButtonColor(
|
||||
.getSecondaryEnabledButtonStyle(
|
||||
context),
|
||||
child: Text(
|
||||
"Ok",
|
||||
|
@ -1767,10 +1767,10 @@ class _SendViewState extends ConsumerState<SendView> {
|
|||
.state
|
||||
? Theme.of(context)
|
||||
.extension<StackColors>()!
|
||||
.getPrimaryEnabledButtonColor(context)
|
||||
.getPrimaryEnabledButtonStyle(context)
|
||||
: Theme.of(context)
|
||||
.extension<StackColors>()!
|
||||
.getPrimaryDisabledButtonColor(context),
|
||||
.getPrimaryDisabledButtonStyle(context),
|
||||
child: Text(
|
||||
"Preview",
|
||||
style: STextStyles.button(context),
|
||||
|
|
|
@ -107,7 +107,7 @@ class _RestoringDialogState extends State<BuildingTransactionDialog>
|
|||
rightButton: TextButton(
|
||||
style: Theme.of(context)
|
||||
.extension<StackColors>()!
|
||||
.getSecondaryEnabledButtonColor(context),
|
||||
.getSecondaryEnabledButtonStyle(context),
|
||||
child: Text(
|
||||
"Cancel",
|
||||
style: STextStyles.itemSubtitle12(context),
|
||||
|
|
|
@ -144,7 +144,7 @@ class _DebugViewState extends ConsumerState<DebugView> {
|
|||
leftButton: TextButton(
|
||||
style: Theme.of(context)
|
||||
.extension<StackColors>()!
|
||||
.getSecondaryEnabledButtonColor(context),
|
||||
.getSecondaryEnabledButtonStyle(context),
|
||||
child: Text(
|
||||
"Cancel",
|
||||
style: STextStyles.itemSubtitle12(context),
|
||||
|
@ -156,7 +156,7 @@ class _DebugViewState extends ConsumerState<DebugView> {
|
|||
rightButton: TextButton(
|
||||
style: Theme.of(context)
|
||||
.extension<StackColors>()!
|
||||
.getPrimaryEnabledButtonColor(context),
|
||||
.getPrimaryEnabledButtonStyle(context),
|
||||
child: Text(
|
||||
"Delete logs",
|
||||
style: STextStyles.button(context),
|
||||
|
|
|
@ -1,16 +1,15 @@
|
|||
import 'package:flutter/material.dart';
|
||||
import 'package:stackwallet/pages/intro_view.dart';
|
||||
import 'package:stackwallet/utilities/delete_everything.dart';
|
||||
import 'package:stackwallet/utilities/text_styles.dart';
|
||||
import 'package:stackwallet/utilities/theme/stack_colors.dart';
|
||||
import 'package:stackwallet/utilities/util.dart';
|
||||
import 'package:stackwallet/widgets/custom_buttons/app_bar_icon_button.dart';
|
||||
import 'package:stackwallet/widgets/desktop/desktop_app_bar.dart';
|
||||
import 'package:stackwallet/widgets/desktop/desktop_scaffold.dart';
|
||||
import 'package:stackwallet/widgets/desktop/primary_button.dart';
|
||||
import 'package:stackwallet/widgets/rounded_white_container.dart';
|
||||
|
||||
import 'package:stackwallet/widgets/stack_dialog.dart';
|
||||
import 'package:stackwallet/utilities/delete_everything.dart';
|
||||
import 'package:stackwallet/utilities/theme/stack_colors.dart';
|
||||
|
||||
class DeleteAccountView extends StatefulWidget {
|
||||
const DeleteAccountView({Key? key}) : super(key: key);
|
||||
|
@ -35,7 +34,7 @@ class _DeleteAccountViewState extends State<DeleteAccountView> {
|
|||
leftButton: TextButton(
|
||||
style: Theme.of(context)
|
||||
.extension<StackColors>()!
|
||||
.getSecondaryEnabledButtonColor(context),
|
||||
.getSecondaryEnabledButtonStyle(context),
|
||||
onPressed: () {
|
||||
Navigator.pop(context);
|
||||
},
|
||||
|
@ -50,7 +49,7 @@ class _DeleteAccountViewState extends State<DeleteAccountView> {
|
|||
rightButton: TextButton(
|
||||
style: Theme.of(context)
|
||||
.extension<StackColors>()!
|
||||
.getPrimaryEnabledButtonColor(context),
|
||||
.getPrimaryEnabledButtonStyle(context),
|
||||
onPressed: () async {
|
||||
await deleteEverything();
|
||||
|
||||
|
|
|
@ -284,7 +284,7 @@ class _AddEditNodeViewState extends ConsumerState<AddEditNodeView> {
|
|||
},
|
||||
style: Theme.of(context)
|
||||
.extension<StackColors>()!
|
||||
.getPrimaryEnabledButtonColor(context),
|
||||
.getPrimaryEnabledButtonStyle(context),
|
||||
child: Text(
|
||||
"Save",
|
||||
style: STextStyles.button(context),
|
||||
|
@ -603,10 +603,10 @@ class _AddEditNodeViewState extends ConsumerState<AddEditNodeView> {
|
|||
style: saveEnabled
|
||||
? Theme.of(context)
|
||||
.extension<StackColors>()!
|
||||
.getPrimaryEnabledButtonColor(context)
|
||||
.getPrimaryEnabledButtonStyle(context)
|
||||
: Theme.of(context)
|
||||
.extension<StackColors>()!
|
||||
.getPrimaryDisabledButtonColor(context),
|
||||
.getPrimaryDisabledButtonStyle(context),
|
||||
onPressed: saveEnabled ? attemptSave : null,
|
||||
child: Text(
|
||||
"Save",
|
||||
|
|
|
@ -85,7 +85,7 @@ class _AutoBackupViewState extends ConsumerState<AutoBackupView> {
|
|||
leftButton: TextButton(
|
||||
style: Theme.of(context)
|
||||
.extension<StackColors>()!
|
||||
.getSecondaryEnabledButtonColor(context),
|
||||
.getSecondaryEnabledButtonStyle(context),
|
||||
child: Text(
|
||||
"Back",
|
||||
style: STextStyles.button(context).copyWith(
|
||||
|
@ -100,7 +100,7 @@ class _AutoBackupViewState extends ConsumerState<AutoBackupView> {
|
|||
rightButton: TextButton(
|
||||
style: Theme.of(context)
|
||||
.extension<StackColors>()!
|
||||
.getPrimaryEnabledButtonColor(context),
|
||||
.getPrimaryEnabledButtonStyle(context),
|
||||
child: Text(
|
||||
"Continue",
|
||||
style: STextStyles.button(context),
|
||||
|
@ -142,7 +142,7 @@ class _AutoBackupViewState extends ConsumerState<AutoBackupView> {
|
|||
leftButton: TextButton(
|
||||
style: Theme.of(context)
|
||||
.extension<StackColors>()!
|
||||
.getSecondaryEnabledButtonColor(context),
|
||||
.getSecondaryEnabledButtonStyle(context),
|
||||
child: Text(
|
||||
"Back",
|
||||
style: STextStyles.button(context).copyWith(
|
||||
|
@ -157,7 +157,7 @@ class _AutoBackupViewState extends ConsumerState<AutoBackupView> {
|
|||
rightButton: TextButton(
|
||||
style: Theme.of(context)
|
||||
.extension<StackColors>()!
|
||||
.getPrimaryEnabledButtonColor(context),
|
||||
.getPrimaryEnabledButtonStyle(context),
|
||||
child: Text(
|
||||
"Disable",
|
||||
style: STextStyles.button(context),
|
||||
|
|
|
@ -483,10 +483,10 @@ class _EnableAutoBackupViewState extends ConsumerState<CreateAutoBackupView> {
|
|||
style: shouldEnableCreate
|
||||
? Theme.of(context)
|
||||
.extension<StackColors>()!
|
||||
.getPrimaryEnabledButtonColor(context)
|
||||
.getPrimaryEnabledButtonStyle(context)
|
||||
: Theme.of(context)
|
||||
.extension<StackColors>()!
|
||||
.getPrimaryDisabledButtonColor(context),
|
||||
.getPrimaryDisabledButtonStyle(context),
|
||||
onPressed: !shouldEnableCreate
|
||||
? null
|
||||
: () async {
|
||||
|
|
|
@ -67,7 +67,7 @@ class CreateBackupInfoView extends StatelessWidget {
|
|||
TextButton(
|
||||
style: Theme.of(context)
|
||||
.extension<StackColors>()!
|
||||
.getPrimaryEnabledButtonColor(context),
|
||||
.getPrimaryEnabledButtonStyle(context),
|
||||
onPressed: () {
|
||||
Navigator.of(context)
|
||||
.pushNamed(CreateBackupView.routeName);
|
||||
|
|
|
@ -454,10 +454,10 @@ class _RestoreFromFileViewState extends State<CreateBackupView> {
|
|||
style: shouldEnableCreate
|
||||
? Theme.of(context)
|
||||
.extension<StackColors>()!
|
||||
.getPrimaryEnabledButtonColor(context)
|
||||
.getPrimaryEnabledButtonStyle(context)
|
||||
: Theme.of(context)
|
||||
.extension<StackColors>()!
|
||||
.getPrimaryDisabledButtonColor(context),
|
||||
.getPrimaryDisabledButtonStyle(context),
|
||||
onPressed: !shouldEnableCreate
|
||||
? null
|
||||
: () async {
|
||||
|
|
|
@ -27,7 +27,7 @@ class CancelStackRestoreDialog extends StatelessWidget {
|
|||
leftButton: TextButton(
|
||||
style: Theme.of(context)
|
||||
.extension<StackColors>()!
|
||||
.getSecondaryEnabledButtonColor(context),
|
||||
.getSecondaryEnabledButtonStyle(context),
|
||||
child: Text(
|
||||
"Back",
|
||||
style: STextStyles.itemSubtitle12(context),
|
||||
|
@ -39,7 +39,7 @@ class CancelStackRestoreDialog extends StatelessWidget {
|
|||
rightButton: TextButton(
|
||||
style: Theme.of(context)
|
||||
.extension<StackColors>()!
|
||||
.getPrimaryEnabledButtonColor(context),
|
||||
.getPrimaryEnabledButtonStyle(context),
|
||||
child: Text(
|
||||
"Yes, cancel",
|
||||
style: STextStyles.itemSubtitle12(context).copyWith(
|
||||
|
|
|
@ -781,10 +781,10 @@ class _EditAutoBackupViewState extends ConsumerState<EditAutoBackupView> {
|
|||
style: shouldEnableCreate
|
||||
? Theme.of(context)
|
||||
.extension<StackColors>()!
|
||||
.getPrimaryEnabledButtonColor(context)
|
||||
.getPrimaryEnabledButtonStyle(context)
|
||||
: Theme.of(context)
|
||||
.extension<StackColors>()!
|
||||
.getPrimaryDisabledButtonColor(context),
|
||||
.getPrimaryDisabledButtonStyle(context),
|
||||
onPressed: !shouldEnableCreate ? null : onSavePressed,
|
||||
child: Text(
|
||||
"Save",
|
||||
|
|
|
@ -158,10 +158,10 @@ class _RestoreFromEncryptedStringViewState
|
|||
style: passwordController.text.isEmpty
|
||||
? Theme.of(context)
|
||||
.extension<StackColors>()!
|
||||
.getPrimaryEnabledButtonColor(context)
|
||||
.getPrimaryEnabledButtonStyle(context)
|
||||
: Theme.of(context)
|
||||
.extension<StackColors>()!
|
||||
.getPrimaryDisabledButtonColor(context),
|
||||
.getPrimaryDisabledButtonStyle(context),
|
||||
onPressed: passwordController.text.isEmpty
|
||||
? null
|
||||
: () async {
|
||||
|
|
|
@ -280,10 +280,10 @@ class _RestoreFromFileViewState extends ConsumerState<RestoreFromFileView> {
|
|||
fileLocationController.text.isEmpty
|
||||
? Theme.of(context)
|
||||
.extension<StackColors>()!
|
||||
.getPrimaryDisabledButtonColor(context)
|
||||
.getPrimaryDisabledButtonStyle(context)
|
||||
: Theme.of(context)
|
||||
.extension<StackColors>()!
|
||||
.getPrimaryEnabledButtonColor(context),
|
||||
.getPrimaryEnabledButtonStyle(context),
|
||||
onPressed: passwordController.text.isEmpty ||
|
||||
fileLocationController.text.isEmpty
|
||||
? null
|
||||
|
|
|
@ -669,7 +669,7 @@ class _StackRestoreProgressViewState
|
|||
},
|
||||
style: Theme.of(context)
|
||||
.extension<StackColors>()!
|
||||
.getPrimaryEnabledButtonColor(context),
|
||||
.getPrimaryEnabledButtonStyle(context),
|
||||
child: Text(
|
||||
_success ? "OK" : "Cancel restore process",
|
||||
style: STextStyles.button(context).copyWith(
|
||||
|
|
|
@ -140,7 +140,7 @@ class WalletBackupView extends ConsumerWidget {
|
|||
TextButton(
|
||||
style: Theme.of(context)
|
||||
.extension<StackColors>()!
|
||||
.getPrimaryEnabledButtonColor(context),
|
||||
.getPrimaryEnabledButtonStyle(context),
|
||||
onPressed: () {
|
||||
String data = AddressUtils.encodeQRSeedData(mnemonic);
|
||||
|
||||
|
@ -194,7 +194,7 @@ class WalletBackupView extends ConsumerWidget {
|
|||
},
|
||||
style: Theme.of(context)
|
||||
.extension<StackColors>()!
|
||||
.getSecondaryEnabledButtonColor(context),
|
||||
.getSecondaryEnabledButtonStyle(context),
|
||||
child: Text(
|
||||
"Cancel",
|
||||
style: STextStyles.button(context).copyWith(
|
||||
|
|
|
@ -96,7 +96,7 @@ class ConfirmFullRescanDialog extends StatelessWidget {
|
|||
leftButton: TextButton(
|
||||
style: Theme.of(context)
|
||||
.extension<StackColors>()!
|
||||
.getSecondaryEnabledButtonColor(context),
|
||||
.getSecondaryEnabledButtonStyle(context),
|
||||
child: Text(
|
||||
"Cancel",
|
||||
style: STextStyles.itemSubtitle12(context),
|
||||
|
@ -108,7 +108,7 @@ class ConfirmFullRescanDialog extends StatelessWidget {
|
|||
rightButton: TextButton(
|
||||
style: Theme.of(context)
|
||||
.extension<StackColors>()!
|
||||
.getPrimaryEnabledButtonColor(context),
|
||||
.getPrimaryEnabledButtonStyle(context),
|
||||
child: Text(
|
||||
"Rescan",
|
||||
style: STextStyles.button(context),
|
||||
|
|
|
@ -126,7 +126,7 @@ class _WalletNetworkSettingsViewState
|
|||
rightButton: TextButton(
|
||||
style: Theme.of(context)
|
||||
.extension<StackColors>()!
|
||||
.getSecondaryEnabledButtonColor(context),
|
||||
.getSecondaryEnabledButtonStyle(context),
|
||||
child: Text(
|
||||
"Ok",
|
||||
style: STextStyles.itemSubtitle12(context),
|
||||
|
@ -156,7 +156,7 @@ class _WalletNetworkSettingsViewState
|
|||
rightButton: TextButton(
|
||||
style: Theme.of(context)
|
||||
.extension<StackColors>()!
|
||||
.getSecondaryEnabledButtonColor(context),
|
||||
.getSecondaryEnabledButtonStyle(context),
|
||||
child: Text(
|
||||
"Ok",
|
||||
style: STextStyles.itemSubtitle12(context),
|
||||
|
|
|
@ -306,7 +306,7 @@ class _WalletSettingsViewState extends State<WalletSettingsView> {
|
|||
},
|
||||
style: Theme.of(context)
|
||||
.extension<StackColors>()!
|
||||
.getSecondaryEnabledButtonColor(context),
|
||||
.getSecondaryEnabledButtonStyle(context),
|
||||
child: Text(
|
||||
"Log out",
|
||||
style: STextStyles.button(context).copyWith(
|
||||
|
|
|
@ -156,7 +156,7 @@ class _DeleteWalletRecoveryPhraseViewState
|
|||
TextButton(
|
||||
style: Theme.of(context)
|
||||
.extension<StackColors>()!
|
||||
.getPrimaryEnabledButtonColor(context),
|
||||
.getPrimaryEnabledButtonStyle(context),
|
||||
onPressed: () {
|
||||
showDialog<dynamic>(
|
||||
barrierDismissible: true,
|
||||
|
@ -166,7 +166,7 @@ class _DeleteWalletRecoveryPhraseViewState
|
|||
leftButton: TextButton(
|
||||
style: Theme.of(context)
|
||||
.extension<StackColors>()!
|
||||
.getSecondaryEnabledButtonColor(context),
|
||||
.getSecondaryEnabledButtonStyle(context),
|
||||
onPressed: () {
|
||||
Navigator.pop(context);
|
||||
},
|
||||
|
@ -181,7 +181,7 @@ class _DeleteWalletRecoveryPhraseViewState
|
|||
rightButton: TextButton(
|
||||
style: Theme.of(context)
|
||||
.extension<StackColors>()!
|
||||
.getPrimaryEnabledButtonColor(context),
|
||||
.getPrimaryEnabledButtonStyle(context),
|
||||
onPressed: () async {
|
||||
final walletId = _manager.walletId;
|
||||
final walletsInstance =
|
||||
|
|
|
@ -69,7 +69,7 @@ class DeleteWalletWarningView extends ConsumerWidget {
|
|||
TextButton(
|
||||
style: Theme.of(context)
|
||||
.extension<StackColors>()!
|
||||
.getSecondaryEnabledButtonColor(context),
|
||||
.getSecondaryEnabledButtonStyle(context),
|
||||
onPressed: () {
|
||||
Navigator.pop(context);
|
||||
},
|
||||
|
@ -87,7 +87,7 @@ class DeleteWalletWarningView extends ConsumerWidget {
|
|||
TextButton(
|
||||
style: Theme.of(context)
|
||||
.extension<StackColors>()!
|
||||
.getPrimaryEnabledButtonColor(context),
|
||||
.getPrimaryEnabledButtonStyle(context),
|
||||
onPressed: () async {
|
||||
final manager = ref
|
||||
.read(walletsChangeNotifierProvider)
|
||||
|
|
|
@ -114,7 +114,7 @@ class _RenameWalletViewState extends ConsumerState<RenameWalletView> {
|
|||
TextButton(
|
||||
style: Theme.of(context)
|
||||
.extension<StackColors>()!
|
||||
.getPrimaryEnabledButtonColor(context),
|
||||
.getPrimaryEnabledButtonStyle(context),
|
||||
onPressed: () async {
|
||||
final newName = _controller.text;
|
||||
final success = await ref
|
||||
|
|
|
@ -105,7 +105,7 @@ class WalletSettingsWalletSettingsView extends ConsumerWidget {
|
|||
leftButton: TextButton(
|
||||
style: Theme.of(context)
|
||||
.extension<StackColors>()!
|
||||
.getSecondaryEnabledButtonColor(context),
|
||||
.getSecondaryEnabledButtonStyle(context),
|
||||
onPressed: () {
|
||||
Navigator.pop(context);
|
||||
},
|
||||
|
@ -120,7 +120,7 @@ class WalletSettingsWalletSettingsView extends ConsumerWidget {
|
|||
rightButton: TextButton(
|
||||
style: Theme.of(context)
|
||||
.extension<StackColors>()!
|
||||
.getPrimaryEnabledButtonColor(context),
|
||||
.getPrimaryEnabledButtonStyle(context),
|
||||
onPressed: () {
|
||||
Navigator.pop(context);
|
||||
Navigator.push(
|
||||
|
|
|
@ -204,7 +204,7 @@ class _EditNoteViewState extends ConsumerState<EditNoteView> {
|
|||
},
|
||||
style: Theme.of(context)
|
||||
.extension<StackColors>()!
|
||||
.getPrimaryEnabledButtonColor(context),
|
||||
.getPrimaryEnabledButtonStyle(context),
|
||||
child: Text(
|
||||
"Save",
|
||||
style: STextStyles.button(context),
|
||||
|
|
|
@ -202,7 +202,7 @@ class _TransactionDetailsViewState
|
|||
rightButton: TextButton(
|
||||
style: Theme.of(context)
|
||||
.extension<StackColors>()!
|
||||
.getPrimaryEnabledButtonColor(context),
|
||||
.getPrimaryEnabledButtonStyle(context),
|
||||
onPressed: () {
|
||||
Navigator.of(context).pop(true);
|
||||
},
|
||||
|
|
|
@ -579,7 +579,7 @@ class _WalletViewState extends ConsumerState<WalletView> {
|
|||
child: TextButton(
|
||||
style: Theme.of(context)
|
||||
.extension<StackColors>()!
|
||||
.getSecondaryEnabledButtonColor(context),
|
||||
.getSecondaryEnabledButtonStyle(context),
|
||||
onPressed: () async {
|
||||
await showDialog<void>(
|
||||
context: context,
|
||||
|
@ -609,7 +609,7 @@ class _WalletViewState extends ConsumerState<WalletView> {
|
|||
},
|
||||
style: Theme.of(context)
|
||||
.extension<StackColors>()!
|
||||
.getPrimaryEnabledButtonColor(
|
||||
.getPrimaryEnabledButtonStyle(
|
||||
context),
|
||||
child: Text(
|
||||
"Continue",
|
||||
|
|
|
@ -94,7 +94,7 @@ class AddWalletButton extends StatelessWidget {
|
|||
return TextButton(
|
||||
style: Theme.of(context)
|
||||
.extension<StackColors>()!
|
||||
.getPrimaryEnabledButtonColor(context),
|
||||
.getPrimaryEnabledButtonStyle(context),
|
||||
onPressed: () {
|
||||
if (isDesktop) {
|
||||
Navigator.of(
|
||||
|
|
|
@ -282,10 +282,10 @@ class _DesktopMenuItemState<T> extends ConsumerState<DesktopMenuItem<T>>
|
|||
style: value == group
|
||||
? Theme.of(context)
|
||||
.extension<StackColors>()!
|
||||
.getDesktopMenuButtonColorSelected(context)
|
||||
.getDesktopMenuButtonStyleSelected(context)
|
||||
: Theme.of(context)
|
||||
.extension<StackColors>()!
|
||||
.getDesktopMenuButtonColor(context),
|
||||
.getDesktopMenuButtonStyle(context),
|
||||
onPressed: () {
|
||||
onChanged(value);
|
||||
},
|
||||
|
|
|
@ -22,7 +22,7 @@ class ExitToMyStackButton extends StatelessWidget {
|
|||
child: TextButton(
|
||||
style: Theme.of(context)
|
||||
.extension<StackColors>()!
|
||||
.getSmallSecondaryEnabledButtonColor(context),
|
||||
.getSmallSecondaryEnabledButtonStyle(context),
|
||||
onPressed: onPressed ??
|
||||
() {
|
||||
Navigator.of(context).popUntil(
|
||||
|
|
|
@ -425,10 +425,10 @@ class _CreatePasswordViewState extends ConsumerState<CreatePasswordView> {
|
|||
style: nextEnabled
|
||||
? Theme.of(context)
|
||||
.extension<StackColors>()!
|
||||
.getPrimaryEnabledButtonColor(context)
|
||||
.getPrimaryEnabledButtonStyle(context)
|
||||
: Theme.of(context)
|
||||
.extension<StackColors>()!
|
||||
.getPrimaryDisabledButtonColor(context),
|
||||
.getPrimaryDisabledButtonStyle(context),
|
||||
onPressed: nextEnabled ? onNextPressed : null,
|
||||
child: Text(
|
||||
"Next",
|
||||
|
|
|
@ -159,7 +159,7 @@ class _BackupRestoreSettings extends ConsumerState<BackupRestoreSettings> {
|
|||
leftButton: TextButton(
|
||||
style: Theme.of(context)
|
||||
.extension<StackColors>()!
|
||||
.getSecondaryEnabledButtonColor(context),
|
||||
.getSecondaryEnabledButtonStyle(context),
|
||||
child: Text(
|
||||
"Back",
|
||||
style: STextStyles.button(context).copyWith(
|
||||
|
@ -175,7 +175,7 @@ class _BackupRestoreSettings extends ConsumerState<BackupRestoreSettings> {
|
|||
rightButton: TextButton(
|
||||
style: Theme.of(context)
|
||||
.extension<StackColors>()!
|
||||
.getPrimaryEnabledButtonColor(context),
|
||||
.getPrimaryEnabledButtonStyle(context),
|
||||
child: Text(
|
||||
"Disable",
|
||||
style: STextStyles.button(context),
|
||||
|
|
|
@ -25,10 +25,10 @@ class SettingsMenuItem<T> extends StatelessWidget {
|
|||
style: value == group
|
||||
? Theme.of(context)
|
||||
.extension<StackColors>()!
|
||||
.getDesktopSettingsButtonColor(context)
|
||||
.getDesktopSettingsButtonStyle(context)
|
||||
: Theme.of(context)
|
||||
.extension<StackColors>()!
|
||||
.getDesktopSettingsButtonColor(context),
|
||||
.getDesktopSettingsButtonStyle(context),
|
||||
onPressed: () {
|
||||
onChanged(value);
|
||||
},
|
||||
|
|
|
@ -82,6 +82,8 @@ abstract class StackColorTheme {
|
|||
Color get buttonBackSecondaryDisabled;
|
||||
Color get buttonBackBorder;
|
||||
Color get buttonBackBorderDisabled;
|
||||
Color get buttonBackBorderSecondary;
|
||||
Color get buttonBackBorderSecondaryDisabled;
|
||||
Color get numberBackDefault;
|
||||
Color get numpadBackDefault;
|
||||
Color get bottomNavBack;
|
||||
|
|
|
@ -71,6 +71,10 @@ class DarkColors extends StackColorTheme {
|
|||
Color get buttonBackBorder => const Color(0xFF4C86E9);
|
||||
@override
|
||||
Color get buttonBackBorderDisabled => const Color(0xFF314265);
|
||||
@override
|
||||
Color get buttonBackBorderSecondary => buttonBackSecondary;
|
||||
@override
|
||||
Color get buttonBackBorderSecondaryDisabled => buttonBackSecondaryDisabled;
|
||||
|
||||
@override
|
||||
Color get numberBackDefault => const Color(0xFF484B51);
|
||||
|
|
|
@ -71,6 +71,10 @@ class FruitSorbetColors extends StackColorTheme {
|
|||
Color get buttonBackBorder => const Color(0xFFF95369);
|
||||
@override
|
||||
Color get buttonBackBorderDisabled => const Color(0xFFFCA7B3);
|
||||
@override
|
||||
Color get buttonBackBorderSecondary => buttonBackBorder;
|
||||
@override
|
||||
Color get buttonBackBorderSecondaryDisabled => buttonBackSecondaryDisabled;
|
||||
|
||||
@override
|
||||
Color get numberBackDefault => const Color(0xFFFFF8EE);
|
||||
|
|
|
@ -71,6 +71,10 @@ class LightColors extends StackColorTheme {
|
|||
Color get buttonBackBorder => const Color(0xFF232323);
|
||||
@override
|
||||
Color get buttonBackBorderDisabled => const Color(0xFFB6B6B6);
|
||||
@override
|
||||
Color get buttonBackBorderSecondary => buttonBackSecondary;
|
||||
@override
|
||||
Color get buttonBackBorderSecondaryDisabled => buttonBackSecondaryDisabled;
|
||||
|
||||
@override
|
||||
Color get numberBackDefault => const Color(0xFFFFFFFF);
|
||||
|
|
|
@ -78,6 +78,10 @@ class OceanBreezeColors extends StackColorTheme {
|
|||
Color get buttonBackBorder => const Color(0xFF227386);
|
||||
@override
|
||||
Color get buttonBackBorderDisabled => const Color(0xFFBDD5DB);
|
||||
@override
|
||||
Color get buttonBackBorderSecondary => buttonBackSecondary;
|
||||
@override
|
||||
Color get buttonBackBorderSecondaryDisabled => buttonBackSecondaryDisabled;
|
||||
|
||||
@override
|
||||
Color get numberBackDefault => const Color(0xFFFFFFFF);
|
||||
|
|
|
@ -72,6 +72,10 @@ class OledBlackColors extends StackColorTheme {
|
|||
Color get buttonBackBorder => const Color(0xFF6F9CE9);
|
||||
@override
|
||||
Color get buttonBackBorderDisabled => const Color(0xFF212F46);
|
||||
@override
|
||||
Color get buttonBackBorderSecondary => buttonBackSecondary;
|
||||
@override
|
||||
Color get buttonBackBorderSecondaryDisabled => buttonBackSecondaryDisabled;
|
||||
|
||||
@override
|
||||
Color get numberBackDefault => const Color(0xFF242424);
|
||||
|
|
|
@ -41,6 +41,8 @@ class StackColors extends ThemeExtension<StackColors> {
|
|||
final Color buttonBackSecondaryDisabled;
|
||||
final Color buttonBackBorder;
|
||||
final Color buttonBackBorderDisabled;
|
||||
final Color buttonBackBorderSecondary;
|
||||
final Color buttonBackBorderSecondaryDisabled;
|
||||
final Color numberBackDefault;
|
||||
final Color numpadBackDefault;
|
||||
final Color bottomNavBack;
|
||||
|
@ -211,6 +213,8 @@ class StackColors extends ThemeExtension<StackColors> {
|
|||
required this.buttonBackSecondaryDisabled,
|
||||
required this.buttonBackBorder,
|
||||
required this.buttonBackBorderDisabled,
|
||||
required this.buttonBackBorderSecondary,
|
||||
required this.buttonBackBorderSecondaryDisabled,
|
||||
required this.numberBackDefault,
|
||||
required this.numpadBackDefault,
|
||||
required this.bottomNavBack,
|
||||
|
@ -352,6 +356,9 @@ class StackColors extends ThemeExtension<StackColors> {
|
|||
buttonBackSecondaryDisabled: colorTheme.buttonBackSecondaryDisabled,
|
||||
buttonBackBorder: colorTheme.buttonBackBorder,
|
||||
buttonBackBorderDisabled: colorTheme.buttonBackBorderDisabled,
|
||||
buttonBackBorderSecondary: colorTheme.buttonBackBorderSecondary,
|
||||
buttonBackBorderSecondaryDisabled:
|
||||
colorTheme.buttonBackBorderSecondaryDisabled,
|
||||
numberBackDefault: colorTheme.numberBackDefault,
|
||||
numpadBackDefault: colorTheme.numpadBackDefault,
|
||||
bottomNavBack: colorTheme.bottomNavBack,
|
||||
|
@ -496,6 +503,8 @@ class StackColors extends ThemeExtension<StackColors> {
|
|||
Color? buttonBackSecondaryDisabled,
|
||||
Color? buttonBackBorder,
|
||||
Color? buttonBackBorderDisabled,
|
||||
Color? buttonBackBorderSecondary,
|
||||
Color? buttonBackBorderSecondaryDisabled,
|
||||
Color? numberBackDefault,
|
||||
Color? numpadBackDefault,
|
||||
Color? bottomNavBack,
|
||||
|
@ -638,6 +647,10 @@ class StackColors extends ThemeExtension<StackColors> {
|
|||
buttonBackBorder: buttonBackBorder ?? this.buttonBackBorder,
|
||||
buttonBackBorderDisabled:
|
||||
buttonBackBorderDisabled ?? this.buttonBackBorderDisabled,
|
||||
buttonBackBorderSecondary:
|
||||
buttonBackBorderSecondary ?? this.buttonBackBorderSecondary,
|
||||
buttonBackBorderSecondaryDisabled: buttonBackBorderSecondaryDisabled ??
|
||||
this.buttonBackBorderSecondaryDisabled,
|
||||
numberBackDefault: numberBackDefault ?? this.numberBackDefault,
|
||||
numpadBackDefault: numpadBackDefault ?? this.numpadBackDefault,
|
||||
bottomNavBack: bottomNavBack ?? this.bottomNavBack,
|
||||
|
@ -942,6 +955,16 @@ class StackColors extends ThemeExtension<StackColors> {
|
|||
other.buttonBackBorderDisabled,
|
||||
t,
|
||||
)!,
|
||||
buttonBackBorderSecondary: Color.lerp(
|
||||
buttonBackBorderSecondary,
|
||||
other.buttonBackBorderSecondary,
|
||||
t,
|
||||
)!,
|
||||
buttonBackBorderSecondaryDisabled: Color.lerp(
|
||||
buttonBackBorderSecondaryDisabled,
|
||||
other.buttonBackBorderSecondaryDisabled,
|
||||
t,
|
||||
)!,
|
||||
numberBackDefault: Color.lerp(
|
||||
numberBackDefault,
|
||||
other.numberBackDefault,
|
||||
|
@ -1526,70 +1549,97 @@ class StackColors extends ThemeExtension<StackColors> {
|
|||
}
|
||||
}
|
||||
|
||||
ButtonStyle? getDeleteEnabledButtonColor(BuildContext context) =>
|
||||
ButtonStyle? getDeleteEnabledButtonStyle(BuildContext context) =>
|
||||
Theme.of(context).textButtonTheme.style?.copyWith(
|
||||
backgroundColor: MaterialStateProperty.all<Color>(
|
||||
textFieldErrorBG,
|
||||
),
|
||||
);
|
||||
|
||||
ButtonStyle? getDeleteDisabledButtonColor(BuildContext context) =>
|
||||
ButtonStyle? getDeleteDisabledButtonStyle(BuildContext context) =>
|
||||
Theme.of(context).textButtonTheme.style?.copyWith(
|
||||
backgroundColor: MaterialStateProperty.all<Color>(
|
||||
buttonBackSecondaryDisabled,
|
||||
),
|
||||
);
|
||||
|
||||
ButtonStyle? getPrimaryEnabledButtonColor(BuildContext context) =>
|
||||
ButtonStyle? getPrimaryEnabledButtonStyle(BuildContext context) =>
|
||||
Theme.of(context).textButtonTheme.style?.copyWith(
|
||||
backgroundColor: MaterialStateProperty.all<Color>(
|
||||
buttonBackPrimary,
|
||||
),
|
||||
);
|
||||
|
||||
ButtonStyle? getPrimaryDisabledButtonColor(BuildContext context) =>
|
||||
ButtonStyle? getPrimaryDisabledButtonStyle(BuildContext context) =>
|
||||
Theme.of(context).textButtonTheme.style?.copyWith(
|
||||
backgroundColor: MaterialStateProperty.all<Color>(
|
||||
buttonBackPrimaryDisabled,
|
||||
),
|
||||
);
|
||||
|
||||
ButtonStyle? getSecondaryEnabledButtonColor(BuildContext context) =>
|
||||
ButtonStyle? getSecondaryEnabledButtonStyle(BuildContext context) =>
|
||||
Theme.of(context).textButtonTheme.style?.copyWith(
|
||||
backgroundColor: MaterialStateProperty.all<Color>(
|
||||
buttonBackSecondary,
|
||||
),
|
||||
shape: MaterialStateProperty.all(
|
||||
RoundedRectangleBorder(
|
||||
side: BorderSide(
|
||||
color: buttonBackBorderSecondary,
|
||||
width: 1,
|
||||
),
|
||||
borderRadius: BorderRadius.circular(10000),
|
||||
),
|
||||
),
|
||||
);
|
||||
|
||||
ButtonStyle? getSecondaryDisabledButtonColor(BuildContext context) =>
|
||||
ButtonStyle? getSecondaryDisabledButtonStyle(BuildContext context) =>
|
||||
Theme.of(context).textButtonTheme.style?.copyWith(
|
||||
backgroundColor: MaterialStateProperty.all<Color>(
|
||||
buttonBackSecondaryDisabled,
|
||||
),
|
||||
shape: MaterialStateProperty.all(
|
||||
RoundedRectangleBorder(
|
||||
side: BorderSide(
|
||||
color: buttonBackBorderSecondaryDisabled,
|
||||
width: 1,
|
||||
),
|
||||
borderRadius: BorderRadius.circular(10000),
|
||||
),
|
||||
),
|
||||
);
|
||||
|
||||
ButtonStyle? getSmallSecondaryEnabledButtonColor(BuildContext context) =>
|
||||
ButtonStyle? getSmallSecondaryEnabledButtonStyle(BuildContext context) =>
|
||||
Theme.of(context).textButtonTheme.style?.copyWith(
|
||||
backgroundColor: MaterialStateProperty.all<Color>(
|
||||
textFieldDefaultBG,
|
||||
),
|
||||
shape: MaterialStateProperty.all(
|
||||
RoundedRectangleBorder(
|
||||
side: BorderSide(
|
||||
color: buttonBackBorderSecondary,
|
||||
width: 1,
|
||||
),
|
||||
borderRadius: BorderRadius.circular(10000),
|
||||
),
|
||||
),
|
||||
);
|
||||
|
||||
ButtonStyle? getDesktopMenuButtonColor(BuildContext context) =>
|
||||
ButtonStyle? getDesktopMenuButtonStyle(BuildContext context) =>
|
||||
Theme.of(context).textButtonTheme.style?.copyWith(
|
||||
backgroundColor: MaterialStateProperty.all<Color>(
|
||||
popupBG,
|
||||
),
|
||||
);
|
||||
|
||||
ButtonStyle? getDesktopMenuButtonColorSelected(BuildContext context) =>
|
||||
ButtonStyle? getDesktopMenuButtonStyleSelected(BuildContext context) =>
|
||||
Theme.of(context).textButtonTheme.style?.copyWith(
|
||||
backgroundColor: MaterialStateProperty.all<Color>(
|
||||
textFieldDefaultBG,
|
||||
),
|
||||
);
|
||||
|
||||
ButtonStyle? getDesktopSettingsButtonColor(BuildContext context) =>
|
||||
ButtonStyle? getDesktopSettingsButtonStyle(BuildContext context) =>
|
||||
Theme.of(context).textButtonTheme.style?.copyWith(
|
||||
backgroundColor: MaterialStateProperty.all<Color>(
|
||||
background,
|
||||
|
|
|
@ -64,10 +64,10 @@ class DeleteButton extends StatelessWidget {
|
|||
style: enabled
|
||||
? Theme.of(context)
|
||||
.extension<StackColors>()!
|
||||
.getDeleteEnabledButtonColor(context)
|
||||
.getDeleteEnabledButtonStyle(context)
|
||||
: Theme.of(context)
|
||||
.extension<StackColors>()!
|
||||
.getDeleteDisabledButtonColor(context),
|
||||
.getDeleteDisabledButtonStyle(context),
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
|
|
|
@ -136,10 +136,10 @@ class PrimaryButton extends StatelessWidget {
|
|||
style: enabled
|
||||
? Theme.of(context)
|
||||
.extension<StackColors>()!
|
||||
.getPrimaryEnabledButtonColor(context)
|
||||
.getPrimaryEnabledButtonStyle(context)
|
||||
: Theme.of(context)
|
||||
.extension<StackColors>()!
|
||||
.getPrimaryDisabledButtonColor(context),
|
||||
.getPrimaryDisabledButtonStyle(context),
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
|
|
|
@ -139,10 +139,10 @@ class SecondaryButton extends StatelessWidget {
|
|||
style: enabled
|
||||
? Theme.of(context)
|
||||
.extension<StackColors>()!
|
||||
.getSecondaryEnabledButtonColor(context)
|
||||
.getSecondaryEnabledButtonStyle(context)
|
||||
: Theme.of(context)
|
||||
.extension<StackColors>()!
|
||||
.getSecondaryDisabledButtonColor(context),
|
||||
.getSecondaryDisabledButtonStyle(context),
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
|
|
|
@ -307,7 +307,7 @@ class NodeOptionsSheet extends ConsumerWidget {
|
|||
child: TextButton(
|
||||
style: Theme.of(context)
|
||||
.extension<StackColors>()!
|
||||
.getSecondaryEnabledButtonColor(context),
|
||||
.getSecondaryEnabledButtonStyle(context),
|
||||
onPressed: () {
|
||||
Navigator.pop(context);
|
||||
Navigator.of(context).pushNamed(
|
||||
|
@ -337,10 +337,10 @@ class NodeOptionsSheet extends ConsumerWidget {
|
|||
style: status == "Connected"
|
||||
? Theme.of(context)
|
||||
.extension<StackColors>()!
|
||||
.getPrimaryDisabledButtonColor(context)
|
||||
.getPrimaryDisabledButtonStyle(context)
|
||||
: Theme.of(context)
|
||||
.extension<StackColors>()!
|
||||
.getPrimaryEnabledButtonColor(context),
|
||||
.getPrimaryEnabledButtonStyle(context),
|
||||
onPressed: status == "Connected"
|
||||
? null
|
||||
: () async {
|
||||
|
|
|
@ -193,7 +193,7 @@ class StackOkDialog extends StatelessWidget {
|
|||
},
|
||||
style: Theme.of(context)
|
||||
.extension<StackColors>()!
|
||||
.getPrimaryEnabledButtonColor(context),
|
||||
.getPrimaryEnabledButtonStyle(context),
|
||||
child: Text(
|
||||
"Ok",
|
||||
style: STextStyles.button(context),
|
||||
|
|
Loading…
Reference in a new issue