1
0
mirror of https://github.com/krawieck/lemmur/ synced 2024-12-16 10:30:24 +01:00
lemmur-app-android/lib/widgets/badge.dart
2020-09-05 18:16:16 +02:00

29 lines
634 B
Dart

import 'package:flutter/material.dart';
class Badge extends StatelessWidget {
final Widget child;
final BorderRadiusGeometry borderRadius;
Badge({
@required this.child,
this.borderRadius = const BorderRadius.all(Radius.circular(5)),
});
@override
Widget build(BuildContext context) {
var theme = Theme.of(context);
return Container(
height: 25,
decoration: BoxDecoration(
color: theme.accentColor,
borderRadius: borderRadius,
),
child: Padding(
padding: const EdgeInsets.symmetric(vertical: 4, horizontal: 8),
child: child,
),
);
}
}