bottom navigation
							parent
							
								
									0a39a00df5
								
							
						
					
					
						commit
						d87402ae00
					
				| @ -0,0 +1,59 @@ | ||||
| import 'package:easy_localization/easy_localization.dart'; | ||||
| import 'package:flutter/material.dart'; | ||||
| import 'package:hmg_patient_app_new/core/app_assets.dart'; | ||||
| import 'package:hmg_patient_app_new/core/utils/utils.dart'; | ||||
| import 'package:hmg_patient_app_new/generated/locale_keys.g.dart'; | ||||
| import 'package:hmg_patient_app_new/theme/colors.dart'; | ||||
| 
 | ||||
| class BottomNavigation extends StatelessWidget { | ||||
|   const BottomNavigation({super.key}); | ||||
| 
 | ||||
|   @override | ||||
|   Widget build(BuildContext context) { | ||||
|     return Container( | ||||
|       padding: const EdgeInsets.symmetric(vertical: 12), | ||||
|       decoration: const BoxDecoration( | ||||
|         color: Colors.white, | ||||
|         border: Border( | ||||
|           top: BorderSide(color: AppColors.bottomNAVBorder, width: 0.5), | ||||
|         ), | ||||
| 
 | ||||
|       ), | ||||
|       child: Row( | ||||
|         mainAxisAlignment: MainAxisAlignment.spaceAround, | ||||
|         children: [ | ||||
|           _buildNavItem(AppAssets.homeBottom, LocaleKeys.home.tr()), | ||||
|           _buildNavItem(AppAssets.myFilesBottom,  LocaleKeys.myFiles.tr()), | ||||
|           _buildNavItem(AppAssets.bookAppoBottom,  LocaleKeys.appointment.tr(), iconSize: 32), | ||||
|           _buildNavItem(AppAssets.toDoBottom,  LocaleKeys.todoList.tr()), | ||||
|           _buildNavItem(AppAssets.servicesBottom, LocaleKeys.services2.tr()), | ||||
|         ], | ||||
|       ), | ||||
|     ); | ||||
|   } | ||||
| 
 | ||||
|   Widget _buildNavItem(String iconName, String label,{ double iconSize = 24}) { | ||||
|     return Column( | ||||
|       mainAxisSize: MainAxisSize.min, | ||||
|       children: [ | ||||
|         Container( | ||||
|           padding: const EdgeInsets.all(10), | ||||
|           child: Utils.buildSvgWithAssets( | ||||
|             icon: iconName, | ||||
|             height: iconSize, | ||||
|             width: iconSize | ||||
|           ), | ||||
|         ), | ||||
|         // const SizedBox(height: 4), | ||||
|         Text( | ||||
|           label, | ||||
|           style: TextStyle( | ||||
|             fontSize: 13, | ||||
|             fontWeight: FontWeight.w500, | ||||
|             color: Colors.black87, | ||||
|           ), | ||||
|         ), | ||||
|       ], | ||||
|     ); | ||||
|   } | ||||
| } | ||||
					Loading…
					
					
				
		Reference in New Issue