List of Awesome Flutter Packages
A curated list
Is your favourite
Please read the contribution guidelines before opening a pull request
Index
- Widgets
- Animations
- Images
- Swipe & Slide
- Dialogs & Pickers
- Input & Forms
- Device
- Networking
- Bluetooth & Wifi
- Utils
- Frameworks & Design Patterns
- Audio & Video
- Files
- Persistance
- Logging & Error Handling
Widgets
v0.3.9+1
WebView for Flutter (Flutter Team)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
.
v2.0.1
auto_size_textFlutter widget that automatically resizes text to fit perfectly within its bounds.
v1.2.0
Splash ScreenEasy to use splash screen package.
v0.1.8
Flutter Sticky HeadersLets you place headers on scrollable content that will stick to the top of the container whilst the content is scrolled.
v1.2.1
Flutter Speed DialFlutter plugin to implement a beautiful and dynamic Material Design Speed Dial, with labels, animated icons and hide on scrolling.
v0.3.2
FancyBottomNavigationAn animated Bottom Navigation Bar for Flutter apps, icon animates into place, colors are customisable.
v0.10.0
Flutter Platform WidgetsSimplifying 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.
v1.1.1
Liquid Pull To RefreshA beautiful and custom refresh indicator with some cool animations and transitions for flutter.
v0.3.1
flutter_tagsFlutter tags let you create a list of tags or insert them dynamically with the input.
v1.2.0
BubbleBottomBarBubbleBottomBar is a Flutter widget designed by cubertodesign and developed by westdabestdb.
v0.1.2
folding_cellSimple folding cell widget implemented in Flutter. Its a widget so add it to any container widget as a child.
v1.0.0
Fluid SliderA fluid design slider that works just like the Slider material widget.
v0.1.8
snaplistSmall cozy library that allows you to make snappable list views.
v0.5.0
ZefyrClean, minimalistic and collaboration-ready rich text editor for Flutter.
v1.0.0
Infinite ListViewListView with items that can be scrolled infinitely in both directions.
v0.0.4
Draggable ScrollbarA 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.
v1.0.1
Passcode Lock ScreenA platform agnostic Flutter package for showing passcode input screen, similar to Native iOS. Screen customizable with a colors, sizes, fonts etc.
v0.0.2
ProgressButtonA Material Flutter Button that supports progress and error visuals.
v0.0.1
stepper_touchA Flutter stepper widget with nice aniamtion.
v0.3.0
flutter_staggered_grid_viewA Flutter staggered grid view which supports multiple columns with rows of varying sizes.
Animations
✨ Flutter Spinkit v3.1.0
A collection of loading indicators animated with flutter.
v1.0.0
ShimmerA package provides an easy way to add shimmer effect in Flutter project.
v1.1.0
Flutter Page Transition PackageThis package gives you beautiful page transitions.
v1.3.1
Animated Text KitA flutter package project which contains a collection of cool and beautiful text animations.
v3.0.1
flutter_sequence_animationComposite together any animation with this robust and simple to use package.
v0.3.0
flip_cardA component that provides flip card animation. It could be used for hide and show details of a product.
v0.0.8
WaveWidget for displaying waves with custom color, duration, floating and blur effects.
v0.9.18
spritewidgetSpriteWidget 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.
v1.2.0
flutter_villainsPage transitions with just a few lines of code. What are heroes without villains?
v0.3.2
fluttie: Lottie for flutterFluttie allows you to easily display stunning Lottie animations in flutter.
v1.0.1
Hidden Drawer MenuHidden Drawer Menu is a library for adding a beautiful drawer mode menu feature with perspective animation.
v1.0.0
flip_panelA package for flip panel with built-in animation.
v0.1.1
drawing_animationAn dart-only library for gradually painting SVG path objects on canvas (drawing line animation).
v0.0.1
WaveProgressA custom wave progress widget.
v1.0.1
Path MorphThis package lets you create path tween animations. In other words, it lets you morph one path into another.
v0.5.7
Text to Path MakerTis is a pure Flutter and Dart package that allows you to convert text (both characters and icons) into paths and animate them.
v0.12.0
flameA 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);
Images
v0.6.0+9
Image Picker (Flutter Team)A Flutter plugin for iOS and Android for picking images from the image library, and taking new pictures with the camera.
v0.8.0
CachedNetworkImageA 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),
)
v2.1.4
imageProvides 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));
v1.0.2
Image CropperA Flutter plugin for Android and iOS supports cropping images.
v0.4.15
Flutter Advanced Network ImageAn 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,
)
v0.5.2
flutter_image_compressCompress 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,
);
v4.3.3
Flutter Multi Image PickerFlutter plugin that allows you to display multi image picker on iOS and Android.
v3.2.3695
Material Design IconsThe Material Design Icons from the community for Flutter.
v0.3.0
A flutter plugin to crop image on iOS and Android. It processes image files off main thread natively. The plugin provides a Crop widget to display image cropping to a user. Image Cropping pluginv0.13.0+2
flutter_svgAn 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'
);
v0.4.0
Flutter Photo ViewA 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.
Swipe & Slide
v1.1.6
flutter_swiperThe best swiper for flutter, with multiple layouts, infinite loop. Compatible with Android & iOS.
v1.3.0
carousel_sliderA carousel slider widget, support infinite scroll and custom child widget, with auto play feature.
v0.5.3
flutter_slidableA Flutter implementation of slidable list item with directional slide actions that can be dismissed.
v2.2.1
intro_sliderA 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.
v2.6.0
intro_views_flutterA Flutter package for simple material design app intro screens with some cool animations.
v0.3.2
RubberRubber is an elastic bottom sheet widget with the customizable material spring animation.
v1.0.3
smooth_star_ratingA Star rating with touch and swipe rate enabled
- Supports half rate and full rate (1.0 or 0.5)
- Swipe for incrementing/decrementing rate amount
- Change star body and boundary colors independently
v1.7.0
FlushbarA 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.
Dialogs & Pickers
v1.3.5
file_pickerA plugin that allows you to pick absolute paths from different file types.
v0.1.3
modal_progress_hudA 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.
v1.0.0
NumberPickerNumberPicker
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
.
v1.1.0
country_pickersCountries, codes, flags and several ways of picking them at your service...
v1.1.0+1
progress_dialogA 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.
v1.0.6
Date Range PickerDate Range Pickers use a dialog window to select a range of date on mobile.
Input & Forms
v1.6.1
Flutter TypeAheadA highly customizable typeahead (autocomplete) text input field.
v3.2.0
flutter_form_builderPackage 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");
}
},
),
v0.1.0
stripe_paymentA flutter plugin to integrate the stripe plugin for iOS and Android. Currently only adding a credit card as source is implemented.
v1.0.0
Email validatorA simple (but correct) dart class for validating email addresses.
var email = "[email protected]";
assert(EmailValidator.validate(email) == true);
Device
v0.4.0+4
package_info (Flutter Team)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;
v0.4.0+2
device_info (Flutter Team)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"
v0.6.1+1
share (Flutter Team)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');
v5.0.0
Flutter GeolocatorGeolocation 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);
v0.2.7
contacts_serviceA 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);
v0.0.5
ScreenA 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);
v0.3.0+3
batteryFlutter 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
});
Networking
v0.12.0+2
http (Flutter Team)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);
v5.0.3
url_launcher (Flutter Team)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';
}
v2.1.7
dioA 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);
}
}
v1.1.7
Flutter DownloaderA 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
});
Bluetooth & Wifi
v0.4.3+2
connectivity (Flutter Team)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.
}
v0.2.4+1
flutter_offlineA 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");
},
);
v0.5.0
FlutterBluePopular 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.
v0.0.23
Flutter NFC ReaderA 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;
}
Utils
v1.4.0
fluroFluro 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);
v3.0.0
json_serialize (Flutter Team)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);
}
v1.0.7+1
after_layoutBrings 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'),
),
);
}
}
v0.22.0
RxDart is a reactive functional programming library for Google Dart, based on ReactiveX. RxDart#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!');
v0.6.3
fluwx WeChatSDKA 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,
),
);
v1.0.2
tupleTuple data structure.
var t = const Tuple2<String, int>('a', 10);
print(t.item1); // prints 'a'
print(t.item2); // prints '10'
v0.1.2
rosettaThis 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);
}
}
v0.4.0
superpowerLists, Iterables and Maps on steroids!
Just wrap your existing List with
var superList = $([0, 10, 100, 1000]);
var sum = superList.sum(); // 1110
var last = superList[-1]; // 1000
var lastTwo = superList.slice(-2); // [100, 1000]
Frameworks & Design Patterns
v1.0.1
scoped_modelA 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")
]),
);
}
}
v0.15.1
flutter_blocFlutter Widgets that make it easy to implement the BLoC (Business Logic Component) design pattern. Built to be used with the bloc state management package.
v0.5.3
flutter_reduxA 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!
v2.1.0
synchronizedLock 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
...
});
}
v0.2.1+1
Flutter MobXMobX 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),
)
],
);
}
}
v0.5.0
Flutter HooksA 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();
}
}
Audio & Video
v0.10.1+3
Video Player (Flutter Team)A Flutter plugin for iOS and Android for playing back video on a Widget surface.
v0.12.1
audioplayersA Flutter plugin to play multiple audio files simultaneously (Android/iOS).
v0.9.7
chewieThe 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!
v1.4.1
Flutter SoundThis plugin provides simple recorder and player functionalities for both Android and iOS.
v0.5.2
audioplayerA flutter plugin to play audio files
AudioPlayer audioPlugin = new AudioPlayer();
audioPlayer.play(kUrl);
audioPlayer.pause();
audioPlayer.stop();
Files
v1.1.0
path_provider (Flutter Team)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;
v2.0.3
open_fileA 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");
Persistance
v0.5.3+1
Shared preferences (Flutter Team)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);
}
v1.1.5
SQLite plugin for Flutter. Supports both iOS and Android. sqflite- 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
v1.15.4+1
sembastNoSQL 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');
v0.8.2
Persist Redux state across app restarts in Flutter, Web, or custom storage engines. redux_persistFeatures:
- Save and load from multiple engine (Flutter, Web, File, custom)
- Fully type safe
- Transform state and raw on load/save
- Custom serializers
- Easy to use, integrate into your codebase in a few minutes!
v1.0.0
A cookie manager for http requests in Dart, by which you can deal with the complex cookie policy and persist cookies easily. CookieJarimport '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);
}
v1.0.10
mmkv_flutterPlugin 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);
v1.2.3
hydratedHydrated 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);
v0.0.4
Reactive ObjectDB helper. objectdb_flutterdb = ObjectDB(File(dbFilePath));
db.open();
// insert sample data
db.insert({
'name': {'first': 'Alex', 'last': 'Boyle'},
'message': 'abc',
'active': true,
'count': 0,
});
Logging & Error Handling
v0.11.3+2
logging (Flutter Team)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}');
});
v0.1.5
catcherPlugin 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);
}
License
To the extent possible under law, Simon Leier has waived all copyright and related or neighboring rights to this work.