Currently MaterialStateProperty lerp functions are localized to each class and duplicated across the source code.
button_style.dart
|
static MaterialStateProperty<T?>? _lerpProperties<T>(MaterialStateProperty<T>? a, MaterialStateProperty<T>? b, double t, T? Function(T?, T?, double) lerpFunction ) { |
|
class _LerpProperties<T> implements MaterialStateProperty<T?> { |
scrollbar_theme.dart
|
static MaterialStateProperty<T>? _lerpProperties<T>( |
|
class _LerpProperties<T> implements MaterialStateProperty<T> { |
checkbox_theme.dart
|
static MaterialStateProperty<T>? _lerpProperties<T>( |
|
class _LerpProperties<T> implements MaterialStateProperty<T> { |
data_table_theme.dart
|
static MaterialStateProperty<T>? _lerpProperties<T>(MaterialStateProperty<T>? a, MaterialStateProperty<T>? b, double t, T Function(T?, T?, double) lerpFunction ) { |
|
class _LerpProperties<T> implements MaterialStateProperty<T> { |
navigation_bar_theme.dart
|
static MaterialStateProperty<T>? _lerpProperties<T>( |
|
class _LerpProperties<T> implements MaterialStateProperty<T> { |
radio_theme.dart
|
static MaterialStateProperty<T>? _lerpProperties<T>( |
|
class _LerpProperties<T> implements MaterialStateProperty<T> { |
switch_theme.dart
|
static MaterialStateProperty<T>? _lerpProperties<T>( |
|
class _LerpProperties<T> implements MaterialStateProperty<T> { |
Solution
Remove duplication and add lerp functions to material_state.dart