From b585e5ef69e42dfa6a2a101357ea5b45d33da1c0 Mon Sep 17 00:00:00 2001 From: Hillel Coren Date: Thu, 1 Sep 2022 12:01:05 +0300 Subject: [PATCH] Google GMS in F-Droid build #478 --- README.md | 1 + lib/ui/app/sms_verification.dart | 11 ++--------- pubspec.foss.yaml | 2 +- pubspec.lock | 2 +- pubspec.next.yaml | 2 +- pubspec.yaml | 2 +- 6 files changed, 7 insertions(+), 13 deletions(-) diff --git a/README.md b/README.md index 99d50a78e..c99b89740 100644 --- a/README.md +++ b/README.md @@ -39,6 +39,7 @@ cp android/build.gradle.foss android/build.gradle cp lib/utils/oauth.dart.foss lib/utils/oauth.dart cp lib/utils/app_review.dart.foss lib/utils/app_review.dart cp lib/ui/app/upgrade_dialog.dart.foss lib/ui/app/upgrade_dialog.dart +cp lib/ui/app/pinput.dart.foss lib/ui/app/pinput.dart cp android/app/src/main/AndroidManifest.foss.xml android/app/src/main/AndroidManifest.xml cp pubspec.foss.yaml pubspec.yaml rm pubspec.lock diff --git a/lib/ui/app/sms_verification.dart b/lib/ui/app/sms_verification.dart index 4696e8f77..08620c821 100644 --- a/lib/ui/app/sms_verification.dart +++ b/lib/ui/app/sms_verification.dart @@ -11,9 +11,9 @@ import 'package:invoiceninja_flutter/redux/app/app_actions.dart'; import 'package:invoiceninja_flutter/redux/app/app_state.dart'; import 'package:invoiceninja_flutter/ui/app/forms/app_form.dart'; import 'package:invoiceninja_flutter/ui/app/loading_indicator.dart'; +import 'package:invoiceninja_flutter/ui/app/pinput.dart'; import 'package:invoiceninja_flutter/utils/dialogs.dart'; import 'package:invoiceninja_flutter/utils/localization.dart'; -import 'package:pinput/pinput.dart'; class SmsVerification extends StatefulWidget { const SmsVerification(); @@ -134,15 +134,8 @@ class _SmsVerificationState extends State { if (_showCode) ...[ Text(localization.codeWasSent), SizedBox(height: 20), - Pinput( + AppPinput( onCompleted: (code) => _code = code, - autofocus: true, - length: 6, - showCursor: true, - androidSmsAutofillMethod: - AndroidSmsAutofillMethod.smsUserConsentApi, - validator: (value) => - value.isEmpty ? localization.pleaseEnterACode : null, ), ] else IntlPhoneField( diff --git a/pubspec.foss.yaml b/pubspec.foss.yaml index 11b55b452..0048f3233 100644 --- a/pubspec.foss.yaml +++ b/pubspec.foss.yaml @@ -23,6 +23,7 @@ dependencies: # google_sign_in: ^5.0.7 # in_app_review: ^2.0.4 # in_app_purchase: ^3.0.6 + # pinput: ^2.2.11 flutter_redux: ^0.8.2 redux_logging: ^0.5.0 http: ^0.13.3 @@ -77,7 +78,6 @@ dependencies: window_manager: ^0.2.7 # bitsdojo_window: ^0.1.2 intl_phone_field: ^3.1.0 - pinput: ^2.2.11 flutter_staggered_grid_view: ^0.6.2 # quick_actions: ^0.2.1 # idb_shim: ^1.11.1+1 diff --git a/pubspec.lock b/pubspec.lock index 50fdd898d..3fb9956ef 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -949,7 +949,7 @@ packages: name: pinput url: "https://pub.dartlang.org" source: hosted - version: "2.2.11" + version: "2.2.12" platform: dependency: transitive description: diff --git a/pubspec.next.yaml b/pubspec.next.yaml index ebdf8da35..59a920dd0 100644 --- a/pubspec.next.yaml +++ b/pubspec.next.yaml @@ -23,6 +23,7 @@ dependencies: google_sign_in: ^5.0.7 in_app_review: ^2.0.4 in_app_purchase: ^3.0.6 + pinput: ^2.2.11 flutter_redux: ^0.8.2 redux_logging: ^0.5.0 http: ^0.13.3 @@ -77,7 +78,6 @@ dependencies: window_manager: ^0.2.5 bitsdojo_window: ^0.1.2 intl_phone_field: ^3.1.0 - pinput: ^2.2.11 flutter_staggered_grid_view: ^0.6.2 # quick_actions: ^0.2.1 # idb_shim: ^1.11.1+1 diff --git a/pubspec.yaml b/pubspec.yaml index 462c3fa9d..7e2d8629c 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -23,6 +23,7 @@ dependencies: google_sign_in: ^5.0.7 in_app_review: ^2.0.4 in_app_purchase: ^3.0.6 + pinput: ^2.2.11 flutter_redux: ^0.8.2 redux_logging: ^0.5.0 http: ^0.13.3 @@ -77,7 +78,6 @@ dependencies: window_manager: ^0.2.7 # bitsdojo_window: ^0.1.2 intl_phone_field: ^3.1.0 - pinput: ^2.2.11 flutter_staggered_grid_view: ^0.6.2 # quick_actions: ^0.2.1 # idb_shim: ^1.11.1+1