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

multiselect 封面
套件詳情v0.1.1

multiselect

一個簡單的多選下拉選單。它提供了一種簡潔的方式來建立多選組合框/選擇框。

AndroidiOSWebmacOSWindowsLinux
近 30 天下載
7420
喜歡數
120
Pub 分數
150

安裝套件

flutter pub add multiselect

套件介紹

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

一個輕量級的 Flutter 套件,提供一個乾淨直覺的多選下拉選單元件。它讓使用者能夠從清單中選擇多個選項,以緊湊的下拉式介面呈現,非常適合表單或過濾介面。此元件可客製化,並能與現有的 Flutter 應用程式無縫整合,適用於所有主要平台。它簡化了多選功能的實作,無需複雜的程式碼。秉持著簡單與效能設計的理念,是尋求高效多值選擇解決方案開發者的完美選擇。

適用情境

  • 具有多個選項的表單輸入
  • 儀表板中的篩選選項
  • 使用者偏好選擇
  • 基於標籤的輸入系統
  • 移動和網頁應用中的動態資料選擇

主要特色

  • 簡單的整合API
  • 支援所有 Flutter 平台
  • 可自訂外觀
  • 高效的狀態管理
  • 內建的搜尋/篩選功能
  • 響應式設計

適合對象

  • 使用多選構建表單的開發者
  • 需要乾淨下拉選單的UI設計師
  • 跨平台應用開發者
  • 需要基於標籤的輸入的應用程式
  • 優先考慮最小化設定的專案

使用建議

  • 內建樣式選項有限,僅支援基本自訂
  • 原生不支援群組選項
  • 需要手動處理大型資料集
  • 未針對極長清單進行優化
  • 可能需要額外的邏輯進行驗證

原始 README

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

multiselect

A simple Multiselect Dropdown

alt Demo

Usage

add it to pubspec.yaml

dependencies:
  flutter:
    sdk: flutter
  multiselect: # use latest version    

import it

// Imports all Widgets included in [multiselect] package
import 'package:multiselect/multiselect.dart';

Add the DropDownMultiSelect widget to your build method

// Import multiselct
import 'package:multiselect/multiselect.dart';


class Home extends StatefulWidget {
  const Home({Key? key}) : super(key: key);

  @override
  _HomeState createState() => _HomeState();
}

class _HomeState extends State<Home> {

  List<String> selected = [];

  @override
  Widget build(BuildContext context) {
    return Scaffold(
        body: Center(
      child: Padding(
        padding: const EdgeInsets.all(20.0),
        // DropDownMultiSelect comes from multiselect
        child: DropDownMultiSelect(
          onChanged: (List<String> x) {
            setState(() {
              selected =x;
            });
          },
          options: ['a' , 'b' , 'c' , 'd'],
          selectedValues: selected,
          whenEmpty: 'Select Something',
        ),
      ),
    ));
  }
}

And that is it. You will have a working multiselect DropDown with no effort at all.

 
 
 

PS: multiselect is planned to be a collection of multi-select widgets. I will add other functionality based on the needs of the community

所屬分類

依賴

依賴清單 1 項

原始碼儲存庫

使用此套件的專案

暫無相關資料。