File tree Expand file tree Collapse file tree 8 files changed +75
-5
lines changed
src/main/resources/liveTemplates Expand file tree Collapse file tree 8 files changed +75
-5
lines changed Original file line number Diff line number Diff line change 22
33## Unreleased
44
5+ ### Added
6+ - freezedSealedClass, freezedAbstractClass, freezedEmptyConst liveTemplates
7+
8+ ### Changed
9+ - freezedConst now shows <3.0.0 to show it can't be used in >3.0.0 freezed instances
10+
511## 1.0.9 - 2024-03-03
612
713### Changed
Original file line number Diff line number Diff line change @@ -5,8 +5,24 @@ Create boiler plate code faster so you can get to your bussiness logic
55
66## Live Templates
77
8+ ### freezedSealedClass
9+ ~~ Begin to~~ type __ freezedSealedClass__ and press <kbd >Tab</kbd > to generate a freezed sealed class
10+ ``` dart
11+ @freezed
12+ sealed class Demo with _$Demo {
13+ }
14+ ```
15+
16+ ### freezedAbstractClass
17+ ~~ Begin to~~ type __ freezedAbstractClass__ and press <kbd >Tab</kbd > to generate a freezed abstract class
18+ ``` dart
19+ @freezed
20+ abstract class Demo with _$Demo {
21+ }
22+ ```
23+
824### freezedClass
9- ~~ Begin to~~ type __ freezedClass__ and press <kbd >Tab</kbd > to generate a freezed class
25+ ~~ Begin to~~ type __ freezedClass__ and press <kbd >Tab</kbd > to generate a freezed class (<3.0.0)
1026``` dart
1127@freezed
1228class Demo with _$Demo {
@@ -19,6 +35,12 @@ class Demo with _$Demo {
1935const factory Demo() = _Demo;
2036```
2137
38+ ### freezedEmptyConst
39+ ~~ Begin to~~ type __ freezedEmptyConst__ and press <kbd >Tab</kbd > to generate a empty constructor that can be extended/subclass
40+ ``` dart
41+ const factory Demo._() = _Demo;
42+ ```
43+
2244### freezedPart
2345~~ Begin to~~ type __ freezedPart__ and press <kbd >Tab</kbd > to generate the part statement
2446``` dart
Original file line number Diff line number Diff line change @@ -18,8 +18,24 @@ There should be a Live Template Group called Freezed.
1818
1919## Live Templates
2020
21+ ### freezedSealedClass
22+ ~~ Begin to~~ type __ freezedSealedClass__ and press <kbd >Tab</kbd > to generate a freezed sealed class
23+ ``` dart
24+ @freezed
25+ sealed class Demo with _$Demo {
26+ }
27+ ```
28+
29+ ### freezedAbstractClass
30+ ~~ Begin to~~ type __ freezedAbstractClass__ and press <kbd >Tab</kbd > to generate a freezed abstract class
31+ ``` dart
32+ @freezed
33+ abstract class Demo with _$Demo {
34+ }
35+ ```
36+
2137### freezedClass
22- ~~ Begin to~~ type __ freezedClass__ and press <kbd >Tab</kbd > to generate a freezed class
38+ ~~ Begin to~~ type __ freezedClass__ and press <kbd >Tab</kbd > to generate a freezed class (<3.0.0)
2339``` dart
2440@freezed
2541class Demo with _$Demo {
@@ -32,6 +48,12 @@ class Demo with _$Demo {
3248const factory Demo() = _Demo;
3349```
3450
51+ ### freezedEmptyConst
52+ ~~ Begin to~~ type __ freezedEmptyConst__ and press <kbd >Tab</kbd > to generate a empty constructor that can be extended/subclass
53+ ``` dart
54+ const factory Demo._() = _Demo;
55+ ```
56+
3557### freezedPart
3658~~ Begin to~~ type __ freezedPart__ and press <kbd >Tab</kbd > to generate the part statement
3759``` dart
Original file line number Diff line number Diff line change @@ -4,12 +4,12 @@ kotlin.code.style=official
44# -> https://plugins.jetbrains.com/docs/intellij/intellij-artifacts.html
55pluginGroup =com.github.fawaz.flutter-freezed-snippets
66pluginName =flutter-freezed-snippets
7- pluginVersion =1.0.9
7+ pluginVersion =1.1.0
88
99
1010# See https://plugins.jetbrains.com/docs/intellij/build-number-ranges.html
1111# for insight into build numbers and IntelliJ Platform versions.
12- pluginSinceBuild = 232
12+ pluginSinceBuild = 233
1313# pluginUntilBuild = 232.*
1414
1515# IntelliJ Platform Properties -> https://github.com/JetBrains/gradle-intellij-plugin#intellij-platform-properties
Original file line number Diff line number Diff line change 11<templateSet group =" Freezed" >
2+ <template name =" freezedSealedClass" value =" @freezed sealed class $NAME$ with _$$$NAME$ { }" description =" Create a freezed class with the keyword sealed" toReformat =" true" toShortenFQNames =" true" >
3+ <variable name =" NAME" expression =" " defaultValue =" " alwaysStopAt =" true" />
4+ <context >
5+ <option name =" DART_TOPLEVEL" value =" true" />
6+ </context >
7+ </template >
8+ <template name =" freezedAbstractClass" value =" @freezed abstract class $NAME$ with _$$$NAME$ { }" description =" Create a freezed class with the keyword abstract" toReformat =" true" toShortenFQNames =" true" >
9+ <variable name =" NAME" expression =" " defaultValue =" " alwaysStopAt =" true" />
10+ <context >
11+ <option name =" DART_TOPLEVEL" value =" true" />
12+ </context >
13+ </template >
214 <template name =" freezedClass" value =" @freezed class $NAME$ with _$$$NAME$ { }" description =" Create a freezed Class" toReformat =" true" toShortenFQNames =" true" >
315 <variable name =" NAME" expression =" " defaultValue =" " alwaysStopAt =" true" />
416 <context >
2537 <option name =" DART_TOPLEVEL" value =" false" />
2638 </context >
2739 </template >
28- <template name =" freezedConst" value =" const factory $NAME$() = _$NAME$; " description =" Create a basic freezed constructor" toReformat =" false" toShortenFQNames =" true" >
40+ <template name =" freezedConst" value =" const factory $NAME$() = _$NAME$; " description =" Create a basic freezed constructor (< 3.0.0)" toReformat =" false" toShortenFQNames =" true" >
41+ <variable name =" NAME" expression =" dartClassName()" defaultValue =" " alwaysStopAt =" false" />
42+ <context >
43+ <option name =" DART" value =" true" />
44+ <option name =" DART_STATEMENT" value =" false" />
45+ <option name =" DART_TOPLEVEL" value =" false" />
46+ </context >
47+ </template >
48+ <template name =" freezeEmptyConst" value =" const factory $NAME$._() = _$NAME$; " description =" Create a freezed private constructor to enable generated code to extend/subclass the class" toReformat =" false" toShortenFQNames =" true" >
2949 <variable name =" NAME" expression =" dartClassName()" defaultValue =" " alwaysStopAt =" false" />
3050 <context >
3151 <option name =" DART" value =" true" />
You can’t perform that action at this time.
0 commit comments