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

插件详情v1.1.2

enough_platform_widgets

用于开发具有Cupertino和Material设计的Flutter应用的有用平台感知小部件。

近 30 天下载
3680
喜欢数
41
Pub 分数
40

安装插件

flutter pub add enough_platform_widgets

插件介绍

基于插件公开信息、社区数据与项目使用情况整理的选型参考。

Enough Platform Widgets 提供了一组平台感知的组件,可在 Flutter 中无缝适应 Cupertino(iOS)和 Material(Android)设计系统。这些组件确保跨平台的一致且原生的用户体验,而无需手动添加条件判断。该包通过提供统一的组件简化了跨平台开发,这些组件会根据目标平台的设计语言自动渲染。它非常适合希望在减少样板代码的同时保持视觉和谐的开发者。

适合场景

  • 跨平台应用程序开发
  • 创建原生的 iOS 和 Android 界面
  • 减少条件小部件逻辑
  • 在各个平台上保持一致的用户体验
  • 简化主题适应

主要特点

  • 自动平台检测
  • Cupertino 和 Material 小部件变体
  • 最小的样板代码
  • 跨平台的一致性样式
  • 与现有 Flutter 应用轻松集成

适合对象

  • 面向 iOS 和 Android 的 Flutter 开发人员
  • 需要原生设计一致性的应用
  • 注重代码简洁性的团队
  • UI/UX 时间紧迫的项目
  • 开发人员避免手动平台检查

使用建议

  • 仅限iOS和Android平台
  • 依赖于 Flutter 的平台感知能力
  • 可能需要额外的样式自定义
  • 不适用于网页或桌面应用程序
  • 最适合用于具有混合平台设计需求的应用程序

原始 README

以下为关联源码仓库的 README 原文快照,最新内容请访问源码仓库。

enough_platform_widgets

enough_platform_widgets version

More cross platform widgets for Flutter developers.

Based on these great packages:

Licensed commercially friendly under the MIT License.

Installation

Add this as a dependency to your pubspec.yaml:

dependencies:
  enough_platform_widgets: ^1.0.0

Flutter Versions

  • Use 1.0 or higher for Flutter 3.16+
  • Use 0.7.4 for previous Flutter versions

Platform Widgets and Methods

Platform widgets use their material or cupertino equivalent based on the chosen platform.

  • DecoratedPlatformTextField provides a cross platform replacement for the material TextField
  • DensePlatformIconButton replaces the material IconButton
  • DialogHelper helps to show platform specific dialogs
  • PlatformBottomBar shows a BottomAppBar on material and a CupertinoBar on cupertino
  • PlatformCheckboxListTile is a platform aware simple checkbox list tile
  • PlatformChip a simple cross-platform Chip replacement
  • PlatformDialogActionButton is a platform aware dialog action
  • PlatformDialogActionText provides a platform aware dialog action text
  • PlatformDropdownButton is a replacement for the material DropdownButton
  • PlatformFilledButtonIcon uses an ElevatedButton.filled on material and a CupertinoButton.filled on cupertino
  • PlatformInkWell is a rectangular area of a that responds to touch and is based either on InkWell or on CupertinoInkWell
  • PlatformPageScaffold provides a PlatformScaffold with the additional option to define a bottom bar.
  • PlatformPopupButton uses an action sheet on cupertino and a popup button on material.
  • PlatformProgressIndicator uses a CircularProgressIndicator on material and a CupertinoActivityIndicator on cupertino
  • PlatformRadioListTile provides a RadioListTile implementation for both material and cupertino
  • PlatformSliverAppBar uses a SliverAppBar on material or a CupertinoSliverNavigationBar on cupertino
  • PlatformSnackApp is a base app that allows to show SnackBars on cupertino as well
  • PlatformStepper abstracts the Stepper material widget
  • PlatformTextButtonIcon is a simple replacement for TextButton.icon
  • PlatformToggleButtons provides a platform aware ToggleButtons replacement
  • PlatformToolbar provides a toolbar option
  • SelectablePlatformListTile provides a ListTile implementation for both material and cupertino
  • showPlatformTimePicker() displays a platform aware time picker
  • showPlatformDatePicker() displays a platform aware date picker
  • Additionally, all flutter_platform_widgets are available.

Cupertino Widgets

Currently the following cupertino widgets are provided:

  • CupertinoBar is a simple cupertino bar that either blurs the background or provides a translucent background
  • CupertinoCheckboxListTile provides a simple cupertino style checkbox list tile
  • CupertinoChip is a cupertino version of the material Chip widget
  • CupertinoDropdownButton maps the basic dropdown feature to a CupertinoPicker
  • CupertinoInkWell is a rectangular area of a that responds to touch
  • CupertinoMultipleSegmentedControl is like the CupertinoSegmentedControl but it allows to select several segments at once
  • CupertinoPageScaffoldWithToolbar provides a scaffold with the option to define a toolbar widget
  • CupertinoPageWithBar is a simple page with a bar that can be aligned top/bottom/left/right
  • CupertinoRadioListTile provides a simple cupertino style radio list tile
  • CupertinoSearchFlowTextField displays a CupertinoSearchTextField with the expected UX flow that switches to a full-screen experience once editing starts
  • CupertinoSnackApp is a CupertinoApp that also allows to display snack bar messages
  • CupertinoToolbar a simple wrapper for a cupertino toolbar widget

API Documentation

Check out the full API documentation at https://pub.dev/documentation/enough_platform_widgets/latest/

Thanks to all Contributors!!

Made with contrib.rocks.

所属分类

依赖

依赖清单 3 项

源码仓库

使用此插件的项目