Last active
April 19, 2022 13:58
-
-
Save FlutterWiz/9b7a65245d25a4bc3724923513319c58 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import 'package:flutter/material.dart'; | |
import 'package:piva/infrastructure/localization/localized_values.dart'; | |
import 'package:format/format.dart'; | |
class PivaLocalizations { | |
PivaLocalizations(this.locale); | |
final Locale locale; | |
static PivaLocalizations of(BuildContext context) { | |
return Localizations.of<PivaLocalizations>(context, PivaLocalizations)!; | |
} | |
Map<String, String> get localeValues => localizedValues[locale.languageCode]!; | |
String get pivaTimer => localeValues['pivaTimer']!; | |
String get timeIsUpTitle => localeValues['timeIsUpTitle']!; | |
String get timeIsUpBody => localeValues['timeIsUpBody']!; | |
String get reset => localeValues['reset']!; | |
String get stop => localeValues['stop']!; | |
String get start => localeValues['start']!; | |
String get hours => localeValues['hours']!; | |
String get minutes => localeValues['minutes']!; | |
String get seconds => localeValues['seconds']!; | |
String workingTimeText(String hours, String minutes, String seconds) => localeValues['workingTimeText']!.format(hours, minutes, seconds); | |
String get timeIsZero => localeValues['timeIsZero']!; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment