跳转到主要内容

标签(标签)

资源精选(342) Go开发(108) Go语言(103) Go(99) angular(82) LLM(78) 大语言模型(63) 人工智能(53) 前端开发(50) LangChain(43) golang(43) 机器学习(39) Go工程师(38) Go程序员(38) Go开发者(36) React(33) Go基础(29) Python(24) Vue(22) Web开发(20) Web技术(19) 精选资源(19) 深度学习(19) Java(18) ChatGTP(17) Cookie(16) android(16) 前端框架(13) JavaScript(13) Next.js(12) 安卓(11) 聊天机器人(10) typescript(10) 资料精选(10) NLP(10) 第三方Cookie(9) Redwoodjs(9) ChatGPT(9) LLMOps(9) Go语言中级开发(9) 自然语言处理(9) PostgreSQL(9) 区块链(9) mlops(9) 安全(9) 全栈开发(8) OpenAI(8) Linux(8) AI(8) GraphQL(8) iOS(8) 软件架构(7) RAG(7) Go语言高级开发(7) AWS(7) C++(7) 数据科学(7) whisper(6) Prisma(6) 隐私保护(6) JSON(6) DevOps(6) 数据可视化(6) wasm(6) 计算机视觉(6) 算法(6) Rust(6) 微服务(6) 隐私沙盒(5) FedCM(5) 智能体(5) 语音识别(5) Angular开发(5) 快速应用开发(5) 提示工程(5) Agent(5) LLaMA(5) 低代码开发(5) Go测试(5) gorm(5) REST API(5) kafka(5) 推荐系统(5) WebAssembly(5) GameDev(5) CMS(5) CSS(5) machine-learning(5) 机器人(5) 游戏开发(5) Blockchain(5) Web安全(5) Kotlin(5) 低代码平台(5) 机器学习资源(5) Go资源(5) Nodejs(5) PHP(5) Swift(5) devin(4) Blitz(4) javascript框架(4) Redwood(4) GDPR(4) 生成式人工智能(4) Angular16(4) Alpaca(4) 编程语言(4) SAML(4) JWT(4) JSON处理(4) Go并发(4) 移动开发(4) 移动应用(4) security(4) 隐私(4) spring-boot(4) 物联网(4) nextjs(4) 网络安全(4) API(4) Ruby(4) 信息安全(4) flutter(4) RAG架构(3) 专家智能体(3) Chrome(3) CHIPS(3) 3PC(3) SSE(3) 人工智能软件工程师(3) LLM Agent(3) Remix(3) Ubuntu(3) GPT4All(3) 软件开发(3) 问答系统(3) 开发工具(3) 最佳实践(3) RxJS(3) SSR(3) Node.js(3) Dolly(3) 移动应用开发(3) 低代码(3) IAM(3) Web框架(3) CORS(3) 基准测试(3) Go语言数据库开发(3) Oauth2(3) 并发(3) 主题(3) Theme(3) earth(3) nginx(3) 软件工程(3) azure(3) keycloak(3) 生产力工具(3) gpt3(3) 工作流(3) C(3) jupyter(3) 认证(3) prometheus(3) GAN(3) Spring(3) 逆向工程(3) 应用安全(3) Docker(3) Django(3) R(3) .NET(3) 大数据(3) Hacking(3) 渗透测试(3) C++资源(3) Mac(3) 微信小程序(3) Python资源(3) JHipster(3) 语言模型(2) 可穿戴设备(2) JDK(2) SQL(2) Apache(2) Hashicorp Vault(2) Spring Cloud Vault(2) Go语言Web开发(2) Go测试工程师(2) WebSocket(2) 容器化(2) AES(2) 加密(2) 输入验证(2) ORM(2) Fiber(2) Postgres(2) Gorilla Mux(2) Go数据库开发(2) 模块(2) 泛型(2) 指针(2) HTTP(2) PostgreSQL开发(2) Vault(2) K8s(2) Spring boot(2) R语言(2) 深度学习资源(2) 半监督学习(2) semi-supervised-learning(2) architecture(2) 普罗米修斯(2) 嵌入模型(2) productivity(2) 编码(2) Qt(2) 前端(2) Rust语言(2) NeRF(2) 神经辐射场(2) 元宇宙(2) CPP(2) 数据分析(2) spark(2) 流处理(2) Ionic(2) 人体姿势估计(2) human-pose-estimation(2) 视频处理(2) deep-learning(2) kotlin语言(2) kotlin开发(2) burp(2) Chatbot(2) npm(2) quantum(2) OCR(2) 游戏(2) game(2) 内容管理系统(2) MySQL(2) python-books(2) pentest(2) opengl(2) IDE(2) 漏洞赏金(2) Web(2) 知识图谱(2) PyTorch(2) 数据库(2) reverse-engineering(2) 数据工程(2) swift开发(2) rest(2) robotics(2) ios-animation(2) 知识蒸馏(2) 安卓开发(2) nestjs(2) solidity(2) 爬虫(2) 面试(2) 容器(2) C++精选(2) 人工智能资源(2) Machine Learning(2) 备忘单(2) 编程书籍(2) angular资源(2) 速查表(2) cheatsheets(2) SecOps(2) mlops资源(2) R资源(2) DDD(2) 架构设计模式(2) 量化(2) Hacking资源(2) 强化学习(2) flask(2) 设计(2) 性能(2) Sysadmin(2) 系统管理员(2) Java资源(2) 机器学习精选(2) android资源(2) android-UI(2) Mac资源(2) iOS资源(2) Vue资源(2) flutter资源(2) JavaScript精选(2) JavaScript资源(2) Rust开发(2) deeplearning(2) RAD(2)

