text styles font based on theme

This commit is contained in:
julian 2022-09-26 11:34:41 -06:00
parent fb0908840d
commit 944bee890e
7 changed files with 839 additions and 366 deletions

View file

@ -80,59 +80,30 @@ class _RestoreOptionsViewState extends ConsumerState<RestoreOptionsView> {
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: GoogleFonts.inter( textStyleButtonNegative: STextStyles.datePicker600(context).copyWith(
color: baseColor, color: baseColor,
letterSpacing: 0.5,
fontSize: 16,
fontWeight: FontWeight.w600,
), ),
textStyleButtonPositive: GoogleFonts.inter( textStyleButtonPositive: STextStyles.datePicker600(context).copyWith(
color: baseColor, color: baseColor,
letterSpacing: 0.5,
fontSize: 16,
fontWeight: FontWeight.w600,
), ),
textStyleCurrentDayOnCalendar: GoogleFonts.inter( textStyleCurrentDayOnCalendar: STextStyles.datePicker400(context),
fontSize: 12, textStyleDayHeader: STextStyles.datePicker600(context),
fontWeight: FontWeight.w400, textStyleDayOnCalendar: STextStyles.datePicker400(context).copyWith(
letterSpacing: 0.5,
color: Theme.of(context).extension<StackColors>()!.accentColorDark,
),
textStyleDayHeader: GoogleFonts.inter(
letterSpacing: 0.5,
color: Theme.of(context).extension<StackColors>()!.accentColorDark,
fontSize: 16,
fontWeight: FontWeight.w600,
),
textStyleDayOnCalendar: GoogleFonts.inter(
color: baseColor, color: baseColor,
fontSize: 12,
fontWeight: FontWeight.w400,
letterSpacing: 0.5,
), ),
textStyleDayOnCalendarDisabled: GoogleFonts.inter( textStyleDayOnCalendarDisabled:
fontSize: 12, STextStyles.datePicker400(context).copyWith(
fontWeight: FontWeight.w400,
letterSpacing: 0.5,
color: Theme.of(context).extension<StackColors>()!.textSubtitle3, color: Theme.of(context).extension<StackColors>()!.textSubtitle3,
), ),
textStyleDayOnCalendarSelected: GoogleFonts.inter( textStyleDayOnCalendarSelected:
fontSize: 12, STextStyles.datePicker400(context).copyWith(
fontWeight: FontWeight.w400,
letterSpacing: 0.5,
color: Theme.of(context).extension<StackColors>()!.popupBG, color: Theme.of(context).extension<StackColors>()!.popupBG,
), ),
textStyleMonthYearHeader: GoogleFonts.inter( textStyleMonthYearHeader: STextStyles.datePicker600(context).copyWith(
letterSpacing: 0.5,
color: Theme.of(context).extension<StackColors>()!.textSubtitle1, color: Theme.of(context).extension<StackColors>()!.textSubtitle1,
fontSize: 16,
fontWeight: FontWeight.w600,
), ),
textStyleYearButton: GoogleFonts.inter( textStyleYearButton: STextStyles.datePicker600(context).copyWith(
letterSpacing: 0.5,
color: Theme.of(context).extension<StackColors>()!.textWhite, color: Theme.of(context).extension<StackColors>()!.textWhite,
fontSize: 16,
fontWeight: FontWeight.w600,
), ),
textStyleButtonAction: GoogleFonts.inter(), textStyleButtonAction: GoogleFonts.inter(),
); );
@ -140,16 +111,10 @@ class _RestoreOptionsViewState extends ConsumerState<RestoreOptionsView> {
MaterialRoundedYearPickerStyle _buildYearPickerStyle() { MaterialRoundedYearPickerStyle _buildYearPickerStyle() {
return MaterialRoundedYearPickerStyle( return MaterialRoundedYearPickerStyle(
textStyleYear: GoogleFonts.inter( textStyleYear: STextStyles.datePicker600(context).copyWith(
letterSpacing: 0.5,
color: Theme.of(context).extension<StackColors>()!.textSubtitle2, color: Theme.of(context).extension<StackColors>()!.textSubtitle2,
fontWeight: FontWeight.w600,
fontSize: 16,
), ),
textStyleYearSelected: GoogleFonts.inter( textStyleYearSelected: STextStyles.datePicker600(context).copyWith(
letterSpacing: 0.5,
color: Theme.of(context).extension<StackColors>()!.accentColorDark,
fontWeight: FontWeight.w600,
fontSize: 18, fontSize: 18,
), ),
); );

View file

@ -1,7 +1,7 @@
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter_svg/svg.dart'; import 'package:flutter_svg/svg.dart';
import 'package:google_fonts/google_fonts.dart';
import 'package:stackwallet/utilities/assets.dart'; import 'package:stackwallet/utilities/assets.dart';
import 'package:stackwallet/utilities/text_styles.dart';
import 'package:stackwallet/utilities/theme/stack_colors.dart'; import 'package:stackwallet/utilities/theme/stack_colors.dart';
enum StepIndicatorStatus { current, completed, incomplete } enum StepIndicatorStatus { current, completed, incomplete }
@ -39,9 +39,7 @@ class StepIndicator extends StatelessWidget {
case StepIndicatorStatus.current: case StepIndicatorStatus.current:
return Text( return Text(
step.toString(), step.toString(),
style: GoogleFonts.roboto( style: STextStyles.stepIndicator(context).copyWith(
fontWeight: FontWeight.w600,
fontSize: 8,
color: Theme.of(context) color: Theme.of(context)
.extension<StackColors>()! .extension<StackColors>()!
.stepIndicatorIconNumber, .stepIndicatorIconNumber,
@ -57,9 +55,7 @@ class StepIndicator extends StatelessWidget {
case StepIndicatorStatus.incomplete: case StepIndicatorStatus.incomplete:
return Text( return Text(
step.toString(), step.toString(),
style: GoogleFonts.roboto( style: STextStyles.stepIndicator(context).copyWith(
fontWeight: FontWeight.w600,
fontSize: 8,
color: Theme.of(context) color: Theme.of(context)
.extension<StackColors>()! .extension<StackColors>()!
.stepIndicatorIconInactive, .stepIndicatorIconInactive,

View file

@ -3,7 +3,6 @@ import 'dart:io';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter_riverpod/flutter_riverpod.dart'; import 'package:flutter_riverpod/flutter_riverpod.dart';
import 'package:flutter_secure_storage/flutter_secure_storage.dart'; import 'package:flutter_secure_storage/flutter_secure_storage.dart';
import 'package:google_fonts/google_fonts.dart';
import 'package:stackwallet/notifications/show_flush_bar.dart'; import 'package:stackwallet/notifications/show_flush_bar.dart';
import 'package:stackwallet/pages/home_view/home_view.dart'; import 'package:stackwallet/pages/home_view/home_view.dart';
import 'package:stackwallet/providers/global/prefs_provider.dart'; import 'package:stackwallet/providers/global/prefs_provider.dart';
@ -188,7 +187,10 @@ class _CreatePinViewState extends ConsumerState<CreatePinView> {
fieldsCount: Constants.pinLength, fieldsCount: Constants.pinLength,
eachFieldHeight: 12, eachFieldHeight: 12,
eachFieldWidth: 12, eachFieldWidth: 12,
textStyle: GoogleFonts.workSans( textStyle: STextStyles.infoSmall(context).copyWith(
color: Theme.of(context)
.extension<StackColors>()!
.textSubtitle3,
fontSize: 1, fontSize: 1,
), ),
focusNode: _pinPutFocusNode2, focusNode: _pinPutFocusNode2,

View file

@ -1,6 +1,5 @@
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter_secure_storage/flutter_secure_storage.dart'; import 'package:flutter_secure_storage/flutter_secure_storage.dart';
import 'package:google_fonts/google_fonts.dart';
import 'package:stackwallet/notifications/show_flush_bar.dart'; import 'package:stackwallet/notifications/show_flush_bar.dart';
import 'package:stackwallet/pages/settings_views/global_settings_view/security_views/security_view.dart'; import 'package:stackwallet/pages/settings_views/global_settings_view/security_views/security_view.dart';
import 'package:stackwallet/utilities/assets.dart'; import 'package:stackwallet/utilities/assets.dart';
@ -168,7 +167,10 @@ class _ChangePinViewState extends State<ChangePinView> {
fieldsCount: Constants.pinLength, fieldsCount: Constants.pinLength,
eachFieldHeight: 12, eachFieldHeight: 12,
eachFieldWidth: 12, eachFieldWidth: 12,
textStyle: GoogleFonts.workSans( textStyle: STextStyles.infoSmall(context).copyWith(
color: Theme.of(context)
.extension<StackColors>()!
.textSubtitle3,
fontSize: 1, fontSize: 1,
), ),
focusNode: _pinPutFocusNode2, focusNode: _pinPutFocusNode2,

View file

@ -4,7 +4,6 @@ import 'package:flutter/services.dart';
import 'package:flutter_riverpod/flutter_riverpod.dart'; import 'package:flutter_riverpod/flutter_riverpod.dart';
import 'package:flutter_rounded_date_picker/flutter_rounded_date_picker.dart'; import 'package:flutter_rounded_date_picker/flutter_rounded_date_picker.dart';
import 'package:flutter_svg/svg.dart'; import 'package:flutter_svg/svg.dart';
import 'package:google_fonts/google_fonts.dart';
import 'package:stackwallet/models/transaction_filter.dart'; import 'package:stackwallet/models/transaction_filter.dart';
import 'package:stackwallet/providers/providers.dart'; import 'package:stackwallet/providers/providers.dart';
import 'package:stackwallet/providers/ui/color_theme_provider.dart'; import 'package:stackwallet/providers/ui/color_theme_provider.dart';
@ -122,77 +121,43 @@ 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: GoogleFonts.inter( textStyleButtonNegative: STextStyles.datePicker600(context).copyWith(
letterSpacing: 0.5,
color: baseColor, color: baseColor,
fontSize: 16,
fontWeight: FontWeight.w600,
), ),
textStyleButtonPositive: GoogleFonts.inter( textStyleButtonPositive: STextStyles.datePicker600(context).copyWith(
letterSpacing: 0.5,
color: baseColor, color: baseColor,
fontSize: 16,
fontWeight: FontWeight.w600,
), ),
textStyleCurrentDayOnCalendar: GoogleFonts.inter( textStyleCurrentDayOnCalendar: STextStyles.datePicker400(context),
letterSpacing: 0.5, textStyleDayHeader: STextStyles.datePicker600(context),
color: Theme.of(context).extension<StackColors>()!.accentColorDark, textStyleDayOnCalendar: STextStyles.datePicker400(context).copyWith(
fontWeight: FontWeight.w400,
fontSize: 12,
),
textStyleDayHeader: GoogleFonts.inter(
letterSpacing: 0.5,
color: Theme.of(context).extension<StackColors>()!.accentColorDark,
fontSize: 16,
fontWeight: FontWeight.w600,
),
textStyleDayOnCalendar: GoogleFonts.inter(
letterSpacing: 0.5,
color: baseColor, color: baseColor,
fontSize: 12,
fontWeight: FontWeight.w400,
), ),
textStyleDayOnCalendarDisabled: GoogleFonts.inter( textStyleDayOnCalendarDisabled:
letterSpacing: 0.5, STextStyles.datePicker400(context).copyWith(
color: Theme.of(context).extension<StackColors>()!.textSubtitle3, color: Theme.of(context).extension<StackColors>()!.textSubtitle3,
fontWeight: FontWeight.w400,
fontSize: 12,
), ),
textStyleDayOnCalendarSelected: GoogleFonts.inter( textStyleDayOnCalendarSelected:
letterSpacing: 0.5, STextStyles.datePicker400(context).copyWith(
color: Theme.of(context).extension<StackColors>()!.textWhite, color: Theme.of(context).extension<StackColors>()!.textWhite,
fontWeight: FontWeight.w400,
fontSize: 12,
), ),
textStyleMonthYearHeader: GoogleFonts.inter( textStyleMonthYearHeader: STextStyles.datePicker600(context).copyWith(
letterSpacing: 0.5,
color: Theme.of(context).extension<StackColors>()!.textSubtitle1, color: Theme.of(context).extension<StackColors>()!.textSubtitle1,
fontSize: 16,
fontWeight: FontWeight.w600,
), ),
textStyleYearButton: GoogleFonts.inter( textStyleYearButton: STextStyles.datePicker600(context).copyWith(
letterSpacing: 0.5,
color: Theme.of(context).extension<StackColors>()!.textWhite, color: Theme.of(context).extension<StackColors>()!.textWhite,
fontSize: 16,
fontWeight: FontWeight.w600,
), ),
textStyleButtonAction: GoogleFonts.inter(), // textStyleButtonAction: GoogleFonts.inter(),
); );
} }
MaterialRoundedYearPickerStyle _buildYearPickerStyle() { MaterialRoundedYearPickerStyle _buildYearPickerStyle() {
return MaterialRoundedYearPickerStyle( return MaterialRoundedYearPickerStyle(
backgroundPicker: Theme.of(context).extension<StackColors>()!.popupBG, backgroundPicker: Theme.of(context).extension<StackColors>()!.popupBG,
textStyleYear: GoogleFonts.inter( textStyleYear: STextStyles.datePicker600(context).copyWith(
letterSpacing: 0.5,
color: Theme.of(context).extension<StackColors>()!.textSubtitle2, color: Theme.of(context).extension<StackColors>()!.textSubtitle2,
fontWeight: FontWeight.w600,
fontSize: 16, fontSize: 16,
), ),
textStyleYearSelected: GoogleFonts.inter( textStyleYearSelected: STextStyles.datePicker600(context).copyWith(
letterSpacing: 0.5,
color: Theme.of(context).extension<StackColors>()!.accentColorDark,
fontWeight: FontWeight.w600,
fontSize: 18, fontSize: 18,
), ),
); );

File diff suppressed because it is too large Load diff

View file

@ -1,7 +1,7 @@
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter_svg/flutter_svg.dart'; import 'package:flutter_svg/flutter_svg.dart';
import 'package:google_fonts/google_fonts.dart';
import 'package:stackwallet/utilities/assets.dart'; import 'package:stackwallet/utilities/assets.dart';
import 'package:stackwallet/utilities/text_styles.dart';
import 'package:stackwallet/utilities/theme/stack_colors.dart'; import 'package:stackwallet/utilities/theme/stack_colors.dart';
class NumberKey extends StatefulWidget { class NumberKey extends StatefulWidget {
@ -72,12 +72,7 @@ class _NumberKeyState extends State<NumberKey> {
child: Center( child: Center(
child: Text( child: Text(
number, number,
style: GoogleFonts.roboto( style: STextStyles.numberDefault(context),
color:
Theme.of(context).extension<StackColors>()!.numberTextDefault,
fontWeight: FontWeight.w400,
fontSize: 26,
),
), ),
), ),
), ),