selected function
Widget
selected(
- dynamic bool, {
- dynamic color,
})
Implementation
Widget selected(bool, {color}) {
if (bool)
return Container(
width: 28,
height: 28,
child: Icon(IconData(0xe616, fontFamily: 'iconfont'), size: 28, color: color != null ? HexToColor(color) : Color.fromRGBO(255, 176, 3, 1)),
);
return Container(
width: 28,
height: 28,
child: Center(
child: Container(
width: 24,
height: 24,
decoration: BoxDecoration(
color: HexToColor('#F2F2F2'),
borderRadius: BorderRadius.circular(100),
),
child: Center(
child: Container(
width: 20,
height: 20,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(20),
color: Colors.white,
),
),
),
),
),
);
}