一个关于最棒的Flutter的精选列表

Index

 

Widgets

WebView for Flutter (Flutter Team) v0.3.9+1  

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.


auto_size_text v2.0.1  

Flutter widget that automatically resizes text to fit perfectly within its bounds.


Splash Screen v1.2.0  

Easy to use splash screen package.


Flutter Sticky Headers v0.1.8  

Lets you place headers on scrollable content that will stick to the top of the container whilst the content is scrolled.


Flutter Speed Dial v1.2.1  

Flutter plugin to implement a beautiful and dynamic Material Design Speed Dial, with labels, animated icons and hide on scrolling.


FancyBottomNavigation v0.3.2  

An animated Bottom Navigation Bar for Flutter apps, icon animates into place, colors are customisable.


Flutter Platform Widgets v0.10.0  

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.


Liquid Pull To Refresh v1.1.1  

A beautiful and custom refresh indicator with some cool animations and transitions for flutter.


flutter_tags v0.3.1  

Flutter tags let you create a list of tags or insert them dynamically with the input.


BubbleBottomBar v1.2.0  

BubbleBottomBar is a Flutter widget designed by cubertodesign and developed by westdabestdb.


folding_cell v0.1.2  

Simple folding cell widget implemented in Flutter. Its a widget so add it to any container widget as a child.


Fluid Slider v1.0.0  

A fluid design slider that works just like the Slider material widget.


snaplist v0.1.8  

Small cozy library that allows you to make snappable list views.


Zefyr v0.5.0  

Clean, minimalistic and collaboration-ready rich text editor for Flutter.


Infinite ListView v1.0.0  

ListView with items that can be scrolled infinitely in both directions.


Draggable Scrollbar v0.0.4  

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.


Passcode Lock Screen v1.0.1  

A platform agnostic Flutter package for showing passcode input screen, similar to Native iOS. Screen customizable with a colors, sizes, fonts etc.


ProgressButton v0.0.2  

A Material Flutter Button that supports progress and error visuals.


stepper_touch v0.0.1  

A Flutter stepper widget with nice aniamtion.


