Flutter Cheat Sheet



“flutter widgets cheat sheet” Code Answer. Flutter text cheatsheat. Dart by Itchy Impala on Aug 27 2020 Donate. Hi, my name is Shivam, This is a flutter tutorial for beginners, some useful flutter commands or cli commands that a developer should know or you can say flutter commands cheat sheet.These list of flutter commands executed on command prompt. NOTE: There are still some commands left which will be updated soon in this article.If you feel any change required in this article please comment below.

Flutter Firebase Cheat Sheet covers firebase service for the rapid development of flutter applications such as Authentication, posting data and retrieving data from cloud firestore, Uploading an image(cloud storage) on firebase and Push notification(device to device and topic subscription) by firebase messaging.

This cheatsheet is based on an internal document created by Googler Mehmet Fidanboylu to help Google engineers remember the syntax for some of Dart’s commonly used features. Inspired by PdfViewerPlugin 😇 Wrapped around AndroidPdfViewer on Android. Add pdfflutteron pubspec.yml dependencies: pdfflutter: ^version 2. For Full PDF Dart cheat Sheet click me Flutter is google UI toolkit for building apps for desktops,mobiles,web and watches.Flutter has 95+K starts on GitHub and his popularity increases day by day.Many contributors contribute code in Flutter to resolve all the GitHub issues.

Firebase is a development platform created by firebase which is currently managed google. firebase provides a variety of tools and services for rapid development.

We have to set up firebase SDK in flutter before using any of its services. create new Firebase project then select android plate form.

SheetFlutter Cheat Sheet

Enter app package name copy it from android/app/src/main/AndroidManifest.xml you can also give app nickname that is totally optional. but make sure of entering SHA-1 as it’s required for authentication. you can get your SHA-1 just copy the below code in the terminal for more details(client-auth).

1Flutter Firebase Authentication
1.1Email And Password-based Authentication
4Firebase Push notification(Cloud Messaging)

Mac/Linux

Windows

Download google_services.json

Flutter Firebase Authentication

Authentication is required to be implemented in most of the applications for authorizing users to access flutter screens. firebase gives a variety of authentication options. In this blog email, password and phone authentication.

Add dependencies: firebase_auth: in pubspec.yaml file then install it by flutter pub get in your terminal and import ‘package:firebase_auth/firebase_auth.dart’; in your dart file.more detail(https://pub.dev/packages/firebase_auth#-installing-tab-)

Email And Password-based Authentication

Register User

Flutter Layout Cheat Sheet

Login user

Flutter Column Cheat Sheet

Flutter Firebase Phone Authentication

Firebase phone authentication is the most common way for authenticating users. flutter firebase phone authentication is easy to implement.

Check current user detail

Flutter Firebase Cloud firestore

Cheat

Firebase gives you the power of storing data in NoSQL formate.in cloud firestore we can perform complex Querys such as AND, OR, EQUAL TO very easily. data can be added modified or deleted in Flutter FirebaseCloud Firestore in realtime.

Flutter Cheat Sheet

Add dependencies: cloud_firestore: in pubspec.yaml file then install it by flutter pub get in your terminal and import‘package:cloud_firestore/cloud_firestore.dart’;in your dart file more detail(cloud_firestore).

Add data

  • Update data
  • Delete data
  • Fetch data

Check if data exists in cloudfirestore!

Flutter Firebase Storage

Flutter flex layout

For storing files in firebase provided its own storing services. In this Flutter Firebase Storage we will see how we can store the image in firebase storage for that we have to use one more plugin to get a file path either from the camera or gallery of the phone.

upload.dart

FirebasePush notification(Cloud Messaging)

We can send app notifications in a flutter by using a firebase cloud messaging service in a flutter. In this, we will see how we can send notifications from one device to another ie. device to device notification and notification with a topic subscription. we also need the Server key of cloud messaging you can get it from project settings in the cloud messaging tab.

Device to device notification

Flutter Widgets Cheat Sheet Pdf

Before sending notification from one device to other we need to store the token in the database.

Flutter Cheat Sheet Pdf

Topic Subscription

Flutter Mainaxisalignment

In topic subscription, we need to subscribe to a topic then send a notification on that topic added by the device.