Skip to content

Commit 3e84106

Browse files
authored
Merge pull request #255 from himanshugoyal77/google-signout
changed com.example to com.ccextractor
2 parents f3de26d + 0cff6df commit 3e84106

File tree

15 files changed

+129
-37
lines changed

15 files changed

+129
-37
lines changed

android/app/build.gradle

Lines changed: 23 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,13 @@ apply plugin: 'kotlin-android'
2828
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
2929
apply from: project(':flutter_config').projectDir.getPath() + "/dotenv.gradle"
3030

31+
def keystoreProperties = new Properties()
32+
def keystorePropertiesFile = rootProject.file('key.properties')
33+
if (keystorePropertiesFile.exists()) {
34+
keystoreProperties.load(new FileInputStream(keystorePropertiesFile))
35+
}
36+
37+
3138
android {
3239
compileSdkVersion 34
3340
buildToolsVersion '29.0.0'
@@ -38,19 +45,32 @@ android {
3845

3946
defaultConfig {
4047
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
41-
applicationId "com.example.beacon"
48+
applicationId "com.ccextractor.beacon"
4249
minSdkVersion 23
4350
targetSdkVersion 30
4451
multiDexEnabled true
4552
versionCode flutterVersionCode.toInteger()
4653
versionName flutterVersionName
4754
}
4855

56+
signingConfigs {
57+
release {
58+
keyAlias = keystoreProperties['keyAlias']
59+
keyPassword = keystoreProperties['keyPassword']
60+
storeFile = keystoreProperties['storeFile'] ? file(keystoreProperties['storeFile']) : null
61+
storePassword = keystoreProperties['storePassword']
62+
}
63+
}
64+
4965
buildTypes {
5066
release {
5167
// TODO: Add your own signing config for the release build.
52-
// Signing with the debug keys for now, so `flutter run --release` works.
53-
signingConfig signingConfigs.debug
68+
// Signing with the debug keys for now,
69+
// so `flutter run --release` works.
70+
crunchPngs false
71+
shrinkResources true
72+
signingConfig = signingConfigs.debug
73+
signingConfig = signingConfigs.release
5474
}
5575
}
5676
}

android/app/src/debug/AndroidManifest.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
2-
package="com.example.beacon">
2+
package="com.ccextractor.beacon">
33
<!-- Flutter needs it to communicate with the running application
44
to allow setting breakpoints, to provide hot reload, etc.
55
-->

android/app/src/main/AndroidManifest.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
2-
package="com.example.beacon">
2+
package="com.ccextractor.beacon">
33

44
<uses-permission android:name="android.permission.INTERNET"/>
55
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />

android/app/src/main/kotlin/com/example/beacon/MainActivity.kt

Lines changed: 0 additions & 21 deletions
This file was deleted.

android/app/src/profile/AndroidManifest.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
2-
package="com.example.beacon">
2+
package="com.ccextractor.beacon">
33
<!-- Flutter needs it to communicate with the running application
44
to allow setting breakpoints, to provide hot reload, etc.
55
-->

lib/core/utils/utils.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ class Utils {
2929
)
3030
],
3131
),
32-
backgroundColor: kLightBlue.withOpacity(0.8),
32+
backgroundColor: kLightBlue.withValues(alpha: 0.8),
3333
shape: RoundedRectangleBorder(
3434
borderRadius: BorderRadius.all(
3535
Radius.circular(10),

lib/firebase_options.dart

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
// File generated by FlutterFire CLI.
2+
// ignore_for_file: type=lint
3+
import 'package:firebase_core/firebase_core.dart' show FirebaseOptions;
4+
import 'package:flutter/foundation.dart'
5+
show defaultTargetPlatform, kIsWeb, TargetPlatform;
6+
7+
/// Default [FirebaseOptions] for use with your Firebase apps.
8+
///
9+
/// Example:
10+
/// ```dart
11+
/// import 'firebase_options.dart';
12+
/// // ...
13+
/// await Firebase.initializeApp(
14+
/// options: DefaultFirebaseOptions.currentPlatform,
15+
/// );
16+
/// ```
17+
class DefaultFirebaseOptions {
18+
static FirebaseOptions get currentPlatform {
19+
if (kIsWeb) {
20+
throw UnsupportedError(
21+
'DefaultFirebaseOptions have not been configured for web - '
22+
'you can reconfigure this by running the FlutterFire CLI again.',
23+
);
24+
}
25+
switch (defaultTargetPlatform) {
26+
case TargetPlatform.android:
27+
return android;
28+
case TargetPlatform.iOS:
29+
return ios;
30+
case TargetPlatform.macOS:
31+
throw UnsupportedError(
32+
'DefaultFirebaseOptions have not been configured for macos - '
33+
'you can reconfigure this by running the FlutterFire CLI again.',
34+
);
35+
case TargetPlatform.windows:
36+
throw UnsupportedError(
37+
'DefaultFirebaseOptions have not been configured for windows - '
38+
'you can reconfigure this by running the FlutterFire CLI again.',
39+
);
40+
case TargetPlatform.linux:
41+
throw UnsupportedError(
42+
'DefaultFirebaseOptions have not been configured for linux - '
43+
'you can reconfigure this by running the FlutterFire CLI again.',
44+
);
45+
default:
46+
throw UnsupportedError(
47+
'DefaultFirebaseOptions are not supported for this platform.',
48+
);
49+
}
50+
}
51+
52+
static const FirebaseOptions android = FirebaseOptions(
53+
apiKey: '',
54+
appId: '',
55+
messagingSenderId: '',
56+
projectId: '',
57+
storageBucket: '',
58+
);
59+
60+
static const FirebaseOptions ios = FirebaseOptions(
61+
apiKey: '',
62+
appId: '',
63+
messagingSenderId: '',
64+
projectId: '',
65+
storageBucket: '',
66+
androidClientId: '',
67+
iosClientId: '',
68+
iosBundleId: '',
69+
);
70+
}

lib/presentation/auth/auth_cubit/auth_cubit.dart

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,4 +94,10 @@ class AuthCubit extends Cubit<AuthState> {
9494
error: 'Something went wrong please try again later!'));
9595
}
9696
}
97+
98+
void googleSignOut() async {
99+
print('signing out');
100+
GoogleSignIn _googleSignIn = GoogleSignIn();
101+
await _googleSignIn.signOut();
102+
}
97103
}

lib/presentation/auth/auth_screen.dart

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,12 +69,16 @@ class _AuthScreenState extends State<AuthScreen>
6969
final authCubit = BlocProvider.of<AuthCubit>(context);
7070
return PopScope(
7171
canPop: false,
72-
onPopInvoked: (didPop) async {
73-
bool? popped = await onPopHome();
72+
onPopInvokedWithResult: (bool didPop, Object? result) async {
73+
if (didPop) {
74+
return;
75+
}
7476

77+
bool? popped = await onPopHome();
7578
if (popped == true) {
7679
await SystemNavigator.pop();
7780
}
81+
return;
7882
},
7983
child: BlocConsumer<AuthCubit, AuthState>(
8084
listener: (context, state) {

lib/presentation/group/widgets/beacon_card.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ class _BeaconCardState extends State<BeaconCard> {
7171
'${widget.beacon.title} is now active! \nYou can join the hike',
7272
style: TextStyle(color: Colors.black),
7373
),
74-
backgroundColor: kLightBlue.withOpacity(0.8),
74+
backgroundColor: kLightBlue.withValues(alpha: 0.8),
7575
shape: RoundedRectangleBorder(
7676
borderRadius: BorderRadius.all(
7777
Radius.circular(10),

0 commit comments

Comments
 (0)