Posts
Integrating Google Sign-In
- Get link
- X
- Other Apps
By
FlutterTute
-
Firstly add google_sign_in dependencies in your pubspac.yaml file Then add internet permission in your androidManifest.xml file Then write your code in main.dart import 'package:flutter/material.dart' ; import 'package:google_sign_in/google_sign_in.dart' ; GoogleSignIn _googleSignIn = GoogleSignIn(scopes: [ 'profile' , 'email' ]); void main() => runApp(MaterialApp( debugShowCheckedModeBanner: false , title: 'Google Sign in' , home: SignInDemo(), )); class SignInDemo extends StatefulWidget { @override _SignInDemoState createState() => _SignInDemoState(); } class _SignInDemoState extends State<SignInDemo> { GoogleSignInAccount _currentUser; @override void initState() { super .initState(); _googleSignIn.onCurrentUserChanged.listen((GoogleSignInAccount account){ setState(() { ...
Firebase Authentication - Google Login
- Get link
- X
- Other Apps
By
FlutterTute
-
Swipe Refresh Activity
- Get link
- X
- Other Apps
By
FlutterTute
-
Implement swipe to dismiss The “swipe to dismiss” pattern is common in many mobile apps. For example, when writing an email app, you might want to allow a user to swipe away email messages to delete them from a list. Flutter makes this task easy by providing the Dismissible widget. Learn how to implement swipe to dismiss with the following steps: Create a list of items. Wrap each item in a Dismissible widget. Provide “leave behind” indicators. 1. Create a list of items First, create a list of items. For detailed instructions on how to create a list, follow the Working with long lists recipe. Create a data source In this example, you want 20 sample items to work with. To keep it simple, generate a list of strings. content_copy final items = List < String >. generate ( 20 , ( i ) => "Item ${i + 1} " ); Convert the data source into a list Display each item in the list on screen. Users won’t be ab...
EditText with TextWatcher (Searching data from ListView)
- Get link
- X
- Other Apps
By
FlutterTute
-