buildChildWithIC function
Widget
buildChildWithIC(
- BuildContext context,
- String? text,
- Icon? icon,
- double gap,
- TextStyle textStyle,
Implementation
Widget buildChildWithIC(BuildContext context, String? text, Icon? icon,
double gap, TextStyle textStyle) {
icon = Icon(
icon?.icon,
color: Theme.of(context).brightness == Brightness.light
? Colors.white
: Colors.black,
);
var children = <Widget>[];
if (text != null) {
children.add(buildText(text, textStyle));
children.add(Padding(padding: EdgeInsets.all(gap)));
}
children.add(icon);
return Wrap(
direction: Axis.horizontal,
crossAxisAlignment: WrapCrossAlignment.center,
children: children,
);
}