Skip to content

Commit c28efcf

Browse files
committed
* Updated example app
* Updated dependencies * Fixed linter warnings * Updated version
1 parent 0d861df commit c28efcf

14 files changed

Lines changed: 81 additions & 68 deletions

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
## [1.0.4] - 07/06/2022
2+
3+
* Updated example app
4+
* Updated dependencies
5+
* Fixed linter warnings
6+
17
## [1.0.3] - 03/05/2022
28

39
* Updated example app

example/android/app/src/main/AndroidManifest.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
22
package="com.example.phone_auth_handler_demo">
33
<application
4-
android:label="phone_auth_handler_demo"
4+
android:label="FirebasePhoneAuthHandler Demo"
55
android:name="${applicationName}"
66
android:icon="@mipmap/ic_launcher">
77
<activity

example/ios/Runner/Info.plist

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
<key>CFBundleInfoDictionaryVersion</key>
1414
<string>6.0</string>
1515
<key>CFBundleName</key>
16-
<string>phone_auth_handler_demo</string>
16+
<string>FirebasePhoneAuthHandler Demo</string>
1717
<key>CFBundlePackageType</key>
1818
<string>APPL</string>
1919
<key>CFBundleShortVersionString</key>

example/lib/screens/authentication_screen.dart

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ class AuthenticationScreen extends StatefulWidget {
1212
}) : super(key: key);
1313

1414
@override
15+
// ignore: library_private_types_in_public_api
1516
_AuthenticationScreenState createState() => _AuthenticationScreenState();
1617
}
1718

@@ -55,10 +56,6 @@ class _AuthenticationScreenState extends State<AuthenticationScreen> {
5556
),
5657
const SizedBox(height: 15),
5758
EasyContainer(
58-
child: const Text(
59-
'Verify',
60-
style: TextStyle(fontSize: 18),
61-
),
6259
width: double.infinity,
6360
onTap: () async {
6461
if (isNullOrBlank(phoneNumber) ||
@@ -72,6 +69,10 @@ class _AuthenticationScreenState extends State<AuthenticationScreen> {
7269
);
7370
}
7471
},
72+
child: const Text(
73+
'Verify',
74+
style: TextStyle(fontSize: 18),
75+
),
7576
),
7677
],
7778
),

