Jul 17, 2024
MyHomePage widgetMyHomePage is a StatefulWidgetScaffold widget to structure the app
body: ContainerbackgroundColor: Colors.whiteRemove Container:
Stack widgetAdd Children to Stack:
Positioned widget for bottom and left: 0Container as childMediaQuery to get screen size and set Container width to size.width and height to 80Add Background Color:
Colors.whiteDefine custom paint:
CustomPaint widgetSize(size.width, 80)CustomPainterCreate CustomPainter Class:
BNBCustomPainter extends CustomPainter classpaint and shouldRepaint functionsshouldRepaint returns falsepaint contains drawing logicCreate Paint Object:
Paint() with color: Colors.whiteStyle to PaintingStyle.fillQuadratic Bezier Curves:
P1 as a reference point to create an arc from P0 to P20, 2, 4, 6, 8, 10 and reference points for bezier curvesPath Creation Steps:
moveTo (0, 20)quadraticBezierTo:
path.close()FloatingActionButton:
BottomNavigationBar using Center widgetheightFactor: 0.6FloatingActionButton properties
backgroundColor: Colors.orangeIcons.shopping_basket0.1Add Icons to Navigation Bar:
Row within another ContainerIconButtons for each navigation itemmainAxisAlignemnt: MainAxisAlignment.spaceEvenlyContainer for gap between icons