flutter_staggered_grid_view v0.3.0  

A 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.


Shimmer v1.0.0  

A package provides an easy way to add shimmer effect in Flutter project.


Flutter Page Transition Package v1.1.0  

This package gives you beautiful page transitions.


Animated Text Kit v1.3.1  

A flutter package project which contains a collection of cool and beautiful text animations.

   


flutter_sequence_animation v3.0.1  

Composite together any animation with this robust and simple to use package.

 


flip_card v0.3.0  

A component that provides flip card animation. It could be used for hide and show details of a product.

 


Wave v0.0.8  

Widget for displaying waves with custom color, duration, floating and blur effects.


spritewidget v0.9.18  

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.


flutter_villains v1.2.0  

Page transitions with just a few lines of code. What are heroes without villains?


fluttie: Lottie for flutter v0.3.2  

Fluttie allows you to easily display stunning Lottie animations in flutter.


Hidden Drawer Menu v1.0.1  

Hidden Drawer Menu is a library for adding a beautiful drawer mode menu feature with perspective animation.


flip_panel v1.0.0  

A package for flip panel with built-in animation.

 flip_panel2.gif


drawing_animation v0.1.1  

An dart-only library for gradually painting SVG path objects on canvas (drawing line animation).


WaveProgress v0.0.1  

A custom wave progress widget.


Path Morph v1.0.1  

This package lets you create path tween animations. In other words, it lets you morph one path into another.


Text to Path Maker v0.5.7  

Tis is a pure Flutter and Dart package that allows you to convert text (both characters and icons) into paths and animate them.


flame v0.12.0  

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);

 

Images

Image Picker (Flutter Team) v0.6.0+9  

A Flutter plugin for iOS and Android for picking images from the image library, and taking new pictures with the camera.


CachedNetworkImage v0.8.0  

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),
)

image v2.1.4  

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));

Image Cropper v1.0.2  

A Flutter plugin for Android and iOS supports cropping images.

 


Flutter Advanced Network Image v0.4.15  

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,
)

flutter_image_compress v0.5.2  

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 Multi Image Picker v4.3.3  

Flutter plugin that allows you to display multi image picker on iOS and Android.


Material Design Icons v3.2.3695  

The Material Design Icons from the community for Flutter.


Image Cropping plugin 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.

 


flutter_svg v0.13.0+2  

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'
);

Flutter Photo View v0.4.0  

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.

 

Swipe & Slide

flutter_swiper v1.1.6  

The best swiper for flutter, with multiple layouts, infinite loop. Compatible with Android & iOS.


carousel_slider v1.3.0  

A carousel slider widget, support infinite scroll and custom child widget, with auto play feature.


flutter_slidable v0.5.3  

A Flutter implementation of slidable list item with directional slide actions that can be dismissed.


intro_slider v2.2.1  

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.


intro_views_flutter v2.6.0  

A Flutter package for simple material design app intro screens with some cool animations.


Rubber v0.3.2  

Rubber is an elastic bottom sheet widget with the customizable material spring animation.


smooth_star_rating v1.0.3  

A 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

smooth_star_rating1.gif


Flushbar v1.7.0  

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.

 

Dialogs & Pickers

file_picker v1.3.5  

A plugin that allows you to pick absolute paths from different file types.


modal_progress_hud v0.1.3  

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 v1.0.0  

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.


country_pickers v1.1.0  

Countries, codes, flags and several ways of picking them at your service...

 


progress_dialog v1.1.0+1  

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 Picker v1.0.6  

Date Range Pickers use a dialog window to select a range of date on mobile.

 

Input & Forms

Flutter TypeAhead v1.6.1  

A highly customizable typeahead (autocomplete) text input field.


flutter_form_builder v3.2.0  

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");
    }
  },
),

stripe_payment v0.1.0  

A flutter plugin to integrate the stripe plugin for iOS and Android. Currently only adding a credit card as source is implemented.

 


