Skip to content

Commit

Permalink
refactor(bricks): upgrade cubit to shorthand lambda syntax (#3321)
Browse files Browse the repository at this point in the history
  • Loading branch information
felangel authored Apr 10, 2022
1 parent b718cbd commit cbf1b9d
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 15 deletions.
4 changes: 4 additions & 0 deletions bricks/cubit/CHANGELOG.md
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 cubit generation

This file was deleted.

This file was deleted.

7 changes: 7 additions & 0 deletions bricks/cubit/__brick__/{{name.snakeCase()}}_cubit.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import 'package:bloc/bloc.dart';

part '{{name.snakeCase()}}_state.dart';

class {{name.pascalCase()}}Cubit extends Cubit<{{name.pascalCase()}}State> {
{{name.pascalCase()}}Cubit() : super(const {{name.pascalCase()}}State());
}
5 changes: 5 additions & 0 deletions bricks/cubit/__brick__/{{name.snakeCase()}}_state.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
part of '{{name.snakeCase()}}_cubit.dart';

class {{name.pascalCase()}}State {
const {{name.pascalCase()}}State();
}
6 changes: 3 additions & 3 deletions bricks/cubit/brick.yaml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
name: cubit
description: Generate a new Cubit in Dart | Built for the bloc state management library.
version: 0.1.0
description: Generate a new Cubit in Dart. Built for the bloc state management library.
version: 0.1.1
repository: https://github.com/felangel/bloc/tree/master/bricks/cubit

environment:
mason: ">=0.1.0-dev <0.1.0"
mason: ">=0.1.0-dev.15 <0.1.0"

vars:
name:
Expand Down

0 comments on commit cbf1b9d

Please sign in to comment.