![]() ![]() Then you have to enter an “ App nickname” which is optional (if you do not enter then an auto-generated app name would be used).On the second line, there will be your package name (eg: ). You can get the android package name from your project directory → android → app → src → main→ AndroidManifest.xml. In this form, you have to first enter the “ Android Package name”.We need to set up the firebase for this project in Android and as well as IOS separately. From here you will be able to add Firebase to your Flutter project. This will lead you to the “ Project Overview”.Now, you have to enter a “ Project name” and check the two checkboxes below.Click on “ Add project” to create a new project.Then create two methods for sign-in and sign-out for google, there are built-in methods for sign-in and sign-out, add them in the method created.Īfter the coding part we need to set up firebase account for the project:įor setting up the project, We need to create a new Firebase project you will need to go and follow the steps below. In that dart file import the two following packages:Īfter adding the dart file, create an instance for firebase_auth and google_sign_in Create a new dart file in the lib folder, where we will set up the firebase authentication and a google sign in with Flutter. Now, let’s dive into the coding part, I will just explain the important parts of the code that needed to be added. google_sign_in (for the implementation of Google Sign In)įirst of all, add the plugins in pubspec.yaml file and save it to run flutter packages get or we can use the command flutter pub get.firebase_auth (for using Firebase Authentication).flutter create īelow plugins are used in the implementation. Run the following command by using your project name. For creating the project, open a Terminal, or use the terminal in your code editor. So in this article, I will be showing how to set up the Flutter app and implement a Google sign-in using Firebase authentication.įor a better understanding, let’s create a new flutter project. Google Sign-In allows you to get users into your apps quickly and securely with little development work required. Nowadays, Google sign-in is one of the main options for login in most of the mobile apps. Make a change in the app and see them in the blink of an eye. Apps developed with Flutter look and feel great. Flutter is the only mobile SDK that provides reactive views without requiring a JavaScript bridge. Flutter is a multi-platform, open-source, and free framework for creating mobile applications, created by Google. Import 'package:google_sign_in/google_sign_in.In this blog, I will be showing how to set up and implement Google Sign in with Flutter. ![]() ignore_for_file: prefer_const_constructors, avoid_print, unused_local_variable, prefer_const_literals_to_create_immutables, sized_box_for_whitespace import 'package:flutter/material.dart' Buka file main.dart lalu ganti isinya dengan Tutorial kali ini, saya menggunakan flutter versi null safety.ĥ. Pertama buatlah sebuah project flutter baru dengan nama bebas. Untuk melihat hasil akhirnya, kalian bisa scroll ke bagian paling bawahĬara Membuat Login Google di Flutter 1. Satunya dipilih maka akan menampilkan data account seperti gambar, nama, danĮmail. Menampilkan pop-up pilihan login dengan berbagai account google. Satu buah file saja untuk membuat fitur ini berjalan, selebihnya kalian bisaĪplikasi sederhana, terdapat tombol di tengah, dan jika diklik maka akan Pada kesempatan kali ini kita cukup menggunakan Jujurly, fitur ini cukup mudah untukĭiimplementasikan di flutter. Salah satu fitur yang cukup menarik untuk dipelajari adalah Ikuti selengkapnya di bawah ini.įlutter memiliki banyak library pendukung untuk membuat beragam aplikasi denganįitur dinamis. Tutorial ini akan dibuat se-simple dan se-sederhana mungkin, agar pemula dapat Ini kita akan belajar cara membuat login google dengan menggunakan flutter. Halo semuanya, kembali lagi di sahretech. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |