Skip to content

Commit

Permalink
Migrating to Material 3
Browse files Browse the repository at this point in the history
  • Loading branch information
alienc0der committed Jan 22, 2023
1 parent b594704 commit f4b9260
Show file tree
Hide file tree
Showing 102 changed files with 452 additions and 345 deletions.
13 changes: 12 additions & 1 deletion analysis_options.yaml
Expand Up @@ -24,6 +24,17 @@ linter:
rules:
avoid_print: true # Uncomment to disable the `avoid_print` rule
prefer_single_quotes: true # Uncomment to enable the `prefer_single_quotes` rule

cancel_subscriptions: true
close_sinks: true
comment_references: true
one_member_abstracts: true
always_use_package_imports: true
avoid_empty_else: true
avoid_slow_async_io: true
avoid_web_libraries_in_flutter: true
control_flow_in_finally: true
empty_statements: true
depend_on_referenced_packages: true
secure_pubspec_urls: true
# Additional information about this file can be found at
# https://dart.dev/guides/language/analysis-options
4 changes: 2 additions & 2 deletions lib/blocs/accelerator/create_phase_bloc.dart
Expand Up @@ -4,14 +4,14 @@ import 'package:zenon_syrius_wallet_flutter/utils/account_block_utils.dart';
import 'package:znn_sdk_dart/znn_sdk_dart.dart';

