项目作者: lohanidamodar

项目描述 :
Flutter Generate Widgets from JSON
高级语言: Dart
项目地址: git://github.com/lohanidamodar/flutter_builders.git
创建时间: 2019-08-12T01:39:18Z
项目社区:https://github.com/lohanidamodar/flutter_builders

开源协议:

下载


Flutter JSON to Widget generator

Automatically generate Widgets from JSON templates using flutter builders.

Example

  • JSON Schema
    1. {
    2. "name":"Container",
    3. "params": {
    4. "color":"#Color(0xffff0000)",
    5. "padding":"#const EdgeInsets.all(16.0)",
    6. "child": {
    7. "name":"Text",
    8. "params":{
    9. "0": "Hello flutter builder!",
    10. "style":"#TextStyle(color: Color(0xffffffff), fontWeight: FontWeight.bold )"
    11. }
    12. }
    13. }
    14. }
  • Generated Code

    1. //generated code
    2. import 'package:flutter/widgets.dart';
    3. class GeneratedWidget extends StatelessWidget {
    4. @override
    5. Widget build(BuildContext context) {
    6. return Container(
    7. color: Color(0xffff0000),
    8. padding: const EdgeInsets.all(16.0),
    9. child: Text(
    10. "Hello flutter builder!",
    11. style: TextStyle(color: Color(0xffffffff), fontWeight: FontWeight.bold),
    12. ),
    13. );
    14. }
    15. }

Getting Started with flutter

This project is a starting point for a Flutter application.

A few resources to get you started if this is your first Flutter project:

For help getting started with Flutter, view our
online documentation, which offers tutorials,
samples, guidance on mobile development, and a full API reference.