selection_picker 0.1.0

  • Readme
  • Changelog
  • Example
  • Installing
  • 71

selection_picker #

A flutter plugin for creating a Picker selection and customize it.

Example

How to use #

    SelectionPicker(
            items: Utilities.getDays(),
            showSelectAll: true,
            textColor: Color(0xFF003A5D),
            selectAllTitle: Text("Select all",style: _styleTitleSelectAll),
            showTitle: true,
            title: Text("Week days",style: _styleTitle,),
            backgroundColorSelected: Colors.black12,
            onSelected: (items){
            //Items selected here 
            },
            aligment: Alignment.center,
          )

class Utilities {
  static List<SelectionItem> getDays() {
    List<SelectionItem> days = [];
    days.add(SelectionItem(name: "MO", isSelected: false, identifier: 1));
    days.add(SelectionItem(name: "TU", isSelected: false, identifier: 2));
    days.add(SelectionItem(name: "WE", isSelected: false, identifier: 3));
    days.add(SelectionItem(name: "TH", isSelected: false, identifier: 4));
    days.add(SelectionItem(name: "FR", isSelected: false, identifier: 5));
    days.add(SelectionItem(name: "SA", isSelected: false, identifier: 6));
    days.add(SelectionItem(name: "SU", isSelected: false, identifier: 7));
    return days;
  }
}

0.1.0 #

  • TODO: Describe initial release.

example/lib/main.dart

import 'package:flutter/material.dart';
import 'example.dart';

void main() => runApp(MyApp());

class MyApp extends StatelessWidget {
  // This widget is the root of your application.
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Flutter Demo',
      theme: ThemeData(
        // This is the theme of your application.
        //
        // Try running your application with "flutter run". You'll see the
        // application has a blue toolbar. Then, without quitting the app, try
        // changing the primarySwatch below to Colors.green and then invoke
        // "hot reload" (press "r" in the console where you ran "flutter run",
        // or simply save your changes to "hot reload" in a Flutter IDE).
        // Notice that the counter didn't reset back to zero; the application
        // is not restarted.
        primarySwatch: Colors.blue,
      ),
      home: ExamplePage(),
    );
  }
}

Use this package as a library

1. Depend on it

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


dependencies:
  selection_picker: ^0.1.0

2. Install it

You can install packages from the command line:

with Flutter:


$ flutter pub get

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

3. Import it

Now in your Dart code, you can use:


import 'package:selection_picker/selectionpicker.dart';
import 'package:selection_picker/selection_item.dart';
  
Popularity:
Describes how popular the package is relative to other packages. [more]
42
Health:
Code health derived from static analysis. [more]
100
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
100
Overall:
Weighted score of the above. [more]
71
Learn more about scoring.

We analyzed this package on Jun 5, 2020, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.8.2
  • pana: 0.13.8-dev
  • Flutter: 1.17.1

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.1.0 <3.0.0
flutter 0.0.0
Transitive dependencies
collection 1.14.12
meta 1.1.8
sky_engine 0.0.99
typed_data 1.1.6
vector_math 2.0.8
Dev dependencies
flutter_test