//自定义按钮组件 class MyButton extends StatelessWidget { final text; final pressed; final double width; final double height; MyButton({this.text, this.pressed = null,this.width = 80.0,this.height=30.0}); @override Widget build(BuildContext context) { return Container( width: this.width, height: this.height, child: RaisedButton( child: Text(this.text), onPressed: this.pressed, ), ); } }
Flutter自定义按钮
最新推荐文章于 2025-05-10 09:52:20 发布