|
|
|
import 'package:diplomaticquarterapp/Constants.dart';
|
|
|
|
import 'package:diplomaticquarterapp/pages/landing/landing_page.dart';
|
|
|
|
import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
|
|
|
|
import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart';
|
|
|
|
import 'package:flutter/material.dart';
|
|
|
|
|
|
|
|
class BottomNavHomeItem extends StatelessWidget {
|
|
|
|
final IconData icon;
|
|
|
|
final Image image;
|
|
|
|
final String title;
|
|
|
|
|
|
|
|
final ValueChanged<int> changeIndex;
|
|
|
|
final int index;
|
|
|
|
final int currentIndex;
|
|
|
|
final Function onTap;
|
|
|
|
final IconData activeIcon;
|
|
|
|
|
|
|
|
BottomNavHomeItem(
|
|
|
|
{this.icon,
|
|
|
|
this.changeIndex,
|
|
|
|
this.index,
|
|
|
|
this.currentIndex,
|
|
|
|
this.activeIcon,
|
|
|
|
this.onTap,
|
|
|
|
this.image,
|
|
|
|
this.title});
|
|
|
|
|
|
|
|
@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: () => {
|
|
|
|
Navigator.push(
|
|
|
|
context,
|
|
|
|
FadePage(page: LandingPage()),
|
|
|
|
),
|
|
|
|
},
|
|
|
|
child: Column(
|
|
|
|
mainAxisSize: MainAxisSize.min,
|
|
|
|
mainAxisAlignment: MainAxisAlignment.center,
|
|
|
|
children: <Widget>[
|
|
|
|
SizedBox(
|
|
|
|
height: 15,
|
|
|
|
),
|
|
|
|
currentIndex == index
|
|
|
|
? Divider(
|
|
|
|
// color: Color(0xff5AB145),
|
|
|
|
thickness: 0.5,
|
|
|
|
)
|
|
|
|
: Divider(
|
|
|
|
thickness: 0,
|
|
|
|
),
|
|
|
|
Container(
|
|
|
|
child: Image.asset(
|
|
|
|
'assets/images/habib-logo.png',
|
|
|
|
height: 35.0,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
SizedBox(
|
|
|
|
height: 11,
|
|
|
|
),
|
|
|
|
Texts(
|
|
|
|
title,
|
|
|
|
textAlign: TextAlign.center,
|
|
|
|
color: currentIndex == index ? secondaryColor : Colors.grey,
|
|
|
|
fontSize: 11,
|
|
|
|
),
|
|
|
|
// Added TextAlign Property
|
|
|
|
],
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|