example/lib/screens/home_screen.dart

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,8 @@ class HomeScreen extends StatelessWidget {
4040
onTap: () async {
4141
await FirebasePhoneAuthHandler.signOut(context);
4242
showSnackBar('Logged out successfully!');
43+
44+
// ignore: use_build_context_synchronously
4345
Navigator.pushNamedAndRemoveUntil(
4446
context,
4547
AuthenticationScreen.id,

example/lib/screens/splash_screen.dart

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ class SplashScreen extends StatefulWidget {
1212
}) : super(key: key);
1313

1414
@override
15+
// ignore: library_private_types_in_public_api
1516
_SplashScreenState createState() => _SplashScreenState();
1617
}
1718

@@ -22,6 +23,7 @@ class _SplashScreenState extends State<SplashScreen> {
2223
await Future.delayed(Duration.zero);
2324
final isLoggedIn = Globals.firebaseUser != null;
2425

26+
if (!mounted) return;
2527
Navigator.pushReplacementNamed(
2628
context,
2729
isLoggedIn ? HomeScreen.id : AuthenticationScreen.id,

example/lib/screens/verify_phone_number_screen.dart

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -29,20 +29,20 @@ class _VerifyPhoneNumberScreenState extends State<VerifyPhoneNumberScreen>
2929
@override
3030
void initState() {
3131
scrollController = ScrollController();
32-
WidgetsBinding.instance?.addObserver(this);
32+
WidgetsBinding.instance.addObserver(this);
3333
super.initState();
3434
}
3535

3636
@override
3737
void dispose() {
38-
WidgetsBinding.instance?.removeObserver(this);
38+
WidgetsBinding.instance.removeObserver(this);
3939
scrollController.dispose();
4040
super.dispose();
4141
}
4242

4343
@override
4444
void didChangeMetrics() {
45-
final bottomViewInsets = WidgetsBinding.instance!.window.viewInsets.bottom;
45+
final bottomViewInsets = WidgetsBinding.instance.window.viewInsets.bottom;
4646
isKeyboardVisible = bottomViewInsets > 0;
4747
}
4848

@@ -101,18 +101,18 @@ class _VerifyPhoneNumberScreenState extends State<VerifyPhoneNumberScreen>
101101
actions: [
102102
if (controller.codeSent)
103103
TextButton(
104-
child: Text(
105-
controller.timerIsActive
106-
? '${controller.timerCount.inSeconds}s'
107-
: 'Resend',
108-
style: const TextStyle(color: Colors.blue, fontSize: 18),
109-
),
110104
onPressed: controller.timerIsActive
111105
? null
112106
: () async {
113107
log(VerifyPhoneNumberScreen.id, msg: 'Resend OTP');
114108
await controller.sendOTP();
115109
},
110+
child: Text(
111+
controller.timerIsActive
112+
? '${controller.timerCount.inSeconds}s'
113+
: 'Resend',
114+
style: const TextStyle(color: Colors.blue, fontSize: 18),
115+
),
116116
),
117117
const SizedBox(width: 5),
118118
],

example/lib/widgets/pin_input_field.dart

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ class PinInputField extends StatefulWidget {
1414
}) : super(key: key);
1515

1616
@override
17+
// ignore: library_private_types_in_public_api
1718
_PinInputFieldState createState() => _PinInputFieldState();
1819
}
1920

example/pubspec.lock

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -42,70 +42,70 @@ packages:
4242
name: collection
4343
url: "https://pub.dartlang.org"
4444
source: hosted
45-
version: "1.15.0"
45+
version: "1.16.0"
4646
easy_container:
4747
dependency: "direct main"
4848
description:
4949
name: easy_container
5050
url: "https://pub.dartlang.org"
5151
source: hosted
52-
version: "1.0.3"
52+
version: "1.0.4"
5353
fake_async:
5454
dependency: transitive
5555
description:
5656
name: fake_async
5757
url: "https://pub.dartlang.org"
5858
source: hosted
59-
version: "1.2.0"
59+
version: "1.3.0"
6060
firebase_auth:
6161
dependency: transitive
6262
description:
6363
name: firebase_auth
6464
url: "https://pub.dartlang.org"
6565
source: hosted
66-
version: "3.3.16"
66+
version: "3.3.19"
6767
firebase_auth_platform_interface:
6868
dependency: transitive
6969
description:
7070
name: firebase_auth_platform_interface
7171
url: "https://pub.dartlang.org"
7272
source: hosted
73-
version: "6.2.4"
73+
version: "6.2.7"
7474
firebase_auth_web:
7575
dependency: transitive
7676
description:
7777
name: firebase_auth_web
7878
url: "https://pub.dartlang.org"
7979
source: hosted
80-
version: "3.3.13"
80+
version: "3.3.16"
8181
firebase_core:
8282
dependency: "direct main"
8383
description:
8484
name: firebase_core
8585
url: "https://pub.dartlang.org"
8686
source: hosted
87-
version: "1.15.0"
87+
version: "1.17.1"
8888
firebase_core_platform_interface:
8989
dependency: transitive
9090
description:
9191
name: firebase_core_platform_interface
9292
url: "https://pub.dartlang.org"
9393
source: hosted
94-
version: "4.2.5"
94+
version: "4.4.0"
9595
firebase_core_web:
9696
dependency: transitive
9797
description:
9898
name: firebase_core_web
9999
url: "https://pub.dartlang.org"
100100
source: hosted
101-
version: "1.6.2"
101+
version: "1.6.4"
102102
firebase_phone_auth_handler:
103103
dependency: "direct main"
104104
description:
105105
path: ".."
106106
relative: true
107107
source: path
108-
version: "1.0.3"
108+
version: "1.0.4"
109109
flutter:
110110
dependency: "direct main"
111111
description: flutter
@@ -117,7 +117,7 @@ packages:
117117
name: flutter_lints
118118
url: "https://pub.dartlang.org"
119119
source: hosted
120-
version: "1.0.4"
120+
version: "2.0.1"
121121
flutter_test:
122122
dependency: "direct dev"
123123
description: flutter
@@ -155,14 +155,14 @@ packages:
155155
name: js
156156
url: "https://pub.dartlang.org"
157157
source: hosted
158-
version: "0.6.3"
158+
version: "0.6.4"
159159
lints:
160160
dependency: transitive
161161
description:
162162
name: lints
163163
url: "https://pub.dartlang.org"
164164
source: hosted
165-
version: "1.0.1"
165+
version: "2.0.0"
166166
matcher:
167167
dependency: transitive
168168
description:
@@ -176,7 +176,7 @@ packages:
176176
name: material_color_utilities
177177
url: "https://pub.dartlang.org"
178178
source: hosted
179-
version: "0.1.3"
179+
version: "0.1.4"
180180
meta:
181181
dependency: transitive
182182
description:
@@ -197,14 +197,14 @@ packages:
197197
name: path
198198
url: "https://pub.dartlang.org"
199199
source: hosted
200-
version: "1.8.0"
200+
version: "1.8.1"
201201
pinput:
202202
dependency: "direct main"
203203
description:
204204
name: pinput
205205
url: "https://pub.dartlang.org"
206206
source: hosted
207-
version: "2.2.7"
207+
version: "2.2.10"
208208
plugin_platform_interface:
209209
dependency: transitive
210210
description:
@@ -218,7 +218,7 @@ packages:
218218
name: provider
219219
url: "https://pub.dartlang.org"
220220
source: hosted
221-
version: "6.0.2"
221+
version: "6.0.3"
222222
sky_engine:
223223
dependency: transitive
224224
description: flutter
@@ -237,7 +237,7 @@ packages:
237237
name: source_span
238238
url: "https://pub.dartlang.org"
239239
source: hosted
240-
version: "1.8.1"
240+
version: "1.8.2"
241241
stack_trace:
242242
dependency: transitive
243243
description:
@@ -272,7 +272,7 @@ packages:
272272
name: test_api
273273
url: "https://pub.dartlang.org"
274274
source: hosted
275-
version: "0.4.8"
275+
version: "0.4.9"
276276
typed_data:
277277
dependency: transitive
278278
description:
@@ -286,7 +286,7 @@ packages:
286286
name: vector_math
287287
url: "https://pub.dartlang.org"
288288
source: hosted
289-
version: "2.1.1"
289+
version: "2.1.2"
290290
sdks:
291-
dart: ">=2.16.1 <3.0.0"
291+
dart: ">=2.17.0-206.0.dev <3.0.0"
292292
flutter: ">=2.5.0"

example/pubspec.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@ dependencies:
1212
flutter:
1313
sdk: flutter
1414

15-
pinput: ^2.2.7
16-
firebase_core: ^1.15.0
17-
easy_container: ^1.0.3
15+
pinput: ^2.2.10
16+
firebase_core: ^1.17.1
17+
easy_container: ^1.0.4
1818
intl_phone_field: ^3.1.0
1919
firebase_phone_auth_handler:
2020
path: "../"
@@ -23,7 +23,7 @@ dev_dependencies:
2323
flutter_test:
2424
sdk: flutter
2525

26-
flutter_lints: ^1.0.4
26+
flutter_lints: ^2.0.1
2727

2828

2929
flutter:

0 commit comments

Comments
 (0)