A library is a collection of functions that help with a lot of coding in a simple way, just by adding them to your code.
In this article, we will discuss 20 of the most useful and commonly used libraries that many developers enjoy, as you should know if you work on FLUTTER development. And all of these are available on Android and IOS.
1. Google Map
Most applications today require Google Maps, and this library gives you many of the services you need in a Google Maps application. You can even customize it your own way.
GoogleMap( mapType: MapType.hybrid, initialCameraPosition: _kGooglePlex, onMapCreated: (GoogleMapController controller) { _controller.complete(controller); },),Copy the code
2.url_launcher
This library allows you to launch urls into your Web browser, and they also support launching your native mode urls, such as phone calls, SMS, email, etc.
_launchURL() async {
const url = 'https://flutter.dev'; if (await canLaunch(url)) { await launch(url); } else { throw 'Could not launch $url’;
}
}
Copy the code
3.Firebase packages (FlutterFire)
This is not a single library, it is a collection of libraries that Firebase supports for your FLUTTER application.
We use Firebase in our applications to implement many different methods, such as messaging, databases, and so on.
So here you can find all of these things according to your requirements, and it provides a separate library for that.
4.Provider
State management is an important part of our application, and providers provide the current data model where we currently need it.
Providers are wrappers around inheritedWidgets and can be used more easily with less boilerplate code.
Provider is the most basic type of Provider widget. You can use it to provide values (typically data model objects) for any location in the Widget tree. However, when this value changes, it does not help you update the Widget tree.
5.Bloc
This is also a state management library. Bloc(Business Logic Component) design pattern, which is something similar to the MVVM pattern.
Bloc Widget is the basic component you need to implement all your business logic. To use it, extend the Bloc class and rewrite the mapEventToState and initialState methods.
6.Getx
It is also a state management library. GetX provides a combination of state management, dependency injection, and route management solutions that work well together.
GetX is an ultra-light and powerful solution for Flutter. It combines high performance state management, intelligent dependency injection, and route management in a fast and practical way.
7.ReduX
Redux for Dart uses generics for typed state. It contains a rich ecosystem of documentation, middleware, development tools, and can be combined with Flutter using the Flutter_redux package.
8.Rxdart
RxDart is a reactive functional programming library for the Dart language, based on ReactiveX.
It is also a library of state management solutions.
9.Location
It provides a callback when the position changes. We can easily manage our application in maps and other uses, we need the current location, and if the user’s location changes, then our application updates in real time without having to call functions over and over again.
10.Device_info
We can obtain current device information from the Flutter application. This means they provide information about your device, such as operating system version, name, and so on.
11.Sqflite
It provides local database storage, just like we do with Sqlite in Android.
It is primarily used for local storage and provides a solution for the creation and storage of large tables.
12.Cached network image
A FLUTTER library that displays images from the Internet and stores them in a cache directory.
The main purpose of this library is that you can only load an image once, after which the library stores it in the cache. So you don’t have to load it over and over again.
13.SharedPreferences
Shared Preferences are used to store data key-value pairs locally without much code structure or table creation.
If you know android’s shared-preferences, you’ll see that the library is the same.
14.Intl
This package provides internationalization and localization facilities, including message translation, number and gender, date/number formatting and parsing, and bidirectional text.
15.Path provider
A plugin for Flutter to find common locations on file systems. Supports iOS, Android, Linux, and macOS. Not all platforms support all methods.
16.Google fonts
The Google_Fonts package for Flutter allows you to easily use any of the 977 fonts (and their variants) from Fonts.google.com in Flutter applications.
17.charts_flutter
This plugin provides various types of chart structures in your Flutter project, such as bar charts, line charts, circle charts, etc.
18.Package info
The Flutter plugin is used to query information about application packages, such as CFBundleVersion on iOS or versionCode on Android.
The plug-in provides details about the device (make, model, and so on) and the Android or iOS version running the application.
19.Share
This Flutter plugin is used to share content via platform shared UI, using ACTION_SEND intent on Android and UIActivityViewController on iOS.
20.Dio
The DIO plugin is a powerful HTTP client for Dart, supporting interceptors, FormData, request cancellations, file downloads, timeouts, and more.
Original text: shirsh94.medium.com/20-flutter-…
By Shirsh Shukla