-
-
Notifications
You must be signed in to change notification settings - Fork 3.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor(bricks): upgrade bloc to shorthand lambda syntax (#3320)
- Loading branch information
Showing
8 changed files
with
29 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,7 @@ | ||
# 0.1.1 | ||
|
||
- refactor: upgrade to shorthand lambda syntax (`mason >= 0.1.0-dev.15`) | ||
|
||
# 0.1.0 | ||
|
||
- feat: initial release with support for basic bloc generation |
12 changes: 0 additions & 12 deletions
12
bricks/bloc/__brick__/{{#snakeCase}}{{name}}{{/snakeCase}}_bloc.dart
This file was deleted.
Oops, something went wrong.
5 changes: 0 additions & 5 deletions
5
bricks/bloc/__brick__/{{#snakeCase}}{{name}}{{/snakeCase}}_event.dart
This file was deleted.
Oops, something went wrong.
5 changes: 0 additions & 5 deletions
5
bricks/bloc/__brick__/{{#snakeCase}}{{name}}{{/snakeCase}}_state.dart
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import 'package:bloc/bloc.dart'; | ||
|
||
part '{{name.snakeCase()}}_event.dart'; | ||
part '{{name.snakeCase()}}_state.dart'; | ||
|
||
class {{name.pascalCase()}}Bloc extends Bloc<{{name.pascalCase()}}Event, {{name.pascalCase()}}State> { | ||
{{name.pascalCase()}}Bloc() : super(const {{name.pascalCase()}}State()) { | ||
on<{{name.pascalCase()}}Event>((event, emit) { | ||
// TODO: implement event handler | ||
}); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
part of '{{name.snakeCase()}}_bloc.dart'; | ||
|
||
abstract class {{name.pascalCase()}}Event { | ||
const {{name.pascalCase()}}Event(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
part of '{{name.snakeCase()}}_bloc.dart'; | ||
|
||
class {{name.pascalCase()}}State { | ||
const {{name.pascalCase()}}State(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters