class IconContainer extends StatelessWidget {
IconData icon;
double iconSize;
Color iconColor;
double containerHeight;
double containerWidth;
Color containerColor;
IconContainer(this.icon,
{this.iconSize = 32.0,
this.iconColor = Colors.white,
this.containerHeight = 100,
this.containerWidth = 100,
this.containerColor = Colors.red});
@override
Widget build(BuildContext context) {
return Container(
height: this.containerHeight,
width: this.containerWidth,
color: this.containerColor,
child: Icon(
this.icon,
size: this.iconSize,
color: this.iconColor,
),
);
}
}
IconContainer - flutter
最新推荐文章于 2023-10-31 23:40:43 发布