design: New design for login page
This commit is contained in:
parent
29dbf6f9f5
commit
4a008d0c2d
7 changed files with 240 additions and 260 deletions
|
|
@ -2,10 +2,11 @@ import 'dart:math';
|
|||
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
import 'package:fluffychat/config/themes.dart';
|
||||
|
||||
class EmptyPage extends StatelessWidget {
|
||||
final bool loading;
|
||||
static const double _width = 300;
|
||||
const EmptyPage({this.loading = false, super.key});
|
||||
static const double _width = 128;
|
||||
const EmptyPage({super.key});
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final width = min(MediaQuery.of(context).size.width, EmptyPage._width) / 2;
|
||||
|
|
@ -14,31 +15,20 @@ class EmptyPage extends StatelessWidget {
|
|||
appBar: AppBar(
|
||||
automaticallyImplyLeading: false,
|
||||
elevation: 0,
|
||||
backgroundColor: Theme.of(context).scaffoldBackgroundColor,
|
||||
backgroundColor: Colors.transparent,
|
||||
),
|
||||
extendBodyBehindAppBar: true,
|
||||
body: Column(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
Center(
|
||||
child: Hero(
|
||||
tag: 'info-logo',
|
||||
child: Image.asset(
|
||||
'assets/favicon.png',
|
||||
width: width,
|
||||
height: width,
|
||||
filterQuality: FilterQuality.medium,
|
||||
),
|
||||
),
|
||||
),
|
||||
if (loading)
|
||||
Center(
|
||||
child: SizedBox(
|
||||
width: width,
|
||||
child: const LinearProgressIndicator(),
|
||||
),
|
||||
),
|
||||
],
|
||||
body: Container(
|
||||
decoration: BoxDecoration(
|
||||
gradient: FluffyThemes.backgroundGradient(context, 128),
|
||||
),
|
||||
alignment: Alignment.center,
|
||||
child: Image.asset(
|
||||
'assets/favicon.png',
|
||||
width: width,
|
||||
height: width,
|
||||
filterQuality: FilterQuality.medium,
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue