getWidget method
Implementation
Widget getWidget(ImageDirection direction) {
if (direction == ImageDirection.left) {
return Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
image,
SizedBox(width: space),
title
],
);
} else if (direction == ImageDirection.right) {
return Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
title,
SizedBox(width: space),
image
],
);
} else if (direction == ImageDirection.top) {
return Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
image,
SizedBox(height: space),
title
],
);
} else {
return Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
title,
SizedBox(height: space),
image
],
);
}
}