styleValue<T> function

T styleValue<T>({
  1. T? widgetValue,
  2. T? themeValue,
  3. required T defaultValue,
})

A style helper function that returns the value from the widget, theme, or default value.

Implementation

T styleValue<T>({T? widgetValue, T? themeValue, required T defaultValue}) {
  return widgetValue ?? themeValue ?? defaultValue;
}