搜尋套件、儲存庫與 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 項

原始碼儲存庫

使用此套件的專案