mirror of
https://github.com/Such-Software/hash-wallet.git
synced 2026-11-26 11:14:11 +01:00
Cw 373 theme refactoring in preparation to support additional themes (#933)
* refactor(Theme): migrate accentColor - based on the specs at https://docs.flutter.dev/release/breaking-changes/theme-data-accent-properties#migration-guide. * refactor(Theme): all deprecated TextTheme styles * refactor(Theme): deprecated backgroundColor for colorScheme.background * refactor(Theme): deprecated buttonColor to use TextTheme backgroundColor instead * refactor(Theme): deprecated isAlwaysShown to use thumbVisibility instead
This commit is contained in:
@@ -29,12 +29,15 @@ class ContactListPage extends BasePage {
|
||||
height: 32.0,
|
||||
decoration: BoxDecoration(
|
||||
shape: BoxShape.circle,
|
||||
color: Theme.of(context).accentTextTheme.caption!.color!),
|
||||
color: Theme.of(context)
|
||||
.accentTextTheme!
|
||||
.bodySmall!
|
||||
.color!),
|
||||
child: Stack(
|
||||
alignment: Alignment.center,
|
||||
children: <Widget>[
|
||||
Icon(Icons.add,
|
||||
color: Theme.of(context).primaryTextTheme.headline6!.color!,
|
||||
color: Theme.of(context).primaryTextTheme!.titleLarge!.color!,
|
||||
size: 22.0),
|
||||
ButtonTheme(
|
||||
minWidth: 32.0,
|
||||
@@ -64,9 +67,9 @@ class ContactListPage extends BasePage {
|
||||
return CollapsibleSectionList(
|
||||
context: context,
|
||||
sectionCount: 2,
|
||||
themeColor: Theme.of(context).primaryTextTheme.headline6!.color!,
|
||||
themeColor: Theme.of(context).primaryTextTheme!.titleLarge!.color!,
|
||||
dividerThemeColor:
|
||||
Theme.of(context).primaryTextTheme.caption!.decorationColor!,
|
||||
Theme.of(context).primaryTextTheme!.bodySmall!.decorationColor!,
|
||||
sectionTitleBuilder: (_, int sectionIndex) {
|
||||
var title = S.current.contact_list_contacts;
|
||||
|
||||
@@ -140,7 +143,7 @@ class ContactListPage extends BasePage {
|
||||
style: TextStyle(
|
||||
fontSize: 14,
|
||||
fontWeight: FontWeight.normal,
|
||||
color: Theme.of(context).primaryTextTheme.headline6!.color!),
|
||||
color: Theme.of(context).primaryTextTheme!.titleLarge!.color!),
|
||||
),
|
||||
)
|
||||
)
|
||||
|
||||
@@ -47,7 +47,8 @@ class ContactPage extends BasePage {
|
||||
@override
|
||||
Widget body(BuildContext context) {
|
||||
final downArrow = Image.asset('assets/images/arrow_bottom_purple_icon.png',
|
||||
color: Theme.of(context).primaryTextTheme!.overline!.color!, height: 8);
|
||||
color: Theme.of(context).primaryTextTheme!.labelSmall!.color!,
|
||||
height: 8);
|
||||
|
||||
reaction((_) => contactViewModel.state, (ExecutionState state) {
|
||||
if (state is FailureState) {
|
||||
@@ -98,12 +99,14 @@ class ContactPage extends BasePage {
|
||||
AddressTextFieldOption.paste,
|
||||
AddressTextFieldOption.qrCode,
|
||||
],
|
||||
buttonColor:
|
||||
Theme.of(context).accentTextTheme!.headline3!.color!,
|
||||
buttonColor: Theme.of(context)
|
||||
.accentTextTheme!
|
||||
.displaySmall!
|
||||
.color!,
|
||||
iconColor: PaletteDark.gray,
|
||||
borderColor: Theme.of(context)
|
||||
.primaryTextTheme!
|
||||
.headline6!
|
||||
.titleLarge!
|
||||
.backgroundColor!,
|
||||
validator:
|
||||
AddressValidator(type: contactViewModel.currency!),
|
||||
@@ -142,7 +145,7 @@ class ContactPage extends BasePage {
|
||||
text: S.of(context).save,
|
||||
color: Theme.of(context)
|
||||
.accentTextTheme!
|
||||
.bodyText1!
|
||||
.bodyLarge!
|
||||
.color!,
|
||||
textColor: Colors.white,
|
||||
isDisabled: !contactViewModel.isReady)))
|
||||
|
||||
Reference in New Issue
Block a user