Localizations constructor

Localizations({
  1. Key? key,
  2. required Locale locale,
  3. required List<LocalizationsDelegate> delegates,
  4. Widget? child,
  5. bool isApplicationLevel = false,
})

Create a widget from which localizations (like translated strings) can be obtained.

Implementation

Localizations({
  super.key,
  required this.locale,
  required this.delegates,
  this.child,
  this.isApplicationLevel = false,
}) : assert(
       delegates.any(
         (LocalizationsDelegate<dynamic> delegate) =>
             delegate is LocalizationsDelegate<WidgetsLocalizations>,
       ),
     );