add icons to bottom sheet

merge-requests/922/head
Elham Rababh 4 years ago
parent 9a1b9eb50b
commit 98bc33042f

Before

Width:  |  Height:  |  Size: 1.3 KiB

After

Width:  |  Height:  |  Size: 1.3 KiB

Before

Width:  |  Height:  |  Size: 749 B

After

Width:  |  Height:  |  Size: 749 B

@ -50,6 +50,7 @@ class _BottomNavBarState extends State<BottomNavBar> {
BottomNavigationItem(
icon: DoctorApp.home_1,
activeIcon: DoctorApp.home_active_1,
svgPath: "assets/images/svgs/bottom_nav/home-active.svg",
changeIndex: _changeIndex,
index: widget.index,
currentIndex: 0,
@ -59,6 +60,7 @@ class _BottomNavBarState extends State<BottomNavBar> {
BottomNavigationItem(
icon: DoctorApp.schedule_1,
activeIcon: DoctorApp.schedule_active_1,
svgPath: "assets/images/svgs/bottom_nav/schedule-active.svg",
changeIndex: _changeIndex,
index: widget.index,
currentIndex: 1,
@ -69,6 +71,7 @@ class _BottomNavBarState extends State<BottomNavBar> {
BottomNavigationItem(
icon: DoctorApp.qr_reader,
activeIcon: DoctorApp.qr_reader_active_1,
svgPath: "assets/images/svgs/bottom_nav/reader-active.svg",
changeIndex: _changeIndex,
index: widget.index,
currentIndex: 2,
@ -79,6 +82,7 @@ class _BottomNavBarState extends State<BottomNavBar> {
BottomNavigationItem(
icon: DoctorApp.dr_reply_1,
activeIcon: DoctorApp.dr_reply_active_1,
svgPath: "assets/images/svgs/bottom_nav/reply-active.svg",
changeIndex: _changeIndex,
index: widget.index,
currentIndex: 3,

@ -5,6 +5,7 @@ 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:flutter_svg/flutter_svg.dart';
import 'package:provider/provider.dart';
import '../../locator.dart';
@ -17,6 +18,8 @@ class BottomNavigationItem extends StatelessWidget {
final int currentIndex;
final String name;
final DashboardViewModel dashboardViewModel;
final String svgPath;
BottomNavigationItem(
{this.icon,
@ -25,7 +28,7 @@ class BottomNavigationItem extends StatelessWidget {
this.index,
this.currentIndex,
this.name,
this.dashboardViewModel});
this.dashboardViewModel, this.svgPath});
@override
Widget build(BuildContext context) {
@ -58,8 +61,9 @@ class BottomNavigationItem extends StatelessWidget {
height: 15,
),
Container(
child: Icon(currentIndex == index ? activeIcon : icon,
color: AppGlobal.appTextColor, size: 22.0),
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,

Loading…
Cancel
Save