Skip to content

Commit

Permalink
Fix stylistics
Browse files Browse the repository at this point in the history
  • Loading branch information
michalina-majewska committed Jun 17, 2024
1 parent abb5aae commit cf33575
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ The package contains a collection of field cubits useful for implementing common
- `SingleSelectFieldCubit` - specialization of `FieldCubit` for a single choice of value from list of options,
- `MultiSelectFieldCubit` - specialization of `FieldCubit` for a multiple choice of values from list of options.

`TextFieldCubit`, `SingleSelectFieldCubit`, `MultiSelectFieldCubit` contain the `clear()` method that resets the value of the field to the initial value by calling `reset()`. You can also call `reset()` as it is defined in the `FieldCubit` class.
`TextFieldCubit`, `SingleSelectFieldCubit` and `MultiSelectFieldCubit` contain the `clear()` method that resets the value of the field to the initial value by calling `reset()`. You can also call `reset()` as it is defined in the `FieldCubit` class.

### Creating custom `FieldCubit`

Expand Down
6 changes: 2 additions & 4 deletions example/lib/widgets/app_text_field.dart
Original file line number Diff line number Diff line change
Expand Up @@ -82,10 +82,8 @@ class AppTextField extends HookWidget {
const SizedBox(width: 16),
ElevatedButton(
onPressed: () {
{
textEditingController.clear();
setValue('');
}
textEditingController.clear();
setValue('');
},
child: const Text('Empty'),
),
Expand Down

0 comments on commit cf33575

Please sign in to comment.