mirror of
https://github.com/cypherstack/stack_wallet.git
synced 2025-01-11 13:14:32 +00:00
Merge remote-tracking branch 'cypherstack/ui-fixes' into simplex
This commit is contained in:
commit
85582de70b
8 changed files with 113 additions and 5 deletions
lib
pages/exchange_view/sub_widgets
utilities/theme
|
@ -3,12 +3,11 @@ import 'package:flutter_riverpod/flutter_riverpod.dart';
|
|||
import 'package:stackwallet/pages/exchange_view/sub_widgets/exchange_rate_sheet.dart';
|
||||
import 'package:stackwallet/providers/providers.dart';
|
||||
import 'package:stackwallet/utilities/assets.dart';
|
||||
import 'package:stackwallet/utilities/constants.dart';
|
||||
import 'package:stackwallet/utilities/theme/stack_colors.dart';
|
||||
import 'package:stackwallet/utilities/util.dart';
|
||||
import 'package:stackwallet/widgets/toggle.dart';
|
||||
|
||||
import '../../../utilities/constants.dart';
|
||||
|
||||
class RateTypeToggle extends ConsumerWidget {
|
||||
const RateTypeToggle({
|
||||
Key? key,
|
||||
|
@ -37,10 +36,16 @@ class RateTypeToggle extends ConsumerWidget {
|
|||
}
|
||||
},
|
||||
isOn: !estimated,
|
||||
onColor: Theme.of(context).extension<StackColors>()!.textFieldDefaultBG,
|
||||
onColor: isDesktop
|
||||
? Theme.of(context)
|
||||
.extension<StackColors>()!
|
||||
.rateTypeToggleDesktopColorOn
|
||||
: Theme.of(context).extension<StackColors>()!.rateTypeToggleColorOn,
|
||||
offColor: isDesktop
|
||||
? Theme.of(context).extension<StackColors>()!.buttonBackSecondary
|
||||
: Theme.of(context).extension<StackColors>()!.popupBG,
|
||||
? Theme.of(context)
|
||||
.extension<StackColors>()!
|
||||
.rateTypeToggleDesktopColorOff
|
||||
: Theme.of(context).extension<StackColors>()!.rateTypeToggleColorOff,
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.circular(
|
||||
Constants.size.circularBorderRadius,
|
||||
|
|
|
@ -220,9 +220,16 @@ abstract class StackColorTheme {
|
|||
Color get textConfirmTotalAmount;
|
||||
Color get textSelectedWordTableItem;
|
||||
|
||||
// rate type toggle
|
||||
Color get rateTypeToggleColorOn;
|
||||
Color get rateTypeToggleColorOff;
|
||||
Color get rateTypeToggleDesktopColorOn;
|
||||
Color get rateTypeToggleDesktopColorOff;
|
||||
|
||||
BoxShadow get standardBoxShadow;
|
||||
BoxShadow? get homeViewButtonBarBoxShadow;
|
||||
}
|
||||
// 0xFFFFD8CE
|
||||
|
||||
class CoinThemeColor {
|
||||
const CoinThemeColor();
|
||||
|
|
|
@ -319,6 +319,16 @@ class DarkColors extends StackColorTheme {
|
|||
@override
|
||||
Color get textSelectedWordTableItem => const Color(0xFF00297A);
|
||||
|
||||
//rate type toggle
|
||||
@override
|
||||
Color get rateTypeToggleColorOn => textFieldDefaultBG;
|
||||
@override
|
||||
Color get rateTypeToggleColorOff => popupBG;
|
||||
@override
|
||||
Color get rateTypeToggleDesktopColorOn => textFieldDefaultBG;
|
||||
@override
|
||||
Color get rateTypeToggleDesktopColorOff => buttonBackSecondary;
|
||||
|
||||
@override
|
||||
BoxShadow get standardBoxShadow => BoxShadow(
|
||||
color: shadow,
|
||||
|
|
|
@ -319,6 +319,16 @@ class FruitSorbetColors extends StackColorTheme {
|
|||
@override
|
||||
Color get textSelectedWordTableItem => const Color(0xFF232323);
|
||||
|
||||
//rate type toggle
|
||||
@override
|
||||
Color get rateTypeToggleColorOn => const Color(0xFFFFD8CE);
|
||||
@override
|
||||
Color get rateTypeToggleColorOff => popupBG;
|
||||
@override
|
||||
Color get rateTypeToggleDesktopColorOn => const Color(0xFFFFD8CE);
|
||||
@override
|
||||
Color get rateTypeToggleDesktopColorOff => buttonBackSecondary;
|
||||
|
||||
@override
|
||||
BoxShadow get standardBoxShadow => BoxShadow(
|
||||
color: shadow,
|
||||
|
|
|
@ -319,6 +319,16 @@ class LightColors extends StackColorTheme {
|
|||
@override
|
||||
Color get textSelectedWordTableItem => const Color(0xFF232323);
|
||||
|
||||
//rate type toggle
|
||||
@override
|
||||
Color get rateTypeToggleColorOn => textFieldDefaultBG;
|
||||
@override
|
||||
Color get rateTypeToggleColorOff => popupBG;
|
||||
@override
|
||||
Color get rateTypeToggleDesktopColorOn => textFieldDefaultBG;
|
||||
@override
|
||||
Color get rateTypeToggleDesktopColorOff => buttonBackSecondary;
|
||||
|
||||
@override
|
||||
BoxShadow get standardBoxShadow => BoxShadow(
|
||||
color: shadow,
|
||||
|
|
|
@ -326,6 +326,16 @@ class OceanBreezeColors extends StackColorTheme {
|
|||
@override
|
||||
Color get textSelectedWordTableItem => const Color(0xFF232323);
|
||||
|
||||
//rate type toggle
|
||||
@override
|
||||
Color get rateTypeToggleColorOn => textFieldDefaultBG;
|
||||
@override
|
||||
Color get rateTypeToggleColorOff => popupBG;
|
||||
@override
|
||||
Color get rateTypeToggleDesktopColorOn => textFieldDefaultBG;
|
||||
@override
|
||||
Color get rateTypeToggleDesktopColorOff => buttonBackSecondary;
|
||||
|
||||
@override
|
||||
BoxShadow get standardBoxShadow => BoxShadow(
|
||||
color: shadow,
|
||||
|
|
|
@ -321,6 +321,16 @@ class OledBlackColors extends StackColorTheme {
|
|||
@override
|
||||
Color get textSelectedWordTableItem => const Color(0xFF143D8E);
|
||||
|
||||
//rate type toggle
|
||||
@override
|
||||
Color get rateTypeToggleColorOn => textFieldDefaultBG;
|
||||
@override
|
||||
Color get rateTypeToggleColorOff => popupBG;
|
||||
@override
|
||||
Color get rateTypeToggleDesktopColorOn => textFieldDefaultBG;
|
||||
@override
|
||||
Color get rateTypeToggleDesktopColorOff => buttonBackSecondary;
|
||||
|
||||
@override
|
||||
BoxShadow get standardBoxShadow => BoxShadow(
|
||||
color: shadow,
|
||||
|
|
|
@ -178,6 +178,12 @@ class StackColors extends ThemeExtension<StackColors> {
|
|||
final Color textConfirmTotalAmount;
|
||||
final Color textSelectedWordTableItem;
|
||||
|
||||
// rate type toggle
|
||||
final Color rateTypeToggleColorOn;
|
||||
final Color rateTypeToggleColorOff;
|
||||
final Color rateTypeToggleDesktopColorOn;
|
||||
final Color rateTypeToggleDesktopColorOff;
|
||||
|
||||
final BoxShadow standardBoxShadow;
|
||||
final BoxShadow? homeViewButtonBarBoxShadow;
|
||||
|
||||
|
@ -319,6 +325,10 @@ class StackColors extends ThemeExtension<StackColors> {
|
|||
required this.myStackContactIconBG,
|
||||
required this.textConfirmTotalAmount,
|
||||
required this.textSelectedWordTableItem,
|
||||
required this.rateTypeToggleColorOn,
|
||||
required this.rateTypeToggleColorOff,
|
||||
required this.rateTypeToggleDesktopColorOn,
|
||||
required this.rateTypeToggleDesktopColorOff,
|
||||
required this.standardBoxShadow,
|
||||
required this.homeViewButtonBarBoxShadow,
|
||||
});
|
||||
|
@ -465,6 +475,10 @@ class StackColors extends ThemeExtension<StackColors> {
|
|||
myStackContactIconBG: colorTheme.myStackContactIconBG,
|
||||
textConfirmTotalAmount: colorTheme.textConfirmTotalAmount,
|
||||
textSelectedWordTableItem: colorTheme.textSelectedWordTableItem,
|
||||
rateTypeToggleColorOn: colorTheme.rateTypeToggleColorOn,
|
||||
rateTypeToggleColorOff: colorTheme.rateTypeToggleColorOff,
|
||||
rateTypeToggleDesktopColorOn: colorTheme.rateTypeToggleDesktopColorOn,
|
||||
rateTypeToggleDesktopColorOff: colorTheme.rateTypeToggleDesktopColorOff,
|
||||
homeViewButtonBarBoxShadow: colorTheme.homeViewButtonBarBoxShadow,
|
||||
standardBoxShadow: colorTheme.standardBoxShadow,
|
||||
);
|
||||
|
@ -609,6 +623,10 @@ class StackColors extends ThemeExtension<StackColors> {
|
|||
Color? myStackContactIconBG,
|
||||
Color? textConfirmTotalAmount,
|
||||
Color? textSelectedWordTableItem,
|
||||
Color? rateTypeToggleColorOn,
|
||||
Color? rateTypeToggleColorOff,
|
||||
Color? rateTypeToggleDesktopColorOn,
|
||||
Color? rateTypeToggleDesktopColorOff,
|
||||
BoxShadow? homeViewButtonBarBoxShadow,
|
||||
BoxShadow? standardBoxShadow,
|
||||
}) {
|
||||
|
@ -790,6 +808,14 @@ class StackColors extends ThemeExtension<StackColors> {
|
|||
textConfirmTotalAmount ?? this.textConfirmTotalAmount,
|
||||
textSelectedWordTableItem:
|
||||
textSelectedWordTableItem ?? this.textSelectedWordTableItem,
|
||||
rateTypeToggleColorOn:
|
||||
rateTypeToggleColorOn ?? this.rateTypeToggleColorOn,
|
||||
rateTypeToggleColorOff:
|
||||
rateTypeToggleColorOff ?? this.rateTypeToggleColorOff,
|
||||
rateTypeToggleDesktopColorOn:
|
||||
rateTypeToggleDesktopColorOn ?? this.rateTypeToggleDesktopColorOn,
|
||||
rateTypeToggleDesktopColorOff:
|
||||
rateTypeToggleDesktopColorOff ?? this.rateTypeToggleDesktopColorOff,
|
||||
homeViewButtonBarBoxShadow:
|
||||
homeViewButtonBarBoxShadow ?? this.homeViewButtonBarBoxShadow,
|
||||
standardBoxShadow: standardBoxShadow ?? this.standardBoxShadow,
|
||||
|
@ -1483,6 +1509,26 @@ class StackColors extends ThemeExtension<StackColors> {
|
|||
other.textSelectedWordTableItem,
|
||||
t,
|
||||
)!,
|
||||
rateTypeToggleColorOn: Color.lerp(
|
||||
rateTypeToggleColorOn,
|
||||
other.rateTypeToggleColorOn,
|
||||
t,
|
||||
)!,
|
||||
rateTypeToggleColorOff: Color.lerp(
|
||||
rateTypeToggleColorOff,
|
||||
other.rateTypeToggleColorOff,
|
||||
t,
|
||||
)!,
|
||||
rateTypeToggleDesktopColorOn: Color.lerp(
|
||||
rateTypeToggleDesktopColorOn,
|
||||
other.rateTypeToggleDesktopColorOn,
|
||||
t,
|
||||
)!,
|
||||
rateTypeToggleDesktopColorOff: Color.lerp(
|
||||
rateTypeToggleDesktopColorOff,
|
||||
other.rateTypeToggleDesktopColorOff,
|
||||
t,
|
||||
)!,
|
||||
);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue