mirror of
https://gitlab.com/comunic/comunicmobile
synced 2025-06-19 08:15:16 +00:00
Get and show the list of conversations
This commit is contained in:
@ -5,7 +5,15 @@
|
||||
/// Translate a string
|
||||
///
|
||||
/// Translate a given [string] into the current language, if available
|
||||
String tr(String string) {
|
||||
///
|
||||
/// Then apply the list of [args] to the string, each argument name is
|
||||
/// surrounded by '%'
|
||||
String tr(String string, {Map<String, String> args}) {
|
||||
//TODO : create translation system
|
||||
|
||||
//Apply arguments
|
||||
if(args != null)
|
||||
args.forEach((key, value) => string = string.replaceAll("%$key%", value));
|
||||
|
||||
return string;
|
||||
}
|
||||
}
|
||||
|
@ -18,7 +18,7 @@ Widget buildLoadingPage() {
|
||||
}
|
||||
|
||||
/// Build and return an error card
|
||||
Widget buildErrorCard(String message) {
|
||||
Widget buildErrorCard(String message, {List<Widget> actions}) {
|
||||
return Card(
|
||||
elevation: 2.0,
|
||||
color: Colors.red,
|
||||
@ -39,6 +39,9 @@ Widget buildErrorCard(String message) {
|
||||
style: TextStyle(color: Colors.white),
|
||||
maxLines: null,
|
||||
),
|
||||
),
|
||||
Row(
|
||||
children: actions == null ? <Widget>[] : actions,
|
||||
)
|
||||
],
|
||||
),
|
||||
|
Reference in New Issue
Block a user