showTranslateBottomSheet static method
Implementation
static Future<void> showTranslateBottomSheet(BuildContext context) async {
return showSmoothModalSheet<void>(
context: context,
builder: (BuildContext context) {
final AppLocalizations appLocalizations = AppLocalizations.of(context);
return SmoothModalSheet(
title: appLocalizations.contribute_translate_header,
prefixIndicator: true,
body: Column(
children: <Widget>[
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Text(appLocalizations.contribute_translate_text),
Text(appLocalizations.contribute_translate_text_2),
],
),
const SizedBox(height: LARGE_SPACE),
SmoothSimpleButton(
onPressed: () async => LaunchUrlHelper.launchURL(
'https://translate.openfoodfacts.org/',
),
minWidth: 150,
child: Text(
appLocalizations.contribute_translate_link_text.toUpperCase(),
style: const TextStyle(fontWeight: FontWeight.bold),
),
),
],
),
);
},
);
}