of static method

Returns the localized resources object of KhaltiLocalizations for the widget tree that corresponds to the given context.

Implementation

static KhaltiLocalizations of(BuildContext context) {
  final loc = Localizations.of<KhaltiLocalizations>(
    context,
    KhaltiLocalizations,
  );
  assert(
    loc != null,
    'Ensure to add KhaltiLocalizations.delegate in MaterialApp.localizationDelegates or CupertinoApp.localizationDelegates',
  );
  return loc!;
}