There are a lot of amazing packages in Flutter that make development simple and fun for developers. They are helpful for easy development and can save you a lot of time. This post does not contain all the important packages, so this will be a series.
This is a package that aids in opening a given URL through predefined schemes and performs various functions from it in a mobile application. Supports Android, iOS, web, Windows, Linux, and macOS.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
import 'package:flutter/material.dart';
import 'package:url_launcher/url_launcher.dart';
void main() {
runApp(Scaffold(
body: Center(
child: RaisedButton(
onPressed: _launchURL,
child: Text('Show Flutter homepage'),
),
),
));
}
_launchURL() async {
const url = 'https://flutter.dev';
if (await canLaunch(url)) {
await launch(url);
} else {
throw 'Could not launch $url';
}
}
The full documentation can be found here.
Dio is a robust HTTP client for Dart that supports FormData, Global configuration, timeout, file loading, Request Cancellation, Downloading, interceptors, and more.
Most Flutter developers use the HTTP package to achieve this but DIO is more complete and works better.
1 2 3 4 5 6 7 8 9 10
import 'package:dio/dio.dart'; void getHttp() async { try { var response = await Dio() .get('http://www.google.com'); print(response); } catch (e) { print(e); } }
The full documentation can be found here.
This is a straightforward service locator for Dart and Flutter projects for certain extra treats profoundly enlivened by Splat. It tends to be utilized rather than InheritedWidget or Provider to get to objects, for example, from your UI.
Typical usage:
Accessing objects like REST API clients or databases
Accessing View/AppModels/Managers/BLoCs from Flutter Views
The full documentation can be found here.
This is an amazing Flutter graph library, presently supporting line charts, bar charts, pie charts, scatter charts, and radar charts.
It also provides impressive packages and parameters to customize the look and feel of the graphs to develop data-intensive apps with features like drawing graphics, filtering, and analytics.
The full documentation can be found here.
This is a Flutter package for making responsive screens and font dimensions. It allows your UI to show a sensible design on various screen sizes.
This package changes only the original widget, like “container” and applies a fluctuation to make this calculation.
The full documentation can be found here.
This package helps to generate global identifiers that are unique across space and time.
1 2 3 4 5 6 7 8 9 10 11 12 13
import 'package:uuid/uuid.dart'; var uuid = Uuid(); // Generate a v1 (time-based) id uuid.v1(); // -> '6c84fb90-12c4-11e1-840d-7b25c5ee775a' // Generate a v4 (random) id uuid.v4(); // -> '110ec58a-a0f2-4ac4-8393-c866d813b8d1' // Generate a v5 (namespace-name-sha1-based) id uuid.v5(Uuid.NAMESPACE_URL, 'www.google.com'); // 'c74a196f-f19d-5ea9-bffd-a2742432fc9c'
The full documentation can be found here.
The google_fonts package for Flutter contains more than 977 fonts (and their variants) from fonts.google.com which can be used directly without importing any font in your Flutter app.
The full documentation can be found here.
A Flutter library that can be used to load images from the Internet and keep them in a cache directory which can be viewed later without reloading.
1 2 3 4 5
CachedNetworkImage( imageUrl: "http://via.placeholder.com/350x150", placeholder: (context, url) => CircularProgressIndicator(), errorWidget: (context, url, error) => Icon(Icons.error), ),
The full documentation can be found here.
Hive storage 🍯 is a super lightweight NoSQL real-time database written on Dart. It is faster compared to Shared Preferences or SQLite databases.
🚀 Cross-platform include mobile, desktop, browser
⚡ Awesome performance
❤️ Simple, powerful, intuitive API
🔒 Strong built-in encryption
🎈 No native dependencies
🔋 Saves batteries
The full documentation can be found here.
CHECK OUT TOPCODER FLUTTER FREELANCE GIGS