style fixes

This commit is contained in:
julian 2022-09-24 15:52:03 -06:00
parent a41e172ac1
commit f45449f3d2
9 changed files with 132 additions and 54 deletions

View file

@ -73,43 +73,62 @@ class _RestoreOptionsViewState extends ConsumerState<RestoreOptionsView> {
super.dispose(); super.dispose();
} }
TextStyle get _datePickerTextStyleBase => GoogleFonts.inter(
color: baseColor,
fontSize: 12,
fontWeight: FontWeight.w400,
letterSpacing: 0.5,
);
MaterialRoundedDatePickerStyle _buildDatePickerStyle() { MaterialRoundedDatePickerStyle _buildDatePickerStyle() {
return MaterialRoundedDatePickerStyle( return MaterialRoundedDatePickerStyle(
paddingMonthHeader: const EdgeInsets.only(top: 11), paddingMonthHeader: const EdgeInsets.only(top: 11),
colorArrowNext: Theme.of(context).extension<StackColors>()!.textSubtitle1, colorArrowNext: Theme.of(context).extension<StackColors>()!.textSubtitle1,
colorArrowPrevious: colorArrowPrevious:
Theme.of(context).extension<StackColors>()!.textSubtitle1, Theme.of(context).extension<StackColors>()!.textSubtitle1,
textStyleButtonNegative: _datePickerTextStyleBase.copyWith( textStyleButtonNegative: GoogleFonts.inter(
fontSize: 16, fontWeight: FontWeight.w600), color: baseColor,
textStyleButtonPositive: _datePickerTextStyleBase.copyWith( letterSpacing: 0.5,
fontSize: 16, fontWeight: FontWeight.w600), fontSize: 16,
textStyleCurrentDayOnCalendar: _datePickerTextStyleBase.copyWith( fontWeight: FontWeight.w600,
),
textStyleButtonPositive: GoogleFonts.inter(
color: baseColor,
letterSpacing: 0.5,
fontSize: 16,
fontWeight: FontWeight.w600,
),
textStyleCurrentDayOnCalendar: GoogleFonts.inter(
fontSize: 12,
fontWeight: FontWeight.w400,
letterSpacing: 0.5,
color: Theme.of(context).extension<StackColors>()!.accentColorDark, color: Theme.of(context).extension<StackColors>()!.accentColorDark,
), ),
textStyleDayHeader: _datePickerTextStyleBase.copyWith( textStyleDayHeader: GoogleFonts.inter(
letterSpacing: 0.5,
color: Theme.of(context).extension<StackColors>()!.accentColorDark, color: Theme.of(context).extension<StackColors>()!.accentColorDark,
fontSize: 16, fontSize: 16,
fontWeight: FontWeight.w600, fontWeight: FontWeight.w600,
), ),
textStyleDayOnCalendar: _datePickerTextStyleBase, textStyleDayOnCalendar: GoogleFonts.inter(
textStyleDayOnCalendarDisabled: _datePickerTextStyleBase.copyWith( color: baseColor,
fontSize: 12,
fontWeight: FontWeight.w400,
letterSpacing: 0.5,
),
textStyleDayOnCalendarDisabled: GoogleFonts.inter(
fontSize: 12,
fontWeight: FontWeight.w400,
letterSpacing: 0.5,
color: Theme.of(context).extension<StackColors>()!.textSubtitle3, color: Theme.of(context).extension<StackColors>()!.textSubtitle3,
), ),
textStyleDayOnCalendarSelected: _datePickerTextStyleBase.copyWith( textStyleDayOnCalendarSelected: GoogleFonts.inter(
fontSize: 12,
fontWeight: FontWeight.w400,
letterSpacing: 0.5,
color: Theme.of(context).extension<StackColors>()!.popupBG, color: Theme.of(context).extension<StackColors>()!.popupBG,
), ),
textStyleMonthYearHeader: _datePickerTextStyleBase.copyWith( textStyleMonthYearHeader: GoogleFonts.inter(
letterSpacing: 0.5,
color: Theme.of(context).extension<StackColors>()!.textSubtitle1, color: Theme.of(context).extension<StackColors>()!.textSubtitle1,
fontSize: 16, fontSize: 16,
fontWeight: FontWeight.w600, fontWeight: FontWeight.w600,
), ),
textStyleYearButton: _datePickerTextStyleBase.copyWith( textStyleYearButton: GoogleFonts.inter(
letterSpacing: 0.5,
color: Theme.of(context).extension<StackColors>()!.textWhite, color: Theme.of(context).extension<StackColors>()!.textWhite,
fontSize: 16, fontSize: 16,
fontWeight: FontWeight.w600, fontWeight: FontWeight.w600,
@ -120,12 +139,14 @@ class _RestoreOptionsViewState extends ConsumerState<RestoreOptionsView> {
MaterialRoundedYearPickerStyle _buildYearPickerStyle() { MaterialRoundedYearPickerStyle _buildYearPickerStyle() {
return MaterialRoundedYearPickerStyle( return MaterialRoundedYearPickerStyle(
textStyleYear: _datePickerTextStyleBase.copyWith( textStyleYear: GoogleFonts.inter(
letterSpacing: 0.5,
color: Theme.of(context).extension<StackColors>()!.textSubtitle2, color: Theme.of(context).extension<StackColors>()!.textSubtitle2,
fontWeight: FontWeight.w600, fontWeight: FontWeight.w600,
fontSize: 16, fontSize: 16,
), ),
textStyleYearSelected: _datePickerTextStyleBase.copyWith( textStyleYearSelected: GoogleFonts.inter(
letterSpacing: 0.5,
color: Theme.of(context).extension<StackColors>()!.accentColorDark, color: Theme.of(context).extension<StackColors>()!.accentColorDark,
fontWeight: FontWeight.w600, fontWeight: FontWeight.w600,
fontSize: 18, fontSize: 18,

View file

@ -178,11 +178,10 @@ class _Step4ViewState extends ConsumerState<Step4View> {
text: TextSpan( text: TextSpan(
text: text:
"You must send at least ${model.sendAmount.toString()} ${model.sendTicker}. ", "You must send at least ${model.sendAmount.toString()} ${model.sendTicker}. ",
style: STextStyles.label(context).copyWith( style: STextStyles.label700(context).copyWith(
color: Theme.of(context) color: Theme.of(context)
.extension<StackColors>()! .extension<StackColors>()!
.warningForeground, .warningForeground,
fontWeight: FontWeight.w700,
), ),
children: [ children: [
TextSpan( TextSpan(
@ -192,7 +191,6 @@ class _Step4ViewState extends ConsumerState<Step4View> {
color: Theme.of(context) color: Theme.of(context)
.extension<StackColors>()! .extension<StackColors>()!
.warningForeground, .warningForeground,
fontWeight: FontWeight.w500,
), ),
), ),
], ],

View file

@ -379,6 +379,11 @@ class _ExchangeViewState extends ConsumerState<ExchangeView> {
height: 4, height: 4,
), ),
TextFormField( TextFormField(
style: STextStyles.smallMed14(context).copyWith(
color: Theme.of(context)
.extension<StackColors>()!
.textDark,
),
focusNode: _sendFocusNode, focusNode: _sendFocusNode,
controller: _sendController, controller: _sendController,
textAlign: TextAlign.right, textAlign: TextAlign.right,
@ -720,6 +725,11 @@ class _ExchangeViewState extends ConsumerState<ExchangeView> {
height: 4, height: 4,
), ),
TextFormField( TextFormField(
style: STextStyles.smallMed14(context).copyWith(
color: Theme.of(context)
.extension<StackColors>()!
.textDark,
),
focusNode: _receiveFocusNode, focusNode: _receiveFocusNode,
controller: _receiveController, controller: _receiveController,
readOnly: ref readOnly: ref

View file

@ -249,11 +249,10 @@ class _TradeDetailsViewState extends ConsumerState<TradeDetailsView> {
"You must send at least ${sendAmount.toStringAsFixed( "You must send at least ${sendAmount.toStringAsFixed(
trade.fromCurrency.toLowerCase() == "xmr" ? 12 : 8, trade.fromCurrency.toLowerCase() == "xmr" ? 12 : 8,
)} ${trade.fromCurrency.toUpperCase()}. ", )} ${trade.fromCurrency.toUpperCase()}. ",
style: STextStyles.label(context).copyWith( style: STextStyles.label700(context).copyWith(
color: Theme.of(context) color: Theme.of(context)
.extension<StackColors>()! .extension<StackColors>()!
.warningForeground, .warningForeground,
fontWeight: FontWeight.w700,
), ),
children: [ children: [
TextSpan( TextSpan(
@ -267,7 +266,6 @@ class _TradeDetailsViewState extends ConsumerState<TradeDetailsView> {
color: Theme.of(context) color: Theme.of(context)
.extension<StackColors>()! .extension<StackColors>()!
.warningForeground, .warningForeground,
fontWeight: FontWeight.w500,
), ),
), ),
]), ]),

View file

@ -424,6 +424,11 @@ class _WalletInitiatedExchangeViewState
height: 4, height: 4,
), ),
TextFormField( TextFormField(
style: STextStyles.smallMed14(context).copyWith(
color: Theme.of(context)
.extension<StackColors>()!
.textDark,
),
focusNode: _sendFocusNode, focusNode: _sendFocusNode,
controller: _sendController, controller: _sendController,
textAlign: TextAlign.right, textAlign: TextAlign.right,
@ -762,6 +767,9 @@ class _WalletInitiatedExchangeViewState
Assets.svg.swap, Assets.svg.swap,
width: 20, width: 20,
height: 20, height: 20,
color: Theme.of(context)
.extension<StackColors>()!
.accentColorDark,
), ),
), ),
), ),
@ -788,6 +796,11 @@ class _WalletInitiatedExchangeViewState
height: 4, height: 4,
), ),
TextFormField( TextFormField(
style: STextStyles.smallMed14(context).copyWith(
color: Theme.of(context)
.extension<StackColors>()!
.textDark,
),
focusNode: _receiveFocusNode, focusNode: _receiveFocusNode,
controller: _receiveController, controller: _receiveController,
readOnly: ref readOnly: ref

View file

@ -523,11 +523,11 @@ class _SendViewState extends ConsumerState<SendView> {
locale: locale, locale: locale,
decimalPlaces: 2, decimalPlaces: 2,
)} ${ref.watch(prefsChangeNotifierProvider.select((value) => value.currency))}", )} ${ref.watch(prefsChangeNotifierProvider.select((value) => value.currency))}",
style: STextStyles.titleBold12( style:
context) STextStyles.titleBold12_400(
.copyWith( context)
.copyWith(
fontSize: 8, fontSize: 8,
fontWeight: FontWeight.w400,
), ),
textAlign: TextAlign.right, textAlign: TextAlign.right,
) )

View file

@ -114,13 +114,6 @@ class _TransactionSearchViewState
var _selectedFromDate = DateTime(2007); var _selectedFromDate = DateTime(2007);
var _selectedToDate = DateTime.now(); var _selectedToDate = DateTime.now();
TextStyle get _datePickerTextStyleBase => GoogleFonts.inter(
color: baseColor,
fontSize: 12,
fontWeight: FontWeight.w400,
letterSpacing: 0.5,
);
MaterialRoundedDatePickerStyle _buildDatePickerStyle() { MaterialRoundedDatePickerStyle _buildDatePickerStyle() {
return MaterialRoundedDatePickerStyle( return MaterialRoundedDatePickerStyle(
backgroundPicker: Theme.of(context).extension<StackColors>()!.popupBG, backgroundPicker: Theme.of(context).extension<StackColors>()!.popupBG,
@ -129,30 +122,56 @@ class _TransactionSearchViewState
colorArrowNext: Theme.of(context).extension<StackColors>()!.textSubtitle1, colorArrowNext: Theme.of(context).extension<StackColors>()!.textSubtitle1,
colorArrowPrevious: colorArrowPrevious:
Theme.of(context).extension<StackColors>()!.textSubtitle1, Theme.of(context).extension<StackColors>()!.textSubtitle1,
textStyleButtonNegative: _datePickerTextStyleBase.copyWith( textStyleButtonNegative: GoogleFonts.inter(
fontSize: 16, fontWeight: FontWeight.w600), letterSpacing: 0.5,
textStyleButtonPositive: _datePickerTextStyleBase.copyWith( color: baseColor,
fontSize: 16, fontWeight: FontWeight.w600), fontSize: 16,
textStyleCurrentDayOnCalendar: _datePickerTextStyleBase.copyWith( fontWeight: FontWeight.w600,
color: Theme.of(context).extension<StackColors>()!.accentColorDark), ),
textStyleDayHeader: _datePickerTextStyleBase.copyWith( textStyleButtonPositive: GoogleFonts.inter(
letterSpacing: 0.5,
color: baseColor,
fontSize: 16,
fontWeight: FontWeight.w600,
),
textStyleCurrentDayOnCalendar: GoogleFonts.inter(
letterSpacing: 0.5,
color: Theme.of(context).extension<StackColors>()!.accentColorDark,
fontWeight: FontWeight.w400,
fontSize: 12,
),
textStyleDayHeader: GoogleFonts.inter(
letterSpacing: 0.5,
color: Theme.of(context).extension<StackColors>()!.accentColorDark, color: Theme.of(context).extension<StackColors>()!.accentColorDark,
fontSize: 16, fontSize: 16,
fontWeight: FontWeight.w600, fontWeight: FontWeight.w600,
), ),
textStyleDayOnCalendar: _datePickerTextStyleBase, textStyleDayOnCalendar: GoogleFonts.inter(
textStyleDayOnCalendarDisabled: _datePickerTextStyleBase.copyWith( letterSpacing: 0.5,
color: baseColor,
fontSize: 12,
fontWeight: FontWeight.w400,
),
textStyleDayOnCalendarDisabled: GoogleFonts.inter(
letterSpacing: 0.5,
color: Theme.of(context).extension<StackColors>()!.textSubtitle3, color: Theme.of(context).extension<StackColors>()!.textSubtitle3,
fontWeight: FontWeight.w400,
fontSize: 12,
), ),
textStyleDayOnCalendarSelected: _datePickerTextStyleBase.copyWith( textStyleDayOnCalendarSelected: GoogleFonts.inter(
letterSpacing: 0.5,
color: Theme.of(context).extension<StackColors>()!.textWhite, color: Theme.of(context).extension<StackColors>()!.textWhite,
fontWeight: FontWeight.w400,
fontSize: 12,
), ),
textStyleMonthYearHeader: _datePickerTextStyleBase.copyWith( textStyleMonthYearHeader: GoogleFonts.inter(
letterSpacing: 0.5,
color: Theme.of(context).extension<StackColors>()!.textSubtitle1, color: Theme.of(context).extension<StackColors>()!.textSubtitle1,
fontSize: 16, fontSize: 16,
fontWeight: FontWeight.w600, fontWeight: FontWeight.w600,
), ),
textStyleYearButton: _datePickerTextStyleBase.copyWith( textStyleYearButton: GoogleFonts.inter(
letterSpacing: 0.5,
color: Theme.of(context).extension<StackColors>()!.textWhite, color: Theme.of(context).extension<StackColors>()!.textWhite,
fontSize: 16, fontSize: 16,
fontWeight: FontWeight.w600, fontWeight: FontWeight.w600,
@ -164,12 +183,14 @@ class _TransactionSearchViewState
MaterialRoundedYearPickerStyle _buildYearPickerStyle() { MaterialRoundedYearPickerStyle _buildYearPickerStyle() {
return MaterialRoundedYearPickerStyle( return MaterialRoundedYearPickerStyle(
backgroundPicker: Theme.of(context).extension<StackColors>()!.popupBG, backgroundPicker: Theme.of(context).extension<StackColors>()!.popupBG,
textStyleYear: _datePickerTextStyleBase.copyWith( textStyleYear: GoogleFonts.inter(
letterSpacing: 0.5,
color: Theme.of(context).extension<StackColors>()!.textSubtitle2, color: Theme.of(context).extension<StackColors>()!.textSubtitle2,
fontWeight: FontWeight.w600, fontWeight: FontWeight.w600,
fontSize: 16, fontSize: 16,
), ),
textStyleYearSelected: _datePickerTextStyleBase.copyWith( textStyleYearSelected: GoogleFonts.inter(
letterSpacing: 0.5,
color: Theme.of(context).extension<StackColors>()!.accentColorDark, color: Theme.of(context).extension<StackColors>()!.accentColorDark,
fontWeight: FontWeight.w600, fontWeight: FontWeight.w600,
fontSize: 18, fontSize: 18,

View file

@ -27,6 +27,12 @@ class STextStyles {
fontSize: 16, fontSize: 16,
); );
static TextStyle titleBold12_400(BuildContext context) => GoogleFonts.inter(
color: Theme.of(context).extension<StackColors>()!.textDark,
fontWeight: FontWeight.w400,
fontSize: 16,
);
static TextStyle subtitle(BuildContext context) => GoogleFonts.inter( static TextStyle subtitle(BuildContext context) => GoogleFonts.inter(
color: Theme.of(context).extension<StackColors>()!.textDark, color: Theme.of(context).extension<StackColors>()!.textDark,
fontWeight: FontWeight.w400, fontWeight: FontWeight.w400,
@ -75,6 +81,12 @@ class STextStyles {
fontSize: 12, fontSize: 12,
); );
static TextStyle label700(BuildContext context) => GoogleFonts.inter(
color: Theme.of(context).extension<StackColors>()!.textSubtitle1,
fontWeight: FontWeight.w700,
fontSize: 12,
);
static TextStyle itemSubtitle(BuildContext context) => GoogleFonts.inter( static TextStyle itemSubtitle(BuildContext context) => GoogleFonts.inter(
color: Theme.of(context).extension<StackColors>()!.infoItemLabel, color: Theme.of(context).extension<StackColors>()!.infoItemLabel,
fontWeight: FontWeight.w500, fontWeight: FontWeight.w500,
@ -87,6 +99,13 @@ class STextStyles {
fontSize: 14, fontSize: 14,
); );
static TextStyle itemSubtitle12_600(BuildContext context) =>
GoogleFonts.inter(
color: Theme.of(context).extension<StackColors>()!.textDark,
fontWeight: FontWeight.w500,
fontSize: 14,
);
static TextStyle fieldLabel(BuildContext context) => GoogleFonts.inter( static TextStyle fieldLabel(BuildContext context) => GoogleFonts.inter(
color: Theme.of(context).extension<StackColors>()!.textSubtitle2, color: Theme.of(context).extension<StackColors>()!.textSubtitle2,
fontWeight: FontWeight.w500, fontWeight: FontWeight.w500,

View file

@ -175,10 +175,8 @@ class _TransactionCardState extends ConsumerState<TransactionCard> {
: _transaction.amount; : _transaction.amount;
return Text( return Text(
"${Format.satoshiAmountToPrettyString(amount, locale)} ${coin.ticker}", "${Format.satoshiAmountToPrettyString(amount, locale)} ${coin.ticker}",
style: STextStyles.itemSubtitle12(context) style:
.copyWith( STextStyles.itemSubtitle12_600(context),
fontWeight: FontWeight.w600,
),
); );
}, },
), ),