Skip to content

Commit 913a370

Browse files
authored
Merge pull request #57 from danvick/main
Docs improvements
2 parents ba3fdea + 871c0f1 commit 913a370

File tree

6 files changed

+22
-20
lines changed

6 files changed

+22
-20
lines changed

.github/workflows/base.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,8 @@ jobs:
4646
4747
- name: Upload coverage to Codecov
4848
uses: codecov/codecov-action@v3
49+
env:
50+
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
4951
with:
5052
files: coverage/lcov.info
5153
flags: unittests

README.md

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,8 @@ Also included is the `l10n` / `i18n` of error text messages to multiple language
3838
## Features
3939

4040
- Ready-made validation rules
41-
- Multiple form inputs validators
42-
- Default error messages in several languages
41+
- Compose multiple reusable validation rules
42+
- Default error messages in multiple languages
4343

4444
## Validators
4545

@@ -136,7 +136,7 @@ return MaterialApp(
136136

137137
### Basic use
138138

139-
```dart
139+
```Dart
140140
TextFormField(
141141
decoration: InputDecoration(labelText: 'Name'),
142142
autovalidateMode: AutovalidateMode.always,
@@ -156,7 +156,7 @@ On validation, each validator is run, and if any validator returns a non-null va
156156

157157
Example:
158158

159-
```dart
159+
```Dart
160160
TextFormField(
161161
decoration: InputDecoration(labelText: 'Age'),
162162
keyboardType: TextInputType.number,
@@ -178,7 +178,7 @@ TextFormField(
178178
if (number == null) return null;
179179
if (number < 0) return 'We cannot have a negative age';
180180
return null;
181-
}
181+
},
182182
]),
183183
),
184184
```
@@ -205,27 +205,27 @@ We welcome efforts to internationalize/localize the package by translating the d
205205

206206
1. Add ARB files
207207

208-
Create one ARB file inside the `lib/l10n` folder for each locale you need to add support. Name the files in the following way: `intl_<LOCALE_ISO_CODE>.arb`. For example: `intl_fr.arb` or `intl_fr_FR.arb`.
208+
Create one ARB file inside the `lib/l10n` folder for each locale you need to add support. Name the files in the following way: `intl_<LOCALE_ISO_CODE>.arb`. For example: `intl_fr.arb` or `intl_fr_FR.arb`.
209209

210210
2. Translate the error messages
211211

212-
Copy and paste the contents of `intl_en.arb` into your newly created ARB file. Then translate the error messages by overwriting the default messages.
212+
Copy and paste the contents of `intl_en.arb` into your newly created ARB file. Then translate the error messages by overwriting the default messages.
213213

214214
3. Generate localization code
215215

216-
To generate boilerplate code for localization, run the generate command inside the package directory where `pubspec.yaml` file is located:
216+
To generate boilerplate code for localization, run the generate command inside the package directory where `pubspec.yaml` file is located:
217217

218-
`flutter gen-l10n`
218+
`flutter gen-l10n`
219219

220-
The command will automatically create/update files inside the `lib/localization` directory, including your newly added locale support.
220+
The command will automatically create/update files inside the `lib/localization` directory, including your newly added locale support.
221221

222222
4. Update README
223223

224-
Remember to update README, adding the new language (and language code) under [Supported languages section](#supported-languages) in alphabetic order, so that everyone knows your new language is now supported!
224+
Remember to update README, adding the new language (and language code) under [Supported languages section](#supported-languages) in alphabetic order, so that everyone knows your new language is now supported!
225225

226226
5. Submit PR
227227

228-
Submit your PR and be of help to millions of developers all over the world!
228+
Submit your PR and be of help to millions of developers all over the world!
229229

230230
#### Add new validator
231231

@@ -258,4 +258,4 @@ Take a look at [our fantastic ecosystem](https://github.com/flutter-form-builder
258258

259259
## Thanks to
260260

261-
[All constributors](https://github.com/flutter-form-builder-ecosystem/form_builder_validators/graphs/contributors)
261+
[All contributors](https://github.com/flutter-form-builder-ecosystem/form_builder_validators/graphs/contributors)

example/pubspec.lock

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,10 +58,10 @@ packages:
5858
dependency: "direct dev"
5959
description:
6060
name: flutter_lints
61-
sha256: aeb0b80a8b3709709c9cc496cdc027c5b3216796bc0af0ce1007eaf24464fd4c
61+
sha256: "2118df84ef0c3ca93f96123a616ae8540879991b8b57af2f81b76a7ada49b2a4"
6262
url: "https://pub.dev"
6363
source: hosted
64-
version: "2.0.1"
64+
version: "2.0.2"
6565
flutter_localizations:
6666
dependency: "direct main"
6767
description: flutter

example/pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ dependencies:
1616
path: ../
1717

1818
dev_dependencies:
19-
flutter_lints: ^2.0.1
19+
flutter_lints: ^2.0.2
2020
flutter_test:
2121
sdk: flutter
2222

pubspec.lock

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,10 +58,10 @@ packages:
5858
dependency: "direct dev"
5959
description:
6060
name: flutter_lints
61-
sha256: aeb0b80a8b3709709c9cc496cdc027c5b3216796bc0af0ce1007eaf24464fd4c
61+
sha256: "2118df84ef0c3ca93f96123a616ae8540879991b8b57af2f81b76a7ada49b2a4"
6262
url: "https://pub.dev"
6363
source: hosted
64-
version: "2.0.1"
64+
version: "2.0.2"
6565
flutter_localizations:
6666
dependency: "direct main"
6767
description: flutter

pubspec.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ version: 9.0.0
44
repository: https://github.com/flutter-form-builder-ecosystem/form_builder_validators
55
issue_tracker: https://github.com/flutter-form-builder-ecosystem/form_builder_validators/issues
66
homepage: https://github.com/flutter-form-builder-ecosystem
7-
funding:
7+
funding:
88
- https://opencollective.com/flutter-form-builder-ecosystem
99

1010
environment:
@@ -19,7 +19,7 @@ dependencies:
1919
intl: ^0.18.0
2020

2121
dev_dependencies:
22-
flutter_lints: ^2.0.1
22+
flutter_lints: ^2.0.2
2323
flutter_test:
2424
sdk: flutter
2525

0 commit comments

Comments
 (0)