Freezed cubit π§
Generates a new freezed cubit, and its runner files in Dart. Built for the flutter bloc state management library with freezed.
Usage π
Make sure that freezed, freezed_annotation, flutter_bloc, and build_runner are added to your pubspec.yaml
.
mason make freezed_cubit
Variables β¨
| Variable | Description | Default | Type |
| -------- | -------------------------- | --------- | -------- |
| name
| The name of the cubit class | counter
| string
|
| generate_status
| Whether to generate a status class for the cubit | true
| boolean
|
| path_for_test
| The path for creating a test file for the cubit; won't generate if the value is empty | | string
|
Output π¦
βββ counter_cubit.dart
βββ counter_state.dart
βββ counter_cubit_test.dart
Freezed cubit testπ§
Generates a new freezed cubit test at the given path. Built for the freezed_cubit template.
Usage π
Make sure that bloc_test and flutter_test are added to your pubspec.yaml
.
mason make freezed_cubit_test
Variables β¨
| Variable | Description | Default | Type |
| -------- | -------------------------- | --------- | -------- |
| path
| The path where the test should be created | | string
|
| name
| The name of the cubit class | counter
| string
|
Output π¦
βββ counter_cubit_test.dart