Skip to content

Latest commit

 

History

History
21 lines (15 loc) · 486 Bytes

custom_widgets.md

File metadata and controls

21 lines (15 loc) · 486 Bytes

Custom Widgets

Glider allows you to specify a set of custom Flutter widgets, which you can then include in your Glider definition.

Using this JSON:

{
  "type": "my_custom_widget"
}

Simply include the _customWidgets parameter in Glider's constructor:

Glider(myJson, customWidgets: {
    "my_custom_widget": Text("Hello"),
});

The resulting app will now render a Text widget wherever it sees "type": "my_custom_widget in the Glider definition. Neat!