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 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: [ SizedBox( height: 15, ), currentIndex == index ? Divider( color: Color(0xff5AB145), thickness: 3.5, ) : Divider( thickness: 0, ), Container( child: Icon(currentIndex == index ? activeIcon : icon, color: currentIndex == index ? Theme.of(context).primaryColor : Theme.of(context).primaryColor, size: 22.0), ), SizedBox( height: 11, ), // Added TextAlign Property Texts( title, textAlign: TextAlign.center, color: currentIndex == index ? Theme.of(context).primaryColor : Theme.of(context).primaryColor, fontSize: 11, ), ], ), ), ), ), ); } }