getHorizontalBar method
Implementation
Widget getHorizontalBar({double percentage,int index}){
return Column(
children: [
Spacer(),
Container(
margin: EdgeInsets.fromLTRB(10, 0, 0, 0),
child: Stack(
alignment: Alignment.bottomLeft,
children: [
Container(
width: 30,
height: 180,
decoration: BoxDecoration(
color: barBackgroundColor ?? Color(0xFFFBEAFF),
borderRadius: BorderRadius.only(
topRight: Radius.circular(5),
topLeft: Radius.circular(5),
)
),
)
,
Container(
width: 30,
height: percentage == null ? 100 : percentage * 1.8,
decoration: BoxDecoration(
color: barTintColor ?? Color(0xFFFBEAFF),
borderRadius: BorderRadius.only(
topRight: Radius.circular(5),
topLeft: Radius.circular(5),
)
)
),
],
),
),
Container(
margin: EdgeInsets.fromLTRB(0, 5, 0, 0),
child: Text(
"" + index.toString(),
style: TextStyle(
fontFamily: fontName ?? "",
fontSize: 18,
color: indexingColor ?? Color(0xFF120E21),
fontWeight: FontWeight.w500),
),
),
Spacer(),
],
);
}