ir_datetime_picker 1.0.1 ir_datetime_picker: ^1.0.1 copied to clipboard
Iranian datetime picker
Iranian (persian,farsi,shamsi,jalali) datetime picker for flutter with cupertino style. #
Usage #
Step1: add dependency to your pubspec.yaml:
dependencies:
ir_datetime_picker: version
Step2: import library:
import 'package:ir_datetime_picker.dart/ir_datetime_picker.dart';
Step3: check exmaples to use:
// use top level function showIRDatePickerRoute like below:
ElevatedButton(
child: const Text("PickDate"),
onPressed: () async {
Jalali? selectedDate = await showIRDatePickerRoute(context);
if (selectedDate != null) {
print("${selectedDate.year}/${selectedDate.month}/${selectedDate.day}");
} else {
print("No date was selected");
}
},
)