1
0
mirror of https://github.com/go-vikunja/app synced 2024-12-03 15:52:41 +00:00
JonasFranz 826acc26f8 Add dark mode (#46)
Merge branch 'master' into feature/dark-mode

Add white logo in dark mode

Make button shadow dark

Format

Add dark mode

Co-authored-by: kolaente <k@knt.li>
Co-authored-by: Jonas Franz <info@jonasfranz.software>
Reviewed-on: vikunja/app#46
Reviewed-by: konrad <konrad@kola-entertainments.de>
2020-06-17 17:41:40 +00:00

46 lines
1.2 KiB
Dart

import 'package:flutter/material.dart';
import 'package:vikunja_app/theme/constants.dart';
class FancyButton extends StatelessWidget {
final double width;
final double height;
final Function onPressed;
final Widget child;
const FancyButton({
Key key,
@required this.child,
this.width = double.infinity,
this.height = 35,
this.onPressed,
}) : super(key: key);
@override
Widget build(BuildContext context) {
return Padding(
padding: vStandardVerticalPadding,
child: Container(
width: width,
height: height,
decoration: BoxDecoration(boxShadow: [
BoxShadow(
color: Theme.of(context).brightness == Brightness.dark
? vButtonShadowDark
: vButtonShadow,
offset: Offset(-5, 5),
blurRadius: 10,
),
]),
child: Material(
borderRadius: BorderRadius.circular(3),
color: vButtonColor,
child: InkWell(
onTap: onPressed,
child: Center(
child: child,
)),
),
));
}
}