chore: Remove gradient and add login wallpaper

This commit is contained in:
Christian Pauly 2021-08-31 11:51:39 +02:00
commit 462e5381e9
7 changed files with 33 additions and 67 deletions

View file

@ -3,8 +3,6 @@ import 'dart:math';
import 'package:fluffychat/config/themes.dart';
import 'package:flutter/material.dart';
import '../background_gradient_box.dart';
class OnePageCard extends StatelessWidget {
final Widget child;
@ -16,19 +14,22 @@ class OnePageCard extends StatelessWidget {
Widget build(BuildContext context) {
return MediaQuery.of(context).size.width <= breakpoint
? child
: Material(
color: Theme.of(context).backgroundColor,
child: BackgroundGradientBox(
child: Padding(
padding: EdgeInsets.symmetric(
horizontal:
max((MediaQuery.of(context).size.width - 600) / 2, 12),
vertical:
max((MediaQuery.of(context).size.height - 800) / 2, 12),
),
child: SafeArea(child: Card(elevation: 3, child: child)),
: Container(
decoration: BoxDecoration(
image: DecorationImage(
image: AssetImage('assets/login_wallpaper.jpg'),
fit: BoxFit.cover,
),
),
child: Padding(
padding: EdgeInsets.symmetric(
horizontal:
max((MediaQuery.of(context).size.width - 600) / 2, 24),
vertical:
max((MediaQuery.of(context).size.height - 800) / 2, 24),
),
child: SafeArea(child: Card(elevation: 5, child: child)),
),
);
}
}