selfprivacy.org.app/lib/ui/components/brand_card/brand_card.dart

30 lines
730 B
Dart
Raw Normal View History

2020-11-30 12:03:55 +02:00
import 'package:flutter/material.dart';
import 'package:selfprivacy/config/brand_colors.dart';
import 'package:selfprivacy/utils/extensions/elevation_extension.dart';
class BrandCard extends StatelessWidget {
2020-12-30 16:13:25 +02:00
const BrandCard({
2021-03-15 17:39:44 +02:00
Key? key,
2020-12-30 16:13:25 +02:00
this.child,
}) : super(key: key);
2020-11-30 12:03:55 +02:00
2021-03-15 17:39:44 +02:00
final Widget? child;
2020-11-30 12:03:55 +02:00
@override
Widget build(BuildContext context) {
2021-01-06 19:35:57 +02:00
return Container(
2020-11-30 12:03:55 +02:00
decoration: BoxDecoration(
2020-12-08 21:26:51 +02:00
color: Theme.of(context).brightness == Brightness.dark
? BrandColors.black
: BrandColors.white,
2020-11-30 12:03:55 +02:00
borderRadius: BorderRadius.circular(20),
).ev8,
padding: EdgeInsets.symmetric(
horizontal: 20,
vertical: 15,
),
child: child,
);
}
}