mirror of
https://github.com/cypherstack/stack_wallet.git
synced 2024-11-17 17:57:40 +00:00
default to easy mode and button size fix
This commit is contained in:
parent
733c81bf90
commit
b822519d58
2 changed files with 20 additions and 16 deletions
|
@ -393,21 +393,21 @@ class _PrivacyToggleState extends ConsumerState<PrivacyToggle> {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
class ContinueButton extends StatelessWidget {
|
class ContinueButton extends ConsumerWidget {
|
||||||
const ContinueButton(
|
const ContinueButton({
|
||||||
{Key? key,
|
Key? key,
|
||||||
required this.isDesktop,
|
required this.isDesktop,
|
||||||
required this.isSettings,
|
required this.isSettings,
|
||||||
required this.isEasy})
|
required this.isEasy,
|
||||||
: super(key: key);
|
}) : super(key: key);
|
||||||
|
|
||||||
final bool isDesktop;
|
final bool isDesktop;
|
||||||
final bool isSettings;
|
final bool isSettings;
|
||||||
final bool isEasy;
|
final bool isEasy;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context, WidgetRef ref) {
|
||||||
return isDesktop
|
return !isDesktop
|
||||||
? TextButton(
|
? TextButton(
|
||||||
style: Theme.of(context)
|
style: Theme.of(context)
|
||||||
.extension<StackColors>()!
|
.extension<StackColors>()!
|
||||||
|
@ -416,10 +416,11 @@ class ContinueButton extends StatelessWidget {
|
||||||
print("Output of isEasy:");
|
print("Output of isEasy:");
|
||||||
print(isEasy);
|
print(isEasy);
|
||||||
|
|
||||||
Prefs.instance.externalCalls = isEasy;
|
ref.read(prefsChangeNotifierProvider).externalCalls = isEasy;
|
||||||
if (!isSettings) {
|
|
||||||
Navigator.of(context).pushNamed(CreatePasswordView.routeName);
|
!isSettings
|
||||||
}
|
? Navigator.of(context).pushNamed(CreatePinView.routeName)
|
||||||
|
: Navigator.of(context).pop();
|
||||||
},
|
},
|
||||||
child: Text(
|
child: Text(
|
||||||
!isSettings ? "Continue" : "Save changes",
|
!isSettings ? "Continue" : "Save changes",
|
||||||
|
@ -437,10 +438,11 @@ class ContinueButton extends StatelessWidget {
|
||||||
print("Output of isEasy:");
|
print("Output of isEasy:");
|
||||||
print(isEasy);
|
print(isEasy);
|
||||||
|
|
||||||
Prefs.instance.externalCalls = isEasy;
|
ref.read(prefsChangeNotifierProvider).externalCalls = isEasy;
|
||||||
|
|
||||||
!isSettings
|
!isSettings
|
||||||
? Navigator.of(context).pushNamed(CreatePinView.routeName)
|
? Navigator.of(context)
|
||||||
|
.pushNamed(CreatePasswordView.routeName)
|
||||||
: Navigator.of(context).pop();
|
: Navigator.of(context).pop();
|
||||||
},
|
},
|
||||||
child: Text(
|
child: Text(
|
||||||
|
|
|
@ -546,7 +546,9 @@ class Prefs extends ChangeNotifier {
|
||||||
boxName: DB.boxNamePrefs, key: "startupWalletId") as String?;
|
boxName: DB.boxNamePrefs, key: "startupWalletId") as String?;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool _externalCalls = false;
|
// incognito mode disabled
|
||||||
|
|
||||||
|
bool _externalCalls = true;
|
||||||
|
|
||||||
bool get externalCalls => _externalCalls;
|
bool get externalCalls => _externalCalls;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue