getBackgroundWidget function
Implementation
Widget getBackgroundWidget(Widget widget) {
double size = MahasDimensions.getWidthPercentSize(10);
return SizedBox(
width: double.infinity,
height: double.infinity,
child: Stack(
children: [
Container(
width: double.infinity,
height: MahasDimensions.getTopViewHeight(),
padding:
EdgeInsets.only(bottom: MahasDimensions.getTopViewHeight() / 4),
decoration: ShapeDecoration(
color: MahasColors.primaryColor,
shape: SmoothRectangleBorder(
borderRadius: SmoothBorderRadius.only(
bottomLeft:
SmoothRadius(cornerRadius: size, cornerSmoothing: 0.2),
bottomRight:
SmoothRadius(cornerRadius: size, cornerSmoothing: 0.2),
),
),
),
child: Row(
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
getSvgImage(
"logo.svg",
MahasDimensions.getHeightPercentSize(
MahasDimensions.logSize)),
getSpaceWidth(1.5),
getCustomText(
"KILO",
color: MahasColors.whiteColor,
weight: FontWeight.bold,
size: MahasDimensions.getHeightPercentSize(
MahasDimensions.fontSizeExtraLarge),
)
],
),
),
SizedBox(
width: double.infinity,
height: double.infinity,
child: Column(
children: [
getSpaceHeight(28),
Expanded(
flex: 1,
child: SingleChildScrollView(
child: Container(
width: double.infinity,
decoration: ShapeDecoration(
color: MahasColors.whiteColor,
shadows: MahasDimensions.getShadows(),
shape: MahasDimensions.getShape(),
),
margin: EdgeInsets.only(
left: size / 2.2,
right: size / 2.2,
bottom: MahasDimensions.getHeightPercentSize(10),
),
child: widget,
),
),
)
],
),
)
],
),
);
}