flutter_select 0.0.1

  • README.md
  • CHANGELOG.md
  • Installing
  • Versions
  • 3

flutter_select

A Flutter package implements different kinds of select fields.

Usage

To use this plugin, add flutter_select as a dependency in your pubspec.yaml file.

Example

import 'flutter_select/flutter_select.dart';

// single select
SingleSelectFormField(
  controller: _singleSelectController,
  labelText: 'Single Select',
  validator: (value) {
    if (value.isEmpty) return 'Please select an option';
  },
  options: _options,
  onSaved: (Map<String, dynamic> value) => _data['singleSelect'] = value,
);

// date select
DateSelectFormField(
  controller: _dateController,
  labelText: 'Date',
  validator: (value) {
    if (value == null) return 'Please select a date';
  },
  onSaved: (DateTime value) => _data['date'] = value,
);

// time select
TimeSelectFormField(
  controller: _timeController,
  labelText: 'Time',
  validator: (value) {
    if (value == null) return 'Please select time';
  },
  onSaved: (TimeOfDay value) => _data['time'] = value,
);

// multiple select
MultipleSelectFormField(
  controller: _multipleSelectController,
  labelText: 'Multiple Select',
  validator: (value) {
    if (value.isEmpty) {
      return 'Please select at least one option';
    }
  },
  options: _options,
  onSaved: (List<Map<String, dynamic>> value) => _data['multipleSelect'] = value,
);

[0.0.1]

  • Initial release of flutter_select, supporting single/multiple/date/time select

Use this package as a library

1. Depend on it

Add this to your package's pubspec.yaml file:


dependencies:
  flutter_select: ^0.0.1

2. Install it

You can install packages from the command line:

with pub:


$ pub get

with Flutter:


$ flutter packages get

Alternatively, your editor might support pub get or flutter packages get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:


import 'package:flutter_select/flutter_select.dart';
  
Version Uploaded Documentation Archive
0.0.1 Aug 25, 2018 Go to the documentation of flutter_select 0.0.1 Download flutter_select 0.0.1 archive
Popularity:
Describes how popular the package is relative to other packages. [more]
6
Health:
Code health derived from static analysis. [more]
0
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
0
Overall:
Weighted score of the above. [more]
3
Learn more about scoring.

The package version is not analyzed, because it does not support Dart 2. Until this is resolved, the package will receive a health and maintenance score of 0.

Analysis issues and suggestions

Support Dart 2 in pubspec.yaml.

The SDK constraint in pubspec.yaml doesn't allow the Dart 2.0.0 release. For information about upgrading it to be Dart 2 compatible, please see https://www.dartlang.org/dart-2#migration.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=1.19.0 <2.0.0