format method

String format(
  1. BuildContext context
)

Returns the localized string representation of this time of day.

This is a shortcut for MaterialLocalizations.formatTimeOfDay.

Implementation

String format(BuildContext context) {
  assert(debugCheckHasMediaQuery(context));
  assert(debugCheckHasMaterialLocalizations(context));
  final MaterialLocalizations localizations = MaterialLocalizations.of(context);
  return localizations.formatTimeOfDay(
    this,
    alwaysUse24HourFormat: MediaQuery.alwaysUse24HourFormatOf(context),
  );
}