Skip to content

Commit

Permalink
added documentations
Browse files Browse the repository at this point in the history
  • Loading branch information
adar2378 committed Jul 15, 2020
1 parent da91bfc commit b2989b2
Show file tree
Hide file tree
Showing 4 changed files with 49 additions and 27 deletions.
68 changes: 43 additions & 25 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
# [4.0.0]

### Features ✨

- Added support for flutter-web

### Breaking changes ⚠️

- Replaced internal automatic OS selection for dialog styles, you can select which style you want by configuring with the DialogConfig

[3.1.2] Documentation update

[3.1.1] Documentation update
Expand All @@ -6,37 +16,42 @@

Better performance overall

### Features ✨
- Added new parameter called `validator`, `autoValidate` & `errorTextSpace`.
### Features ✨

- Added new parameter called `validator`, `autoValidate` & `errorTextSpace`.

### Breaking changes ⚠️

### Breaking changes ⚠️
- The internal `TextField` has been changed to `TextFormField` to work with `Form`
- The debug logs will not be printed in release builds.

## [3.0.1]

Better Performance overall

### Updates
- Fixed bug where calling setState will not reflect the change on the parent view
### Updates ✨

- Fixed bug where calling setState will not reflect the change on the parent view

---

## [3.0.0]

Better performance overall

### Features ✨
- Added new parameter called `bool Function(String text) beforeTextPaste`, a callback method to validate if text can be pasted.
### Features ✨

- Added new parameter called `bool Function(String text) beforeTextPaste`, a callback method to validate if text can be pasted.
- Introduced `PinTheme` & `DialogConfig`
- Added an optional constructor parameter: `void Function(String) onCompleted`. which triggers when all fields are filled.

### Fixes 🐛
### Fixes 🐛

- When pressing the back button to close the keyboard, you can't open the keyboard back up again. #51
- When we long press on the OTP field to paste the code & if clipboard data is NULL, it gets crashed. #45

### Breaking changes ⚠️
### Breaking changes ⚠️

- Removed all the color, cell height, width & dialogconfiguration and moved them in `PinTheme` and `DialogConfig`

[2.5.1] Documentation update
Expand All @@ -45,24 +60,24 @@ Better performance overall

Better Performance overall

### Updates
- Added errorAnimationController to trigger shake animation. Can be used for errors.
- Added autoDisposeControllers which can be set to true for auto TextEidtingController and FocusNode disposal.
- Fixed typos & Optimzied code
### Updates ✨

- Added errorAnimationController to trigger shake animation. Can be used for errors.
- Added autoDisposeControllers which can be set to true for auto TextEidtingController and FocusNode disposal.
- Fixed typos & Optimzied code

---

## [2.4.0]

Better Performance overall

### Updates
- Optional: Exposed TextCapitalization, TextInputAction.
- Added background color customization for each cell(SelectedCell, UnselectedCell and InactiveCell). But you must set `enableActiveFill = true`.
- Added warning messages
- Fixed typos & Optimzied code
### Updates ✨

- Optional: Exposed TextCapitalization, TextInputAction.
- Added background color customization for each cell(SelectedCell, UnselectedCell and InactiveCell). But you must set `enableActiveFill = true`.
- Added warning messages
- Fixed typos & Optimzied code

---

Expand All @@ -76,7 +91,7 @@ Better Performance overall

Better Performance overall

### Updates
### Updates ✨

- Optional: Exposed `controller` so that one can control the texts programmatically
- Updated the example code with clear and set manual text buttons.
Expand All @@ -102,7 +117,8 @@ Better Performance overall

Better performance overall

### Features ✨
### Features ✨

- Colors:
- `selectedColor` is the color set on the current index. Default is `Colors.blue`
- `disabledColor` is the color if the TextField is disabled. Default is `Colors.grey`
Expand All @@ -111,12 +127,14 @@ Better performance overall
- Added a new constructor parameter called `enabled`. Default is true
- Added an optional constructor parameter: `void Function(String) onCompleted`. which triggers when all fields are filled.

### Fixes 🐛
### Fixes 🐛

- Colors:
- `activeColor` and `inactiveColor` were swapped
- Keyboard does not show up onTap #4

### Breaking changes ⚠️
### Breaking changes ⚠️

- Renamed `currentText` to `onChanged`

---
Expand Down
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,9 @@ A flutter package which will help you to generate pin code fields with beautiful
/// Negative action text for the [AlertDialog]. Default to "Cancel"
final String negativeText;
/// The default dialog theme, should it be iOS or other(including web and Android)
final Platform platform; //enum Platform { iOS, other } other indicates for web and android
```

## Contributors ✨
Expand All @@ -191,6 +194,7 @@ Thanks to everyone whoever suggested their thoughts to improve this package. And
<tr>
<td align="center"><a href="https://github.com/JeffryHermanto"><img src="https://avatars0.githubusercontent.com/u/35820325?v=3" width="100px;" alt="Jeffry Hermanto"/><br /><sub><b>Jeffry Hermanto</b></sub></a><br /><a href="https://github.com/adar2378/pin_code_fields/commits?author=JeffryHermanto" title="Code">💻</a></td>
<td align="center"><a href="https://github.com/ItamarMu"><img src="https://avatars3.githubusercontent.com/u/27651221?v=3" width="100px;" alt="ItamarMu"/><br /><sub><b>ItamarMu</b></sub></a><br /><a href="https://github.com/adar2378/pin_code_fields/commits?author=ItamarMu" title="Code">💻</a></td>
<td align="center"><a href="https://github.com/ened"><img src="https://avatars0.githubusercontent.com/u/269860?v=3" width="100px;" alt="Sebastian Roth"/><br /><sub><b>Sebastian Roth</b></sub></a><br /><a href="https://github.com/adar2378/pin_code_fields/commits?author=ened" title="Code">💻</a></td>
</tr>
</table>

Expand Down
2 changes: 1 addition & 1 deletion lib/src/models/platform.dart
Original file line number Diff line number Diff line change
@@ -1 +1 @@
enum Platform { iOS, other }
enum Platform { iOS, other } //other indicates for web and android
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: pin_code_fields
description: A flutter package which will help you to generate pin code fields. Can be useful for OTP for example.
version: 3.1.2
version: 4.0.0
homepage: https://github.com/adar2378
repository: https://github.com/adar2378/pin_code_fields

Expand Down

0 comments on commit b2989b2

Please sign in to comment.