You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
diplomatic-quarter/lib/widgets/pharmacy/bottom_nav_pharmacy_item.dart

75 lines
2.1 KiB
Dart

4 years ago
import 'package:diplomaticquarterapp/Constants.dart';
4 years ago
import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
import 'package:flutter/material.dart';
class BottomNavPharmacyItem extends StatelessWidget {
final String title;
final IconData icon;
final ValueChanged<int> changeIndex;
final int index;
final int currentIndex;
final Function onTap;
final IconData activeIcon;
BottomNavPharmacyItem(
{this.icon,
this.changeIndex,
this.index,
this.currentIndex,
this.activeIcon,
this.title,
this.onTap});
@override
Widget build(BuildContext context) {
return Expanded(
child: SizedBox(
// height: 72.0,
child: Material(
type: MaterialType.transparency,
child: InkWell(
highlightColor: Colors.transparent,
splashColor: Colors.transparent,
onTap: () => changeIndex(currentIndex),
child: Column(
mainAxisSize: MainAxisSize.min,
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
SizedBox(
height: 15,
),
currentIndex == index
? Divider(
color: Color(0xff5AB145),
thickness: 3.5,
)
: Divider(
thickness: 0,
),
Container(
child: Icon(currentIndex == index ? activeIcon : icon,
4 years ago
color:
currentIndex == index ? secondaryColor : Colors.grey,
4 years ago
size: 22.0),
),
SizedBox(
height: 11,
),
// Added TextAlign Property
Texts(
title,
textAlign: TextAlign.center,
4 years ago
color: currentIndex == index ? secondaryColor : Colors.grey,
4 years ago
fontSize: 11,
),
],
),
),
),
),
);
}
}