scheduled_date_picker 1.0.4

  • Readme
  • Changelog
  • Example
  • Installing
  • new67

Scheduled Date Picker #

The scheduled date picker is a set of widgets that allows scheduling date. This can be useful in many scenarios, for scheduled tasks for example;

Demo #

animated image

Getting Started #

Installation #

Add to pubspec.yaml in dependencies

  scheduled_date_picker: ^1.0.0

Usage #

More usage details can be found on example folder

new ScheduledDatePicker(
    defaultLocale: 'pt',
    onStartDateChanged: (startDate) => print(startDate.toString()),
    onEndDateChanged: (endDate) => print(endDate.toString()),
    onScheduleDateChanged: (scheduleDate) =>
        print(scheduleDate.toString()),
    onTypeChanged: (type) => print(type.toString()),
    onWeekDaysChanged: (weekDays) =>
        print(weekDays.join(', ').toString()),
);

[1.0.4] - 21/03/2020 #

  • Added support to initialize ScheduledDatePicker with initial values;

[1.0.3] - 19/03/2020 #

  • Resized demo gif on readme;

[1.0.2] - 19/03/2020 #

  • Update demo gif on readme;

[1.0.1] - 19/03/2020 #

  • Update pubspec description;

[1.0.0] - 19/03/2020 #

  • Update readme with example usage;
  • Exported WeekDay enum to be used outside the lib;
  • Added author to pubspec;

[0.0.1] - 18/03/2020 #

  • Initial version.

example/lib/main.dart

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

void main() {
  runApp(SampleApp());
}

class SampleApp extends StatefulWidget {
  @override
  State<StatefulWidget> createState() {
    return SampleAppState();
  }
}

class SampleAppState extends State<SampleApp> {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        appBar: AppBar(title: Text('Sample App')),
        body: ScheduledDatePicker(
          defaultLocale: 'pt',
          initialType: ScheduledDateType.CUSTOMIZED,
          initialWeekDays: [WeekDay.SEG, WeekDay.QUA, WeekDay.SEX],
          initialStartDate: DateTime.now().add(Duration(days: 5)),
          initialEndDate: DateTime.now().add(Duration(days: 15)),
          onStartDateChanged: (startDate) => print(startDate.toString()),
          onEndDateChanged: (endDate) => print(endDate.toString()),
          onScheduleDateChanged: (scheduleDate) =>
              print(scheduleDate.toString()),
          onTypeChanged: (type) => print(type.toString()),
          onWeekDaysChanged: (weekDays) =>
              print(weekDays.join(', ').toString()),
        ),
      ),
    );
  }
}

Use this package as a library

1. Depend on it

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


dependencies:
  scheduled_date_picker: ^1.0.4

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:scheduled_date_picker/scheduled_date_picker.dart';
  
Popularity:
Describes how popular the package is relative to other packages. [more]
33
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]
67
Learn more about scoring.

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

  • Dart: 2.7.1
  • pana: 0.13.6
  • Flutter: 1.12.13+hotfix.8

Health issues and suggestions

Document public APIs. (-0.06 points)

30 out of 31 API elements have no dartdoc comment.Providing good documentation for libraries, classes, functions, and other API elements improves code readability and helps developers find and use your API.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.6.0 <3.0.0
flutter 0.0.0
intl ^0.16.1 0.16.1
Transitive dependencies
collection 1.14.11 1.14.12
meta 1.1.8
path 1.6.4
sky_engine 0.0.99
typed_data 1.1.6
vector_math 2.0.8
Dev dependencies
flutter_test