-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathREADME.md
49 lines (37 loc) · 1.43 KB
/
README.md
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
## Simple Month Year Picker
Simple to use month/year picker for your apps with highly customisable options.

## Getting started
Add this to your package's `pubspec.yaml` file
```yaml
dependencies:
simple_month_year_picker: ^1.1.0
```
## Usage
Next, you just have to import the package using:
```dart
import 'package:simple_month_year_picker/simple_month_year_picker.dart';
```
```dart
Widget build(BuildContext context) {
return ElevatedButton(
onPressed: () async {
// This is in order to get the selected date.
final selectedDate =
await SimpleMonthYearPicker.showMonthYearPickerDialog(
context: context,
titleTextStyle: TextStyle(),
monthTextStyle: TextStyle(),
yearTextStyle: TextStyle(),
disableFuture:
true // This will disable future years. it is false by default.
);
// Use the selected date as needed
print('Selected date: $selectedDate');
},
child: const Text('show dialog'),
);
}
```
## Additional information
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.