A convenience widget that combines common painting,
positioning, and sizing widgets. Often used to contain
wrap child widgets and apply styling
Container having the below properties
Color Property
Child Property
Alignment Property
Constraints Property
Margin Property
Padding Property
Decoration Property
ForegroundDecoration Property
Transform Property
class ContainerWidget extends StatelessWidget{ @override Widget build(BuildContext context) { // TODO: implement build return MaterialApp( home: Scaffold( appBar: AppBar(title: Text("Container"),), body: Container( color: Color.fromARGB(255, 66, 165, 245), child: Container( color: Colors.pink, alignment: Alignment.center, constraints: BoxConstraints( maxHeight: 300, maxWidth: 200, minWidth: 150, minHeight: 150, ), child: Container( child: Text("Flutter Cheatsheet", style: TextStyle( fontSize: 30.0, color: Colors.white, ),),), transform: Matrix4.rotationZ(0.5), ), alignment: Alignment.center, ),),); }} |