A curated list of awesome Flutter packages.
A curated list ? of awesome ? Flutter packages. These are some of the most valuable gems ? of the Flutter community.
Is your favourite ? package missing? Let me know or create a pull request...
Please read the contribution guidelines before opening a pull request ?
A Flutter plugin that provides a WebView widget on Android and iOS.
On iOS the WebView widget is backed by a WKWebView
; On Android the WebView widget is backed by a WebView
.
Flutter widget that automatically resizes text to fit perfectly within its bounds.
Easy to use splash screen package.
Lets you place headers on scrollable content that will stick to the top of the container whilst the content is scrolled.
Flutter plugin to implement a beautiful and dynamic Material Design Speed Dial, with labels, animated icons and hide on scrolling.
An animated Bottom Navigation Bar for Flutter apps, icon animates into place, colors are customisable.
Simplifying the use of both Material and Cupertino widgets with a single widget.
PlatformWidget(
ios: (_) => Icon(CupertinoIcons.flag),
android: (_) => Icon(Icons.flag),
);
PlatformButton(
onPressed: () => print('send'),
child: PlatformText('Send'),
);
PlatformAlertDialog(
title: Text('Alert'),
content: Text('Some content'),
actions: <Widget>[
PlatformDialogAction(),
PlatformDialogAction(),
],
);
etc.
A beautiful and custom refresh indicator with some cool animations and transitions for flutter.
Flutter tags let you create a list of tags or insert them dynamically with the input.
BubbleBottomBar is a Flutter widget designed by cubertodesign and developed by westdabestdb.
Simple folding cell widget implemented in Flutter. Its a widget so add it to any container widget as a child.
A fluid design slider that works just like the Slider material widget.
Small cozy library that allows you to make snappable list views.
Clean, minimalistic and collaboration-ready rich text editor for Flutter.
ListView with items that can be scrolled infinitely in both directions.
A scrollbar that can be dragged for quickly navigating through a vertical list. Additionally it can show a label next to the scrollthumb with information about the current item.
A platform agnostic Flutter package for showing passcode input screen, similar to Native iOS. Screen customizable with a colors, sizes, fonts etc.
A Material Flutter Button that supports progress and error visuals.
A Flutter stepper widget with nice aniamtion.
A Flutter staggered grid view which supports multiple columns with rows of varying sizes.
A collection of loading indicators animated with flutter.
A package provides an easy way to add shimmer effect in Flutter project.
This package gives you beautiful page transitions.
A flutter package project which contains a collection of cool and beautiful text animations.
Composite together any animation with this robust and simple to use package.
A component that provides flip card animation. It could be used for hide and show details of a product.
Widget for displaying waves with custom color, duration, floating and blur effects.
SpriteWidget is a toolkit for building complex, high performance animations and 2D games with Flutter. Your sprite render tree lives inside a widget that mixes seamlessly with other Flutter and Material widgets. You can use SpriteWidget to create anything from an animated icon to a full fledged game.
Page transitions with just a few lines of code. What are heroes without villains?
Fluttie allows you to easily display stunning Lottie animations in flutter.
Hidden Drawer Menu is a library for adding a beautiful drawer mode menu feature with perspective animation.
A package for flip panel with built-in animation.
An dart-only library for gradually painting SVG path objects on canvas (drawing line animation).
A custom wave progress widget.
This package lets you create path tween animations. In other words, it lets you morph one path into another.
Tis is a pure Flutter and Dart package that allows you to convert text (both characters and icons) into paths and animate them.
A minimalist Flutter game engine, provides a nice set of somewhat independent modules you can choose from.
import 'package:flame/components/component.dart';
Sprite sprite = new Sprite('player.png');
const size = 128.0;
final player = new SpriteComponent.fromSprite(size, size, sprite); // width, height, sprite
player.x = ... // 0 by default
player.y = ... // 0 by default
player.angle = ... // 0 by default
// on your render method...
player.render(canvas);
A Flutter plugin for iOS and Android for picking images from the image library, and taking new pictures with the camera.
A flutter library to show images from the internet and keep them in the cache directory.
CachedNetworkImage(
imageUrl: "http://via.placeholder.com/350x150",
placeholder: (context, url) => CircularProgressIndicator(),
errorWidget: (context, url, error) => Icon(Icons.error),
)
Provides server and web apps the ability to load, manipulate, and save images with various image file formats including PNG, JPEG, GIF, WebP, TIFF, TGA, PSD, PVR, and OpenEXR.
Image image = decodeImage(Io.File('test.webp').readAsBytesSync());
// Resize the image to a 120x? thumbnail (maintaining the aspect ratio).
Image thumbnail = copyResize(image, 120);
// Save the thumbnail as a PNG.
Io.File('thumbnail.png')
..writeAsBytesSync(encodePng(thumbnail));
A Flutter plugin for Android and iOS supports cropping images.
An advanced image provider provides caching and retrying for flutter app. Now with zoomable widget and transition to image widget
Image(
image: AdvancedNetworkImage(
url,
header: header,
useDiskCache: true,
cacheRule: CacheRule(maxAge: const Duration(days: 7)),
),
fit: BoxFit.cover,
)
Compress images with native code (objc kotlin), it's faster. This package supports Android and iOS.
var result = await FlutterImageCompress.compressWithFile(
file.absolute.path,
minWidth: 2300,
minHeight: 1500,
quality: 94,
rotate: 90,
);
Flutter plugin that allows you to display multi image picker on iOS and Android.
The Material Design Icons from the community for Flutter.
An SVG rendering and widget library for Flutter, which allows painting and displaying Scalable Vector Graphics 1.1 files.
final String assetName = 'assets/image.svg';
final Widget svg = new SvgPicture.asset(
assetName,
semanticsLabel: 'Acme Logo'
);
A simple zoomable image widget for Flutter.
Resolves a image provider and shows the result with useful gestures support, such as pinch to zoom and pan.
The best swiper for flutter, with multiple layouts, infinite loop. Compatible with Android & iOS.
A carousel slider widget, support infinite scroll and custom child widget, with auto play feature.
A Flutter implementation of slidable list item with directional slide actions that can be dismissed.
A plugin to help you make intro slider screen to show the major features of your app. You can change the image, button, text style, color, and more things.
A Flutter package for simple material design app intro screens with some cool animations.
Rubber is an elastic bottom sheet widget with the customizable material spring animation.
A Star rating with touch and swipe rate enabled
A flexible widget for user notification. Customize your text, button, duration, animations and much more. For Android devs, it is made to replace Snackbars and Toasts.
A plugin that allows you to pick absolute paths from different file types.
A modal progress indicator widget (HUD = heads-up display). Wrap around another widget to block access to widget during an async call. Also accepts a custom spinner.
NumberPicker
is a custom widget designed for choosing an integer or decimal number by scrolling spinners.
It is possible to use NumberPicker
as a standalone widget as well as in NumberPickerDialog
.
Countries, codes, flags and several ways of picking them at your service...
A light weight library to easily manage a progress dialog with simple steps whenever you need to do it. You can easily show and hide it.
Date Range Pickers use a dialog window to select a range of date on mobile.
A highly customizable typeahead (autocomplete) text input field.
Package to build Material Form with components such as TextField (With number, url, email validation), DropDown, TypeAhead, Radios, Checkboxes
FormBuilder(
context,
autovalidate: true,
controls: [
FormBuilderInput.textField(
type: FormBuilderInput.TYPE_TEXT,
attribute: "name",
label: "Name",
require: true,
min: 3,
),
FormBuilderInput.password(
attribute: "password",
label: "Password",
//require: true,
),
],
onChanged: () {
print("Form Changed");
},
onSubmit: (formValue) {
if (formValue != null) {
print(formValue);
} else {
print("Form invalid");
}
},
),
A flutter plugin to integrate the stripe plugin for iOS and Android. Currently only adding a credit card as source is implemented.
A simple (but correct) dart class for validating email addresses.
var email = "[email protected]";
assert(EmailValidator.validate(email) == true);
Flutter plugin for querying information about the application package, such as CFBundleVersion on iOS or versionCode on Android.
import 'package:package_info/package_info.dart';
PackageInfo packageInfo = await PackageInfo.fromPlatform();
String appName = packageInfo.appName;
String packageName = packageInfo.packageName;
String version = packageInfo.version;
String buildNumber = packageInfo.buildNumber;
Flutter plugin providing detailed information about the device (make, model, etc.), and Android or iOS version the app is running on.
import 'package:device_info/device_info.dart';
DeviceInfoPlugin deviceInfo = DeviceInfoPlugin();
AndroidDeviceInfo androidInfo = await deviceInfo.androidInfo;
print('Running on ${androidInfo.model}'); // e.g. "Moto G (4)"
IosDeviceInfo iosInfo = await deviceInfo.iosInfo;
print('Running on ${iosInfo.utsname.machine}'); // e.g. "iPod7,1"
Flutter plugin for sharing content via the platform share UI, using the ACTION_SEND intent on Android and UIActivityViewController on iOS.
import 'package:share/share.dart';
Share.share('check out my website https://example.com');
Geolocation plugin for Flutter. This plugin provides a cross-platform (iOS, Android) API for generic location (GPS etc.) functions.
import 'package:geolocator/geolocator.dart';
Position position = await Geolocator().getCurrentPosition(desiredAccuracy: LocationAccuracy.high);
A Flutter plugin to retrieve and manage contacts on Android and iOS devices.
import 'package:contacts_service/contacts_service.dart';
// Get all contacts
Iterable<Contact> contacts = await ContactsService.getContacts();
// Get contacts matching a string
Iterable<Contact> johns = await ContactsService.getContacts(query : "john");
await ContactsService.addContact(newContact);
await ContactsService.deleteContact(contact);
A Flutter plugin to manage the device's screen on Android and iOS.
import 'package:screen/screen.dart';
// Get the current brightness:
double brightness = await Screen.brightness;
// Set the brightness:
Screen.setBrightness(0.5);
// Check if the screen is kept on:
bool isKeptOn = await Screen.isKeptOn;
// Prevent screen from going into sleep mode:
Screen.keepOn(true);
Flutter plugin for accessing information about the battery state (full, charging, discharging) on Android and iOS.
import 'package:battery/battery.dart';
var battery = Battery();
print(battery.batteryLevel); // Access current battery level
// Be informed when the state (full, charging, discharging) changes
_battery.onBatteryStateChanged.listen((BatteryState state) {
// Do something with new state
});
A composable, cross-platform, Future-based API for making HTTP requests.
import 'package:http/http.dart' as http;
http.read("http://example.com/foobar.txt").then(print);
Flutter plugin for launching a URL on Android and iOS. Supports web, phone, SMS, and email schemes.
import 'package:url_launcher/url_launcher.dart';
const url = 'https://flutter.io';
if (await canLaunch(url)) {
await launch(url);
} else {
throw 'Could not launch $url';
}
A powerful Http client for Dart, which supports Interceptors, FormData, Request Cancellation, File Downloading, Timeout etc.
import 'package:dio/dio.dart';
void getHttp() async {
try {
Response response = await Dio().get("http://www.google.com");
return print(response);
} catch (e) {
return print(e);
}
}
A plugin for creating and managing download tasks. Supports iOS and Android.
This plugin is based on WorkManager
in Android and NSURLSessionDownloadTask
in iOS to run download task in background mode.
final taskId = await FlutterDownloader.enqueue(
url: 'your download link',
savedDir: 'the path of directory where you want to save downloaded files',
showNotification: true, // show download progress in status bar (for Android)
openFileFromNotification: true, // click on notification to open downloaded file (for Android)
);
FlutterDownloader.registerCallback((id, status, progress) {
// code to update your UI
});
This plugin allows Flutter apps to discover network connectivity and configure themselves accordingly. It can distinguish between cellular vs WiFi connection. This plugin works for iOS and Android.
import 'package:connectivity/connectivity.dart';
var connectivityResult = await (Connectivity().checkConnectivity());
if (connectivityResult == ConnectivityResult.mobile) {
// I am connected to a mobile network.
} else if (connectivityResult == ConnectivityResult.wifi) {
// I am connected to a wifi network.
}
A tidy utility to handle offline/online connectivity like a Boss. It provides support for both iOS and Android platforms.
OfflineBuilder(
connectivityBuilder: (
BuildContext context,
ConnectivityResult connectivity,
Widget child,
) {
final bool connected = connectivity != ConnectivityResult.none;
return Text(connected ? "online" : "offline");
},
);
Popular Bluetooth plugin for Flutter
FlutterBlue aims to offer the most from both platforms (iOS and Android).
Using the FlutterBlue
instance, you can scan for and connect to nearby devices. Once connected to a device, the BluetoothDevice
object can discover services, characteristics, and descriptors. The BluetoothDevice
object is then used to directly interact with characteristics and descriptors.
A new flutter plugin to help developers looking to use internal hardware inside iOS or Android devices for reading NFC tags.
The system activate a pooling reading session that stops automatically once a tag has been recognised. You can also trigger the stop event manually using a dedicated function.
Future<NfcData> startNFC() async {
NfcData response;
try {
response = await FlutterNfcReader.read;
} on PlatformException {
//Something went wrong
}
return response;
}
Fluro is a Flutter routing library that adds flexible routing options like wildcards, named parameters and clear route definitions.
var usersHandler = Handler(handlerFunc: (BuildContext context, Map<String, dynamic> params) {
return UsersScreen(params["id"][0]);
});
final router = Router();
router.define("/users/:id", handler: usersHandler);
Generates utilities to aid in serializing to/from JSON.
import 'package:json_annotation/json_annotation.dart';
part 'example.g.dart';
@JsonSerializable(nullable: false)
class Person {
final String firstName;
final String lastName;
final DateTime dateOfBirth;
Person({this.firstName, this.lastName, this.dateOfBirth});
factory Person.fromJson(Map<String, dynamic> json) => _$PersonFromJson(json);
Map<String, dynamic> toJson() => _$PersonToJson(this);
}
Brings functionality to execute code after the first layout of a widget has been performed, i.e. after the first frame has been displayed.
class HomeScreen extends StatefulWidget {
@override
HomeScreenState createState() => new HomeScreenState();
}
class HomeScreenState extends State<HomeScreen> with AfterLayoutMixin<HomeScreen> {
@override
Widget build(BuildContext context) {
return new Scaffold(body: new Container(color: Colors.red));
}
@override
void afterFirstLayout(BuildContext context) {
showDialog(
context: context,
builder: (context) => AlertDialog(
content: Text('Hello World'),
),
);
}
}
#Reading the Konami Code
const konamiKeyCodes = const <int>[
KeyCode.UP, KeyCode.UP,
KeyCode.DOWN, KeyCode.DOWN,
KeyCode.LEFT, KeyCode.RIGHT,
KeyCode.LEFT, KeyCode.RIGHT,
KeyCode.B, KeyCode.A
];
final result = querySelector('#result');
final keyUp = new Observable<KeyboardEvent>(document.onKeyUp);
keyUp
.map((event) => event.keyCode)
.bufferCount(10, 1)
.where((lastTenKeyCodes) => const IterableEquality<int>().equals(lastTenKeyCodes, konamiKeyCodes))
.listen((_) => result.innerHtml = 'KONAMI!');
A implement of WeChatSDK on Flutter. Enjoy sharing or payments in Flutter.
import 'package:fluwx/fluwx.dart' as fluwx;
fluwx.register(appId:"wxd930ea5d5a258f4f");
fluwx.share(
WeChatShareTextModel(
text: "text from fluwx",
transaction: "transaction",
scene: WeChatScene.SESSION,
),
);
Tuple data structure.
var t = const Tuple2<String, int>('a', 10);
print(t.item1); // prints 'a'
print(t.item2); // prints '10'
This is a localization library to simplify Flutter localization with the help of code generation.
i18n/en.json
{
"hello_there": "Hello there!",
"see_you_soon": "See you soon!"
}
part 'translation.g.dart';
@Stone(path: 'i18n')
class Translation with _$TranslationHelper {
static LocalizationsDelegate<Translation> delegate = _$TranslationDelegate();
static Translation of(BuildContext context) {
return Localizations.of(context, Translation);
}
}
Lists, Iterables and Maps on steroids! ? Extends Lists with negative indices, sort, group, distinct, slice, flatten etc. Inspired by Kotlin.
Just wrap your existing List with $(myList) or create a new empty list with $() and you are good to go.
var superList = $([0, 10, 100, 1000]);
var sum = superList.sum(); // 1110
var last = superList[-1]; // 1000
var lastTwo = superList.slice(-2); // [100, 1000]
A Widget that passes a Reactive Model to all of it's children.
A set of utilities that allow you to easily pass a data Model from a parent Widget down to it's descendants. In addition, it also rebuilds all of the children that use the model when the model is updated. This library was originally extracted from the Fuchsia codebase.
class CounterModel extends Model {
int _counter = 0;
int get counter => _counter;
void increment() {
_counter++; // First, increment the counter
notifyListeners(); // Then notify all the listeners.
}
}
class CounterApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
// Create a `ScopedModel` widget. This will provide the `model` to the children that request it.
return ScopedModel<CounterModel>(
model: CounterModel(),
child: Column(children: [
// Create a ScopedModelDescendant. This widget will get the CounterModel from the nearest
// ScopedModel<CounterModel>. It will rebuild any time the CounterModel changes
ScopedModelDescendant<CounterModel>(
builder: (context, child, model) => Text('${model.counter}'),
),
Text("Another widget that doesn't depend on the CounterModel")
]),
);
}
}
Flutter Widgets that make it easy to implement the BLoC (Business Logic Component) design pattern. Built to be used with the bloc state management package.
A set of utilities that allow you to easily consume a Redux Store to build Flutter Widgets.
#Redux Widgets
StoreProvider
- The base Widget. It will pass the given Redux Store to all descendants that request it.StoreBuilder
- A descendant Widget that gets the Store from a StoreProvider and passes it to a Widget builder function.StoreConnector
- A descendant Widget that gets the Store from the nearest StoreProvider ancestor, converts the Store into a ViewModel with the given converter function, and passes the ViewModel to a builder function. Any time the Store emits a change event, the Widget will automatically be rebuilt. No need to manage subscriptions!Lock mechanism to prevent concurrent access to asynchronous code.
import 'package:synchronized/synchronized.dart';
main() async {
// Use this object to prevent concurrent access to data
var lock = new Lock();
...
await lock.synchronized(() async {
// Only this block can run (once) until done
...
});
}
MobX is a library for reactively managing the state of your applications. Use the power of observables, actions, and reactions to supercharge your Dart and Flutter apps.
part 'counter.g.dart';
class Counter = _Counter with _$Counter;
abstract class _Counter implements Store {
@observable
int value = 0;
@action
void increment() {
value++;
}
}
class CounterExample extends StatefulWidget {
@override
_CounterExampleState createState() => _CounterExampleState();
}
class _CounterExampleState extends State<CounterExample> {
final _counter = Counter();
@override
Widget build(BuildContext context) {
return Column(
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
Observer(
builder: (_) => Text('${_counter.value}'),
),
Button(
onPressed: _counter.increment,
child: const Icon(Icons.add),
)
],
);
}
}
A flutter implementation of React hooks. It adds a new kind of widget with enhanced code reuse.
class Example extends HookWidget {
final Duration duration;
const Example({@required this.duration});
@override
Widget build(BuildContext context) {
final controller = useAnimationController(duration: duration);
return Container();
}
}
A Flutter plugin for iOS and Android for playing back video on a Widget surface.
A Flutter plugin to play multiple audio files simultaneously (Android/iOS).
The video player for Flutter with a heart of gold.
The video_player plugin provides low-level access to video playback. Chewie uses the video_player under the hood and wraps it in a friendly Material or Cupertino UI!
This plugin provides simple recorder and player functionalities for both Android and iOS.
A flutter plugin to play audio files
AudioPlayer audioPlugin = new AudioPlayer();
audioPlayer.play(kUrl);
audioPlayer.pause();
audioPlayer.stop();
A Flutter plugin for finding commonly used locations on the filesystem. Supports iOS and Android.
Directory tempDir = await getTemporaryDirectory();
String tempPath = tempDir.path;
Directory appDocDir = await getApplicationDocumentsDirectory();
String appDocPath = appDocDir.path;
A plug-in that can call native apps to open files with string result in flutter. Supports iOS (UTI) and Android (Intent)
import 'package:open_file/open_file.dart';
OpenFile.open("/sdcard/example.txt");
Flutter plugin for reading and writing simple key-value pairs. Wraps NSUserDefaults on iOS and SharedPreferences on Android.
incrementCounter() async {
SharedPreferences prefs = await SharedPreferences.getInstance();
int counter = (prefs.getInt('counter') ?? 0) + 1;
print('Pressed $counter times.');
await prefs.setInt('counter', counter);
}
NoSQL persistent embedded file system document-based database for Dart VM and Flutter with encryption support.
await db.put('Simple application', 'title');
await db.put(10, 'version');
await db.put({'offline': true}, 'settings');
// read values
String title = await db.get('title') as String;
int version = await db.get('version') as int;
Map settings = await db.get('settings') as Map;
// ...and delete
await db.delete('version');
Features:
import 'package:cookie_jar/cookie_jar.dart';
void main() async {
List<Cookie> cookies = [new Cookie("name", "wendux"), new Cookie("location", "china")];
var cj = new CookieJar();
//Save cookies
cj.saveFromResponse(Uri.parse("https://www.baidu.com/"), cookies);
//Get cookies
List<Cookie> results = cj.loadForRequest(Uri.parse("https://www.baidu.com/xx"));
print(results);
}
Plugin that allow Flutter to read value from persistent storage or save value to persistent storage based on MMKV framework.
MmkvFlutter mmkv = await MmkvFlutter.getInstance();
mmkv.setBool('boolKey', true);
print('get bool value is ${ await mmkv.getBool('boolKey')}');
String stringtest = await mmkv.getString('stringKey') + '1';
print('GetSetStringTest value is $stringtest');
await mmkv.setString('stringKey', stringtest);
Hydrated provides a BehaviorSubject that automatically persists to Flutter's local storage and hydrates on creation!
All values are persisted with shared_preferences and restored with automatic hydration.
final count$ = HydratedSubject<int>("count", seedValue: 0);
/// count$ will automatically be hydrated with 42 next time it is created
count$.add(42);
db = ObjectDB(File(dbFilePath));
db.open();
// insert sample data
db.insert({
'name': {'first': 'Alex', 'last': 'Boyle'},
'message': 'abc',
'active': true,
'count': 0,
});
Provides APIs for debugging and error logging. This library introduces abstractions similar to those used in other languages, such as the Closure JS Logger and java.util.logging.Logger.
Logger.root.level = Level.ALL;
Logger.root.onRecord.listen((LogRecord rec) {
print('${rec.level.name}: ${rec.time}: ${rec.message}');
});
Plugin for error catching. Allows handling errors when they're not catched by developer. Plugin provides multiple handlers for errors.
main() {
var debugOptions = CatcherOptions(
DialogReportMode(),
[ConsoleHandler()],
);
var releaseOptions = CatcherOptions(
DialogReportMode(),
[EmailManualHandler(["[email protected]"])],
);
Catcher(MyApp(), debugConfig: debugOptions, releaseConfig: releaseOptions);
}
To the extent possible under law, Simon Leier has waived all copyright and related or neighboring rights to this work.