Add tooltips

This commit is contained in:
Hillel Coren 2020-12-20 11:47:16 +02:00
parent 5c62bcbccf
commit 810b8f89f7
2 changed files with 9 additions and 3 deletions

View File

@ -602,6 +602,7 @@ class SidebarFooter extends StatelessWidget {
)
else if (account.isUpdateAvailable)
IconButton(
tooltip: localization.updateAvailable,
icon: Icon(
Icons.warning,
color: Theme.of(context).accentColor,
@ -932,8 +933,7 @@ void _showAbout(BuildContext context) async {
),
AppButton(
label: 'Flutter/Dart',
iconData:
MdiIcons.desktopClassic,
iconData: MdiIcons.desktopClassic,
onPressed: () =>
launch(kSourceCodeFrontend),
),
@ -1009,7 +1009,10 @@ void _showAbout(BuildContext context) async {
},
),
AppButton(
label: localization.forceUpdate.toUpperCase(),
label: (state.account.isUpdateAvailable
? localization.updateApp
: localization.forceUpdate)
.toUpperCase(),
iconData: MdiIcons.update,
color: Colors.orange,
onPressed: () => _showUpdate(context),

View File

@ -15,6 +15,7 @@ mixin LocalizationsProvider on LocaleCodeAware {
static final Map<String, Map<String, String>> _localizedValues = {
'en': {
// STARTER: lang key - do not remove comment
'update_app': 'Update App',
'started_import': 'Successfully started import',
'duplicate_column_mapping': 'Duplicate column mapping',
'uses_inclusive_taxes': 'Uses Inclusive Taxes',
@ -5309,6 +5310,8 @@ mixin LocalizationsProvider on LocaleCodeAware {
String get startedImport => _localizedValues[localeCode]['started_import'] ?? '';
String get updateApp => _localizedValues[localeCode]['update_app'] ?? '';
String lookup(String key) {
final lookupKey = toSnakeCase(key);