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