Skip to content

Instantly share code, notes, and snippets.

@shalithasuranga
Created September 2, 2022 05:40
Show Gist options
  • Save shalithasuranga/44df4bb9c338d9cf51558c2299363e3c to your computer and use it in GitHub Desktop.
Save shalithasuranga/44df4bb9c338d9cf51558c2299363e3c to your computer and use it in GitHub Desktop.
Widget _renderSteps(List<Step> steps) {
return ExpansionPanelList.radio(
children: steps.map<ExpansionPanelRadio>((Step step) {
return ExpansionPanelRadio(
headerBuilder: (BuildContext context, bool isExpanded) {
return ListTile(
title: Text(step.title),
);
},
body: ListTile(
title: Text(step.body),
subtitle: _renderSteps(step.subSteps)
),
value: step.title
);
}).toList(),
);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment