flutter_linear_datepicker

Last updated:

0 purchases

flutter_linear_datepicker Image
flutter_linear_datepicker Images
Add to Cart

Description:

flutter linear datepicker

Flutter Persian (Jalaali) and Gregorian Linear Date Picker #

This package provides a Persian or Gregorian linear DatePicker for flutter.


Use this package as a library #
1. Depend on it
Add this to your package's pubspec.yaml file:
dependencies:
flutter_linear_datepicker: ^2.0.6
copied to clipboard
2. Install it
You can install packages from the command line:
with pub:
$ pub get
copied to clipboard
with Flutter:
$ flutter pub get
copied to clipboard
Alternatively, your editor might support pub get or 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:flutter_linear_datepicker/flutter_datepicker.dart';
import 'package:flutter_linear_datepicker/number_picker.dart';
copied to clipboard

How to use? #
Simple usage
just simply infalate following snippet in your flutter code:
LinearDatePicker(
dateChangeListener: (String selectedDate) {
print(selectedDate);
},
);
copied to clipboard

Advanced usage
You can customize widget using below parameters:
LinearDatePicker(
startDate: "2004/10/17", //yyyy/mm/dd
endDate: "2020/02/20",
initialDate: "2010/11/15",
addLeadingZero: true,
dateChangeListener: (String selectedDate) {
print(selectedDate);
},
showDay: true, //false -> only select year & month
labelStyle: TextStyle(
fontFamily: 'sans',
fontSize: 14.0,
color: Colors.black,
),
selectedRowStyle: TextStyle(
fontFamily: 'sans',
fontSize: 18.0,
color: Colors.deepOrange,
),
unselectedRowStyle: TextStyle(
fontFamily: 'sans',
fontSize: 16.0,
color: Colors.blueGrey,
),
yearText: "سال | year",
monthText: "ماه | month",
dayText: "روز | day",
showLabels: true, // to show column captions, eg. year, month, etc.
columnWidth: 100,
showMonthName: true,
isJalaali: false // false -> Gregorian
),
copied to clipboard

Used Packages
MarcinusX/NumberPicker
FatulM/shamsi_date

License:

For personal and professional use. You cannot resell or redistribute these repositories in their original state.

Customer Reviews

There are no reviews.