mirror of
https://github.com/cypherstack/stack_wallet.git
synced 2024-11-17 01:37:54 +00:00
resolve merge conflicts
This commit is contained in:
parent
db9485474e
commit
572410db89
7 changed files with 26 additions and 4 deletions
|
@ -9,7 +9,6 @@ import 'package:stackwallet/providers/global/secure_store_provider.dart';
|
|||
import 'package:stackwallet/utilities/assets.dart';
|
||||
import 'package:stackwallet/utilities/biometrics.dart';
|
||||
import 'package:stackwallet/utilities/constants.dart';
|
||||
import 'package:stackwallet/utilities/enums/flush_bar_type.dart';
|
||||
import 'package:stackwallet/utilities/flutter_secure_storage_interface.dart';
|
||||
import 'package:stackwallet/utilities/text_styles.dart';
|
||||
import 'package:stackwallet/utilities/theme/stack_colors.dart';
|
||||
|
@ -139,6 +138,8 @@ class _CreatePinViewState extends ConsumerState<CreatePinView> {
|
|||
.background,
|
||||
counterText: "",
|
||||
),
|
||||
isRandom:
|
||||
ref.read(prefsChangeNotifierProvider).randomizePIN,
|
||||
submittedFieldDecoration: _pinPutDecoration.copyWith(
|
||||
color: Theme.of(context)
|
||||
.extension<StackColors>()!
|
||||
|
@ -221,6 +222,8 @@ class _CreatePinViewState extends ConsumerState<CreatePinView> {
|
|||
),
|
||||
selectedFieldDecoration: _pinPutDecoration,
|
||||
followingFieldDecoration: _pinPutDecoration,
|
||||
isRandom:
|
||||
ref.read(prefsChangeNotifierProvider).randomizePIN,
|
||||
onSubmit: (String pin) async {
|
||||
// _onSubmitCount++;
|
||||
// if (_onSubmitCount - _onSubmitFailCount > 1) return;
|
||||
|
|
|
@ -304,6 +304,9 @@ class _LockscreenViewState extends ConsumerState<LockscreenView> {
|
|||
),
|
||||
selectedFieldDecoration: _pinPutDecoration,
|
||||
followingFieldDecoration: _pinPutDecoration,
|
||||
isRandom: ref
|
||||
.read(prefsChangeNotifierProvider)
|
||||
.randomizePIN,
|
||||
onSubmit: (String pin) async {
|
||||
_attempts++;
|
||||
|
||||
|
|
|
@ -1,11 +1,12 @@
|
|||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_riverpod/flutter_riverpod.dart';
|
||||
import 'package:stackduo/providers/global/prefs_provider.dart';
|
||||
import 'package:stackwallet/notifications/show_flush_bar.dart';
|
||||
import 'package:stackwallet/pages/settings_views/global_settings_view/security_views/security_view.dart';
|
||||
import 'package:stackwallet/providers/global/prefs_provider.dart';
|
||||
import 'package:stackwallet/providers/global/secure_store_provider.dart';
|
||||
import 'package:stackwallet/utilities/assets.dart';
|
||||
import 'package:stackwallet/utilities/constants.dart';
|
||||
import 'package:stackwallet/utilities/enums/flush_bar_type.dart';
|
||||
import 'package:stackwallet/utilities/flutter_secure_storage_interface.dart';
|
||||
import 'package:stackwallet/utilities/text_styles.dart';
|
||||
import 'package:stackwallet/utilities/theme/stack_colors.dart';
|
||||
|
@ -123,6 +124,8 @@ class _ChangePinViewState extends ConsumerState<ChangePinView> {
|
|||
.background,
|
||||
counterText: "",
|
||||
),
|
||||
isRandom:
|
||||
ref.read(prefsChangeNotifierProvider).randomizePIN,
|
||||
submittedFieldDecoration: _pinPutDecoration.copyWith(
|
||||
color: Theme.of(context)
|
||||
.extension<StackColors>()!
|
||||
|
@ -188,6 +191,8 @@ class _ChangePinViewState extends ConsumerState<ChangePinView> {
|
|||
.background,
|
||||
counterText: "",
|
||||
),
|
||||
isRandom:
|
||||
ref.read(prefsChangeNotifierProvider).randomizePIN,
|
||||
submittedFieldDecoration: _pinPutDecoration.copyWith(
|
||||
color: Theme.of(context)
|
||||
.extension<StackColors>()!
|
||||
|
|
|
@ -19,6 +19,7 @@ class Prefs extends ChangeNotifier {
|
|||
if (!_initialized) {
|
||||
_currency = await _getPreferredCurrency();
|
||||
// _exchangeRateType = await _getExchangeRateType();
|
||||
_randomizePIN = await _getRandomizePIN();
|
||||
_useBiometrics = await _getUseBiometrics();
|
||||
_hasPin = await _getHasPin();
|
||||
_language = await _getPreferredLanguage();
|
||||
|
|
|
@ -7,6 +7,7 @@ class CustomPinPut extends StatefulWidget {
|
|||
const CustomPinPut({
|
||||
Key? key,
|
||||
required this.fieldsCount,
|
||||
required this.isRandom,
|
||||
this.height,
|
||||
this.width,
|
||||
this.onSubmit,
|
||||
|
@ -60,6 +61,8 @@ class CustomPinPut extends StatefulWidget {
|
|||
|
||||
final CustomKey? customKey;
|
||||
|
||||
final bool isRandom;
|
||||
|
||||
/// Displayed fields count. PIN code length.
|
||||
final int fieldsCount;
|
||||
|
||||
|
|
|
@ -50,6 +50,9 @@ class CustomPinPutState extends State<CustomPinPut>
|
|||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
// final bool randomize = ref
|
||||
// .read(prefsChangeNotifierProvider)
|
||||
// .randomizePIN;
|
||||
return SizedBox(
|
||||
width: widget.width,
|
||||
height: widget.height,
|
||||
|
@ -69,6 +72,7 @@ class CustomPinPutState extends State<CustomPinPut>
|
|||
),
|
||||
Center(
|
||||
child: PinKeyboard(
|
||||
isRandom: widget.isRandom,
|
||||
customKey: widget.customKey,
|
||||
onNumberKeyPressed: (number) {
|
||||
if (_controller.text.length < widget.fieldsCount) {
|
||||
|
|
|
@ -244,6 +244,7 @@ class PinKeyboard extends ConsumerWidget {
|
|||
required this.onNumberKeyPressed,
|
||||
required this.onBackPressed,
|
||||
required this.onSubmitPressed,
|
||||
required this.isRandom,
|
||||
this.backgroundColor,
|
||||
this.width = 264,
|
||||
this.height = 360,
|
||||
|
@ -257,6 +258,7 @@ class PinKeyboard extends ConsumerWidget {
|
|||
final double? width;
|
||||
final double? height;
|
||||
final CustomKey? customKey;
|
||||
final bool isRandom;
|
||||
|
||||
void _backHandler() {
|
||||
onBackPressed.call();
|
||||
|
@ -286,8 +288,9 @@ class PinKeyboard extends ConsumerWidget {
|
|||
"0",
|
||||
];
|
||||
|
||||
// if (ref.read(prefsChangeNotifierProvider).randomizePIN == true)
|
||||
list.shuffle();
|
||||
// final isRandom = ref.read(prefsChangeNotifierProvider).randomizePIN;
|
||||
|
||||
if (isRandom) list.shuffle();
|
||||
|
||||
return Container(
|
||||
width: width,
|
||||
|
|
Loading…
Reference in a new issue