class CreatePhaseBloc extends BaseBloc<AccountBlockTemplate?> {
void createPhase(
Future<void> createPhase(
Hash id,
String name,
String description,
String url,
int znnFundsNeeded,
int qsrFundsNeeded,
) {
) async {
try {
addEvent(null);
AccountBlockTemplate transactionParams =
Expand Down
2 changes: 1 addition & 1 deletion lib/blocs/auto_receive_tx_worker.dart
Expand Up @@ -79,7 +79,7 @@ class AutoReceiveTxWorker extends BaseBloc<WalletNotification> {
);
}

void addHash(Hash hash) {
Future<void> addHash(Hash hash) async {
if (!processedHashes.contains(hash)) {
zenon!.stats.syncInfo().then((syncInfo) {
if (!processedHashes.contains(hash) &&
Expand Down
2 changes: 1 addition & 1 deletion lib/blocs/base_bloc_for_reloading_indicator.dart
Expand Up @@ -27,7 +27,7 @@ abstract class BaseBlocForReloadingIndicator<T> extends BaseBloc<T?>
}

@override
dispose() {
dispose() async {
cancelStreamSubscription();
super.dispose();
}
Expand Down
2 changes: 1 addition & 1 deletion lib/screens/change_wallet_password_screen.dart
Expand Up @@ -50,7 +50,7 @@ class _ChangeWalletPasswordScreenState
),
Text(
'Change wallet password',
style: Theme.of(context).textTheme.headline1,
style: Theme.of(context).textTheme.headlineLarge,
),
Column(
children: [
Expand Down
2 changes: 1 addition & 1 deletion lib/screens/dump_mnemonic_screen.dart
Expand Up @@ -36,7 +36,7 @@ class _DumpMnemonicScreenState extends State<DumpMnemonicScreen> {
visible: _seedWords == null,
child: Text(
'Enter the wallet password to dump the mnemonic',
style: Theme.of(context).textTheme.headline1,
style: Theme.of(context).textTheme.headlineLarge,
),
),
Visibility(
Expand Down
12 changes: 6 additions & 6 deletions lib/screens/export/export_wallet_info_screen.dart
Expand Up @@ -46,7 +46,7 @@ class _ExportWalletInfoScreenState extends State<ExportWalletInfoScreen> {
),
Text(
'Export Seed Vault',
style: Theme.of(context).textTheme.headline1,
style: Theme.of(context).textTheme.headlineLarge,
),
_getSeedFieldsGrid(),
_getSecureSeedInfo(),
Expand Down Expand Up @@ -80,7 +80,7 @@ class _ExportWalletInfoScreenState extends State<ExportWalletInfoScreen> {
),
child: Text(
text,
style: Theme.of(context).textTheme.bodyText1!.copyWith(
style: Theme.of(context).textTheme.bodyLarge!.copyWith(
color: Colors.white,
),
textAlign: TextAlign.justify,
Expand Down Expand Up @@ -109,7 +109,7 @@ class _ExportWalletInfoScreenState extends State<ExportWalletInfoScreen> {
),
Text(
'Seed',
style: Theme.of(context).textTheme.bodyText1,
style: Theme.of(context).textTheme.bodyLarge,
)
],
),
Expand All @@ -125,7 +125,7 @@ class _ExportWalletInfoScreenState extends State<ExportWalletInfoScreen> {
),
Text(
'Seed Vault Key',
style: Theme.of(context).textTheme.bodyText1,
style: Theme.of(context).textTheme.bodyLarge,
)
],
),
Expand All @@ -144,7 +144,7 @@ class _ExportWalletInfoScreenState extends State<ExportWalletInfoScreen> {
),
Text(
'Seed Vault',
style: Theme.of(context).textTheme.bodyText1,
style: Theme.of(context).textTheme.bodyLarge,
)
],
),
Expand All @@ -169,7 +169,7 @@ class _ExportWalletInfoScreenState extends State<ExportWalletInfoScreen> {
),
Text(
'I will securely store the Seed Vault & Seed Vault Key',
style: Theme.of(context).textTheme.headline6,
style: Theme.of(context).textTheme.headlineSmall,
)
],
);
Expand Down
4 changes: 2 additions & 2 deletions lib/screens/export/export_wallet_password_screen.dart
Expand Up @@ -65,12 +65,12 @@ class _ExportWalletPasswordScreenState
kVerticalSpacing,
Text(
'Export Seed Vault',
style: Theme.of(context).textTheme.headline1,
style: Theme.of(context).textTheme.headlineLarge,
),
kVerticalSpacing,
Text(
'Please enter a strong Seed Vault Key to encrypt your Seed',
style: Theme.of(context).textTheme.headline4,
style: Theme.of(context).textTheme.headlineMedium,
),
const SizedBox(
height: 50.0,
Expand Down
8 changes: 4 additions & 4 deletions lib/screens/node_management_screen.dart
Expand Up @@ -57,13 +57,13 @@ class _NodeManagementScreenState extends State<NodeManagementScreen> {
const NotificationWidget(),
Text(
'Node Management',
style: Theme.of(context).textTheme.headline1,
style: Theme.of(context).textTheme.headlineLarge,
textAlign: TextAlign.center,
),
kVerticalSpacing,
Text(
'By default Syrius connects to its own built-in full node, which is called the Embedded Node. If you want to connect to a different node, you can add one below. Otherwise just connect and continue.',
style: Theme.of(context).textTheme.headline4,
style: Theme.of(context).textTheme.headlineMedium,
textAlign: TextAlign.center,
),
SizedBox(
Expand All @@ -81,13 +81,13 @@ class _NodeManagementScreenState extends State<NodeManagementScreen> {
children: [
Text(
'Node selection',
style: Theme.of(context).textTheme.bodyText1,
style: Theme.of(context).textTheme.bodyLarge,
),
_getNodeSelectionColumn(),
kVerticalSpacing,
Text(
'Add node',
style: Theme.of(context).textTheme.bodyText1,
style: Theme.of(context).textTheme.bodyLarge,
),
kVerticalSpacing,
_getAddNodeColumn(),
Expand Down
4 changes: 2 additions & 2 deletions lib/screens/onboarding/access_wallet_screen.dart
Expand Up @@ -24,12 +24,12 @@ class _AccessWalletScreenState extends State<AccessWalletScreen> {
children: <Widget>[
Text(
'Welcome',
style: Theme.of(context).textTheme.headline1,
style: Theme.of(context).textTheme.headlineLarge,
),
kVerticalSpacing,
Text(
'Select an option to access your wallet',
style: Theme.of(context).textTheme.headline4,
style: Theme.of(context).textTheme.headlineMedium,
),
const SizedBox(
height: 50.0,
Expand Down
Expand Up @@ -45,12 +45,12 @@ class _ImportWalletDecryptScreenState extends State<ImportWalletDecryptScreen> {
),
Text(
'Unlock your Seed Vault',
style: Theme.of(context).textTheme.headline1,
style: Theme.of(context).textTheme.headlineLarge,
),
kVerticalSpacing,
Text(
'Input the Seed Vault Key to continue',
style: Theme.of(context).textTheme.headline4,
style: Theme.of(context).textTheme.headlineMedium,
),
],
),
Expand Down
Expand Up @@ -48,12 +48,12 @@ class _ImportWalletPasswordScreenState
),
Text(
'Create a wallet password',
style: Theme.of(context).textTheme.headline1,
style: Theme.of(context).textTheme.headlineLarge,
),
kVerticalSpacing,
Text(
'This is the password that will be required to unlock the wallet',
style: Theme.of(context).textTheme.headline4,
style: Theme.of(context).textTheme.headlineMedium,
),
const SizedBox(
height: 100.0,
Expand Down
Expand Up @@ -49,12 +49,12 @@ class _ImportWalletSeedChoiceScreenState
),
Text(
'Import your wallet',
style: Theme.of(context).textTheme.headline1,
style: Theme.of(context).textTheme.headlineLarge,
),
kVerticalSpacing,
Text(
'Input your seed or import the Seed Vault',
style: Theme.of(context).textTheme.headline4,
style: Theme.of(context).textTheme.headlineMedium,
),
kVerticalSpacing,
SizedBox(
Expand Down
Expand Up @@ -70,15 +70,15 @@ class _NewWalletConfirmSeedScreenState
),
Text(
'Confirm your seed',
style: Theme.of(context).textTheme.headline1,
style: Theme.of(context).textTheme.headlineLarge,
),
kVerticalSpacing,
Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Text(
'Drag & drop the words in the correct order',
style: Theme.of(context).textTheme.headline4,
style: Theme.of(context).textTheme.headlineMedium,
),
const StandardTooltipIcon(
'You can drag & drop words on empty boxes or incorrect words',
Expand Down Expand Up @@ -203,7 +203,7 @@ class _NewWalletConfirmSeedScreenState
child: Center(
child: Text(
'${seedGridElementIndex + 1}',
style: Theme.of(context).textTheme.headline6,
style: Theme.of(context).textTheme.headlineSmall,
),
),
),
Expand Down Expand Up @@ -296,7 +296,7 @@ class _NewWalletConfirmSeedScreenState
onPressed: () {},
child: Text(
seedWords[index],
style: Theme.of(context).textTheme.bodyText1,
style: Theme.of(context).textTheme.bodyLarge,
),
),
data: seedWords[index],
Expand Down Expand Up @@ -325,7 +325,7 @@ class _NewWalletConfirmSeedScreenState
onPressed: () {},
child: Text(
seedWords[index],
style: Theme.of(context).textTheme.bodyText1!.copyWith(
style: Theme.of(context).textTheme.bodyLarge!.copyWith(
color: _draggedValue == seedWords[index]
? Colors.white.withOpacity(0.7)
: Colors.white,
Expand Down
Expand Up @@ -40,11 +40,11 @@ class _NewWalletPasswordScreenState extends State<NewWalletPasswordScreen> {
height: 30.0,
),
Text('Create a wallet password',
style: Theme.of(context).textTheme.headline1),
style: Theme.of(context).textTheme.headlineLarge),
kVerticalSpacing,
Text(
'This is the password that will be required to unlock the wallet',
style: Theme.of(context).textTheme.headline4),
style: Theme.of(context).textTheme.headlineMedium),
const SizedBox(
height: 65.0,
),
Expand Down
Expand Up @@ -56,12 +56,12 @@ class _NewWalletSeedChoiceScreenState extends State<NewWalletSeedChoiceScreen> {
_isSeed12Selected
? 'This is your 12 words seed'
: 'This is your 24 words seed',
style: Theme.of(context).textTheme.headline1,
style: Theme.of(context).textTheme.headlineLarge,
),
kVerticalSpacing,
Text(
'Please carefully write down your seed and export it to a safe location',
style: Theme.of(context).textTheme.headline4,
style: Theme.of(context).textTheme.headlineMedium,
),
kVerticalSpacing,
SizedBox(
Expand Down Expand Up @@ -165,7 +165,7 @@ class _NewWalletSeedChoiceScreenState extends State<NewWalletSeedChoiceScreen> {
color: Colors.transparent,
child: SvgPicture.asset(
'assets/svg/ic_export_seed.svg',
color: Theme.of(context).textTheme.headline6!.color,
color: Theme.of(context).textTheme.headlineSmall!.color,
height: 18.0,
),
),
Expand All @@ -174,7 +174,7 @@ class _NewWalletSeedChoiceScreenState extends State<NewWalletSeedChoiceScreen> {
),
Text(
'Export Seed',
style: Theme.of(context).textTheme.headline6,
style: Theme.of(context).textTheme.headlineSmall,
),
],
),
Expand Down Expand Up @@ -218,7 +218,7 @@ class _NewWalletSeedChoiceScreenState extends State<NewWalletSeedChoiceScreen> {
),
Text(
'I have backed up my seed in a safe location',
style: Theme.of(context).textTheme.headline6,
style: Theme.of(context).textTheme.headlineSmall,
)
],
);
Expand Down Expand Up @@ -282,7 +282,7 @@ class _NewWalletSeedChoiceScreenState extends State<NewWalletSeedChoiceScreen> {
),
Text(
'I have written down my seed',
style: Theme.of(context).textTheme.headline6,
style: Theme.of(context).textTheme.headlineSmall,
),
],
);
Expand Down
4 changes: 2 additions & 2 deletions lib/screens/onboarding/wallet_success_screen.dart
Expand Up @@ -43,12 +43,12 @@ class _WalletSuccessScreenState extends State<WalletSuccessScreen> {
),
Text(
'You\'re all set',
style: Theme.of(context).textTheme.headline1,
style: Theme.of(context).textTheme.headlineLarge,
),
kVerticalSpacing,
Text(
'The wallet has been successfully created',
style: Theme.of(context).textTheme.headline4,
style: Theme.of(context).textTheme.headlineMedium,
),
],
),
Expand Down
4 changes: 2 additions & 2 deletions lib/screens/reset_wallet_screen.dart
Expand Up @@ -44,7 +44,7 @@ class _ResetWalletScreenState extends State<ResetWalletScreen> {
kVerticalSpacing,
Text(
'Reset wallet',
style: Theme.of(context).textTheme.headline1,
style: Theme.of(context).textTheme.headlineLarge,
),
kVerticalSpacing,
SizedBox(
Expand All @@ -54,7 +54,7 @@ class _ResetWalletScreenState extends State<ResetWalletScreen> {
'you have a backup of your mnemonic or Seed Vault & Seed Vault Key before you proceed '
'with erasing the wallet',
textAlign: TextAlign.center,
style: Theme.of(context).textTheme.headline4,
style: Theme.of(context).textTheme.headlineMedium,
),
),
],
Expand Down

0 comments on commit f4b9260

Please sign in to comment.