Skip to content

Commit 1fb3f55

Browse files
docs: Refactor readme
1 parent 7953a1a commit 1fb3f55

File tree

1 file changed

+79
-14
lines changed

1 file changed

+79
-14
lines changed

README.md

Lines changed: 79 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,40 @@
11
# Form Builder File Picker
22

3+
File Picker Field for [flutter_form_builder](https://pub.dev/packages/flutter_form_builder) package
4+
35
[![Pub Version](https://img.shields.io/pub/v/form_builder_file_picker?logo=flutter&style=for-the-badge)](https://pub.dev/packages/form_builder_file_picker)
46
[![GitHub Workflow Status](https://img.shields.io/github/workflow/status/flutter-form-builder-ecosystem/form_builder_file_picker/Base?logo=github&style=for-the-badge)](https://github.com/flutter-form-builder-ecosystem/form_builder_file_picker/actions/workflows/base.yaml)
57
[![CodeFactor Grade](https://img.shields.io/codefactor/grade/github/flutter-form-builder-ecosystem/form_builder_file_picker?logo=codefactor&style=for-the-badge)](https://www.codefactor.io/repository/github/flutter-form-builder-ecosystem/form_builder_file_picker)
68
[![Codecov](https://img.shields.io/codecov/c/github/flutter-form-builder-ecosystem/form_builder_file_picker?logo=codecov&style=for-the-badge)](https://codecov.io/gh/flutter-form-builder-ecosystem/form_builder_file_picker/)
9+
[![Discord](https://img.shields.io/discord/985922433578053673?logo=discord&style=for-the-badge)](https://discord.com/invite/25KNPMJQf2)
10+
___
711

8-
File Picker Field for [flutter_form_builder](https://pub.dev/packages/flutter_form_builder) package
12+
- [Features](#features)
13+
- [Use](#use)
14+
- [Setup](#setup)
15+
- [Basic use](#basic-use)
16+
- [Especific uses](#especific-uses)
17+
- [Support](#support)
18+
- [Contribute](#contribute)
19+
- [Questions and answers](#questions-and-answers)
20+
- [Donations](#donations)
21+
- [Roadmap](#roadmap)
22+
- [Ecosystem](#ecosystem)
23+
- [Thanks to](#thanks-to)
24+
- [Contributors](#contributors)
25+
26+
## Features
27+
28+
- Automatic handle permissions
29+
- Show images preview
930

10-
# Setup
31+
## Use
1132

12-
Since this package makes use of [file_picker package](https://pub.dev/packages/file_picker), for platform specific setup, follow the instructions [here](https://github.com/miguelpruivo/flutter_file_picker/wiki/Setup)
33+
### Setup
1334

14-
# Usage
35+
Since this package makes use of [file_picker](https://pub.dev/packages/file_picker) package, for platform specific setup follow [this instructions](https://github.com/miguelpruivo/flutter_file_picker/wiki/Setup)
36+
37+
### Basic use
1538

1639
```dart
1740
import 'package:flutter_form_builder/flutter_form_builder.dart';
@@ -23,21 +46,30 @@ Since this package makes use of [file_picker package](https://pub.dev/packages/f
2346
maxFiles: null,
2447
previewImages: true,
2548
onChanged: (val) => print(val),
26-
selector: Row(
27-
children: <Widget>[
28-
Icon(Icons.file_upload),
29-
Text('Upload'),
30-
],
31-
),
49+
typeSelectors: [
50+
TypeSelector(
51+
type: FileType.any,
52+
selector: Row(
53+
children: <Widget>[
54+
Icon(Icons.add_circle),
55+
Padding(
56+
padding: const EdgeInsets.only(left: 8.0),
57+
child: Text("Add documents"),
58+
),
59+
],
60+
),
61+
),
62+
],
3263
onFileLoading: (val) {
3364
print(val);
3465
},
3566
),
3667
```
3768

38-
On mobile platforms the file picker will open a default document picker if used with FileType.any.
39-
If you want to be able to pick documents and images in the same form field you will need to define
40-
different file types and thus different selectors. To achieve this use the typeSelectors parameter:
69+
### Especific uses
70+
71+
On mobile platforms the file picker will open a default document picker if used with `FileType.any`.
72+
If you want to be able to pick documents and images in the same form field, you will need to define different file types and thus different selectors. To achieve this use the `typeSelectors` parameter.
4173
This way the user will see two buttons to open a file picker for documents and a file picker for the photos
4274
gallery.
4375

@@ -79,7 +111,40 @@ FormBuilderFilePicker(
79111
)
80112
```
81113

82-
## Credits
114+
## Support
115+
116+
### Contribute
117+
118+
You have some ways to contribute to this packages
119+
120+
- Beginner: Reporting bugs or request new features
121+
- Intermediate: Implement new features (from issues or not) and created pull requests
122+
- Advanced: Join to [organization](#ecosystem) like a member and help coding, manage issues, dicuss new features and other things
123+
124+
See [contribution file](https://github.com/flutter-form-builder-ecosystem/.github/blob/main/CONTRIBUTING.md) for more details
125+
126+
### Questions and answers
127+
128+
You can join to [our Discord server](https://discord.gg/25KNPMJQf2) or search answers in [StackOverflow](https://stackoverflow.com/questions/tagged/flutter-form-builder)
129+
130+
### Donations
131+
132+
Buy a coffe to [Danvick Miller](https://twitter.com/danvickmiller), creator of this awesome package
133+
134+
[![Buy me a coffee](https://www.buymeacoffee.com/assets/img/guidelines/download-assets-sm-1.svg)](https://www.buymeacoffee.com/danvick)
135+
136+
## Roadmap
137+
138+
- [Add visual examples](https://github.com/flutter-form-builder-ecosystem/form_builder_file_picker/issues/37) (images, gifs, videos, sample application)
139+
- [Solve open issues](https://github.com/flutter-form-builder-ecosystem/form_builder_file_picker/issues), [prioritizing bugs](https://github.com/flutter-form-builder-ecosystem/form_builder_file_picker/labels/bug)
140+
141+
## Ecosystem
142+
143+
Take a look to [our awesome ecosystem](https://github.com/flutter-form-builder-ecosystem) and all packages in there
144+
145+
## Thanks to
146+
147+
### Contributors
83148

84149
<a href="https://github.com/flutter-form-builder-ecosystem/form_builder_file_picker/graphs/contributors">
85150
<img src="https://contrib.rocks/image?repo=flutter-form-builder-ecosystem/form_builder_file_picker" />

0 commit comments

Comments
 (0)