ofValue<T> static method

Option<T> ofValue<T>(
  1. T? key, {
  2. String? label,
})

Implementation

static Option<T> ofValue<T>(T? key, {String? label}) {
  // ignore: can_be_null_after_null_aware
  return _Option<T>(key, label: (label ?? key?.toString().toTitle())!);
}