override static method

A delegate supplying strings instead of the defaults.

MaterialApp(
  localizationsDelegates: [
    PlinthLocalizations.override(
      const PlinthStrings(
        closeDialog: 'Cerrar diálogo',
        nextSlide: 'Siguiente',
      ),
    ),
  ],
)

Every field has a default, so overriding two of twenty-one is two lines rather than a file.

Implementation

static LocalizationsDelegate<PlinthLocalizations> override(
  PlinthStrings strings,
) =>
    _PlinthLocalizationsDelegate(strings);