flutter w10抓包_10个最受喜爱的flutter软件包

flutter w10抓包

Flutter is “Google’s UI toolkit for building beautiful, natively compiled applications for mobile, web, and desktop from a single codebase.”

Flutter是“ Google的UI工具包,可通过单个代码库为移动,Web和桌面构建漂亮的,本机编译的应用程序。”

Flutter is based on the Dart programming language. It has a large and lively community on Dart.dev, offering both officially supported and third-party packages to make Flutter development even more productive.

Flutter基于Dart编程语言。 它在Dart.dev上拥有一个庞大而活跃的社区,同时提供官方支持和第三方软件包,从而使Flutter开发更加高效。

This article lists the most promising and most popular packages to give you an idea of Flutter’s maturity as a platform.

本文列出了最有前途和最受欢迎的软件包,以使您了解Flutter作为平台的成熟度。

If you haven’t done so already, read my introductory article first. It will get you set up and running with a basic Flutter project in no time. This allows you to try out the packages you like most quickly!

如果您还没有这样做, 请先阅读我的介绍性文章 。 它使您立即设置并运行基本的Flutter项目。 这使您可以最快地试用自己喜欢的软件包!

1. HTTP (1. HTTP)

URL: https://pub.dev/packages/httpWorks on: iOS, Android, Web

网址: https : //pub.dev/packages/http适用于:iOS,Android,Web

Everything is web-based these days, so a robust HTTP library is a must-have. This Dart package contains a set of high-level functions and classes that make it easy to consume HTTP resources. It’s well developed and actively maintained by the Dart team. It has been around since 2012, so it should be rock-solid!

如今,所有内容都基于网络,因此必须具有强大的HTTP库。 该Dart程序包包含一组高级函数和类,可轻松使用HTTP资源。 它是Dart团队精心开发并积极维护的。 自2012年以来一直存在,因此应该坚如磐石!

The library offers top-level functions that make it easy to work with HTTP:

该库提供了顶级功能,可轻松使用HTTP:

import 'package:http/http.dart' as http;# Posting data
var url = 'https://example.com/whatsit/create';
var data = {'name': 'Jack', 'age': 38};var response = await http.post(url, body: data);print('Response status: ${response.statusCode}');
print('Response body: ${response.body}');# A simple GET request
print(await http.read('https://example.com/foobar.txt'));

2. flutter_slidable (2. flutter_slidable)

URL: https://pub.dev/packages/flutter_slidableWorks on: iOS, Android, Web

网址: https//pub.dev/packages/flutter_slidable 适用于:iOS,Android,Web

Image for post
source) )

The flutter_slidable plugin adds a feature-rich slider widget to your project. Sliders like this are often seen in scrollable lists. The Gmail app is a notable example, in which sliding list items offer a significant productivity enhancement.

flutter_slidable插件向您的项目添加了功能丰富的滑块小部件。 这样的滑块经常出现在可滚动列表中。 Gmail应用程序是一个著名的例子,其中滑动列表项显着提高了工作效率。

This plugin is packed with features and ready for use, but also highly customizable if needed. Some of the listed features are:

该插件具有很多功能,可以立即使用,但是如果需要,还可以高度自定义。 列出的一些功能包括:

  • Accepts primary (left/top) and secondary (right/bottom) widget lists as slide actions

    接受主要(左侧/顶部)和次要(右侧/底部)小部件列表作为幻灯片操作
  • Can be dismissed

    可以被解雇
  • Four built-in action panes

    四个内置的操作窗格
  • Two built-in slide action widgets

    两个内置的滑动动作小部件
  • Built-in dismiss animation

    内置关闭动画
  • Easily create custom layouts and animations

    轻松创建自定义布局和动画
  • Closes when a slide action has been tapped (overridable)

    轻按滑动动作(可覆盖)时关闭
  • Closes when the nearest Scrollable starts to scroll (overridable)

    当最近的Scrollable开始滚动(可覆盖)时关闭

  • Option to disable the slide effect easily

    轻松禁用幻灯片效果的选项

3.共享的首选项 (3. Shared Preferences)

URL: https://pub.dev/packages/shared_preferencesWorks on: iOS, Android, Web, Linux

