搜尋套件、儲存庫與 APP 分類

ios_color_picker 封面
套件詳情v3.0.0

ios_color_picker

一個為所有 Flutter 平台提供 iOS 風格顏色選擇器 UI 的 Flutter 套件,同時在 iOS 上提供原生 iOS 顏色選擇器。

AndroidiOSWebmacOSWindowsLinux
近 30 天下載
167
喜歡數
10
Pub 分數
140

安裝套件

flutter pub add ios_color_picker

套件介紹

根據套件公開資料產生的選型評估,僅供參考。

ios_color_picker 套件在所有 Flutter 平台上提供 iOS 風格的顏色選擇器介面,確保外觀與感受的一致性。在 iOS 上,它利用原生顏色選擇器實現真實整合。此套件非常適合需要直覺式顏色選擇且具備平台適當設計的應用程式。它支援多個平台,包括 Android、Web、macOS、Windows 和 Linux,使其適用於跨平台開發。其使用者介面模仿 Apple 的原生顏色選擇器,在非 iOS 設備上提升使用者體驗,同時在可用時維持原生行為。

適用情境

  • 跨平台顏色選擇
  • iOS 原生 UI 在非 iOS 平台
  • 帶有顏色選擇器的設計工具
  • 自定主題建構器
  • 行動應用程式顏色自訂

主要特色

  • iOS 風格的使用者介面適用於所有平台
  • 在 iOS 上使用原生 iOS 選擇器
  • 支援多個平台
  • 透過 pub 的簡單整合
  • 跨裝置的一致使用者體驗

適合對象

  • 針對iOS美學的開發者
  • 需要顏色輸入的應用程式
  • 跨平台 UI 一致性
  • 注重設計的應用程式
  • 具有色彩自定義的 Flutter 應用

使用建議

  • 僅限顏色選擇
  • 無進階色彩操控
  • 需要手動處理顏色值
  • 預設情況下未針對可訪問性進行優化
  • 在邊緣情況下可能與iOS不完全相符

原始 README

以下為關聯原始碼儲存庫的 README 原文快照,最新內容請造訪原始碼儲存庫。

ios_color_picker

A Flutter package that provides an iOS-style color picker UI for every Flutter platform, plus access to the native iOS color picker on iOS.

Supported Platforms

  • Linux
  • macOS
  • Web
  • Windows
  • iOS
  • Android

Requirements

  • Flutter 3.41.0 or later
  • Dart 3.11.4 or later
  • Android minSdk 24
  • iOS 14.0 or later for the native iOS picker
  • macOS 10.15 or later

Features

Screenshots & Demo

Getting Started

Add the package and create a controller. Dispose the controller from your widget's dispose method because the native iOS picker streams color changes through an event channel.

Usage

final iosColorPickerController = IOSColorPickerController();

/// Native iOS Color Picker
ElevatedButton(
  onPressed: () {
    iosColorPickerController.showNativeIosColorPicker(
      startingColor: backgroundColor,
      darkMode: true,
      onColorChanged: (color) {
        setState(() {
          backgroundColor = color;
        });
      },
    );
  },
  child: Text("Native iOS"),
),

/// Custom iOS Color Picker (for all platforms)
ElevatedButton(
  onPressed: () {
    iosColorPickerController.showIOSCustomColorPicker(
      startingColor: backgroundColor,
      onColorChanged: (color) {
        setState(() {
          backgroundColor = color;
        });
      },
      context: context,
    );
  },
  child: Text("Custom iOS for all"),
),

Dispose the controller:

final IOSColorPickerController iosColorPickerController =
    IOSColorPickerController();

@override
void dispose() {
  iosColorPickerController.dispose();
  super.dispose();
}

Example

Run the app in the example/ folder to explore the plugin.

Additional Information

For more updates and inquiries, connect with me on LinkedIn:

所屬分類

依賴

依賴清單 5 項

原始碼儲存庫

使用此套件的專案

暫無相關資料。