You can create a widget like this as your master:
class MyMasterExpandable extends StatelessWidget {
final String title;
final Widget content;
const MyMasterExpandable({Key key, @required this.title, @required this.content})
: super(key: key);
@override
Widget build(BuildContext context) {
return ExpansionTile(
title: Text(title),
children: [content],
);
}
}
This can be used like this:
MyMasterExpandable(title: 'My Title', content: content1);
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…