This is a feature implementation for Google sign-in in your Flutter application without using Firebase
- Google Sign-in, Sign-out.
- access to the user's public details on the screen.
- This project is licensed under the MIT License - see the LICENSE file for details
go to google-cloud-console
-->create-a-project
-->OAuth consent screen
-->external
-->complete your app registration
.
Now navigate to credentials
, then click on create credentials
and select OAuth Client ID
:
-
Create
OAuth Client Id
by filling in the details. -
it will require an
SHA-1 certificate fingerprint
andpackage name
:- to get
SHA-1 certificate fingerprint
-->- Open your Flutter project's root directory.
- Open cmd or PowerShell
- and run command
cd android ./gradlew signingReport
- to get
package name
-->- go to
build.gradle
and check your package name.
- go to
- to get
-
complete your credentials creation after filling it with details above.
Go to URL β https://docs.flutter.dev/deployment/android
and follow instructions for Create an upload keystore
.
- Run the command given over there as per your os anywhere on the desktop and it will create .jks file.
- moves this file to,
android
-->app
of the flutter project directory. - update
build.gradle
file by adding the below code under the Android section:
signingConfigs{
debug{
keyAlias 'androiddebugkey'
keyPassword yourpassword'
storeFile file('upload-keystore.jks')
storePassword 'yourpassword'
}
}
buildTypes {
debug {
signingConfig signingConfigs.debug
}
release {
// TODO: Add your own signing config for the release build.
// Signing with the debug keys for now,
// so `flutter run --release` works.
signingConfig signingConfigs.debug
}
}
open your command prompt & go to the directory where you want to create your flutter project.
git clone https://github.com/akashmishra242/flutter_onesignal_push_notification.git #to fork this flutter project
cd .\flutter_onesignal_push_notification\ #navigate to the woking directory
code . #open your vs code
now to run the app, run the following command in VS Code Terminal(flutter):
flutter pub get #to install and update packages & dependencies.
flutter run #to run the flutter app
Give your feedback at akashmishra242@gmail.com