Skip to content

Commit fdb4e01

Browse files
committed
feat: upgrade templates
1 parent 2a322c7 commit fdb4e01

File tree

3 files changed

+9
-2
lines changed

3 files changed

+9
-2
lines changed

README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ This extension allows **quickly scaffold flutter BLoC templates** in VS Code pro
77

88
This extension use <https://github.com/felangel/bloc> for BLoC
99

10+
## Support me - install my music player: [meows.app](https://meows.app?utm_source=ext&utm_medium=f_f)
11+
1012
![demo](https://github.com/Gorniv/vscode-flutter-files/raw/master/assets/flutter.gif)
1113

1214
## Custom(dynamic) templates
@@ -17,6 +19,10 @@ Copy [templates](./templates) directory to your project(root path) and change an
1719

1820
## Changelog
1921

22+
## 1.5.6
23+
24+
- update templates
25+
2026
## 1.5.5
2127

2228
- support flutter_bloc ^2.0.0

templates/bloc.tmpl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,10 @@ class ${upperName}Bloc extends Bloc<${upperName}Event, ${upperName}State> {
1515
@override
1616
Future<void> close() async{
1717
// dispose objects
18-
super.close();
18+
await super.close();
1919
}
2020

21+
@override
2122
${upperName}State get initialState => Un${upperName}State(0);
2223

2324
@override

templates/event.tmpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ class Load${upperName}Event extends ${upperName}Event {
3535
}
3636
await Future.delayed(Duration(seconds: 2));
3737
this._${privateName}Repository.test(this.isError);
38-
return In${upperName}State(0, "Hello world");
38+
return In${upperName}State(0, 'Hello world');
3939
} catch (_, stackTrace) {
4040
developer.log('$_', name: 'Load${upperName}Event', error: _, stackTrace: stackTrace);
4141
return Error${upperName}State(0, _?.toString());

0 commit comments

Comments
 (0)