Skip to content

A basic solution to create declarative UI on flutter based on JSON response provided by an external API

Notifications You must be signed in to change notification settings

iresharma/FlutterUIGenerator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

code_gen

A simple on UI generation

How to use

in lib/data/chopper.dart put in the url for an API that returns a json of the following format

 'scroll': True, 'col': [ { 'row': [ { 'text': 'hi', 'bold': False, 'style': False, 'size': 25 }, { 'text': 'bold', 'bold': True, 'style': False, 'size': 20 }, { 'text': 'italic', 'bold': False, 'style': True, 'size': 15 }, { 'text': 'bold and italic', 'bold': True, 'style': True, 'size': 30 } ] }, { 'row': [ { 'text': 'italic', 'bold': False, 'style': True, 'size': 25 }, { 'text': 'bold and italic', 'bold': True, 'style': True, 'size': 25 }, { 'text': 'hi', 'bold': False, 'style': False, 'size': 25 }, { 'text': 'bold', 'bold': True, 'style': False, 'size': 25 }, ] } ] }
flutter pub get flutter packages pub run build_runner watch

Run the above code to generator the `chopper.chopper.dart', then

About

A basic solution to create declarative UI on flutter based on JSON response provided by an external API

Topics

Resources

Stars

Watchers

Forks