Add option to change Badge border radius
This commit is contained in:
parent
88d796def7
commit
de625de379
|
@ -2,8 +2,12 @@ import 'package:flutter/material.dart';
|
|||
|
||||
class Badge extends StatelessWidget {
|
||||
final Widget child;
|
||||
final BorderRadiusGeometry borderRadius;
|
||||
|
||||
Badge({@required this.child});
|
||||
Badge({
|
||||
@required this.child,
|
||||
this.borderRadius = const BorderRadius.all(Radius.circular(5)),
|
||||
});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
|
@ -13,7 +17,7 @@ class Badge extends StatelessWidget {
|
|||
height: 25,
|
||||
decoration: BoxDecoration(
|
||||
color: theme.accentColor,
|
||||
borderRadius: BorderRadius.all(Radius.circular(5)),
|
||||
borderRadius: borderRadius,
|
||||
),
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.symmetric(vertical: 4, horizontal: 8),
|
||||
|
|
Loading…
Reference in New Issue