design:
parent
49092744f0
commit
937b69fec9
Binary file not shown.
After Width: | Height: | Size: 66 KiB |
@ -0,0 +1,10 @@
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
class FluffyBanner extends StatelessWidget {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Image.asset(Theme.of(context).brightness == Brightness.dark
|
||||
? 'assets/banner_dark.png'
|
||||
: 'assets/banner.png');
|
||||
}
|
||||
}
|
@ -0,0 +1,40 @@
|
||||
import 'dart:math';
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
class OnePageCard extends StatelessWidget {
|
||||
final Widget child;
|
||||
|
||||
const OnePageCard({Key key, this.child}) : super(key: key);
|
||||
|
||||
static const int alpha = 64;
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Container(
|
||||
decoration: BoxDecoration(
|
||||
color: Theme.of(context).backgroundColor,
|
||||
gradient: LinearGradient(
|
||||
begin: Alignment.topRight,
|
||||
end: Alignment.bottomLeft,
|
||||
stops: [
|
||||
0.1,
|
||||
0.4,
|
||||
0.6,
|
||||
0.9,
|
||||
],
|
||||
colors: [
|
||||
Theme.of(context).secondaryHeaderColor.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),
|
||||
),
|
||||
child: Card(child: child),
|
||||
);
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue