Skip to content
This repository has been archived by the owner on Jul 31, 2021. It is now read-only.

Commit

Permalink
add google-service.json to .gitignore
Browse files Browse the repository at this point in the history
  • Loading branch information
mkofdwu committed Apr 1, 2021
1 parent e0f8b2c commit 2ec312f
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 25 deletions.
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -40,4 +40,6 @@ android/key.properties
!/packages/flutter_tools/test/data/dart_dependencies_test/**/.packages

# Firebase related
.firebase/
.firebase/
google-services.json
GoogleService-Info.plist
10 changes: 5 additions & 5 deletions lib/pages/chat/chat.dart
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,11 @@ class _ChatPageState extends State<ChatPage> {
SizedBox(width: 10),
Expanded(
child: GestureDetector(
onTap: () async => Navigator.pushNamed(
context,
'/profile',
arguments: widget.chat.otherProfile,
),
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.start,
Expand All @@ -125,11 +130,6 @@ class _ChatPageState extends State<ChatPage> {
ChatDescription(chat: widget.chat)
],
),
onTap: () async => Navigator.pushNamed(
context,
'/profile',
arguments: widget.chat.otherProfile,
),
),
),
TileIconButton(
Expand Down
41 changes: 23 additions & 18 deletions lib/services/auth_service.dart
Original file line number Diff line number Diff line change
Expand Up @@ -138,23 +138,28 @@ class AuthService {
RegistrationInfo info,
Function(AuthCredential) onVerificationCompleted,
Function(FirebaseAuthException) onVerificationFailed,
}) {
FirebaseAuth.instance.verifyPhoneNumber(
phoneNumber: info.phoneNumber,
timeout: const Duration(seconds: 120),
verificationCompleted: (AuthCredential credential) {
onVerificationCompleted(credential);
},
verificationFailed: (FirebaseAuthException exception) {
print('verification failed: ' + exception.message);
onVerificationFailed(exception);
},
codeSent: (String verificationId, int forceResendingToken) {
info.smsVerificationId = verificationId;
},
codeAutoRetrievalTimeout: (String verificationId) {
info.smsVerificationId = verificationId;
},
);
}) async {
try {
await FirebaseAuth.instance.verifyPhoneNumber(
phoneNumber: info.phoneNumber,
timeout: const Duration(seconds: 120),
verificationCompleted: (AuthCredential credential) {
onVerificationCompleted(credential);
},
verificationFailed: (FirebaseAuthException exception) {
print('verification failed: ' + exception.message);
onVerificationFailed(exception);
},
codeSent: (String verificationId, int forceResendingToken) {
info.smsVerificationId = verificationId;
},
codeAutoRetrievalTimeout: (String verificationId) {
info.smsVerificationId = verificationId;
},
);
} catch (e) {
// temporary fix for invalid phone numbers
onVerificationFailed(e);
}
}
}
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: tundr
description: tundr clean up removing support for web.

version: 0.2.9+25
version: 0.2.10+26

environment:
sdk: '>=2.2.2 <3.0.0'
Expand Down

0 comments on commit 2ec312f

Please sign in to comment.