I18n constructor
The I18n widget should wrap the child which contains the tree of
widgets you want to translate. If you want, you may provide an
initialLocale. You may also provide a key
, or, for advanced uses,
an id
which you can use with the forceRebuild function.
Implementation
I18n({
Key? key,
String? id,
required this.child,
this.initialLocale,
}) : super(key: key ?? ((id != null && id.isNotEmpty) ? GlobalObjectKey<_I18nState>(id) : null));