<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Gnanaprakash on Medium]]></title>
        <description><![CDATA[Stories by Gnanaprakash on Medium]]></description>
        <link>https://medium.com/@gnanaprakash1999?source=rss-da0552335468------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*wond8eUeUz2MRU6ZgkKeoQ.png</url>
            <title>Stories by Gnanaprakash on Medium</title>
            <link>https://medium.com/@gnanaprakash1999?source=rss-da0552335468------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Fri, 04 Dec 2026 05:15:19 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@gnanaprakash1999/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Getting Started with Flutter: A Beginner’s Guide for Freshers]]></title>
            <link>https://gnanaprakash1999.medium.com/getting-started-with-flutter-a-beginners-guide-for-freshers-50cf0f30861a?source=rss-da0552335468------2</link>
            <guid isPermaLink="false">https://medium.com/p/50cf0f30861a</guid>
            <category><![CDATA[mobile-app-development]]></category>
            <category><![CDATA[flutter]]></category>
            <category><![CDATA[dart]]></category>
            <category><![CDATA[flutter-app-development]]></category>
            <category><![CDATA[technology]]></category>
            <dc:creator><![CDATA[Gnanaprakash]]></dc:creator>
            <pubDate>Wed, 27 Nov 2024 03:11:27 GMT</pubDate>
            <atom:updated>2024-11-27T04:01:39.793Z</atom:updated>
            <content:encoded><![CDATA[<blockquote>Flutter is a game-changer for freshers entering the world of app development. Created by Google, it’s a versatile and beginner-friendly framework that allows you to build beautiful, high-performance applications for Android, iOS, web, and desktop — all from a single codebase. With its intuitive design and robust tools, Flutter provides an excellent starting point for freshers eager to dive into the fast-growing field of mobile development. If you’re new to programming or looking to enhance your skills, Flutter is the perfect framework to kickstart your journey!</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*WzOFVEiRbp4N8JZUhyNvZA.png" /><figcaption>Learn Flutter 😉</figcaption></figure><h4>Introduction</h4><p>Flutter is a popular open-source UI toolkit by Google, known for building natively compiled applications for mobile, web, and desktop from a single codebase. If you’re a fresher wondering where to start, this guide is for you!</p><h4>Why Choose Flutter?</h4><ol><li><strong>Single Codebase:</strong> Write one codebase for both Android and iOS apps.</li><li><strong>Fast Development:</strong> Hot Reload lets you see changes instantly.</li><li><strong>Rich Widget Library:</strong> Everything in Flutter is a widget, making it easy to create custom, responsive UIs.</li><li><strong>Great Community Support:</strong> Tons of documentation, libraries, and helpful developers.</li></ol><h4><strong>Step 1: Set Up Your Environment</strong></h4><p>Install Flutter SDK:</p><ul><li>Download Flutter from <a href="https://flutter.dev/">flutter.dev</a>.</li><li>Follow the installation guide for your operating system.</li></ul><p>Install an IDE:</p><ul><li>Use <strong>Android Studio</strong> or <strong>VS Code</strong> for Flutter development.</li><li>Add the Flutter and Dart plugins.</li></ul><p>Set Up an Emulator or Device:</p><ul><li>Create an Android Emulator or connect a physical device via USB.</li></ul><h4><strong>Step 2: Understand the Basics</strong></h4><p><strong>Dart Language:</strong> Flutter uses Dart, a simple and powerful programming language. Start by learning:</p><ul><li>Variables, Functions, Classes.</li><li>Async programming with Future and async/await.</li></ul><p>Explore Dart here: <a href="https://dart.dev/">Dart Documentation</a>.</p><p><strong>Widgets:</strong> Everything in Flutter is a widget. Learn the two types:</p><ul><li><strong>StatelessWidget</strong>: For static UI.</li><li><strong>StatefulWidget</strong>: For UI that changes dynamically.</li></ul><h4>Step 3: Build Your First Flutter App</h4><p>Open your terminal and run:</p><pre>flutter create my_first_app<br>cd my_first_app<br>flutter run</pre><p>Your first app is now running! Explore main.dart to understand the basic structure.</p><h4>Step 4: Learn Through Projects</h4><p>Build small projects to improve your skills:</p><ul><li><strong>To-Do App:</strong> Practice adding, updating, and deleting items.</li><li><strong>Weather App:</strong> Fetch data from an API and display it.</li><li><strong>Portfolio App:</strong> Create a simple personal portfolio.</li></ul><h4>Step 5: Join the Community</h4><p>1.Follow Flutter’s official documentation: Flutter Docs.<br>2.Join forums like:</p><ul><li><a href="https://stackoverflow.com/questions/tagged/flutter">Stack Overflow</a></li><li><a href="https://discord.com/invite/rflutterdev">Flutter Dev Discord</a></li></ul><p>3.Contribute to GitHub projects to learn and grow.</p><h4><strong>Resources</strong></h4><p><a href="https://docs.flutter.dev/get-started/install">https://docs.flutter.dev/get-started/install</a></p><p><a href="https://flutter.dev/">https://flutter.dev/</a></p><p><a href="https://dart.dev/">https://dart.dev/</a></p><h4>Conclusion</h4><p>Starting your Flutter journey as a fresher can feel overwhelming, but with consistent effort and hands-on practice, you’ll quickly realize how beginner-friendly and powerful Flutter is. Its vibrant community, extensive documentation, and versatile capabilities make it the perfect toolkit for freshers to learn and grow as developers. Dive in, stay curious, and start building amazing apps — one widget at a time! 🚀</p><h4>Pro Tip for Freshers</h4><p>Be consistent and focus on hands-on practice. Flutter’s simplicity will help you grow quickly as a developer.</p><p>Happy coding! 🚀 If you found this article helpful, don’t forget to recommend, share it with your peers, and check out my other projects on <a href="https://github.com/Gnanaprakash1999">GitHub</a>. 😊</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=50cf0f30861a" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Implementing Google Sign-In in a Flutter App without Firebase (Android & iOS) via Google Cloud…]]></title>
            <link>https://gnanaprakash1999.medium.com/implementing-google-sign-in-in-a-flutter-app-without-firebase-android-ios-via-google-cloud-5f1f453aeedc?source=rss-da0552335468------2</link>
            <guid isPermaLink="false">https://medium.com/p/5f1f453aeedc</guid>
            <category><![CDATA[mobile-app-development]]></category>
            <category><![CDATA[google-cloud-platform]]></category>
            <category><![CDATA[dart]]></category>
            <category><![CDATA[technology]]></category>
            <category><![CDATA[flutter]]></category>
            <dc:creator><![CDATA[Gnanaprakash]]></dc:creator>
            <pubDate>Fri, 15 Nov 2024 09:52:40 GMT</pubDate>
            <atom:updated>2024-11-15T09:52:40.609Z</atom:updated>
            <content:encoded><![CDATA[<h3>Implementing Google Sign-In in a Flutter App without Firebase (Android &amp; iOS) via Google Cloud Platform</h3><blockquote>Easily implement Google Sign-In in your Flutter app without Firebase. Using Google Cloud directly for authentication, you can enable users to sign in with their Google accounts without adding Firebase dependencies. This setup leverages Google’s secure OAuth 2.0 infrastructure, offering a streamlined and reliable login experience while keeping your app’s configuration lightweight and under your full control.</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*MOF0oogHFf6iAn7SnnG5bw.png" /><figcaption>Flutter-Google SignIn</figcaption></figure><h4>Introduction</h4><p>In this article, we’ll explore how to integrate Google Sign-In in a Flutter app without relying on Firebase. By connecting directly with Google’s authentication services, you can streamline the login process while keeping dependencies light.</p><h4>Step 1: Create a Google Cloud Project</h4><p>Go to the <a href="https://console.cloud.google.com/welcome?project=polar-arbor-441705-e7">Google Cloud Console</a></p><p>Create a new project by clicking on the project dropdown and selecting New Project</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ZFfa13DPwnyOIT6fTRk03Q.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*OYHRk_MsdD7ZvlqxmvaAVw.png" /></figure><h4>Step 2: Configure OAuth consent screen</h4><p>Set up your OAuth consent screen under APIs &amp; Services &gt; OAuth consent screen</p><p>Add necessary scopes, like email and profile</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*PRE8uFZ5W3O8xyTjd1BdUQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2IdKIOMJWxYuk8P5fPjEVQ.png" /></figure><h4>Step 3: Create OAuth Client ID</h4><p><strong>For Android:</strong></p><p>In <strong>APIs &amp; Services &gt; Credentials</strong>, click on <strong>Create Credentials</strong> and select <strong>OAuth Client ID</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ZHFBxWvAPw4TuAQyi8ez0A.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*FhVi87g1GE9oaKTRpz8d_g.png" /></figure><p><strong>Generate and Store Your Keystore File<br>Generate the Keystore</strong>:</p><p>Use the provided command or instructions to generate a keystore file. This file is essential for signing your Android app, and you’ll need it later to publish updates, so make sure to store it securely.</p><p><strong>Move the Keystore</strong>:</p><p>Place the generated keystore file in the /android/app directory of your Flutter project.</p><p><strong>Configure Signing in Gradle</strong>:</p><p>Follow the steps in the <strong>Configure signing in Gradle</strong> section to set up your app’s signing configuration.</p><pre>cd android<br>./gradlew signingReport</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*RByzNuJ6--7fDjV4lCB9JA.png" /></figure><p><strong>For iOS:</strong></p><h4>Setting up Google Sign-In for iOS</h4><p>Setting up Google Sign-In for iOS is relatively simple. Follow these steps:</p><h4>Obtain and Enter the Bundle ID</h4><ol><li>To complete the form, you’ll need to provide the <strong>Bundle ID</strong>:</li></ol><ul><li>Open the ios/Runner/Info.plist file in your project.</li><li>Look for the &lt;key&gt;CFBundleIdentifier&lt;/key&gt; field.</li><li>Copy the corresponding &lt;string&gt; value, which is your <strong>Bundle ID</strong>.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*iCwJ-yt8p8p2z9VWKImNDw.png" /></figure><p><strong>Note:</strong> When your app is published on the App Store, you must return to the iOS Client form in the Google Cloud Console and fill in the App Store ID field. If you don’t, the Google Sign-In feature won’t work.</p><p>Enter this <strong>Bundle ID</strong> in the required field in the Google Cloud Console to configure your iOS OAuth Client ID.</p><p>Next, download the .plist file by clicking the “DOWNLOAD PLIST” button. Rename the downloaded file to GoogleService-Info.plist and place it inside the ios/Runner folder. To make sure the changes are applied, open the terminal and run the following commands:</p><pre>cd ios<br>pod install</pre><p>Running these commands will ensure that the app recognizes the new files and activates the feature. With the setup complete, let’s move on to the code to integrate Google Sign-In into your Flutter app.</p><h4>Step 4: Add Required Packages to Your Flutter Project</h4><p>To enable Google Sign-In, you need the following packages:</p><p>In pubspec.yaml:</p><pre>dependencies:<br>  google_sign_in: ^6.2.2</pre><p>Run:</p><pre>flutter pub get</pre><h4>Step 5: Configure Google Sign-In in Flutter</h4><p>Import and initialize google_sign_in in your Dart code:</p><p><strong>google_signin_api.dart</strong></p><pre>import &#39;package:google_sign_in/google_sign_in.dart&#39;;<br><br>class GoogleSignInApi {<br>  static final _googleSignIn = GoogleSignIn();<br><br>  static Future&lt;GoogleSignInAccount?&gt; login() async {<br>    final user = await _googleSignIn.signIn();<br>    if (user != null) {<br>      print(<br>          &#39;User Name: ${user.displayName} User Email: ${user.email} User Photo URL: ${user.photoUrl}&#39;);<br>    } else {<br>      print(&#39;Sign-in failed or canceled by user.&#39;);<br>    }<br>    return user;<br>  }<br><br>  static Future&lt;void&gt; logout() async {<br>    await _googleSignIn.disconnect();<br>    print(&#39;User signed out.&#39;);<br>  }<br>}</pre><h4>Conclusion</h4><p>Integrating Google Sign-In directly through Google Cloud Platform in Flutter offers a smooth and secure authentication experience without the need for Firebase. By leveraging Google’s OAuth 2.0 for user authentication, you can create a reliable and scalable login system with complete control over the backend. This setup is efficient and keeps dependencies minimal, providing users with seamless access while maintaining flexibility in your app’s architecture. Whether you’re developing a new app or enhancing an existing one, Google Cloud’s authentication solution is a robust, user-friendly alternative for implementing Google Sign-In.</p><p>Enhance your app’s user experience with Google Sign-In integration! 🚀 Follow this guide to add secure, seamless login using Flutter and Google Cloud Platform. Get the complete source code on GitHub: <a href="https://github.com/Gnanaprakash1999/google_siginin_without_firebase">Gnanaprakash1999/google_siginin_without_firebase</a>. If this project helps simplify your development, give it a star ⭐️ on GitHub!</p><p>Did this guide make implementing Google Sign-In easier? Give a virtual high-five! 👏 And don’t forget to share it with other developers — let’s grow together and support each other’s coding journeys.</p><p>Here’s to building amazing apps and reaching new milestones in development. Thanks for reading, and happy coding! 😊</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5f1f453aeedc" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Integrating Google Sign-In with Firebase in a Flutter App (Android & iOS)]]></title>
            <link>https://gnanaprakash1999.medium.com/integrating-google-sign-in-with-firebase-in-a-flutter-app-a22501e9b4c5?source=rss-da0552335468------2</link>
            <guid isPermaLink="false">https://medium.com/p/a22501e9b4c5</guid>
            <category><![CDATA[mobile-app-development]]></category>
            <category><![CDATA[firebase]]></category>
            <category><![CDATA[technology]]></category>
            <category><![CDATA[dart]]></category>
            <category><![CDATA[flutter]]></category>
            <dc:creator><![CDATA[Gnanaprakash]]></dc:creator>
            <pubDate>Wed, 13 Nov 2024 12:31:10 GMT</pubDate>
            <atom:updated>2024-11-15T02:49:43.967Z</atom:updated>
            <content:encoded><![CDATA[<blockquote>Easily implement Google Sign-In in your Flutter app with Firebase. Simplify user authentication by allowing users to sign in with their Google accounts using Firebase’s secure backend. This setup provides a seamless login experience, helping you build trust with your users while avoiding the complexity of managing authentication.</blockquote><h4><strong>Introduction</strong></h4><p>Integrating Google Sign-In with Firebase in Flutter can streamline user authentication in your app, making it easy to log in with a Google account. This step-by-step guide will take you through setting up Firebase and Google Sign-In in your Flutter project using Firebase CLI and FlutterFire CLI, along with configuring essential SHA keys. Here’s a complete overview to get you started.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*DHI4NwSaS93ypUGFjecCaQ.png" /></figure><h4><strong>Step 1: Set Up Firebase CLI</strong></h4><p><strong>Install Firebase CLI:</strong></p><p>Open a terminal and run:</p><p>npm install -g firebase-tools<br>(Note: Requires Node.js)</p><p><strong>Log in to Firebase:</strong><br>Run <strong>firebase login</strong> to sign in to your Firebase account.</p><pre>firebase login</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*rRKCXnRt9sjKS7QwAJndXQ.png" /></figure><h4><strong>Step 2: Create Firebase Project</strong></h4><p><strong>Create a Project in Firebase Console:</strong></p><ul><li>Go to the <a href="https://console.firebase.google.com/">Firebase Console</a>.</li><li>Click Add Project and follow the steps to create a new project.</li></ul><p><strong>Add Firebase to Android &amp; iOS:</strong></p><p>In your Firebase project, click on Project Overview &gt; Add app.<br>For Android:<br> Register the app by adding the Android package name.<br>For iOS:<br> Register with your iOS bundle ID.</p><h4><strong>Step 3: Set Up FlutterFire CLI</strong></h4><p><strong>Install FlutterFire CLI:</strong></p><p>Run the command:</p><pre>dart pub global activate flutterfire_cli</pre><p>Configure FlutterFire:<br> In your Flutter project’s root directory, run:</p><pre>flutterfire configure</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*CFmK6GJ8EO425lY8U2Jwbw.png" /></figure><p>Follow the prompts to select the Firebase project and platforms. After setup, the <strong>firebase_options.dart</strong> file is generated.</p><h4><strong>Step 4: Install Firebase and Google Sign-In Packages</strong></h4><p>Add Firebase Core and Auth Dependencies:<br>Run:</p><pre>flutter pub add firebase_core<br><br>flutter pub add firebase_auth<br><br>flutter pub add google_sign_in</pre><p>Initialize Firebase in Your App:</p><pre>void main() async {<br>WidgetsFlutterBinding.ensureInitialized();<br>await Firebase.initializeApp(<br>options: DefaultFirebaseOptions.currentPlatform,<br> );<br>runApp(MyApp());<br>}</pre><h4><strong>Step 5: Configure SHA-1 and SHA-256 Keys for Android</strong></h4><p>Generate SHA-1 Key:<br>Run the following command (on Windows, change ~/.android/debug.keystore to %USERPROFILE%\.android\debug.keystore):</p><pre>keytool -list -v -alias androiddebugkey -keystore ~/.android/debug.keystore</pre><p>Use the SHA-1 or SHA-256 from the output.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*THIfSRafwlpkd9N2eDrnmQ.png" /></figure><p>Add SHA Key to Firebase:</p><p>In Firebase Console, go to Project Settings &gt; Android App and add your SHA key under SHA certificate fingerprints.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*dmbc6TebEDWoG6n35PEWJw.png" /></figure><h4><strong>Step 6: Set Up Google Sign-In</strong></h4><p><strong>Configure Firebase Console for Google Sign-In:</strong></p><ul><li>Go to Authentication &gt; Sign-in Method in Firebase Console.</li><li>Enable Google as a sign-in provider.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*L9XuidqiosnjoH1Hs-uX9w.png" /></figure><h4><strong>Step 7: Implement Google Sign-In in Flutter</strong></h4><p><strong>Create the Google Sign-In Button:</strong><br>Add a button in the Flutter widget to trigger Google sign-in</p><pre>static Future&lt;User?&gt; loginWithGoogle() async {<br>   final googleAccount = await GoogleSignIn().signIn();<br>   if (googleAccount == null) {<br>     return null; // User canceled the login<br>   }<br>   final googleAuth = await googleAccount.authentication;<br>   final credential = GoogleAuthProvider.credential(<br>     accessToken: googleAuth.accessToken,<br>     idToken: googleAuth.idToken,<br>   );<br>   final userCredential = await FirebaseAuth.instance.signInWithCredential(<br>     credential,<br>   );<br>   // Update static user to reflect the logged-in user<br>   user = FirebaseAuth.instance.currentUser;<br>   return user;<br> }</pre><h4><strong>Step 8: For iOS</strong></h4><ul><li>Ensure you’ve added your iOS app to your Firebase project and downloaded the GoogleService-Info.plist file.</li><li>Place GoogleService-Info.plist in the ios/Runner directory of your Flutter project.</li></ul><p><strong>Ensure Minimum iOS Deployment Target:<br></strong>Set your platform version to at least 13.0 in ios/Podfile:</p><pre>platform :ios, &#39;13.0&#39;</pre><p><strong>Add the following in info.plist</strong></p><pre><br>&lt;!-- Put me in the [my_project]/ios/Runner/Info.plist file --&gt;<br>&lt;!-- Google Sign-in Section --&gt;<br>&lt;key&gt;CFBundleURLTypes&lt;/key&gt;<br>&lt;array&gt;<br> &lt;dict&gt;<br>  &lt;key&gt;CFBundleTypeRole&lt;/key&gt;<br>  &lt;string&gt;Editor&lt;/string&gt;<br>  &lt;key&gt;CFBundleURLSchemes&lt;/key&gt;<br>  &lt;array&gt;<br>   &lt;!-- TODO Replace this value: --&gt;<br>   &lt;!-- Copied from GoogleService-Info.plist key REVERSED_CLIENT_ID --&gt;<br>   &lt;string&gt;com.googleusercontent.apps.861823949799-vc35cprkp249096uujjn0vvnmcvjppkn&lt;/string&gt;<br>  &lt;/array&gt;<br> &lt;/dict&gt;<br>&lt;/array&gt;<br>&lt;!-- End of the Google Sign-in Section --&gt;</pre><h4><strong>Full code:</strong></h4><h4><strong>user_controller.dart</strong></h4><pre>import &#39;package:firebase_auth/firebase_auth.dart&#39;;<br>import &#39;package:google_sign_in/google_sign_in.dart&#39;;<br><br>class UserController {<br>  static User? user = FirebaseAuth.instance.currentUser;<br><br>  static Future&lt;User?&gt; loginWithGoogle() async {<br>    final googleAccount = await GoogleSignIn().signIn();<br>    if (googleAccount == null) {<br>      return null; // User canceled the login<br>    }<br><br>    final googleAuth = await googleAccount.authentication;<br><br>    final credential = GoogleAuthProvider.credential(<br>      accessToken: googleAuth.accessToken,<br>      idToken: googleAuth.idToken,<br>    );<br><br>    final userCredential = await FirebaseAuth.instance.signInWithCredential(<br>      credential,<br>    );<br><br>    // Update static user to reflect the logged-in user<br>    user = FirebaseAuth.instance.currentUser;<br><br>    return user;<br>  }<br><br>  static Future&lt;void&gt; signOut() async {<br>    await FirebaseAuth.instance.signOut();<br>    await GoogleSignIn().signOut();<br><br>    // Reset static user<br>    user = null;<br>  }<br>}</pre><h4><strong>login_page.dart</strong></h4><pre>import &#39;package:firebase_auth/firebase_auth.dart&#39;;<br>import &#39;package:flutter/material.dart&#39;;<br>import &#39;package:flutter_signin/controller/user_controller.dart&#39;;<br>import &#39;home_page.dart&#39;;<br><br>class LoginPage extends StatefulWidget {<br>  const LoginPage({super.key});<br><br>  @override<br>  State&lt;LoginPage&gt; createState() =&gt; _LoginPageState();<br>}<br><br>class _LoginPageState extends State&lt;LoginPage&gt; {<br>  @override<br>  Widget build(BuildContext context) {<br>    final textTheme = Theme.of(context).textTheme;<br>    return Scaffold(<br>      body: SafeArea(<br>        minimum: const EdgeInsets.all(20),<br>        child: Center(<br>          child: Column(<br>            crossAxisAlignment: CrossAxisAlignment.center,<br>            mainAxisAlignment: MainAxisAlignment.center,<br>            children: [<br>             <br>         <br>              /**/<br>              FilledButton.tonalIcon(<br>                onPressed: () async {<br>                  try {<br>                    final user = await UserController.loginWithGoogle();<br>                    if (user != null &amp;&amp; mounted) {<br>                      Navigator.of(context).pushReplacement(MaterialPageRoute(<br>                          builder: (context) =&gt; const HomePage()));<br>                    }<br>                  } on FirebaseAuthException catch (error) {<br>                    print(error.message);<br>                    ScaffoldMessenger.of(context).showSnackBar(SnackBar(<br>                        content: Text(<br>                      error.message ?? &quot;Something went wrong&quot;,<br>                    )));<br>                  } catch (error) {<br>                    print(error);<br>                    ScaffoldMessenger.of(context).showSnackBar(SnackBar(<br>                        content: Text(<br>                      error.toString(),<br>                    )));<br>                  }<br>                },<br>                icon:  Icon(Icons.login_rounded),<br>                label: const Text(&quot;Continue with Google&quot;),<br>              )<br>            ],<br>          ),<br>        ),<br>      ),<br>    );<br>  }<br>}</pre><h4><strong>home_page.dart</strong></h4><pre>import &#39;package:flutter/material.dart&#39;;<br>import &#39;package:flutter_signin/controller/user_controller.dart&#39;;<br>import &#39;package:flutter_signin/pages/login_page.dart&#39;;<br><br>class HomePage extends StatefulWidget {<br>  const HomePage({super.key});<br><br>  @override<br>  State&lt;HomePage&gt; createState() =&gt; _HomePageState();<br>}<br><br>class _HomePageState extends State&lt;HomePage&gt; {<br>  @override<br>  Widget build(BuildContext context) {<br>    return Scaffold(<br>      body: Center(<br>        child: Column(<br>          mainAxisAlignment: MainAxisAlignment.center,<br>          children: [<br>            CircleAvatar(<br>              radius: 40,<br>              foregroundImage: UserController.user?.photoURL != null <br>                  ? NetworkImage(UserController.user!.photoURL!)<br>                  : null,<br>              child: UserController.user?.photoURL == null <br>                  ? const Icon(Icons.person, size: 40)<br>                  : null,<br>            ),<br>            Text(UserController.user?.displayName ?? &#39;GuestUser&#39;),<br>             Text(UserController.user?.email ?? &#39;Email&#39;),<br>             <br>            ElevatedButton(<br>              onPressed: () async {<br>                await UserController.signOut();<br>                if (mounted) {<br>                  Navigator.of(context).pushReplacement(MaterialPageRoute(<br>                    builder: (context) =&gt; const LoginPage(),<br>                  ));<br>                }<br>              },<br>              child: const Text(&quot;Logout&quot;),<br>            ),<br>          ],<br>        ),<br>      ),<br>    );<br>  }<br>}</pre><h4><strong>main.dart</strong></h4><pre>import &#39;package:firebase_core/firebase_core.dart&#39;;<br>import &#39;package:flutter/material.dart&#39;;<br>import &#39;package:flutter_signin/controller/user_controller.dart&#39;;<br>import &#39;package:flutter_signin/firebase_options.dart&#39;;<br>import &#39;package:flutter_signin/pages/home_page.dart&#39;;<br>import &#39;package:flutter_signin/pages/login_page.dart&#39;;<br><br>void main() async {<br>  WidgetsFlutterBinding.ensureInitialized();<br>  await Firebase.initializeApp(options: DefaultFirebaseOptions.currentPlatform);<br>  runApp(const MainApp());<br>}<br><br>class MainApp extends StatelessWidget {<br>  const MainApp({super.key});<br><br>  @override<br>  Widget build(BuildContext context) {<br>    return MaterialApp(<br>      debugShowCheckedModeBanner: false,<br>    <br>      home: UserController.user != null ? const HomePage() : const LoginPage(),<br>    );<br>  }<br>}<br><br></pre><p><strong>Resources</strong></p><p>1. Firebase CLI:<a href="https://firebase.google.com/docs/cli"> https://firebase.google.com/docs/cli</a></p><p>2. FlutterFire CLI:<a href="https://www.youtube.com/redirect?event=video_description&amp;redir_token=QUFFLUhqa2dURTBvZnlkRzFMa3JNRVNUcWg5a3Nsc2ZNUXxBQ3Jtc0tsMm9EczdXUFVyT1F0T3hYal9Yc3Nwc0w5MENvN2piNFJnclRHTXU1LUhVbVV5UmFUOWlfaU41cFh0Tk1veG1zR0dZXzE4d0M0RXIwUkhWRTNiV0NFOGttWUE1UUJwUWZtSnBoZ1BjU2RqdWUwUEduTQ&amp;q=https%3A%2F%2Ffirebase.google.com%2Fdocs%2Fflutter%2Fsetup%3Fplatform%3Dios&amp;v=PkvW5WoUonQ"> </a><a href="https://firebase.google.com/docs/flutter/setup?platform=ios">https://firebase.google.com/docs/flutter/setup?platform=ios</a></p><p>3. Google Sign-In Package:<a href="https://www.youtube.com/redirect?event=video_description&amp;redir_token=QUFFLUhqbDB2OTZpMUh4bVhHRkxzSDlaYkV2QVJXd1Nvd3xBQ3Jtc0ttVXh4UlI1enVyR3UxTC05NXFoS0VJbXpYU0pQQllEMnZ5RjEzcGpYMFlqUk1BM0MyOEVSRzZVVWhPaExtaHBKRTZCZEc5MmMwYnpQSU01OF93QkE5R0xwM19sQzNvOFlraDNBcHg4UDNRb0xTNGw0RQ&amp;q=https%3A%2F%2Fpub.dev%2Fpackages%2Fgoogle_sign_in&amp;v=PkvW5WoUonQ"> </a><a href="https://pub.dev/packages/google_sign_in">https://pub.dev/packages/google_sign_in</a></p><p>4. SHA COMMAND: <a href="https://developers.google.com/android/guides/client-auth">https://developers.google.com/android/guides/client-auth</a></p><h4><strong>Conclusion</strong></h4><p>Integrating Google Sign-In with Firebase in Flutter allows you to provide a smooth and secure authentication experience for your users. By leveraging Firebase’s robust backend and the ease of Google Sign-In, you can quickly implement a reliable login system that scales with your app. The setup process is straightforward, and once completed, you can enhance user engagement by offering seamless authentication. Whether you’re building a new app or enhancing an existing one, Google Sign-In offers an efficient and user-friendly solution.</p><p>Boost your app’s user experience with Google Sign-In integration! 🚀 Jump into this project to add secure, seamless login using Firebase and Flutter. Check out the complete source code on GitHub: [Gnanaprakash1999/google_signin](<a href="https://github.com/Gnanaprakash1999/google_siginin.git">https://github.com/Gnanaprakash1999/google_signin.git</a>). If this project smooths out your coding journey, don’t forget to star it ⭐️ on GitHub!</p><p>Did this guide help you simplify the sign-in process? Give a virtual high-five! 👏 And share it with fellow devs to spread the knowledge — we’re all in this together!</p><p>Let’s keep building awesome apps and pushing the boundaries of what’s possible. Here’s to successful coding and future accomplishments! 😊</p><p>Thanks for taking the time to read this article!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a22501e9b4c5" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>