horizontal_time_picker 1.0.1

  • Readme
  • Changelog
  • Example
  • Installing
  • 80

horizontal_time_picker #

Easy to use, beautiful and customizable time strip component for Flutter

Getting Started #

Features #

  • [x] Custom time range (start & end Time)
  • [x] onTimeSelected, onTimeUnSelectedevents.
  • [x] Support custom ScrollController
  • [x] Custom [TextStyles] for text
  • [x] Custom [TextStyles] for text selected
  • [x] Default time cell Decoration
  • [x] Selected time cell Decoration
  • [x] Disabled time cell Decoration

Properties #

Property NameProperty TypeDescriptionDefault value
TODO

e.g.

                          HorizontalTimePicker(
                            key: UniqueKey(),
                            startTimeInHour: 9,
                            endTimeInHour: 24,
                            dateForTime: DateTime.now(),
                            selectedTimeTextStyle: TextStyle(
                              color: Colors.white,
                              fontFamily: "Helvetica Neue",
                              fontWeight: FontWeight.w300,
                              fontSize: 16,
                              height: 1.0,
                            ),
                            timeTextStyle: TextStyle(
                              color: Colors.black,
                              fontFamily: "Helvetica Neue",
                              fontWeight: FontWeight.w300,
                              fontSize: 16,
                              height: 1.0,
                            ),
                            defaultDecoration: const BoxDecoration(
                              color: Colors.white,
                              border:
                                  Border.fromBorderSide(BorderSide(
                                                            color: Color.fromARGB(255, 151, 151, 151),
                                                            width: 1,
                                                            style: BorderStyle.solid,
                                                          )),
                              borderRadius: BorderRadius.all(Radius.circular(5)),
                            ),
                            selectedDecoration: const BoxDecoration(
                              color: Colors.black,
                              border:
                                  Border.fromBorderSide(BorderSide(
                                                            color: Color.fromARGB(255, 151, 151, 151),
                                                            width: 1,
                                                            style: BorderStyle.solid,
                                                          )),
                              borderRadius: BorderRadius.all(Radius.circular(5)),
                            ),
                            disabledDecoration: const BoxDecoration(
                              color: Colors.black26,
                              border:
                                  Border.fromBorderSide(BorderSide(
                                                            color: Color.fromARGB(255, 151, 151, 151),
                                                            width: 1,
                                                            style: BorderStyle.solid,
                                                          )),
                              borderRadius: BorderRadius.all(Radius.circular(5)),
                            ),
                          ));

0.0.1 #

  • Initial code for the horizontal time picker.

0.0.2 #

  • Bug Fixes + Example.

1.0.0 #

  • Adding support to hide and show disabled time slots.

1.0.1 #

  • Adding support to select initial time slots.

example/README.md

example #

A new Flutter application.

Getting Started #

This project is a starting point for a Flutter application.

A few resources to get you started if this is your first Flutter project:

For help getting started with Flutter, view our online documentation, which offers tutorials, samples, guidance on mobile development, and a full API reference.

Use this package as a library

1. Depend on it

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


dependencies:
  horizontal_time_picker: ^1.0.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:horizontal_time_picker/horizontal_time_picker.dart';
  
Popularity:
Describes how popular the package is relative to other packages. [more]
60
Health:
Code health derived from static analysis. [more]
98
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
100
Overall:
Weighted score of the above. [more]
80
Learn more about scoring.

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

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

Health issues and suggestions

Document public APIs. (-0.03 points)

58 out of 60 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.

Fix lib/horizontal_time_picker.dart. (-1.99 points)

Analysis of lib/horizontal_time_picker.dart reported 4 hints:

line 68 col 11: Avoid wrapping fields in getters and setters just to be "safe".

line 70 col 7: Avoid wrapping fields in getters and setters just to be "safe".

line 81 col 11: Avoid wrapping fields in getters and setters just to be "safe".

line 83 col 7: Avoid wrapping fields in getters and setters just to be "safe".

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.1.0 <3.0.0
flutter 0.0.0
Transitive dependencies
collection 1.14.11 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