-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
See https://github.com/flutter/flutter/wiki/Code-generation-in-Flutter - Generates a .dart widget class based on a .json file
- Loading branch information
maru
committed
Apr 25, 2020
1 parent
1f77467
commit fa54060
Showing
9 changed files
with
636 additions
and
5 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
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,20 @@ | ||
# Read about `build.yaml` at https://pub.dartlang.org/packages/build_config | ||
targets: | ||
$default: | ||
builders: | ||
freezed: | ||
enabled: true | ||
generate_for: | ||
exclude: | ||
- test | ||
- example | ||
include: | ||
- test | ||
|
||
builders: | ||
jsonWidgetBuilder: | ||
import: "package:nstack/json_widget.dart" | ||
builder_factories: ["jsonWidgetBuilder"] | ||
build_extensions: {".json": [".dart"]} | ||
build_to: source | ||
auto_apply: dependents |
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 @@ | ||
{ | ||
"name": "Container", | ||
"params": { | ||
"color": "#Color(0xFF22DD11)", | ||
"child": { | ||
"name": "Text", | ||
"params": { | ||
"0": "Hello, World" | ||
} | ||
} | ||
} | ||
} |
Oops, something went wrong.