Skip to content

Commit

Permalink
refactor: apply dart analyze suggestions
Browse files Browse the repository at this point in the history
  • Loading branch information
Tommytrg committed May 19, 2023
1 parent 9f1257a commit a901fbb
Show file tree
Hide file tree
Showing 11 changed files with 10 additions and 17 deletions.
1 change: 1 addition & 0 deletions lib/constants.dart
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ enum WitUnit {

enum EstimatedFeeOptions { Stinky, Low, Medium, High, Opulent, Custom }

// ignore: non_constant_identifier_names
Map<EstimatedFeeOptions, String?> DEFAULT_MINER_FEE_OPTIONS = {
EstimatedFeeOptions.Stinky: '0',
EstimatedFeeOptions.Low: '0',
Expand Down
1 change: 0 additions & 1 deletion lib/screens/create_wallet/confirm_mnemonic_card.dart
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ class ConfirmMnemonicCardState extends State<ConfirmMnemonicCard>
String mnemonic = '';
final TextEditingController textController = TextEditingController();
int numLines = 0;
int _phraseLength = 12;

void prevAction() {
WalletType type =
Expand Down
1 change: 0 additions & 1 deletion lib/screens/create_wallet/create_import_wallet.dart
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import 'package:flutter/material.dart';
import 'package:my_wit_wallet/widgets/carousel.dart';
import 'package:my_wit_wallet/shared/locator.dart';
import 'package:flutter_bloc/flutter_bloc.dart';
import 'package:my_wit_wallet/screens/create_wallet/bloc/api_create_wallet.dart';
Expand Down
1 change: 0 additions & 1 deletion lib/screens/preferences/general_config.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import 'package:flutter/material.dart';
import 'package:my_wit_wallet/bloc/crypto/crypto_bloc.dart';
import 'package:my_wit_wallet/screens/dashboard/bloc/dashboard_bloc.dart';
import 'package:my_wit_wallet/screens/login/bloc/login_bloc.dart';
import 'package:my_wit_wallet/theme/extended_theme.dart';
import 'package:my_wit_wallet/util/preferences.dart';
import 'package:package_info_plus/package_info_plus.dart';
import 'package:my_wit_wallet/widgets/PaddedButton.dart';
Expand Down
4 changes: 1 addition & 3 deletions lib/screens/preferences/preferences_screen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,7 @@ class _PreferencePageState extends State<PreferencePage> {
actionable: true,
selectedItem: stepSelectedItem,
listItems: stepListItems,
onChanged: (item) => {
setState(() => {stepSelectedItem = item!})
}),
onChanged: (item) => {setState(() => stepSelectedItem = item!)}),
SizedBox(height: 16),
stepSelectedItem == ConfigSteps.General
? GeneralConfig()
Expand Down
2 changes: 1 addition & 1 deletion lib/screens/receive_transaction/receive_tx_screen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ class ReceiveTransactionScreenState extends State<ReceiveTransactionScreen>
accountList = [];
selectedAccount = currentAccount;
currentWallet?.externalAccounts
.forEach((key, value) => {accountList.add(value)});
.forEach((key, value) => accountList.add(value));
});
}

Expand Down
6 changes: 3 additions & 3 deletions lib/widgets/generate_compatible_xprv.dart
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ class GenerateCompatibleXprvState extends State<GenerateCompatibleXprv>
children: [
Text(
'This password encrypts your xprv file. You will be asked to type this password if you want to import this xprv as a backup.',
style: theme.textTheme.bodyText1,
style: theme.textTheme.bodyLarge,
),
SizedBox(height: 16),
Form(
Expand All @@ -126,7 +126,7 @@ class GenerateCompatibleXprvState extends State<GenerateCompatibleXprv>
children: [
Text(
'Password',
style: theme.textTheme.subtitle2,
style: theme.textTheme.titleSmall,
),
SizedBox(height: 8),
InputLogin(
Expand All @@ -151,7 +151,7 @@ class GenerateCompatibleXprvState extends State<GenerateCompatibleXprv>
SizedBox(height: 16),
Text(
'Confirm password',
style: theme.textTheme.subtitle2,
style: theme.textTheme.titleSmall,
),
SizedBox(height: 8),
InputLogin(
Expand Down
1 change: 0 additions & 1 deletion lib/widgets/transaction_details.dart
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,6 @@ class TransactionDetails extends StatelessWidget {

Widget build(BuildContext context) {
final theme = Theme.of(context);
final extendedTheme = theme.extension<ExtendedTheme>()!;
return Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Expand Down
4 changes: 2 additions & 2 deletions lib/widgets/verify_password.dart
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ class VerifyPasswordState extends State<VerifyPassword>
children: [
Text(
'Please, input your wallet\'s password.',
style: theme.textTheme.bodyText1,
style: theme.textTheme.bodyLarge,
),
SizedBox(height: 16),
Form(
Expand All @@ -103,7 +103,7 @@ class VerifyPasswordState extends State<VerifyPassword>
children: [
Text(
'Password',
style: theme.textTheme.subtitle2,
style: theme.textTheme.titleSmall,
),
SizedBox(height: 8),
InputLogin(
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import 'dart:typed_data';
import 'package:flutter/material.dart';
import 'package:font_awesome_flutter/font_awesome_flutter.dart';
import 'package:mobile_scanner/mobile_scanner.dart';
Expand All @@ -22,7 +21,6 @@ class QrScanner extends StatelessWidget {
MobileScanner(
onDetect: (capture) {
final List<Barcode> barcodes = capture.barcodes;
final Uint8List? image = capture.image;
for (final barcode in barcodes) {
onChanged(barcode.rawValue ?? '');
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -122,12 +122,12 @@ class RecipientStepState extends State<RecipientStep>
_addressController.text = savedAddress;
_address = savedAddress;
}
;

if (savedAmount != null) {
_amountController.text = savedAmount;
_amount = savedAmount;
}
;

BlocProvider.of<VTTCreateBloc>(context).add(ResetTransactionEvent());
}

Expand Down

0 comments on commit a901fbb

Please sign in to comment.