v0.1.1+1dropdown_plus_plus
검색, 키보드 탐색, 오프라인 데이터 소스, 원격 데이터 소스 및 간편한 사용자 정의를 지원하는 폼용 간단하고 사용하기 쉬운 드롭다운.
11좋아요 1430일 다운로드140Pub 점수
AndroidiOSWebmacOSWindowsLinux
검색, 키보드 탐색, 오프라인 데이터 소스, 원격 데이터 소스 및 간편한 사용자 정의를 지원하는 폼용 간단하고 사용하기 쉬운 드롭다운.
아래는 영문 원문 스냅샷입니다. 최신 내용은 GitHub에서 확인하세요.
Simple and easy to use Dropdown in forms with search, keyboard navigation, offiline data source, remote data source and easy customization.
A maintained fork of dropdown_plus with a lot more customisations.
Simple Text Dropdown.
TextDropdownFormField(
options: ["Male", "Female"],
decoration: InputDecoration(
border: OutlineInputBorder(),
suffixIcon: Icon(Icons.arrow_drop_down),
labelText: "Gender"),
cursorColor: Colors.green,
dropdownItemColor: Colors.red,
),
dropdown_plus_plus: <lastest version>
final List<Map<String, dynamic>> _roles = [
{"name": "Super Admin", "desc": "Having full access rights", "role": 1},
{
"name": "Admin",
"desc": "Having full access rights of a Organization",
"role": 2
},
{
"name": "Manager",
"desc": "Having Magenent access rights of a Organization",
"role": 3
},
{
"name": "Technician",
"desc": "Having Technician Support access rights",
"role": 4
},
{
"name": "Customer Support",
"desc": "Having Customer Support access rights",
"role": 5
},
{"name": "User", "desc": "Having End User access rights", "role": 6},
];
// ...
// ...
DropdownFormField<Map<String, dynamic>>(
onEmptyActionPressed: () async {},
dropdownItemSeparator: Divider(
color: Colors.black,
height: 1,
),
decoration: InputDecoration(
border: OutlineInputBorder(),
suffixIcon: Icon(Icons.arrow_drop_down),
labelText: "Access"),
onSaved: (dynamic str) {},
onChanged: (dynamic str) {},
validator: (dynamic str) {},
displayItemFn: (dynamic item) => Text(
item['name'] ?? '',
style: TextStyle(fontSize: 16),
),
findFn: (dynamic str) async => _roles,
filterFn: (dynamic item, str) =>
item['name'].toLowerCase().indexOf(str.toLowerCase()) >= 0,
dropdownItemFn: (dynamic item, position, focused,
dynamic lastSelectedItem, onTap) =>
ListTile(
title: Text(item['name']),
subtitle: Text(
item['desc'] ?? '',
),
tileColor:
focused ? Color.fromARGB(20, 0, 0, 0) : Colors.transparent,
onTap: onTap,
),
),
final bool autoFocus;
final bool Function(dynamic item, String str)? filterFn;
final bool Function(dynamic item1, dynamic item2)? selectedFn;
final Future<List<dynamic>> Function(String str) findFn;
final ListTile Function(
dynamic item,
int position,
bool focused,
bool selected,
Function() onTap,
) dropdownItemFn;
final Widget Function(dynamic item) displayItemFn;
final InputDecoration? decoration;
final Color? dropdownColor;
final Color? cursorColor;
final DropdownEditingController<T>? controller;
final void Function(dynamic item)? onChanged;
final void Function(dynamic)? onSaved;
final String? Function(T?)? validator;
final double? dropdownHeight;
final TextStyle? searchTextStyle;
final String emptyText;
final String emptyActionText;
final Future<void> Function(String)? onEmptyActionPressed;
final Widget? dropdownItemSeparator;
의존성 목록 2 개
{"sdk":"flutter"}{"sdk":"flutter"}사용 목적에 따라 검색하고 개발 활동을 비교한 뒤 원본 저장소에서 요구 사항을 확인하세요.
“A repository is the most basic element of GitHub.”
GitHub Docs — About repositories ↗