|
|
|
|
@ -1,5 +1,11 @@
|
|
|
|
|
import 'package:badges/badges.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:flutter/cupertino.dart';
|
|
|
|
|
import 'package:flutter/material.dart';
|
|
|
|
|
import 'package:provider/provider.dart';
|
|
|
|
|
|
|
|
|
|
import '../../locator.dart';
|
|
|
|
|
|
|
|
|
|
class BottomNavigationItem extends StatelessWidget {
|
|
|
|
|
final IconData icon;
|
|
|
|
|
@ -19,6 +25,8 @@ class BottomNavigationItem extends StatelessWidget {
|
|
|
|
|
|
|
|
|
|
@override
|
|
|
|
|
Widget build(BuildContext context) {
|
|
|
|
|
|
|
|
|
|
DashboardViewModel model = DashboardViewModel();
|
|
|
|
|
return Expanded(
|
|
|
|
|
child: SizedBox(
|
|
|
|
|
height: 70.0,
|
|
|
|
|
@ -28,7 +36,12 @@ class BottomNavigationItem extends StatelessWidget {
|
|
|
|
|
highlightColor: Colors.transparent,
|
|
|
|
|
splashColor: Colors.transparent,
|
|
|
|
|
onTap: () => changeIndex(currentIndex),
|
|
|
|
|
child: Column(
|
|
|
|
|
child: Stack(
|
|
|
|
|
alignment: AlignmentDirectional.center,
|
|
|
|
|
children: [
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Column(
|
|
|
|
|
mainAxisSize: MainAxisSize.min,
|
|
|
|
|
mainAxisAlignment: MainAxisAlignment.center,
|
|
|
|
|
children: <Widget>[
|
|
|
|
|
@ -53,6 +66,26 @@ class BottomNavigationItem extends StatelessWidget {
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
if(currentIndex == 3)
|
|
|
|
|
Positioned(
|
|
|
|
|
right: 18.0,
|
|
|
|
|
bottom: 40.0,
|
|
|
|
|
child: Badge(
|
|
|
|
|
toAnimate: false,
|
|
|
|
|
position: BadgePosition.topEnd(),
|
|
|
|
|
shape: BadgeShape.circle,
|
|
|
|
|
badgeColor: Colors.red[800],
|
|
|
|
|
borderRadius: BorderRadius.circular(8),
|
|
|
|
|
badgeContent: Container(
|
|
|
|
|
// padding: EdgeInsets.all(2.0),
|
|
|
|
|
child: Text(model.notRepliedCount.toString(),
|
|
|
|
|
style: TextStyle(
|
|
|
|
|
color: Colors.white, fontSize: 12.0)),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
|