resolveAs<T> static method

T resolveAs<T>(
  1. T light,
  2. T dark,
  3. BuildContext context
)
override

Resolves the value for the given context if value is a ContextualProperty, otherwise returns the value itself.

Implementation

static T resolveAs<T>(T light, T dark, BuildContext context) {
  return Theme.of(context).brightness == Brightness.light ? light : dark;
}