Skip to content

Commit a10e295

Browse files
authored
Added identical(a,b) short circuit to Material Library lerp methods (#120829)
1 parent c0b7d2d commit a10e295

File tree

93 files changed

+433
-51
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

93 files changed

+433
-51
lines changed

packages/flutter/lib/src/material/app_bar_theme.dart

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -204,6 +204,9 @@ class AppBarTheme with Diagnosticable {
204204
///
205205
/// {@macro dart.ui.shadow.lerp}
206206
static AppBarTheme lerp(AppBarTheme? a, AppBarTheme? b, double t) {
207+
if (identical(a, b) && a != null) {
208+
return a;
209+
}
207210
return AppBarTheme(
208211
backgroundColor: Color.lerp(a?.backgroundColor, b?.backgroundColor, t),
209212
foregroundColor: Color.lerp(a?.foregroundColor, b?.foregroundColor, t),

packages/flutter/lib/src/material/badge_theme.dart

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,9 @@ class BadgeThemeData with Diagnosticable {
9494

9595
/// Linearly interpolate between two [Badge] themes.
9696
static BadgeThemeData lerp(BadgeThemeData? a, BadgeThemeData? b, double t) {
97+
if (identical(a, b) && a != null) {
98+
return a;
99+
}
97100
return BadgeThemeData(
98101
backgroundColor: Color.lerp(a?.backgroundColor, b?.backgroundColor, t),
99102
textColor: Color.lerp(a?.textColor, b?.textColor, t),

packages/flutter/lib/src/material/bottom_app_bar_theme.dart

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,9 @@ class BottomAppBarTheme with Diagnosticable {
9494
///
9595
/// {@macro dart.ui.shadow.lerp}
9696
static BottomAppBarTheme lerp(BottomAppBarTheme? a, BottomAppBarTheme? b, double t) {
97+
if (identical(a, b) && a != null) {
98+
return a;
99+
}
97100
return BottomAppBarTheme(
98101
color: Color.lerp(a?.color, b?.color, t),
99102
elevation: lerpDouble(a?.elevation, b?.elevation, t),

packages/flutter/lib/src/material/bottom_navigation_bar_theme.dart

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -174,6 +174,9 @@ class BottomNavigationBarThemeData with Diagnosticable {
174174
///
175175
/// {@macro dart.ui.shadow.lerp}
176176
static BottomNavigationBarThemeData lerp(BottomNavigationBarThemeData? a, BottomNavigationBarThemeData? b, double t) {
177+
if (identical(a, b) && a != null) {
178+
return a;
179+
}
177180
return BottomNavigationBarThemeData(
178181
backgroundColor: Color.lerp(a?.backgroundColor, b?.backgroundColor, t),
179182
elevation: lerpDouble(a?.elevation, b?.elevation, t),

packages/flutter/lib/src/material/bottom_sheet_theme.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -118,8 +118,8 @@ class BottomSheetThemeData with Diagnosticable {
118118
///
119119
/// {@macro dart.ui.shadow.lerp}
120120
static BottomSheetThemeData? lerp(BottomSheetThemeData? a, BottomSheetThemeData? b, double t) {
121-
if (a == null && b == null) {
122-
return null;
121+
if (identical(a, b)) {
122+
return a;
123123
}
124124
return BottomSheetThemeData(
125125
backgroundColor: Color.lerp(a?.backgroundColor, b?.backgroundColor, t),

packages/flutter/lib/src/material/button_bar_theme.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -146,8 +146,8 @@ class ButtonBarThemeData with Diagnosticable {
146146
///
147147
/// {@macro dart.ui.shadow.lerp}
148148
static ButtonBarThemeData? lerp(ButtonBarThemeData? a, ButtonBarThemeData? b, double t) {
149-
if (a == null && b == null) {
150-
return null;
149+
if (identical(a, b)) {
150+
return a;
151151
}
152152
return ButtonBarThemeData(
153153
alignment: t < 0.5 ? a?.alignment : b?.alignment,

packages/flutter/lib/src/material/button_style.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -492,8 +492,8 @@ class ButtonStyle with Diagnosticable {
492492

493493
/// Linearly interpolate between two [ButtonStyle]s.
494494
static ButtonStyle? lerp(ButtonStyle? a, ButtonStyle? b, double t) {
495-
if (a == null && b == null) {
496-
return null;
495+
if (identical(a, b)) {
496+
return a;
497497
}
498498
return ButtonStyle(
499499
textStyle: MaterialStateProperty.lerp<TextStyle?>(a?.textStyle, b?.textStyle, t, TextStyle.lerp),

packages/flutter/lib/src/material/card_theme.dart

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,9 @@ class CardTheme with Diagnosticable {
114114
///
115115
/// {@macro dart.ui.shadow.lerp}
116116
static CardTheme lerp(CardTheme? a, CardTheme? b, double t) {
117+
if (identical(a, b) && a != null) {
118+
return a;
119+
}
117120
return CardTheme(
118121
clipBehavior: t < 0.5 ? a?.clipBehavior : b?.clipBehavior,
119122
color: Color.lerp(a?.color, b?.color, t),

packages/flutter/lib/src/material/checkbox_theme.dart

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,9 @@ class CheckboxThemeData with Diagnosticable {
130130
///
131131
/// {@macro dart.ui.shadow.lerp}
132132
static CheckboxThemeData lerp(CheckboxThemeData? a, CheckboxThemeData? b, double t) {
133+
if (identical(a, b) && a != null) {
134+
return a;
135+
}
133136
return CheckboxThemeData(
134137
mouseCursor: t < 0.5 ? a?.mouseCursor : b?.mouseCursor,
135138
fillColor: MaterialStateProperty.lerp<Color?>(a?.fillColor, b?.fillColor, t, Color.lerp),
@@ -195,6 +198,9 @@ class CheckboxThemeData with Diagnosticable {
195198
if (a == null || b == null) {
196199
return null;
197200
}
201+
if (identical(a, b)) {
202+
return a;
203+
}
198204
return BorderSide.lerp(a, b, t);
199205
}
200206
}

packages/flutter/lib/src/material/chip_theme.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -483,8 +483,8 @@ class ChipThemeData with Diagnosticable {
483483
///
484484
/// {@macro dart.ui.shadow.lerp}
485485
static ChipThemeData? lerp(ChipThemeData? a, ChipThemeData? b, double t) {
486-
if (a == null && b == null) {
487-
return null;
486+
if (identical(a, b)) {
487+
return a;
488488
}
489489
return ChipThemeData(
490490
backgroundColor: Color.lerp(a?.backgroundColor, b?.backgroundColor, t),

packages/flutter/lib/src/material/color_scheme.dart

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -827,6 +827,9 @@ class ColorScheme with Diagnosticable {
827827
///
828828
/// {@macro dart.ui.shadow.lerp}
829829
static ColorScheme lerp(ColorScheme a, ColorScheme b, double t) {
830+
if (identical(a, b)) {
831+
return a;
832+
}
830833
return ColorScheme(
831834
brightness: t < 0.5 ? a.brightness : b.brightness,
832835
primary: Color.lerp(a.primary, b.primary, t)!,

packages/flutter/lib/src/material/data_table_theme.dart

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,9 @@ class DataTableThemeData with Diagnosticable {
122122
///
123123
/// {@macro dart.ui.shadow.lerp}
124124
static DataTableThemeData lerp(DataTableThemeData a, DataTableThemeData b, double t) {
125+
if (identical(a, b)) {
126+
return a;
127+
}
125128
return DataTableThemeData(
126129
decoration: Decoration.lerp(a.decoration, b.decoration, t),
127130
dataRowColor: MaterialStateProperty.lerp<Color?>(a.dataRowColor, b.dataRowColor, t, Color.lerp),

packages/flutter/lib/src/material/date_picker_theme.dart

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -356,6 +356,9 @@ class DatePickerThemeData with Diagnosticable {
356356

357357
/// Linearly interpolates between two [DatePickerThemeData].
358358
static DatePickerThemeData lerp(DatePickerThemeData? a, DatePickerThemeData? b, double t) {
359+
if (identical(a, b) && a != null) {
360+
return a;
361+
}
359362
return DatePickerThemeData(
360363
backgroundColor: Color.lerp(a?.backgroundColor, b?.backgroundColor, t),
361364
elevation: lerpDouble(a?.elevation, b?.elevation, t),
@@ -393,8 +396,8 @@ class DatePickerThemeData with Diagnosticable {
393396
}
394397

395398
static BorderSide? _lerpBorderSide(BorderSide? a, BorderSide? b, double t) {
396-
if (a == null && b == null) {
397-
return null;
399+
if (identical(a, b)) {
400+
return a;
398401
}
399402
if (a == null) {
400403
return BorderSide.lerp(BorderSide(width: 0, color: b!.color.withAlpha(0)), b, t);

packages/flutter/lib/src/material/dialog_theme.dart

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,9 @@ class DialogTheme with Diagnosticable {
111111
///
112112
/// {@macro dart.ui.shadow.lerp}
113113
static DialogTheme lerp(DialogTheme? a, DialogTheme? b, double t) {
114+
if (identical(a, b) && a != null) {
115+
return a;
116+
}
114117
return DialogTheme(
115118
backgroundColor: Color.lerp(a?.backgroundColor, b?.backgroundColor, t),
116119
elevation: lerpDouble(a?.elevation, b?.elevation, t),

packages/flutter/lib/src/material/divider_theme.dart

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,9 @@ class DividerThemeData with Diagnosticable {
8787
///
8888
/// {@macro dart.ui.shadow.lerp}
8989
static DividerThemeData lerp(DividerThemeData? a, DividerThemeData? b, double t) {
90+
if (identical(a, b) && a != null) {
91+
return a;
92+
}
9093
return DividerThemeData(
9194
color: Color.lerp(a?.color, b?.color, t),
9295
space: lerpDouble(a?.space, b?.space, t),

packages/flutter/lib/src/material/drawer_theme.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,8 +99,8 @@ class DrawerThemeData with Diagnosticable {
9999
///
100100
/// {@macro dart.ui.shadow.lerp}
101101
static DrawerThemeData? lerp(DrawerThemeData? a, DrawerThemeData? b, double t) {
102-
if (a == null && b == null) {
103-
return null;
102+
if (identical(a, b)) {
103+
return a;
104104
}
105105
return DrawerThemeData(
106106
backgroundColor: Color.lerp(a?.backgroundColor, b?.backgroundColor, t),

packages/flutter/lib/src/material/dropdown_menu_theme.dart

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,9 @@ class DropdownMenuThemeData with Diagnosticable {
6464

6565
/// Linearly interpolates between two dropdown menu themes.
6666
static DropdownMenuThemeData lerp(DropdownMenuThemeData? a, DropdownMenuThemeData? b, double t) {
67+
if (identical(a, b) && a != null) {
68+
return a;
69+
}
6770
return DropdownMenuThemeData(
6871
textStyle: TextStyle.lerp(a?.textStyle, b?.textStyle, t),
6972
inputDecorationTheme: t < 0.5 ? a?.inputDecorationTheme : b?.inputDecorationTheme,

packages/flutter/lib/src/material/elevated_button_theme.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,8 @@ class ElevatedButtonThemeData with Diagnosticable {
4949

5050
/// Linearly interpolate between two elevated button themes.
5151
static ElevatedButtonThemeData? lerp(ElevatedButtonThemeData? a, ElevatedButtonThemeData? b, double t) {
52-
if (a == null && b == null) {
53-
return null;
52+
if (identical(a, b)) {
53+
return a;
5454
}
5555
return ElevatedButtonThemeData(
5656
style: ButtonStyle.lerp(a?.style, b?.style, t),

packages/flutter/lib/src/material/expansion_tile_theme.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -124,8 +124,8 @@ class ExpansionTileThemeData with Diagnosticable {
124124

125125
/// Linearly interpolate between ExpansionTileThemeData objects.
126126
static ExpansionTileThemeData? lerp(ExpansionTileThemeData? a, ExpansionTileThemeData? b, double t) {
127-
if (a == null && b == null) {
128-
return null;
127+
if (identical(a, b)) {
128+
return a;
129129
}
130130
return ExpansionTileThemeData(
131131
backgroundColor: Color.lerp(a?.backgroundColor, b?.backgroundColor, t),

packages/flutter/lib/src/material/filled_button_theme.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,8 @@ class FilledButtonThemeData with Diagnosticable {
4949

5050
/// Linearly interpolate between two filled button themes.
5151
static FilledButtonThemeData? lerp(FilledButtonThemeData? a, FilledButtonThemeData? b, double t) {
52-
if (a == null && b == null) {
53-
return null;
52+
if (identical(a, b)) {
53+
return a;
5454
}
5555
return FilledButtonThemeData(
5656
style: ButtonStyle.lerp(a?.style, b?.style, t),

packages/flutter/lib/src/material/floating_action_button_theme.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -193,8 +193,8 @@ class FloatingActionButtonThemeData with Diagnosticable {
193193
///
194194
/// {@macro dart.ui.shadow.lerp}
195195
static FloatingActionButtonThemeData? lerp(FloatingActionButtonThemeData? a, FloatingActionButtonThemeData? b, double t) {
196-
if (a == null && b == null) {
197-
return null;
196+
if (identical(a, b)) {
197+
return a;
198198
}
199199
return FloatingActionButtonThemeData(
200200
foregroundColor: Color.lerp(a?.foregroundColor, b?.foregroundColor, t),

packages/flutter/lib/src/material/icon_button_theme.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,8 @@ class IconButtonThemeData with Diagnosticable {
4949

5050
/// Linearly interpolate between two icon button themes.
5151
static IconButtonThemeData? lerp(IconButtonThemeData? a, IconButtonThemeData? b, double t) {
52-
if (a == null && b == null) {
53-
return null;
52+
if (identical(a, b)) {
53+
return a;
5454
}
5555
return IconButtonThemeData(
5656
style: ButtonStyle.lerp(a?.style, b?.style, t),

packages/flutter/lib/src/material/list_tile_theme.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -172,8 +172,8 @@ class ListTileThemeData with Diagnosticable {
172172

173173
/// Linearly interpolate between ListTileThemeData objects.
174174
static ListTileThemeData? lerp(ListTileThemeData? a, ListTileThemeData? b, double t) {
175-
if (a == null && b == null) {
176-
return null;
175+
if (identical(a, b)) {
176+
return a;
177177
}
178178
return ListTileThemeData(
179179
dense: t < 0.5 ? a?.dense : b?.dense,

packages/flutter/lib/src/material/menu_bar_theme.dart

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,11 @@ class MenuBarThemeData extends MenuThemeData {
4141
/// Creates a const set of properties used to configure [MenuTheme].
4242
const MenuBarThemeData({super.style});
4343

44-
/// Linearly interpolate between two text button themes.
44+
/// Linearly interpolate between two [MenuBar] themes.
4545
static MenuBarThemeData? lerp(MenuBarThemeData? a, MenuBarThemeData? b, double t) {
46+
if (identical(a, b)) {
47+
return a;
48+
}
4649
return MenuBarThemeData(style: MenuStyle.lerp(a?.style, b?.style, t));
4750
}
4851
}

packages/flutter/lib/src/material/menu_button_theme.dart

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,9 @@ class MenuButtonThemeData with Diagnosticable {
5959

6060
/// Linearly interpolate between two menu button themes.
6161
static MenuButtonThemeData? lerp(MenuButtonThemeData? a, MenuButtonThemeData? b, double t) {
62+
if (identical(a, b)) {
63+
return a;
64+
}
6265
return MenuButtonThemeData(style: ButtonStyle.lerp(a?.style, b?.style, t));
6366
}
6467

packages/flutter/lib/src/material/menu_style.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -304,8 +304,8 @@ class MenuStyle with Diagnosticable {
304304

305305
/// Linearly interpolate between two [MenuStyle]s.
306306
static MenuStyle? lerp(MenuStyle? a, MenuStyle? b, double t) {
307-
if (a == null && b == null) {
308-
return null;
307+
if (identical(a, b)) {
308+
return a;
309309
}
310310
return MenuStyle(
311311
backgroundColor: MaterialStateProperty.lerp<Color?>(a?.backgroundColor, b?.backgroundColor, t, Color.lerp),

packages/flutter/lib/src/material/menu_theme.dart

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,9 @@ class MenuThemeData with Diagnosticable {
4343

4444
/// Linearly interpolate between two menu button themes.
4545
static MenuThemeData? lerp(MenuThemeData? a, MenuThemeData? b, double t) {
46+
if (identical(a, b)) {
47+
return a;
48+
}
4649
return MenuThemeData(style: MenuStyle.lerp(a?.style, b?.style, t));
4750
}
4851

packages/flutter/lib/src/material/navigation_bar_theme.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -125,8 +125,8 @@ class NavigationBarThemeData with Diagnosticable {
125125
///
126126
/// {@macro dart.ui.shadow.lerp}
127127
static NavigationBarThemeData? lerp(NavigationBarThemeData? a, NavigationBarThemeData? b, double t) {
128-
if (a == null && b == null) {
129-
return null;
128+
if (identical(a, b)) {
129+
return a;
130130
}
131131
return NavigationBarThemeData(
132132
height: lerpDouble(a?.height, b?.height, t),

packages/flutter/lib/src/material/navigation_drawer_theme.dart

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -124,10 +124,9 @@ class NavigationDrawerThemeData with Diagnosticable {
124124
/// If both arguments are null then null is returned.
125125
///
126126
/// {@macro dart.ui.shadow.lerp}
127-
static NavigationDrawerThemeData? lerp(
128-
NavigationDrawerThemeData? a, NavigationDrawerThemeData? b, double t) {
129-
if (a == null && b == null) {
130-
return null;
127+
static NavigationDrawerThemeData? lerp(NavigationDrawerThemeData? a, NavigationDrawerThemeData? b, double t) {
128+
if (identical(a, b)) {
129+
return a;
131130
}
132131
return NavigationDrawerThemeData(
133132
tileHeight: lerpDouble(a?.tileHeight, b?.tileHeight, t),

packages/flutter/lib/src/material/navigation_rail_theme.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -143,8 +143,8 @@ class NavigationRailThemeData with Diagnosticable {
143143
///
144144
/// {@macro dart.ui.shadow.lerp}
145145
static NavigationRailThemeData? lerp(NavigationRailThemeData? a, NavigationRailThemeData? b, double t) {
146-
if (a == null && b == null) {
147-
return null;
146+
if (identical(a, b)) {
147+
return a;
148148
}
149149
return NavigationRailThemeData(
150150
backgroundColor: Color.lerp(a?.backgroundColor, b?.backgroundColor, t),

packages/flutter/lib/src/material/outlined_button_theme.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,8 @@ class OutlinedButtonThemeData with Diagnosticable {
4949

5050
/// Linearly interpolate between two outlined button themes.
5151
static OutlinedButtonThemeData? lerp(OutlinedButtonThemeData? a, OutlinedButtonThemeData? b, double t) {
52-
if (a == null && b == null) {
53-
return null;
52+
if (identical(a, b)) {
53+
return a;
5454
}
5555
return OutlinedButtonThemeData(
5656
style: ButtonStyle.lerp(a?.style, b?.style, t),

packages/flutter/lib/src/material/popup_menu_theme.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -129,8 +129,8 @@ class PopupMenuThemeData with Diagnosticable {
129129
///
130130
/// {@macro dart.ui.shadow.lerp}
131131
static PopupMenuThemeData? lerp(PopupMenuThemeData? a, PopupMenuThemeData? b, double t) {
132-
if (a == null && b == null) {
133-
return null;
132+
if (identical(a, b)) {
133+
return a;
134134
}
135135
return PopupMenuThemeData(
136136
color: Color.lerp(a?.color, b?.color, t),

packages/flutter/lib/src/material/progress_indicator_theme.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,8 +84,8 @@ class ProgressIndicatorThemeData with Diagnosticable {
8484
///
8585
/// If both arguments are null, then null is returned.
8686
static ProgressIndicatorThemeData? lerp(ProgressIndicatorThemeData? a, ProgressIndicatorThemeData? b, double t) {
87-
if (a == null && b == null) {
88-
return null;
87+
if (identical(a, b)) {
88+
return a;
8989
}
9090
return ProgressIndicatorThemeData(
9191
color: Color.lerp(a?.color, b?.color, t),

packages/flutter/lib/src/material/radio_theme.dart

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,9 @@ class RadioThemeData with Diagnosticable {
112112
///
113113
/// {@macro dart.ui.shadow.lerp}
114114
static RadioThemeData lerp(RadioThemeData? a, RadioThemeData? b, double t) {
115+
if (identical(a, b) && a != null) {
116+
return a;
117+
}
115118
return RadioThemeData(
116119
mouseCursor: t < 0.5 ? a?.mouseCursor : b?.mouseCursor,
117120
fillColor: MaterialStateProperty.lerp<Color?>(a?.fillColor, b?.fillColor, t, Color.lerp),

packages/flutter/lib/src/material/scrollbar_theme.dart

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -204,6 +204,9 @@ class ScrollbarThemeData with Diagnosticable {
204204
///
205205
/// {@macro dart.ui.shadow.lerp}
206206
static ScrollbarThemeData lerp(ScrollbarThemeData? a, ScrollbarThemeData? b, double t) {
207+
if (identical(a, b) && a != null) {
208+
return a;
209+
}
207210
return ScrollbarThemeData(
208211
thumbVisibility: MaterialStateProperty.lerp<bool?>(a?.thumbVisibility, b?.thumbVisibility, t, _lerpBool),
209212
thickness: MaterialStateProperty.lerp<double?>(a?.thickness, b?.thickness, t, lerpDouble),

0 commit comments

Comments
 (0)