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

Improve signup route

This commit is contained in:
2021-04-17 10:59:06 +02:00
parent 9555d35521
commit ab60593f12
5 changed files with 90 additions and 47 deletions

View File

@ -278,6 +278,7 @@ class _InputEntry extends StatelessWidget {
obscureText: isPassword,
maxLength: maxLength,
decoration: InputDecoration(
counterText: "",
alignLabelWithHint: true,
errorText: error,
labelText: label,

View File

@ -59,7 +59,7 @@ class _InitializeWidgetState extends SafeState<InitializeWidget> {
/// Open login page
_openLoginPage() {
Navigator.of(context)
.pushReplacement(MaterialPageRoute(builder: (c) => LoginRoute()));
.pushReplacement(MaterialPageRoute(builder: (c) => WelcomeRoute()));
}
/// Try to connect to server

View File

@ -1,3 +1,4 @@
import 'package:comunic/models/config.dart';
import 'package:comunic/utils/intl_utils.dart';
import 'package:flutter/material.dart';
@ -7,9 +8,10 @@ import 'package:flutter/material.dart';
class LoginScaffold extends StatelessWidget {
final Widget child;
final Widget noStyleChild;
const LoginScaffold({Key key, @required this.child})
: assert(child != null),
const LoginScaffold({Key key, @required this.child, this.noStyleChild})
: assert(child != null || noStyleChild != null),
super(key: key);
@override
@ -34,7 +36,7 @@ class LoginScaffold extends StatelessWidget {
fillColor: Colors.white,
hoverColor: Colors.white,
),
scaffoldBackgroundColor: Colors.indigo.shade900,
scaffoldBackgroundColor: Config.get().splashBackgroundColor,
textTheme: TextTheme(
bodyText2: TextStyle(color: Colors.white),
button: TextStyle(color: Colors.white),
@ -50,18 +52,26 @@ class LoginScaffold extends StatelessWidget {
child: Column(
children: <Widget>[
Spacer(flex: 3),
Text("Comunic", style: TextStyle(fontSize: 50)),
Text("Comunic",
textAlign: TextAlign.center,
style: TextStyle(fontSize: 50)),
Spacer(flex: 1),
Text(tr("Free social network that respect your privacy")),
Spacer(flex: 1),
Padding(
padding: const EdgeInsets.all(8.0),
child: Material(
child: child,
color: Colors.indigo.shade500,
),
Text(
tr("Free social network that respect your privacy"),
textAlign: TextAlign.center,
),
Spacer(flex: 5),
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),
],
),
),