在本文中,我们将介绍令人惊叹的Flutter按钮,它们可以帮助所有初学者或专业人士为现代应用程序设计漂亮的UI。首先让我告诉你关于Flutter中按钮的一件重要事情,在最新版本的flutter中,以下Buttons在flutter中被弃用:DeprecatedrecommendedreplacementsRaisedButtonElevatedButtonOutlineButtonOutlinedButtonFlatButtonTextButton那么让我们来探索一下Flutter中的按钮。高架ButtonStadiumBorderElevatedButton(onPressed:(){},child:Text('Button'),style:ElevatedButton.styleFrom(shadowColor:Colors.green,shape:StadiumBorder(),padding:EdgeInsets.symmetric(水平:35,垂直:20)),)RoundedRectangleBorderElevatedButton(onPressed:(){},child:Text('Button'),style:ElevatedButton.styleFrom(shadowColor:Colors.green,shape:RoundedRectangleBorder(borderRadius:BorderRadius.circular(12),),),),CircleBorderElevatedButton(onPressed:(){},child:Text('Button'),style:ElevatedButton.styleFrom(shape:CircleBorder(),padding:EdgeInsets.all(24),),)BeveledRectangleBorderElevatedButton(onPressed:(){},child:Text('Button'),style:ElevatedButton.styleFrom(shape:BeveledRectangleBorder(borderRadius:BorderRadius.circular(12)),),)OutlinedButtonStadiumBorderOutlinedButton(onPressed:(){},child:Text('按钮'),style:OutlinedButton.styleFrom(shape:StadiumBorder(),),)RoundedRectangleBorderOutlinedButton(onPressed:(){},child:Text('Button'),style:OutlinedButton.styleFrom(shape:BeveledRectangleBorder(borderRadius:BorderRadius.circular(12),)),)CircleBorderOutlinedButton(onPressed:(){},child:Text('Button'),style:OutlinedButton.styleFrom(shape:CircleBorder(),填充:EdgeInsets.all(24),),)BeveledRectangleBorderOutlinedButton(onPressed:(){},child:Text('Button'),style:OutlinedButton.styleFrom(shape:BeveledRectangleBorder(borderRadius:BorderRadius.circular(12),),))译文:https://medium.com/@waseemakram.jpb/button-cheat-sheet-in-flutter-2021-1db38501d5f2
