搜索插件、代码仓与 APP 分类

GitHub 代码仓Jesway/flutter_device_locale

flutter_device_locale

一个用于获取设备区域设置信息的 Flutter 插件。

flutter_device_locale 项目封面
星标
20
复刻
32
最近推送(UTC)
2022年5月5日
项目状态
未归档

原始 README

以下为英文项目原文快照,最新内容请访问 GitHub。

Build Status pub package License: MIT Flutter.io


A Flutter plugin for retrieving the device locale information.

Installation

Add this to your package's pubspec.yaml file:

dependencies:
  flutter_device_locale: <latest version>

Install packages from the command line (or from your editor):

flutter pub get

Import flutter_device_locale:

import 'package:flutter_device_locale/flutter_device_locale.dart';

Usage

Retrieve the current locale:

Locale locale = await DeviceLocale.getCurrentLocale();

Retrieve the preferred locales:

List<Locale> preferredLocales = await DeviceLocale.getPreferredLocales();
Note for Linux

Since GNU/Linux and POSIX doesn't provide a standard API for getting the preferred languages, DeviceLocale.getPreferredLocales always returns the current locale.

Issues

Please file any issues, bugs or feature request here.

License

This project is licensed under the MIT License

Author

This Flutter plugin is developed by Florin Bratan. You can contact me at <florin@leadcode.dev>

Jesway GitHub avatar
GitHub 作者

Jesway ↗

Innovative software development

语言C++CMakeDartRubyJavaCHTMLSwiftObjective-C

分类

使用的依赖

依赖清单 3 项

  • flutter{"sdk":"flutter"}
  • flutter_web_plugins{"sdk":"flutter"}
  • plugin_platform_interface^2.0.0

如何选择适合项目的代码仓?

先按使用场景筛选,再比较项目活跃情况,最后到原始仓库核对使用要求。

  1. 通过仓库名、作者或描述搜索,再按技术分类缩小范围。
  2. 结合星标、复刻与最近推送比较项目;星标反映社区关注,不代表质量保证。
  3. 使用前在 GitHub 核对 README、许可证与 Issues。

来源与维护

“A repository is the most basic element of GitHub.”

GitHub Docs — About repositories ↗