This commit is contained in:
Sai Naw Wun
2020-10-07 02:33:06 +06:30
parent 01a2798a74
commit 65dda16fe6
475 changed files with 1543 additions and 90780 deletions

View File

@@ -0,0 +1,38 @@
import 'package:fcs/helpers/theme.dart';
import 'package:flutter/material.dart';
Widget badgeCounter(Widget child, int counter) {
return Container(
width: 120,
height: 140,
child: new Stack(
children: <Widget>[
child,
counter != null && counter != 0
? new Positioned(
right: 12,
top: 12,
child: new Container(
padding: EdgeInsets.all(8),
decoration: new BoxDecoration(
shape: BoxShape.circle,
color: secondaryColor,
),
constraints: BoxConstraints(
minWidth: 14,
minHeight: 14,
),
child: Text(
counter > 99 ? '+99' : '$counter',
style: TextStyle(
color: Colors.white,
),
textAlign: TextAlign.center,
),
),
)
: new Container()
],
),
);
}