Top Flutter Packages
Aug 9, 2022
Guest User
Flutter
Top Packages
Engineering
Summary
A key aspect of Flutter development involves using packages, which are collections of related classes and interfaces that provide additional functionality. This article highlights some of the most popular Flutter packages, including firebase_auth for user authentication, font_awesome_flutter for icons, firebase_messaging for cloud messaging, and more.
Key insights:
firebase_auth: Simplifies user authentication with Google's system using JSON Web Tokens (JWT) for security.
font_awesome_flutter: Provides a comprehensive set of free icons for use in Flutter applications.
firebase_messaging: Enables sending messages to users across Android and iOS without requiring app downloads.
sqflite: Offers a lightweight SQL database engine with support for transactions, version management, and background thread execution.
google_fonts: Allows the use of Google Fonts, offering various styles and caching options for efficient font management.
flutter_spinkit: A collection of animated loading indicators for cross-platform use.
firebase_crashlytics: Provides real-time crash reporting and analytics to help developers identify and fix issues.
riverpod: A state-management library that ensures compile-time error checking and testable code.
What is Flutter?
Flutter is a mobile application framework developed by Google. It was released in 2017 and is based on Dart programming language. Flutter makes use of native widgets and provides a smooth user experience. It's a cross-platform technology that works across Android, iOS, macOS, Linux, and Windows.
What are Packages?
Flutter is a Software development kit that contains a set of tools that allow you to complete app development. These tools include libraries, APIs, Sample Applications, development utilities, and packages. A package is a namespace that organizes a set of related classes and interfaces.
We will be taking a look at some of the most popular Flutter packages in this article.
firebase_auth
Firebase Auth is a library for authenticating users using Google's authentication system. Firebase Auth is designed to work with any backend server-side API that supports OAuth 2.0 (e.g., REST APIs, GraphQL APIs, etc.). Firebase Auth provides a simple way to sign in and out of your app without having to manage user accounts yourself.
Firebase Auth makes it easy to get started with authentication and authorization in your apps. Firebase Auth is compatible with both iOS and Android platforms. Firebase Auth uses JSON Web Tokens (JWT) for security. Firebase Auth is open sourced under the Apache License v2.0. Firebase_auth is installed via the following line:
$ flutter pub add firebase_auth
font_awesome_flutter
Font Awesome is a free web font designed to be used in conjunction with HTML. The Font Awesome Icon pack is available as a set of Flutter Icons and includes all free icons:
Regular
Solid
Brands
In order to install this package, enter the following line in your command prompt:
$ flutter pub add font_awesome_flutter
firebase_messaging
Firebase Cloud Messaging (or FCM) is Google's cloud messaging service. It provides a way to send messages to users without having them download any apps. Instead, they receive notifications via the web browser. It is free to use, and it works across both Android and iOS devices.
Firebase_messaging is a plugin that lets you use the Firebase Cloud Messaging API in Flutter. In order to install the package, you need to input the following code:
$ flutter pub add firebase_messaging
sqflite
SQLite is a lightweight, fast, and powerful SQL database engine written in C++. sqflite is an SQLite plugin for Flutter and supports iOS, Android and macOS. Its features include:
Support transactions and batches
Automatic version management during open
Helpers for insert/query/update/delete queries
DB operation executed in a background thread on iOS and Android
In order to install this package, enter the following line of code in the command prompt:
$ flutter pub add sqflite
google_fonts
Google Fonts is a free service offered by Google that provides access to over 100 different typefaces (fonts) to use in web design. You can choose from hundreds of different styles, including serif, script, display, and decorative fonts. These fonts are compatible with any browser and operating system.
google_fonts is a Flutter package that lets you use Google fonts for free. Its additional features are:
HTTP fetching at runtime, ideal for development. Can also be used in production to reduce app size
Font file caching, on the device file system
Font bundling in assets. Matching font files found in assets are prioritized over HTTP fetching. Useful for offline-first apps.
Installing google_fonts requires the following instructions:
$ flutter pub add google_fonts
flutter_spinkit
flutter_spinkit is a collection of loading indicators animated with flutter. Heavily inspired by @tobiasahlin's SpinKit. The package is compatible with Android, iOS, macOS, Windows, and Linux devices. Installing the package from pub.dev requires you to input this in your command line:
$ flutter pub add flutter_spinkit
firebase_crashlytics
Firebase Crashlytics is a free service that helps developers detect crashes in their apps. It provides real-time crash reporting and analytics, helping them identify issues before users do. Using firebase_crashyltics 2.8.6, you can use the Crashlytics API for app development. You must add the below code in your terminal to install this package:
$ flutter pub add firebase_crashlytics
riverpod
riverpod is a state-management library that catches programming errors at compile time rather than at runtime. It removes nesting for listening and combining objects and ensures that the code is testable. To begin using the package, type the following in your command line:
$ flutter pub add riverpod