1
0
mirror of https://gitlab.com/comunic/comunicmobile synced 2025-06-19 08:15:16 +00:00

Add about dialog

This commit is contained in:
2020-04-16 09:29:37 +02:00
parent 302e5f22ce
commit ec1732088a
3 changed files with 31 additions and 4 deletions

View File

@ -31,10 +31,9 @@ Widget buildLoadingPage({
}
/// Build and return an error card
Widget buildErrorCard(String message, {List<Widget> actions, bool hide = false}) {
if(hide)
return Container();
Widget buildErrorCard(String message,
{List<Widget> actions, bool hide = false}) {
if (hide) return Container();
return Card(
elevation: 2.0,
@ -190,3 +189,23 @@ const darkerAccentColor = Colors.white30;
/// Check out whether dark theme is enabled or not
bool darkTheme() => preferences().getBool(PreferencesKeyList.ENABLE_DARK_THEME);
/// Show about Comunic dialog
void showAboutAppDialog(BuildContext context) {
showAboutDialog(
context: context,
applicationName: "Comunic",
children: <Widget>[
Text(
tr("Comunic is a free and OpenSource social network that respect your privacy."),
textAlign: TextAlign.center,
),
SizedBox(
height: 20,
),
Text(
"Application built by Pierre Hubert",
textAlign: TextAlign.center,
),
]);
}