1
0
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:
2019-04-23 14:35:41 +02:00
parent d10df9dd7a
commit 7666af0975
10 changed files with 246 additions and 11 deletions

View File

@ -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;
}
}

View File

@ -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,
)
],
),