dengyin2000 / dynamic_widget

A Backend-Driven UI toolkit, build your dynamic UI with json, and the json format is very similar with flutter widget code.
Apache License 2.0
1.56k stars 309 forks source link

Can I export from variable like list of widget ? #95

Open tonyhart7 opened 2 years ago

tonyhart7 commented 2 years ago

something like this

final seatMap = <Widget>[];
DynamicWidgetJson(child: seatMap)

then export as jsonstring ?
tonyhart7 commented 2 years ago

@dengyin2000
so basically Iam looking at source code app and

jsonEncode(DynamicWidgetBuilder.exportWidgets(seatMap, null));

this function do same as DynamicJsonExporter, can I use that ?

dengyin2000 commented 2 years ago

@dengyin2000 so basically Iam looking at source code app and

jsonEncode(DynamicWidgetBuilder.exportWidgets(seatMap, null));

this function do same as DynamicJsonExporter, can I use that ?

yes. try it.

tonyhart7 commented 2 years ago

@dengyin2000 so basically Iam looking at source code app and

jsonEncode(DynamicWidgetBuilder.exportWidgets(seatMap, null));

this function do same as DynamicJsonExporter, can I use that ?

yes. try it.

ok this is a bit strange its works but the strange part its just produce the last widget, its just print single last widget of it do u know why its problem ? because I certainly put a for loop for it @dengyin2000

dengyin2000 commented 2 years ago

@dengyin2000 so basically Iam looking at source code app and

jsonEncode(DynamicWidgetBuilder.exportWidgets(seatMap, null));

this function do same as DynamicJsonExporter, can I use that ?

yes. try it.

ok this is a bit strange its works but the strange part its just produce the last widget, its just print single last widget of it do u know why its problem ? because I certainly put a for loop for it @dengyin2000

show your code?