From 75b06e7df80b87685008776235df11df8cd51dcd Mon Sep 17 00:00:00 2001 From: Pierre HUBERT Date: Thu, 30 Dec 2021 12:28:06 +0100 Subject: [PATCH] Show banner on welcome route --- lib/ui/widgets/login_scaffold.dart | 72 +++++++++++++++++------------- 1 file changed, 41 insertions(+), 31 deletions(-) diff --git a/lib/ui/widgets/login_scaffold.dart b/lib/ui/widgets/login_scaffold.dart index 127ecf8..c7751e4 100644 --- a/lib/ui/widgets/login_scaffold.dart +++ b/lib/ui/widgets/login_scaffold.dart @@ -1,4 +1,5 @@ import 'package:comunic/models/config.dart'; +import 'package:comunic/ui/widgets/banner_widget.dart'; import 'package:comunic/utils/intl_utils.dart'; import 'package:flutter/material.dart'; @@ -43,40 +44,49 @@ class LoginScaffold extends StatelessWidget { ), ), child: Scaffold( - body: SingleChildScrollView( - child: Center( - child: Container( - height: contentHeight, - child: ConstrainedBox( - constraints: BoxConstraints(maxWidth: 300), - child: Column( - children: [ - Spacer(flex: 3), - Text(config().appName, - textAlign: TextAlign.center, - style: TextStyle(fontSize: 50)), - Spacer(flex: 1), - Text( - tr(config().appQuickDescription ?? - tr("Free social network that respect your privacy")), - textAlign: TextAlign.center, - ), - Spacer(flex: 3), - child != null - ? Padding( - padding: const EdgeInsets.all(8.0), - child: Material( - child: child, - color: Colors.indigo.shade500, + body: SafeArea( + child: Column( + children: [ + BannerWidget(), + Expanded( + child: SingleChildScrollView( + child: Center( + child: Container( + height: contentHeight, + child: ConstrainedBox( + constraints: BoxConstraints(maxWidth: 300), + child: Column( + children: [ + Spacer(flex: 2), + Text(config().appName, + textAlign: TextAlign.center, + style: TextStyle(fontSize: 50)), + Spacer(flex: 1), + Text( + tr(config().appQuickDescription ?? + tr("Free social network that respect your privacy")), + textAlign: TextAlign.center, ), - ) - : Container(), - noStyleChild ?? Container(), - Spacer(flex: 3), - ], + Spacer(flex: 3), + child != null + ? Padding( + padding: const EdgeInsets.all(8.0), + child: Material( + child: child, + color: Colors.indigo.shade500, + ), + ) + : Container(), + noStyleChild ?? Container(), + Spacer(flex: 3), + ], + ), + ), + ), + ), ), ), - ), + ], ), ), ),