Skip to content

Commit 8190f6d

Browse files
Merge pull request #23 from VisualPT/main
feat: add `FormBuilderCupertinoDateTimePicker`
2 parents 34cd942 + 087d17c commit 8190f6d

7 files changed

Lines changed: 655 additions & 16 deletions

File tree

README.md

Lines changed: 18 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -6,20 +6,22 @@ Additional form inputs fields with Cupertino style for [flutter_form_builder](ht
66
[![GitHub Workflow Status](https://img.shields.io/github/actions/workflow/status/flutter-form-builder-ecosystem/form_builder_cupertino_fields/base.yaml?branch=main&logo=github&style=for-the-badge)](https://github.com/flutter-form-builder-ecosystem/form_builder_cupertino_fields/actions/workflows/base.yaml)
77
[![Codecov](https://img.shields.io/codecov/c/github/flutter-form-builder-ecosystem/form_builder_cupertino_fields?logo=codecov&style=for-the-badge)](https://codecov.io/gh/flutter-form-builder-ecosystem/form_builder_cupertino_fields/)
88
[![CodeFactor Grade](https://img.shields.io/codefactor/grade/github/flutter-form-builder-ecosystem/form_builder_cupertino_fields?logo=codefactor&style=for-the-badge)](https://www.codefactor.io/repository/github/flutter-form-builder-ecosystem/form_builder_cupertino_fields)
9-
___
10-
11-
- [Features](#features)
12-
- [Inputs](#inputs)
13-
- [Use](#use)
14-
- [Setup](#setup)
15-
- [Basic use](#basic-use)
16-
- [Support](#support)
17-
- [Contribute](#contribute)
18-
- [Questions and answers](#questions-and-answers)
19-
- [Donations](#donations)
20-
- [Roadmap](#roadmap)
21-
- [Ecosystem](#ecosystem)
22-
- [Thanks to](#thanks-to)
9+
10+
---
11+
12+
- [Form Builder Cupertino Fields](#form-builder-cupertino-fields)
13+
- [Features](#features)
14+
- [Inputs](#inputs)
15+
- [Use](#use)
16+
- [Setup](#setup)
17+
- [Basic use](#basic-use)
18+
- [Support](#support)
19+
- [Contribute](#contribute)
20+
- [Questions and answers](#questions-and-answers)
21+
- [Donations](#donations)
22+
- [Roadmap](#roadmap)
23+
- [Ecosystem](#ecosystem)
24+
- [Thanks to](#thanks-to)
2325

2426
## Features
2527

@@ -31,6 +33,7 @@ ___
3133
The currently supported fields include:
3234

3335
- `FormBuilderCupertinoCheckbox` - Single checkbox field
36+
- `FormBuilderCupertinoDateTimePicker` - Date picker field
3437
- `FormBuilderCupertinoSegmentedControl` - Segmented control using `CupertinoSegmentedControl`
3538
- `FormBuilderCupertinoSlidingSegmentedControl` - Segmented control bar using `CupertinoSlidingSegmentedControl`
3639
- `FormBuilderCupertinoSlider` - For selection of a numerical value on a slider
@@ -71,7 +74,7 @@ You have some ways to contribute to this packages
7174
- Intermediate: Implement new features (from issues or not) and created pull requests
7275
- Advanced: Join to [organization](#ecosystem) like a member and help coding, manage issues, dicuss new features and other things
7376

74-
See [contribution file](https://github.com/flutter-form-builder-ecosystem/.github/blob/main/CONTRIBUTING.md) for more details
77+
See [contribution file](https://github.com/flutter-form-builder-ecosystem/.github/blob/main/CONTRIBUTING.md) for more details
7578

7679
### Questions and answers
7780

example/.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,11 @@
55
*.swp
66
.DS_Store
77
.atom/
8+
.build/
89
.buildlog/
910
.history
1011
.svn/
12+
.swiftpm/
1113
migrate_working_dir/
1214

1315
# IntelliJ related

example/lib/main.dart

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,14 @@ class _MyHomePageState extends State<MyHomePage> {
9999
validator: (value) =>
100100
value != null && value.length > 4 ? null : 'Write a text',
101101
),
102+
const SizedBox(height: 16),
103+
FormBuilderCupertinoDateTimePicker(
104+
name: 'date',
105+
prefix: const Icon(CupertinoIcons.calendar),
106+
autovalidateMode: AutovalidateMode.onUserInteraction,
107+
validator: (value) => value != null ? null : 'Required date',
108+
initialValue: DateTime.now(),
109+
),
102110
],
103111
),
104112
),

lib/form_builder_cupertino_fields.dart

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
export 'src/fields/form_builder_cupertino_checkbox.dart';
2+
export 'src/fields/form_builder_cupertino_datetime_picker.dart';
23
export 'src/fields/form_builder_cupertino_segmented_control.dart';
34
export 'src/fields/form_builder_cupertino_slider.dart';
45
export 'src/fields/form_builder_cupertino_sliding_segmented_control.dart';

0 commit comments

Comments
 (0)