Fixed issues for linter and analyzer

This commit is contained in:
M
2020-01-08 15:12:50 +02:00
parent 6c832a4efd
commit 78ec11de47
168 changed files with 2274 additions and 1971 deletions
@@ -9,24 +9,24 @@ import 'package:cake_wallet/src/stores/settings/settings_store.dart';
import 'package:cake_wallet/generated/i18n.dart';
class SetupPinCodePage extends BasePage {
SetupPinCodePage({this.onPinCodeSetup});
final Function(BuildContext, String) onPinCodeSetup;
@override
String get title => S.current.setup_pin;
SetupPinCodePage({this.onPinCodeSetup});
@override
Widget body(BuildContext context) =>
SetupPinCodeForm(onPinCodeSetup: onPinCodeSetup, hasLengthSwitcher: true);
}
class SetupPinCodeForm extends PinCodeWidget {
final Function(BuildContext, String) onPinCodeSetup;
final bool hasLengthSwitcher;
SetupPinCodeForm(
{@required this.onPinCodeSetup, @required this.hasLengthSwitcher});
{@required this.onPinCodeSetup, @required bool hasLengthSwitcher})
: super(hasLengthSwitcher: hasLengthSwitcher);
final Function(BuildContext, String) onPinCodeSetup;
@override
_SetupPinCodeFormState createState() => _SetupPinCodeFormState();
@@ -34,17 +34,16 @@ class SetupPinCodeForm extends PinCodeWidget {
class _SetupPinCodeFormState<WidgetType extends SetupPinCodeForm>
extends PinCodeState<WidgetType> {
_SetupPinCodeFormState() {
title = S.current.enter_your_pin;
}
bool isEnteredOriginalPin() => !(_originalPin.length == 0);
bool isEnteredOriginalPin() => _originalPin.isNotEmpty;
Function(BuildContext) onPinCodeSetup;
List<int> _originalPin = [];
UserStore _userStore;
SettingsStore _settingsStore;
_SetupPinCodeFormState() {
title = S.current.enter_your_pin;
}
@override
void onPinCodeEntered(PinCodeState state) {
if (!isEnteredOriginalPin()) {
@@ -57,7 +56,7 @@ class _SetupPinCodeFormState<WidgetType extends SetupPinCodeForm>
_userStore.set(password: pin);
_settingsStore.setDefaultPinLength(pinLength: state.pinLength);
showDialog(
showDialog<void>(
context: context,
barrierDismissible: false,
builder: (BuildContext context) {
@@ -76,7 +75,7 @@ class _SetupPinCodeFormState<WidgetType extends SetupPinCodeForm>
);
});
} else {
showDialog(
showDialog<void>(
context: context,
builder: (BuildContext context) {
return AlertDialog(