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

Improve login route

This commit is contained in:
2021-04-17 11:16:21 +02:00
parent ab60593f12
commit 1bf41bcc20
6 changed files with 162 additions and 80 deletions

View File

@ -150,6 +150,8 @@ class _CreateAccountWidgetState extends State<CreateAccountWidget> {
: null,
),
SizedBox(height: 10),
// TOS
CheckboxListTile(
title:
@ -172,6 +174,8 @@ class _CreateAccountWidgetState extends State<CreateAccountWidget> {
),
),
SizedBox(height: 10),
// Submit button
Center(
child: ElevatedButton(

View File

@ -6,11 +6,11 @@ import 'package:comunic/helpers/version_helper.dart';
import 'package:comunic/helpers/websocket_helper.dart';
import 'package:comunic/models/config.dart';
import 'package:comunic/ui/dialogs/deprecation_dialog.dart';
import 'package:comunic/ui/routes/login_route.dart';
import 'package:comunic/ui/routes/main_route/main_route.dart';
import 'package:comunic/ui/routes/main_route/smartphone_route.dart';
import 'package:comunic/ui/routes/main_route/tablet_route.dart';
import 'package:comunic/ui/routes/push_notifications_route.dart';
import 'package:comunic/ui/routes/welcome_route.dart';
import 'package:comunic/ui/widgets/safe_state.dart';
import 'package:comunic/utils/flutter_utils.dart';
import 'package:comunic/utils/intl_utils.dart';

View File

@ -0,0 +1,59 @@
import 'package:comunic/models/config.dart';
import 'package:flutter/material.dart';
/// Login forms base theme
///
/// @author Pierre Hubert
class LoginRoutesTheme extends StatelessWidget {
final Widget child;
const LoginRoutesTheme({Key key, @required this.child}) : super(key: key);
@override
Widget build(BuildContext context) => Theme(
data: Theme.of(context).copyWith(
scaffoldBackgroundColor: Config.get().splashBackgroundColor,
appBarTheme: AppBarTheme(
backgroundColor: Colors.transparent,
elevation: 0,
),
iconTheme: IconThemeData(color: Colors.white),
inputDecorationTheme: InputDecorationTheme(
fillColor: Colors.white,
hintStyle: TextStyle(color: Colors.white),
labelStyle: TextStyle(color: Colors.white),
prefixStyle: TextStyle(color: Colors.white),
hoverColor: Colors.white,
errorStyle: TextStyle(color: Colors.deepOrangeAccent),
),
checkboxTheme: CheckboxThemeData(
fillColor: MaterialStateProperty.all(Colors.white),
checkColor:
MaterialStateProperty.all(Config.get().splashBackgroundColor),
),
primaryColor: Colors.white,
backgroundColor: Config.get().splashBackgroundColor,
disabledColor: Colors.grey,
highlightColor: Colors.white12,
accentColor: Colors.white,
hintColor: Colors.white,
textTheme: TextTheme(subtitle1: TextStyle(color: Colors.white)),
colorScheme: ColorScheme(
primary: Colors.white,
primaryVariant: Colors.white,
secondary: Colors.white,
secondaryVariant: Colors.white,
surface: Config.get().splashBackgroundColor,
background: Config.get().splashBackgroundColor,
error: Colors.redAccent,
onPrimary: Config.get().splashBackgroundColor,
onSecondary: Config.get().splashBackgroundColor,
onSurface: Colors.white,
onBackground: Colors.white,
onError: Colors.redAccent,
brightness: Brightness.dark,
)),
child: child,
);
}