网址: https//pub.dev/packages/shared_preferences适用于:iOS,Android,Web,Linux

This package wraps platform-specific persistent storage libraries. It’s indented for simple data, like user preferences, and it uses:

该软件包包装了特定于平台的持久性存储库。 它缩进用于简单数据,例如用户首选项,并且使用:

  • NSUserDefaults on iOS and macOS

    iOS和macOS上的NSUserDefaults

  • SharedPreferences on Android

    Android上的SharedPreferences

  • LocalStorage on websites

    网站上的LocalStorage

  • A JSON file on the local filesystem for Linux

    适用于Linux的本地文件系统上的JSON文件

Data may be persisted to disk asynchronously, and there is no guarantee that writes will be persisted to disk after returning, so this plugin is not meant for storing critical data. For that look into sqflite (see below).

数据可能 异步存储到磁盘上,并且不能保证返回后将写操作保留到磁盘上,因此此插件不用于存储关键数据。 为此,请查看sqflite(请参阅下文)。

4. sqflite (4. sqflite)

URL: https://pub.dev/packages/sqfliteWorks on: iOS, Android, MacOS

网址: https//pub.dev/packages/sqflite适用于:iOS,Android,MacOS

This is the SQLite plugin for Flutter. It supports iOS, Android, and MacOS. The web is not supported since there is no SQL-based persistence system in web browsers. Some of its features are:

这是 FlutterSQLite插件。 它支持iOS,Android和MacOS。 不支持Web,因为Web浏览器中没有基于SQL的持久性系统。 它的一些功能是:

  • Support for transactions and batches

    支持交易和批次
  • Automatic version management

    自动版本管理
  • Helpers for insert/query/update/delete queries

    插入/查询/更新/删除查询的助手
  • Operations are executed in a background thread on iOS and Android to prevent the UI from locking up

    在iOS和Android上的后台线程中执行操作以防止UI锁定

If you need more than basic (shared_preferences) data storage, look no further.

如果您需要的不仅仅是基本( shared_preferences )数据存储,那就别shared_preferences

5. url_launcher (5. url_launcher)

URL: https://pub.dev/packages/url_launcherWorks on: iOS, Android, Web

网址: https : //pub.dev/packages/url_launcher适用于:iOS,Android,Web

This plugin helps you launch a URL. URLs can be of the following types:

此插件可帮助您启动URL。 URL可以是以下类型:

Basic usage is very straightforward:

基本用法非常简单:

const url = 'https://flutter.dev';if (await canLaunch(url)) {await launch(url);
} else {throw 'Could not launch $url';
}

6. video_player (6. video_player)

URL: https://pub.dev/packages/video_playerWorks on: iOS, Android, Web

网址: https//pub.dev/packages/video_player适用于:iOS,Android,Web

Image for post
pub.dev pub.dev的图像和示例视频

Many formats are supported, but it all depends on the platform you’re running. For example, the backing libraries differ for iOS and Android. Also, on the web, the supported formats depend on the browser you’re using.

支持多种格式,但这都取决于您正在运行的平台。 例如,iOS和Android的后备库不同。 另外,在网络上,支持的格式取决于您使用的浏览器。

Note that even though it’s called video_player, this plugin can also play audio. Since the plugin is pretty mature and has reached API stability, it’s not a bad idea to use this for audio over some of the alternatives.

请注意,即使它名为video_player,该插件也可以播放音频。 由于该插件已经相当成熟并且已经达到API的稳定性,因此在一些替代方案中使用它来进行音频播放并不是一个坏主意。

This plugin can play video from a local file (assets) and a remote server (e.g., a website). For some example code, head over to this page.

该插件可以播放来自本地文件(资产)和远程服务器(例如网站)的视频。 有关一些示例代码,请转到此页面

7.加密 (7. crypto)

Works on: All platforms

适用于:所有平台

Comping from the Dart team itself, this is a set of cryptographic hashing functions implemented in pure Dart. This means you don’t need external libraries to make this work.

由Dart团队本身进行比较,这是一组在纯Dart中实现的加密哈希函数。 这意味着您不需要外部库即可完成这项工作。

The following hashing algorithms are supported:

