Чтобы изменить цвет границы Flutter OutlinedButton, вы можете использовать следующие методы:
-
Метод 1: использование свойства
styleOutlinedButton( style: OutlinedButton.styleFrom( side: BorderSide(color: Colors.red), // Change the color to your desired color ), onPressed: () { // Handle button press }, child: Text('Button'), ) -
Метод 2: перенос с помощью
ThemeTheme( data: Theme.of(context).copyWith( outlinedButtonTheme: OutlinedButtonThemeData( style: ButtonStyle( side: MaterialStateProperty.all(BorderSide(color: Colors.red)), // Change the color to your desired color ), ), ), child: OutlinedButton( onPressed: () { // Handle button press }, child: Text('Button'), ), ) -
Метод 3. Создание собственного
ButtonStyleOutlinedButton( style: ButtonStyle( side: MaterialStateProperty.all(BorderSide(color: Colors.red)), // Change the color to your desired color ), onPressed: () { // Handle button press }, child: Text('Button'), )