translate method
Access translations by key using CustomLocalization
Usage: context.translate('myCustomKey')
Implementation
String translate(String key, {Map<String, dynamic>? params}) {
final customLoc = CustomLocalization.of(this);
if (customLoc == null) {
throw FlutterError(
'CustomLocalization not found in context. '
'Make sure CustomLocalization.delegate is added to localizationsDelegates.',
);
}
return customLoc.get(key, params: params);
}