## Description Revert Pinput version to fix smart_auth and hence the fdroid build. Fixes #1279
This commit is contained in:
commit
2bd02eac4b
|
@ -4,8 +4,7 @@ import 'package:ente_auth/services/user_service.dart';
|
||||||
import 'package:ente_auth/ui/lifecycle_event_handler.dart';
|
import 'package:ente_auth/ui/lifecycle_event_handler.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter/services.dart';
|
import 'package:flutter/services.dart';
|
||||||
|
import 'package:pinput/pin_put/pin_put.dart';
|
||||||
import 'package:pinput/pinput.dart';
|
|
||||||
|
|
||||||
class TwoFactorAuthenticationPage extends StatefulWidget {
|
class TwoFactorAuthenticationPage extends StatefulWidget {
|
||||||
final String sessionID;
|
final String sessionID;
|
||||||
|
@ -20,6 +19,10 @@ class TwoFactorAuthenticationPage extends StatefulWidget {
|
||||||
class _TwoFactorAuthenticationPageState
|
class _TwoFactorAuthenticationPageState
|
||||||
extends State<TwoFactorAuthenticationPage> {
|
extends State<TwoFactorAuthenticationPage> {
|
||||||
final _pinController = TextEditingController();
|
final _pinController = TextEditingController();
|
||||||
|
final _pinPutDecoration = BoxDecoration(
|
||||||
|
border: Border.all(color: const Color.fromRGBO(45, 194, 98, 1.0)),
|
||||||
|
borderRadius: BorderRadius.circular(15.0),
|
||||||
|
);
|
||||||
String _code = "";
|
String _code = "";
|
||||||
late LifecycleEventHandler _lifecycleEventHandler;
|
late LifecycleEventHandler _lifecycleEventHandler;
|
||||||
|
|
||||||
|
@ -60,16 +63,6 @@ class _TwoFactorAuthenticationPageState
|
||||||
|
|
||||||
Widget _getBody() {
|
Widget _getBody() {
|
||||||
final l10n = context.l10n;
|
final l10n = context.l10n;
|
||||||
final pinPutDecoration = BoxDecoration(
|
|
||||||
border: Border.all(
|
|
||||||
color: Theme.of(context)
|
|
||||||
.inputDecorationTheme
|
|
||||||
.focusedBorder!
|
|
||||||
.borderSide
|
|
||||||
.color,
|
|
||||||
),
|
|
||||||
borderRadius: BorderRadius.circular(15.0),
|
|
||||||
);
|
|
||||||
return Column(
|
return Column(
|
||||||
crossAxisAlignment: CrossAxisAlignment.stretch,
|
crossAxisAlignment: CrossAxisAlignment.stretch,
|
||||||
mainAxisAlignment: MainAxisAlignment.center,
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
|
@ -86,31 +79,32 @@ class _TwoFactorAuthenticationPageState
|
||||||
const Padding(padding: EdgeInsets.all(32)),
|
const Padding(padding: EdgeInsets.all(32)),
|
||||||
Padding(
|
Padding(
|
||||||
padding: const EdgeInsets.fromLTRB(40, 0, 40, 0),
|
padding: const EdgeInsets.fromLTRB(40, 0, 40, 0),
|
||||||
child: Pinput(
|
child: PinPut(
|
||||||
onSubmitted: (String code) {
|
fieldsCount: 6,
|
||||||
|
onSubmit: (String code) {
|
||||||
_verifyTwoFactorCode(code);
|
_verifyTwoFactorCode(code);
|
||||||
},
|
},
|
||||||
length: 6,
|
|
||||||
defaultPinTheme: const PinTheme(),
|
|
||||||
submittedPinTheme: PinTheme(
|
|
||||||
decoration: pinPutDecoration.copyWith(
|
|
||||||
borderRadius: BorderRadius.circular(20.0),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
focusedPinTheme: PinTheme(
|
|
||||||
decoration: pinPutDecoration,
|
|
||||||
),
|
|
||||||
followingPinTheme: PinTheme(
|
|
||||||
decoration: pinPutDecoration.copyWith(
|
|
||||||
borderRadius: BorderRadius.circular(5.0),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
onChanged: (String pin) {
|
onChanged: (String pin) {
|
||||||
setState(() {
|
setState(() {
|
||||||
_code = pin;
|
_code = pin;
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
controller: _pinController,
|
controller: _pinController,
|
||||||
|
submittedFieldDecoration: _pinPutDecoration.copyWith(
|
||||||
|
borderRadius: BorderRadius.circular(20.0),
|
||||||
|
),
|
||||||
|
selectedFieldDecoration: _pinPutDecoration,
|
||||||
|
followingFieldDecoration: _pinPutDecoration.copyWith(
|
||||||
|
borderRadius: BorderRadius.circular(5.0),
|
||||||
|
border: Border.all(
|
||||||
|
color: const Color.fromRGBO(45, 194, 98, 0.5),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
inputDecoration: const InputDecoration(
|
||||||
|
focusedBorder: InputBorder.none,
|
||||||
|
border: InputBorder.none,
|
||||||
|
counterText: '',
|
||||||
|
),
|
||||||
autofocus: true,
|
autofocus: true,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|
|
@ -1109,10 +1109,10 @@ packages:
|
||||||
dependency: "direct main"
|
dependency: "direct main"
|
||||||
description:
|
description:
|
||||||
name: pinput
|
name: pinput
|
||||||
sha256: a92b55ecf9c25d1b9e100af45905385d5bc34fc9b6b04177a9e82cb88fe4d805
|
sha256: "27eb69042f75755bdb6544f6e79a50a6ed09d6e97e2d75c8421744df1e392949"
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "3.0.1"
|
version: "1.2.2"
|
||||||
platform:
|
platform:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
|
@ -1334,14 +1334,6 @@ packages:
|
||||||
description: flutter
|
description: flutter
|
||||||
source: sdk
|
source: sdk
|
||||||
version: "0.0.99"
|
version: "0.0.99"
|
||||||
smart_auth:
|
|
||||||
dependency: transitive
|
|
||||||
description:
|
|
||||||
name: smart_auth
|
|
||||||
sha256: a25229b38c02f733d0a4e98d941b42bed91a976cb589e934895e60ccfa674cf6
|
|
||||||
url: "https://pub.dev"
|
|
||||||
source: hosted
|
|
||||||
version: "1.1.1"
|
|
||||||
sodium:
|
sodium:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
|
@ -1551,14 +1543,6 @@ packages:
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "2.2.2"
|
version: "2.2.2"
|
||||||
universal_platform:
|
|
||||||
dependency: transitive
|
|
||||||
description:
|
|
||||||
name: universal_platform
|
|
||||||
sha256: d315be0f6641898b280ffa34e2ddb14f3d12b1a37882557869646e0cc363d0cc
|
|
||||||
url: "https://pub.dev"
|
|
||||||
source: hosted
|
|
||||||
version: "1.0.0+1"
|
|
||||||
url_launcher:
|
url_launcher:
|
||||||
dependency: "direct main"
|
dependency: "direct main"
|
||||||
description:
|
description:
|
||||||
|
|
|
@ -75,7 +75,7 @@ dependencies:
|
||||||
password_strength: ^0.2.0
|
password_strength: ^0.2.0
|
||||||
path: ^1.8.3
|
path: ^1.8.3
|
||||||
path_provider: ^2.0.11
|
path_provider: ^2.0.11
|
||||||
pinput: ^3.0.1
|
pinput: ^1.2.2
|
||||||
pointycastle: ^3.7.3
|
pointycastle: ^3.7.3
|
||||||
privacy_screen: ^0.0.6
|
privacy_screen: ^0.0.6
|
||||||
protobuf: ^3.0.0
|
protobuf: ^3.0.0
|
||||||
|
|
Loading…
Reference in a new issue