buildBrokenMsg function
- BuildContext context,
- SamModel sm,
- String brokenMsg
Builds a broken message alert when a SamModel renders and is broken.
This is written as an Alert so it covers what is underneath.
Implementation
Widget buildBrokenMsg (BuildContext context,SamModel sm,String brokenMsg) {
return AlertDialog(
title: Row(children:[
const Text('Model '),
Text('${sm.aaaName}',style:TextStyle(fontStyle:FontStyle.italic)),
Text(' Broken'),
Spacer(),
FlatButton(
onPressed: () {Navigator.of(context).pop();},
textColor: Colors.black, child: const Text('X',style:TextStyle(fontSize:20,fontWeight:FontWeight.bold)),
),
]),
content: Column(
mainAxisSize: MainAxisSize.min,
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Text(brokenMsg,style:TextStyle(color:Colors.red,decoration:TextDecoration.lineThrough)),
],
),
);
}