v0.0.8json_editor
一个 Flutter 上的 JSON 编辑器。
22喜欢 2050近 30 天下载110Pub 分数
AndroidiOSmacOSWindowsLinux
一个基于 Flutter 的 JSON 编辑器
以下为英文项目原文快照,最新内容请访问 GitHub。
JsonElement ;dependencies:
json_editor: ^0.0.8
import 'package:json_editor/json_editor.dart';
JsonEditor.string(
jsonString: '''
{
// This is a comment
"name": "young chan",
"number": 100,
"boo": true,
"user": {"age": 20, "tall": 1.8},
"cities": ["beijing", "shanghai", "shenzhen"]
}
''',
onValueChanged: (value) {
print(value);
},
)
import 'package:json_editor/json_editor.dart';
JsonEditor.object(
object: const {
"name": "young",
"number": 100,
"boo": true,
"user": {"age": 20, "tall": 1.8},
"cities": ["beijing", "shanghai", "shenzhen"]
},
onValueChanged: (value) {
print(value);
},
)
JsonElement is a data model witch contains key, value and comment.
import 'package:json_editor/json_editor.dart';
JsonEditor.element(
element: JsonElement(),
onValueChanged: (value) {
print(value);
},
)
If you want to custom the json theme. You can use JsonEditorTheme widget.
JsonEditorTheme(
themeData: JsonEditorThemeData.defaultTheme(),
child: JsonEditor.object(
object: const {
"name": "young",
"number": 100,
"boo": true,
"user": {"age": 20, "tall": 1.8},
"cities": ["beijing", "shanghai", "shenzhen"]
},
onValueChanged: (value) {
print(value);
},
)
)
See LICENSE
依赖清单 4 项
{"sdk":"flutter"}^1.1.0{"sdk":"flutter"}^1.0.0先按使用场景筛选,再比较项目活跃情况,最后到原始仓库核对使用要求。
“A repository is the most basic element of GitHub.”
GitHub Docs — About repositories ↗