select_days_week 0.1.1

  • Readme
  • Changelog
  • Example
  • Installing
  • 78

Select Days Week

A widget to select days of the week

Features: #

  • Single and multiple selection
  • Select non-selectable days
  • Validate selected day
  • Customizable selection color
  • Possibility to specify days of the week

Example Use #

SelectDaysWeekWidget(
    SelectDaysWeekController(
      unSelectableDays: [1, 5],
    ),
    daySelected: (int day) {
      print(day);
    },
);

[0.0.1] - 2020-03-03. #

  • Initial release

[0.0.2] - 2020-03-04. #

  • Update Docs

[0.0.3] - 2020-03-04. #

  • Update LICENCE

[0.0.4] - 2020-03-04. #

  • Add Example

[0.1.0] - 2020-03-08. #

  • Add Suport internationalization

  • Possibility to specify days of the week

[0.1.1] - 2020-03-11. #

  • Add Screen Example

example/lib/main.dart

import 'package:flutter/material.dart';
import 'package:flutter/widgets.dart';
import 'package:select_days_week/select_days_week_controller.dart';
import 'package:select_days_week/select_days_week_widget.dart';

void main() => runApp(new Example());

class Example extends StatefulWidget {
  @override
  _ExampleState createState() => _ExampleState();
}

class _ExampleState extends State<Example> {
  @override
  Widget build(BuildContext context) {
    return Center(
      child: SelectDaysWeekWidget(
        SelectDaysWeekController(unSelectableDays: [
          1,
          5
        ], specificDays: [
          DateTime(2000, 01, 03),
          DateTime(2000, 01, 06),
          DateTime(2000, 01, 07),
          DateTime(2000, 01, 08),
          //any days
        ]),
        color: Colors.green,
        singleDay: false,
        validatorDay: (int day) async {
          return day != 2;
        },
        daySelected: (int day) {
          print(day);
        },
      ),
    );
  }
}

Use this package as a library

1. Depend on it

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


dependencies:
  select_days_week: ^0.1.1

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:select_days_week/day.dart';
import 'package:select_days_week/day.g.dart';
import 'package:select_days_week/select_days_week_controller.dart';
import 'package:select_days_week/select_days_week_controller.g.dart';
import 'package:select_days_week/select_days_week_widget.dart';
  
Popularity:
Describes how popular the package is relative to other packages. [more]
56
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]
78
Learn more about scoring.

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

  • Dart: 2.8.4
  • pana: 0.13.14
  • Flutter: 1.17.5

Analysis suggestions

Package not compatible with SDK dart

Because:

  • select_days_week that is a package requiring null.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.1.0 <3.0.0
flutter 0.0.0
flutter_mobx ^1.1.0 1.1.0+1
intl ^0.16.1 0.16.1
mobx ^1.1.1 1.2.1+1
Transitive dependencies
collection 1.14.12 1.14.13
meta 1.1.8 1.2.1
path 1.7.0
sky_engine 0.0.99
typed_data 1.1.6 1.2.0
vector_math 2.0.8
Dev dependencies
build_runner ^1.9.0
flutter_test
mobx_codegen ^1.0.3