alt_persian_date_picker 0.1.4
alt_persian_date_picker: ^0.1.4 copied to clipboard

Persian date picker for flutter.

A persian (farsi,shamsi) date picker for flutter, inspired by material datetime picker. #

A Flutter persian date picker inspired by material datetime picker and based on shamsi_date.

You can pick date / range date / Month / Year .

Screenshots #

Date PickerEditable Date PickerRanged Date PickerSeprate Header Date PickerMonth PickerYear Picker

Usage #

Add it to your pubspec.yaml file:


dependencies:

alt_persian_datetime_picker: version

In your library add the following import:


import 'package:alt_persian_date_picker/alt_persian_date_picker.dart';

Here is an example how to use:


            TextButton(
              onPressed: () {
                DatePicker.showDatePicker(
                  context,
                  PickerEnum.month,
                  theme: DatePickerTheme(
                      noneSelectedItemColor: Colors.white,
                      selectedItemColor: Colors.greenAccent,
                      disableItemColor: Colors.redAccent),
                  pickerModel: MonthPickerModel(
                    startSelectedInitDate: 4,
                    disables: [1, 5],
                  ),
                  onConfirm: (time) {
                    print("Selected month is $time");
                    _showToast(time);
                  },
                );
              },
              child: Text("ماه"),
            ),

Date time picker parameters and events #

ParameterTypeDefaultDescription
typePickerEnumHas 4 values(month,year,date,rangedate)
headerTypeHeaderTypeHas 3 values(seprated,mix,writable)
disableString or List<String>nullDisable dates
themeDatePickerThemeYou can add your style to each part of date picker
onConfirmFunction(String)This event return a String date

##Pull request and feedback are always appreciated.

###Contact me with ali.tazik@gmail.com.

7
likes
70
pub points
5%
popularity

Publisher

Unknown

Persian date picker for flutter.

Repository (GitHub)
View/report issues

Documentation

API reference

License

BSD (LICENSE)

Dependencies

flutter, shamsi_date

More

Packages that depend on alt_persian_date_picker