resolve method

  1. @override
MouseCursor resolve(
  1. Set<MaterialState> states
)
override

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
MouseCursor resolve(Set<MaterialState> states) {
  if (states.contains(MaterialState.disabled))
    return disabledCursor;
  return enabledCursor;
}