Skip to content

Commit

Permalink
Removed abstract class declaration from freezed templates
Browse files Browse the repository at this point in the history
  • Loading branch information
fnicastri committed Jun 19, 2021
1 parent a26c4b5 commit e0ec12d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# -> https://plugins.jetbrains.com/docs/intellij/intellij-artifacts.html
pluginGroup=com.github.tbm98.fluttergeneratorsnippets
pluginName=flutter_generator_snippets
pluginVersion=1.3.0
pluginVersion=1.3.1
pluginSinceBuild=201
pluginUntilBuild=211.*
# Plugin Verifier integration -> https://github.com/JetBrains/gradle-intellij-plugin#plugin-verifier-dsl
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<templateSet group="Flutter generator snippets">
<template name="freezed" value="import 'package:flutter/foundation.dart';&#10;import 'package:freezed_annotation/freezed_annotation.dart';&#10;&#10;part '$fileName$.freezed.dart';&#10;part '$fileName$.g.dart';&#10;&#10;@freezed&#10;abstract class $ClassName$ with _$$$ClassName$ {&#10; @JsonSerializable(fieldRename: FieldRename.snake, explicitToJson: true)&#10; const factory $ClassName$({&#10; $Params$,&#10; }) = _$ClassName$;&#10; &#10; $code$&#10;&#10; factory $ClassName$.fromJson(Map&lt;String, dynamic&gt; json) =&gt;&#10; _$$$ClassName$FromJson(json);&#10;}" description="Create feezed template" toReformat="false" toShortenFQNames="true">
<template name="freezed" value="import 'package:flutter/foundation.dart';&#10;import 'package:freezed_annotation/freezed_annotation.dart';&#10;&#10;part '$fileName$.freezed.dart';&#10;part '$fileName$.g.dart';&#10;&#10;@freezed&#10;class $ClassName$ with _$$$ClassName$ {&#10; @JsonSerializable(fieldRename: FieldRename.snake, explicitToJson: true)&#10; const factory $ClassName$({&#10; $Params$,&#10; }) = _$ClassName$;&#10; &#10; $code$&#10;&#10; factory $ClassName$.fromJson(Map&lt;String, dynamic&gt; json) =&gt;&#10; _$$$ClassName$FromJson(json);&#10;}" description="Create feezed template" toReformat="false" toShortenFQNames="true">
<variable name="fileName" expression="fileNameWithoutExtension()" defaultValue="" alwaysStopAt="true" />
<variable name="ClassName" expression="dartClassName()" defaultValue="" alwaysStopAt="true" />
<variable name="Params" expression="dartSuggestVariableName()" defaultValue="" alwaysStopAt="true" />
Expand All @@ -8,7 +8,7 @@
<option name="DART_TOPLEVEL" value="true" />
</context>
</template>
<template name="freezedWithoutImport" value="@freezed&#10;abstract class $ClassName$ with _$$$ClassName$ {&#10; @JsonSerializable(fieldRename: FieldRename.snake, explicitToJson: true)&#10; const factory $ClassName$({&#10; $Params$,&#10; }) = _$ClassName$;&#10; &#10; $code$&#10;&#10; factory $ClassName$.fromJson(Map&lt;String, dynamic&gt; json) =&gt;&#10; _$$$ClassName$FromJson(json);&#10;}" description="Create freezed template without import" toReformat="false" toShortenFQNames="true">
<template name="freezedWithoutImport" value="@freezed&#10;class $ClassName$ with _$$$ClassName$ {&#10; @JsonSerializable(fieldRename: FieldRename.snake, explicitToJson: true)&#10; const factory $ClassName$({&#10; $Params$,&#10; }) = _$ClassName$;&#10; &#10; $code$&#10;&#10; factory $ClassName$.fromJson(Map&lt;String, dynamic&gt; json) =&gt;&#10; _$$$ClassName$FromJson(json);&#10;}" description="Create freezed template without import" toReformat="false" toShortenFQNames="true">
<variable name="ClassName" expression="" defaultValue="" alwaysStopAt="true" />
<variable name="Params" expression="" defaultValue="" alwaysStopAt="true" />
<variable name="code" expression="" defaultValue="" alwaysStopAt="true" />
Expand Down

0 comments on commit e0ec12d

Please sign in to comment.