From a022e8bfd124e01f7ef680a71e3827462b322368 Mon Sep 17 00:00:00 2001 From: Pierre HUBERT Date: Fri, 23 Apr 2021 12:28:50 +0200 Subject: [PATCH] Adapt welcome route --- lib/main_forez_dev.dart | 2 ++ lib/models/config.dart | 2 ++ lib/ui/widgets/login_scaffold.dart | 5 +++-- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/lib/main_forez_dev.dart b/lib/main_forez_dev.dart index 115044a..5ba45d8 100644 --- a/lib/main_forez_dev.dart +++ b/lib/main_forez_dev.dart @@ -2,6 +2,7 @@ import 'dart:io'; import 'package:comunic/main.dart'; import 'package:comunic/models/config.dart'; +import 'package:comunic/utils/intl_utils.dart'; import 'package:flutter/material.dart'; /// Forez development configuration @@ -27,6 +28,7 @@ void main() { clientName: "ForezFlutter", splashBackgroundColor: Colors.green.shade900, appName: "#Forez", + appQuickDescription: tr("Events organisation in Forez plain"), )); HttpOverrides.global = new MyHttpOverride(); diff --git a/lib/models/config.dart b/lib/models/config.dart index 91773eb..09bf18e 100644 --- a/lib/models/config.dart +++ b/lib/models/config.dart @@ -16,6 +16,7 @@ class Config { final String clientName; final Color splashBackgroundColor; final String appName; + final String appQuickDescription; const Config({ @required this.apiServerName, @@ -24,6 +25,7 @@ class Config { @required this.clientName, this.splashBackgroundColor = defaultColor, this.appName = "Comunic", + this.appQuickDescription, }) : assert(apiServerName != null), assert(apiServerUri != null), assert(apiServerSecure != null), diff --git a/lib/ui/widgets/login_scaffold.dart b/lib/ui/widgets/login_scaffold.dart index 9aa58bc..ac760ce 100644 --- a/lib/ui/widgets/login_scaffold.dart +++ b/lib/ui/widgets/login_scaffold.dart @@ -52,12 +52,13 @@ class LoginScaffold extends StatelessWidget { child: Column( children: [ Spacer(flex: 3), - Text("Comunic", + Text(config().appName, textAlign: TextAlign.center, style: TextStyle(fontSize: 50)), Spacer(flex: 1), Text( - tr("Free social network that respect your privacy"), + config().appQuickDescription ?? + tr("Free social network that respect your privacy"), textAlign: TextAlign.center, ), Spacer(flex: 3),