resolve method
Returns a value of type T that depends on states.
Widgets like TextButton and ElevatedButton apply this method to their current WidgetStates to compute colors and other visual parameters at build time.
Implementation
@override
T? resolve(Set<WidgetState> states) {
for (final state in themeStatePrecedence) {
if (states.contains(state)) {
final value = values[state];
if (value != null) {
return value;
}
}
}
return fallback;
}