mirror of
https://gitlab.com/famedly/fluffychat.git
synced 2025-01-12 10:42:35 +01:00
fix: Add normal mode again to OnePageCard
This commit is contained in:
parent
e3474bf220
commit
c057d31d21
@ -10,31 +10,33 @@ class OnePageCard extends StatelessWidget {
|
|||||||
static const int alpha = 64;
|
static const int alpha = 64;
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return Container(
|
return MediaQuery.of(context).size.width <= 600
|
||||||
decoration: BoxDecoration(
|
? child
|
||||||
color: Theme.of(context).backgroundColor,
|
: Container(
|
||||||
gradient: LinearGradient(
|
decoration: BoxDecoration(
|
||||||
begin: Alignment.topRight,
|
color: Theme.of(context).backgroundColor,
|
||||||
end: Alignment.bottomLeft,
|
gradient: LinearGradient(
|
||||||
stops: [
|
begin: Alignment.topRight,
|
||||||
0.1,
|
end: Alignment.bottomLeft,
|
||||||
0.4,
|
stops: [
|
||||||
0.6,
|
0.1,
|
||||||
0.9,
|
0.4,
|
||||||
],
|
0.6,
|
||||||
colors: [
|
0.9,
|
||||||
Theme.of(context).secondaryHeaderColor.withAlpha(alpha),
|
],
|
||||||
Theme.of(context).primaryColor.withAlpha(alpha),
|
colors: [
|
||||||
Theme.of(context).accentColor.withAlpha(alpha),
|
Theme.of(context).secondaryHeaderColor.withAlpha(alpha),
|
||||||
Theme.of(context).backgroundColor.withAlpha(alpha),
|
Theme.of(context).primaryColor.withAlpha(alpha),
|
||||||
],
|
Theme.of(context).accentColor.withAlpha(alpha),
|
||||||
),
|
Theme.of(context).backgroundColor.withAlpha(alpha),
|
||||||
),
|
],
|
||||||
padding: EdgeInsets.symmetric(
|
),
|
||||||
horizontal: max((MediaQuery.of(context).size.width - 600) / 2, 0),
|
),
|
||||||
vertical: max((MediaQuery.of(context).size.height - 800) / 2, 0),
|
padding: EdgeInsets.symmetric(
|
||||||
),
|
horizontal: max((MediaQuery.of(context).size.width - 600) / 2, 0),
|
||||||
child: SafeArea(child: Card(child: child)),
|
vertical: max((MediaQuery.of(context).size.height - 800) / 2, 0),
|
||||||
);
|
),
|
||||||
|
child: SafeArea(child: Card(child: child)),
|
||||||
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user