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

View File

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