Skip to content

Commit a0aa143

Browse files
committed
i2 - Update README.md
1 parent b00e361 commit a0aa143

File tree

1 file changed

+25
-25
lines changed

1 file changed

+25
-25
lines changed

README.md

Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,15 @@ A Flutter package for all platform which provides a custom date picker
44

55
![image](https://user-images.githubusercontent.com/80730648/194060809-54d34d17-3a1b-48cd-8b1b-6703ff99dd4c.gif)
66

7-
#### Screen Shot
7+
### Screen Shot
8+
9+
#### Mobile
10+
11+
![Simulator Screen Shot - iPhone 14 Pro Max - 2023-03-17 at 19 04 23](https://user-images.githubusercontent.com/80730648/225899798-db90da6d-4dd1-4643-9427-f62481d5b4bf.png)
12+
13+
![Simulator Screen Shot - iPhone 14 Pro Max - 2023-03-17 at 19 04 14](https://user-images.githubusercontent.com/80730648/225899832-da157c6b-a3ba-494f-9995-81b90ddb0545.png)
14+
15+
#### Web
816

917
!["Screen Shot 2022-03-01 at 15 36 31](https://user-images.githubusercontent.com/80730648/194061025-1b968af8-a9a3-4e3e-b124-1a41f91e6002.png)
1018

@@ -28,29 +36,21 @@ import 'package:flutter_date_range_picker/flutter_date_range_picker.dart';
2836

2937
Use the widget
3038

39+
- Open date range picker:
40+
41+
```dart
42+
MaterialDateRangePickerDialog.showDateRangePicker(
43+
context,
44+
selectDateRangeActionCallback: (startDate, endDate) {}
45+
);
46+
```
47+
48+
- Open date picker:
49+
3150
```dart
32-
void showDatePicker() {
33-
showGeneralDialog(
34-
context: context,
35-
barrierDismissible: true,
36-
barrierLabel: '',
37-
barrierColor: Colors.black54,
38-
pageBuilder: (context, animation, secondaryAnimation) {
39-
return Dialog(
40-
elevation: 0,
41-
backgroundColor: Colors.white,
42-
shape: RoundedRectangleBorder(
43-
borderRadius: BorderRadius.circular(18.0)),
44-
child: MultipleViewDateRangePicker(
45-
setDateActionCallback: ({startDate, endDate}) {
46-
setState(() {
47-
startDateSelected = startDate;
48-
endDateSelected = endDate;
49-
});
50-
Navigator.of(context).pop();
51-
},
52-
));
53-
}
54-
);
55-
}
51+
MaterialDateRangePickerDialog.showDatePicker(
52+
context,
53+
title
54+
selectDateActionCallback: (dateSelected) {}
55+
);
5656
```

0 commit comments

Comments
 (0)