getHeader function
- String name,
- int numBanks,
- int depth,
- double width,
- Color color,
- double hdrHgt
Return the MissileSite header data for a particulat Missile type.
The values numBanks
, width
and hdrHgt
are used to calculated the dimensions of this
section of the header. The color
is based on the Missile type as seen in MissileSiteFactory.
Implementation
Widget getHeader(String name,int numBanks,int depth,double width,Color color,double hdrHgt) {
return Container(
child: ConstrainedBox(
constraints: BoxConstraints.expand(height: hdrHgt, width: (width * numBanks) + (2.0 * (numBanks - 1))),
child: Center(child:Text("${name}s: $depth",style:TextStyle(fontWeight:FontWeight.bold)))
),
decoration: BoxDecoration(color: color,border:Border.all()),
);
}