positionView method
Get the position view
Implementation
Widget positionView() {
final List<Widget> children = [];
children.add(child!);
if (position == VxBadgePosition.left) {
children.insert(0, getVxRound());
} else if (position == VxBadgePosition.right) {
children.add(getVxRound());
} else if (position == VxBadgePosition.leftTop) {
children.add(Positioned(
top: 0,
left: 0,
child: getVxRound(),
));
} else if (position == VxBadgePosition.rightTop) {
children.add(Positioned(
top: 0,
right: 0,
child: getVxRound(),
));
} else if (position == VxBadgePosition.leftBottom) {
children.add(Positioned(
bottom: 0,
left: 0,
child: getVxRound(),
));
} else if (position == VxBadgePosition.rightBottom) {
children.add(Positioned(
bottom: 0,
right: 0,
child: getVxRound(),
));
}
if (position == VxBadgePosition.left || position == VxBadgePosition.right) {
return Row(
mainAxisAlignment: MainAxisAlignment.center,
mainAxisSize: MainAxisSize.min,
children: children,
);
} else {
return Stack(
children: children,
);
}
}