Email validator v1.0.0  

A simple (but correct) dart class for validating email addresses.

var email = "fredrik@gmail.com";

assert(EmailValidator.validate(email) == true);

 

Device

package_info (Flutter Team) v0.4.0+4  

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;

device_info (Flutter Team) v0.4.0+2  

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"

share (Flutter Team) v0.6.1+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');

Flutter Geolocator v5.0.0  

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);

contacts_service v0.2.7  

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);

Screen v0.0.5  

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);

battery v0.3.0+3  

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
});

 

Networking

http (Flutter Team) v0.12.0+2  

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);

url_launcher (Flutter Team) v5.0.3  

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';
}

dio v2.1.7  

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);
  }
}

Flutter Downloader v1.1.7  

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
});

 

Bluetooth & Wifi

connectivity (Flutter Team) v0.4.3+2  

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.
}

flutter_offline v0.2.4+1  

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");
  },
);

FlutterBlue v0.5.0  

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.


Flutter NFC Reader v0.0.23  

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;
}

 

Utils

fluro v1.4.0  

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);

json_serialize (Flutter Team) v3.0.0  

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);
}

after_layout v1.0.7+1  

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'),
      ),
    );
  }
}

RxDart v0.22.0  

RxDart is a reactive functional programming library for Google Dart, based on ReactiveX.

#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!');

fluwx WeChatSDK v0.6.3  

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 v1.0.2  

Tuple data structure.

var t = const Tuple2<String, int>('a', 10);

print(t.item1); // prints 'a'
print(t.item2); // prints '10'

rosetta v0.1.2  

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);
  }
}

superpower v0.4.0  

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)orcreateanewemptylistwith() 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]

 

Frameworks & Design Patterns

scoped_model v1.0.1  

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_bloc v0.15.1  

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.


flutter_redux v0.5.3  

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!

synchronized v2.1.0  

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
    ...
  });
}

Flutter MobX v0.2.1+1  

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),
          )
        ],
    );
  }
}

Flutter Hooks v0.5.0  

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();
  }
}

 

Audio & Video

Video Player (Flutter Team) v0.10.1+3  

A Flutter plugin for iOS and Android for playing back video on a Widget surface.


audioplayers v0.12.1  

A Flutter plugin to play multiple audio files simultaneously (Android/iOS).

  


chewie v0.9.7  

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!


Flutter Sound v1.4.1  

This plugin provides simple recorder and player functionalities for both Android and iOS.


audioplayer v0.5.2  

A flutter plugin to play audio files

AudioPlayer audioPlugin = new AudioPlayer();

audioPlayer.play(kUrl);

audioPlayer.pause();

audioPlayer.stop();

 

Files

path_provider (Flutter Team) v1.1.0  

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;

open_file v2.0.3  

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");

 

Persistance

Shared preferences (Flutter Team) v0.5.3+1  

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);
}

sqflite v1.1.5  

SQLite plugin for Flutter. Supports both iOS and Android.

  • 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

sembast v1.15.4+1  

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');

redux_persist v0.8.2  

Persist Redux state across app restarts in Flutter, Web, or custom storage engines.

Features:

  • 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!

CookieJar 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.

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);  
}  

mmkv_flutter v1.0.10  

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 v1.2.3  

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);

objectdb_flutter v0.0.4  

Reactive ObjectDB helper.

db = ObjectDB(File(dbFilePath));
db.open();
// insert sample data
db.insert({
  'name': {'first': 'Alex', 'last': 'Boyle'},
  'message': 'abc',
  'active': true,
  'count': 0,
});

 

Logging & Error Handling

logging (Flutter Team) v0.11.3+2  

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}');
});

catcher v0.1.5  

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(["recipient@email.com"])],
  );

  Catcher(MyApp(), debugConfig: debugOptions, releaseConfig: releaseOptions);
}

 

原文:https://github.com/leisim/awesome-flutter-packages