|
|
|
|
@ -3,6 +3,7 @@ import 'package:doctor_app_flutter/config/config.dart';
|
|
|
|
|
import 'package:doctor_app_flutter/config/size_config.dart';
|
|
|
|
|
import 'package:doctor_app_flutter/core/viewModel/dashboard_view_model.dart';
|
|
|
|
|
import 'package:doctor_app_flutter/core/viewModel/doctor_replay_view_model.dart';
|
|
|
|
|
import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart';
|
|
|
|
|
import 'package:flutter/cupertino.dart';
|
|
|
|
|
import 'package:flutter/material.dart';
|
|
|
|
|
import 'package:flutter_svg/flutter_svg.dart';
|
|
|
|
|
@ -20,7 +21,6 @@ class BottomNavigationItem extends StatelessWidget {
|
|
|
|
|
final DashboardViewModel dashboardViewModel;
|
|
|
|
|
final String svgPath;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
BottomNavigationItem(
|
|
|
|
|
{this.icon,
|
|
|
|
|
this.activeIcon,
|
|
|
|
|
@ -28,7 +28,8 @@ class BottomNavigationItem extends StatelessWidget {
|
|
|
|
|
this.index,
|
|
|
|
|
this.currentIndex,
|
|
|
|
|
this.name,
|
|
|
|
|
this.dashboardViewModel, this.svgPath});
|
|
|
|
|
this.dashboardViewModel,
|
|
|
|
|
this.svgPath});
|
|
|
|
|
|
|
|
|
|
@override
|
|
|
|
|
Widget build(BuildContext context) {
|
|
|
|
|
@ -46,13 +47,12 @@ class BottomNavigationItem extends StatelessWidget {
|
|
|
|
|
children: [
|
|
|
|
|
if (currentIndex == index)
|
|
|
|
|
Positioned(
|
|
|
|
|
top: 0,
|
|
|
|
|
top: 0,
|
|
|
|
|
child: Container(
|
|
|
|
|
|
|
|
|
|
color: AppGlobal.appRedColor,
|
|
|
|
|
width: 100,
|
|
|
|
|
height: 3,
|
|
|
|
|
)),
|
|
|
|
|
color: AppGlobal.appRedColor,
|
|
|
|
|
width: 100,
|
|
|
|
|
height: 3,
|
|
|
|
|
)),
|
|
|
|
|
Column(
|
|
|
|
|
mainAxisSize: MainAxisSize.min,
|
|
|
|
|
mainAxisAlignment: MainAxisAlignment.center,
|
|
|
|
|
@ -61,25 +61,31 @@ class BottomNavigationItem extends StatelessWidget {
|
|
|
|
|
height: 15,
|
|
|
|
|
),
|
|
|
|
|
Container(
|
|
|
|
|
child: SvgPicture.asset(svgPath,width: SizeConfig.widthMultiplier* (10), height:SizeConfig.getHeightMultiplier(height:SizeConfig.heightMultiplier *
|
|
|
|
|
(SizeConfig.isHeightVeryShort ? 10:SizeConfig.isHeightShort ?8.5 : 7) ) * 40,
|
|
|
|
|
),
|
|
|
|
|
child: SvgPicture.asset(
|
|
|
|
|
svgPath,
|
|
|
|
|
width: SizeConfig.widthMultiplier * (10),
|
|
|
|
|
height: SizeConfig.getHeightMultiplier(
|
|
|
|
|
height: SizeConfig.heightMultiplier *
|
|
|
|
|
(SizeConfig.isHeightVeryShort
|
|
|
|
|
? 10
|
|
|
|
|
: SizeConfig.isHeightShort
|
|
|
|
|
? 8.5
|
|
|
|
|
: 7)) *
|
|
|
|
|
40,
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
SizedBox(
|
|
|
|
|
height: 8,
|
|
|
|
|
),
|
|
|
|
|
Expanded(
|
|
|
|
|
child: Text(name ?? "",
|
|
|
|
|
textAlign: TextAlign.center,
|
|
|
|
|
style: TextStyle(
|
|
|
|
|
fontSize:
|
|
|
|
|
SizeConfig.getTextMultiplierBasedOnWidth() *
|
|
|
|
|
2,
|
|
|
|
|
letterSpacing: 0.24,
|
|
|
|
|
color: AppGlobal.appTextColor,
|
|
|
|
|
fontWeight: FontWeight.w600) //#989898,
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
child: AppText(name ?? "",
|
|
|
|
|
textAlign: TextAlign.center,
|
|
|
|
|
fontSize:
|
|
|
|
|
SizeConfig.getTextMultiplierBasedOnWidth() * 2,
|
|
|
|
|
letterSpacing: -0.24,
|
|
|
|
|
color: AppGlobal.appTextColor,
|
|
|
|
|
fontWeight: FontWeight.w600) //#989898,
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
if (currentIndex == 3 &&
|
|
|
|
|
@ -95,10 +101,10 @@ class BottomNavigationItem extends StatelessWidget {
|
|
|
|
|
borderRadius: BorderRadius.circular(8),
|
|
|
|
|
badgeContent: Container(
|
|
|
|
|
// padding: EdgeInsets.all(2.0),
|
|
|
|
|
child: Text(
|
|
|
|
|
child: AppText(
|
|
|
|
|
dashboardViewModel.notRepliedCount.toString(),
|
|
|
|
|
style:
|
|
|
|
|
TextStyle(color: Colors.white, fontSize: 12.0)),
|
|
|
|
|
color: Colors.white,
|
|
|
|
|
fontSize: 12.0),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
|