From 64a732740d658ebd1917c07e99cebc7a3b812c48 Mon Sep 17 00:00:00 2001 From: Tirth Date: Thu, 4 Jan 2024 22:33:58 +0530 Subject: [PATCH] [Fix] Consistency in ButtonStyleButton related Tests (#140610) [Fix] Consistency in ButtonStyleButton related Tests: - Replaced the usage of ElevatedButton with FilledButton in FilledButton's test. - Replaced the usage of TextButton.styleFrom with FilledButton.styleFrom in FilledButton's test. - Replaced the usage of TextButton.styleFrom with ElevatedButton.styleFrom in ElevatedButton's test. --- packages/flutter/test/material/elevated_button_test.dart | 4 ++-- packages/flutter/test/material/filled_button_test.dart | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/packages/flutter/test/material/elevated_button_test.dart b/packages/flutter/test/material/elevated_button_test.dart index 5d5ea42c78..7f3c393214 100644 --- a/packages/flutter/test/material/elevated_button_test.dart +++ b/packages/flutter/test/material/elevated_button_test.dart @@ -1578,7 +1578,7 @@ void main() { children: [ ElevatedButton( key: key0, - style: TextButton.styleFrom( + style: ElevatedButton.styleFrom( minimumSize: const Size(24, 36), maximumSize: const Size.fromWidth(64), ), @@ -1587,7 +1587,7 @@ void main() { ), ElevatedButton.icon( key: key1, - style: TextButton.styleFrom( + style: ElevatedButton.styleFrom( minimumSize: const Size(24, 36), maximumSize: const Size.fromWidth(104), ), diff --git a/packages/flutter/test/material/filled_button_test.dart b/packages/flutter/test/material/filled_button_test.dart index e9e63fe6a1..ce707f42e2 100644 --- a/packages/flutter/test/material/filled_button_test.dart +++ b/packages/flutter/test/material/filled_button_test.dart @@ -1405,7 +1405,7 @@ void main() { theme: ThemeData.from(colorScheme: const ColorScheme.light(), useMaterial3: true), home: Scaffold( body: Center( - child: ElevatedButton( + child: FilledButton( key: key, onPressed: () {}, child: const Text('FilledButton'), @@ -1435,7 +1435,7 @@ void main() { key: key, icon: const Icon(Icons.favorite), onPressed: () {}, - label: const Text('ElevatedButton'), + label: const Text('FilledButton'), ), ), ), @@ -1652,7 +1652,7 @@ void main() { children: [ FilledButton( key: key0, - style: TextButton.styleFrom( + style: FilledButton.styleFrom( minimumSize: const Size(24, 36), maximumSize: const Size.fromWidth(64), ), @@ -1661,7 +1661,7 @@ void main() { ), FilledButton.icon( key: key1, - style: TextButton.styleFrom( + style: FilledButton.styleFrom( minimumSize: const Size(24, 36), maximumSize: const Size.fromWidth(104), ),