支持以下哈希算法:

  • SHA-1

    SHA-1
  • SHA-224

    SHA-224
  • SHA-256

    SHA-256
  • SHA-384

    SHA-384
  • SHA-512

    SHA-512
  • MD5

    MD5
  • HMAC (i.e. HMAC-MD5, HMAC-SHA1, HMAC-SHA256)

    HMAC(即HMAC-MD5,HMAC-SHA1,HMAC-SHA256)

Since this is not a GUI tool but simply a crypto library, it works on all supported platforms.

由于这不是GUI工具而是一个加密库,因此它可在所有受支持的平台上使用。

8. carousel_slider (8. carousel_slider)

URL: https://pub.dev/packages/carousel_sliderWorks on: iOS, Android, Web

网址: https//pub.dev/packages/carousel_slider适用于:iOS,Android,Web

Image for post
Sample carousel from pub.dev
来自 pub.dev的本轮

A carousel slider is part of many apps and websites. The carousel_slider plugin offers an excellent and customizable carousel that works on multiple platforms.

轮播滑块是许多应用程序和网站的一部分。 carousel_slider插件提供了可在多个平台上运行的出色且可自定义的轮播。

Because the carousel accepts widgets as content, you can slide anything that can be a widget.

由于轮播接受小部件作为内容,因此您可以滑动任何可以成为小部件的东西。

For live examples, you can visit this website, which uses Flutter web to demo the plugin.

有关实时示例,您可以访问此网站该网站使用Flutter网站演示了该插件。

Here’s an example of how to create a carousel in your app:

这是有关如何在应用中创建轮播的示例:

CarouselSlider(
options: CarouselOptions(height: 400.0),
items: [1,2,3,4,5].map((i) {
return Builder(
builder: (BuildContext context) {
return Container(
width: MediaQuery.of(context).size.width,
margin: EdgeInsets.symmetric(horizontal: 5.0),
decoration: BoxDecoration(
color: Colors.amber
),
child: Text('text $i', style: TextStyle(fontSize: 16.0),)
);
},
);
}).toList(),
)

The carousel has several configurable options, like:

轮播有几个可配置的选项,例如:

  • the height and aspect ratio

    高度和长宽比
  • enabling infinite scrolling

    启用无限滚动
  • reversing the carousel

    倒转轮播
  • enabling autoplay with a configurable interval, animation duration

    以可配置的间隔,动画持续时间启用自动播放
  • defining the scroll direction (vertical, horizontal)

    定义滚动方向(垂直,水平)

9.路径 (9. path)

URL: https://pub.dev/packages/pathWorks on: iOS, Android, Web

网址: https//pub.dev/packages/path适用于:iOS,Android,Web

Paths are both easy and incredibly complex because they differ from platform to platform. To make sure you don’t introduce bugs or security vulnerabilities in your code, always use the path library when dealing with paths. To join a directory and a file with the file separator for the current OS, use:

路径既简单又难以置信,因为各个平台的路径不同。 为确保您不会在代码中引入错误或安全漏洞,请在处理路径时始终使用路径库。 要使用当前操作系统的文件分隔符将目录和文件联接在一起,请使用:

import 'package:path/path.dart' as p;p.join('directory', 'file.txt');

10.位置 (10. location)

URL: https://pub.dev/packages/locationWorks on: iOS, Android, Web, MacOS

网址: https//pub.dev/packages/location适用于:iOS,Android,Web,MacOS

One of the great things about phones is their mobility combined with the ability to accurately track location. This has already given us many useful applications. The location plugin for Flutter makes it easy to get access to the current location. It provides callbacks when the location has changed. It also offers API endpoints to properly request access to a user’s location.

手机的一大优点是其移动性以及准确跟踪位置的能力。 这已经给了我们许多有用的应用程序。 Flutter的位置插件可轻松访问当前位置。 位置更改后,它将提供回调。 它还提供API端点,以正确请求访问用户位置。

Image for post
source) )

This is my top ten. What are your favorite Flutter packages? Let me know in the comments!

这是我的前十名。 您最喜欢的Flutter套件是什么? 在评论中让我知道!

翻译自: https://medium.com/better-programming/the-10-best-and-most-liked-flutter-packages-f5813822e118

flutter w10抓包

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值