File tree Expand file tree Collapse file tree 4 files changed +30
-11
lines changed Expand file tree Collapse file tree 4 files changed +30
-11
lines changed Original file line number Diff line number Diff line change
1
+ ## [ 0.1.1] - 31-Dec-2020
2
+ * Include code sample in README
3
+
1
4
## [ 0.1.0] - 31-Dec-2020
2
5
* Initial release.
Original file line number Diff line number Diff line change 2
2
3
3
Field for picking image(s) from Gallery or Camera for flutter_form_builder package
4
4
5
- ## Getting Started
5
+ ## Usage
6
6
7
- This project is a starting point for a Dart
8
- [ package] ( https://flutter.dev/developing-packages/ ) ,
9
- a library module containing code that can be shared easily across
10
- multiple Flutter or Dart projects.
11
-
12
- For help getting started with Flutter, view our
13
- [ online documentation] ( https://flutter.dev/docs ) , which offers tutorials,
14
- samples, guidance on mobile development, and a full API reference.
7
+ FormBuilder(
8
+ child: Column(
9
+ mainAxisAlignment: MainAxisAlignment.center,
10
+ children: <Widget >[
11
+ FormBuilderImagePicker(
12
+ name: 'photos',
13
+ decoration: const InputDecoration(labelText: 'Pick Photos'),
14
+ maxImages: 1,
15
+ ),
16
+ const SizedBox(height: 15),
17
+ RaisedButton(onPressed: (){
18
+ if(_ formKey.currentState.saveAndValidate()){
19
+ print(_ formKey.currentState.value);
20
+ }
21
+ })
22
+ ] ,
23
+ ),
24
+ ),
Original file line number Diff line number Diff line change @@ -21,6 +21,7 @@ class MyApp extends StatelessWidget {
21
21
}
22
22
23
23
class MyHomePage extends StatelessWidget {
24
+ final _formKey = GlobalKey <FormBuilderState >();
24
25
25
26
@override
26
27
Widget build (BuildContext context) {
@@ -41,6 +42,11 @@ class MyHomePage extends StatelessWidget {
41
42
maxImages: 1 ,
42
43
),
43
44
const SizedBox (height: 15 ),
45
+ RaisedButton (onPressed: () {
46
+ if (_formKey.currentState.saveAndValidate ()) {
47
+ print (_formKey.currentState.value);
48
+ }
49
+ })
44
50
],
45
51
),
46
52
),
Original file line number Diff line number Diff line change 1
1
name : form_builder_image_picker
2
- description : Field for picking image(s) from Gallery or Camera for flutter_form_builder package
3
- version : 0.1.0
2
+ description : Field for picking image(s) from Gallery or Camera for flutter_form_builder package
3
+ version : 0.1.1
4
4
homepage : https://github.com/danvick/form_builder_image_picker
5
5
6
6
environment :
You can’t perform that action at this time.
0 commit comments