Skip to content

Commit 6aba0a2

Browse files
Merge pull request #38 from flutter-form-builder-ecosystem/refactor-readme
Refactor readme
2 parents 80d6be0 + 1fb3f55 commit 6aba0a2

File tree

3 files changed

+108
-27
lines changed

3 files changed

+108
-27
lines changed

.github/workflows/base.yaml

Lines changed: 18 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -47,14 +47,15 @@ jobs:
4747
cd example
4848
flutter build appbundle --debug
4949
flutter build ios --debug --no-codesign
50+
flutter build web
5051
51-
- name: Upload coverage to Codecov
52-
if: ${{ matrix.channel == 'stable' }}
53-
uses: codecov/codecov-action@v3
54-
with:
55-
files: coverage/lcov.info
56-
flags: unittests
57-
name: form_builder_file_picker
52+
# - name: Upload coverage to Codecov
53+
# if: ${{ matrix.channel == 'stable' }}
54+
# uses: codecov/codecov-action@v3
55+
# with:
56+
# files: coverage/lcov.info
57+
# flags: unittests
58+
# name: form_builder_file_picker
5859

5960
deployment:
6061
if: ${{ github.ref_type == 'tag' }}
@@ -78,3 +79,13 @@ jobs:
7879
sh ./tool/pub_login.sh
7980
- name: Publish package
8081
run: dart pub publish -v -f
82+
- name: Build changelog
83+
id: github_release
84+
uses: mikepenz/release-changelog-builder-action@v3
85+
env:
86+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
87+
- name: Create release
88+
uses: softprops/action-gh-release@v0.1.14
89+
with:
90+
body: ${{steps.github_release.outputs.changelog}}
91+

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" />

example/lib/main.dart

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -47,12 +47,17 @@ class MyHomePageState extends State<MyHomePage> {
4747
allowMultiple: true,
4848
previewImages: true,
4949
onChanged: (val) => debugPrint(val.toString()),
50-
selector: Row(
51-
children: const <Widget>[
52-
Icon(Icons.file_upload),
53-
Text('Upload'),
54-
],
55-
),
50+
typeSelectors: [
51+
TypeSelector(
52+
type: FileType.any,
53+
selector: Row(
54+
children: const <Widget>[
55+
Icon(Icons.file_upload),
56+
Text('Upload'),
57+
],
58+
),
59+
)
60+
],
5661
onFileLoading: (val) {
5762
debugPrint(val.toString());
5863
},

0 commit comments

Comments
 (0)