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.
87 lines
2.5 KiB
Dart
87 lines
2.5 KiB
Dart
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 VoidCallback? changeIndex;
|
|
final int? index;
|
|
final int? currentIndex;
|
|
final VoidCallback? 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(
|
|
margin: EdgeInsets.only(bottom: 5.0),
|
|
child: Image.asset(
|
|
'assets/images/habib-logo.png',
|
|
),
|
|
height: 22.0,
|
|
),
|
|
SizedBox(
|
|
height: 5,
|
|
),
|
|
Container(
|
|
margin: EdgeInsets.only(bottom: 7.0),
|
|
child: Texts(
|
|
title!,
|
|
textAlign: TextAlign.start,
|
|
color: currentIndex == index ? Colors.grey : Colors.grey,
|
|
fontSize: 11,
|
|
),
|
|
),
|
|
// Added TextAlign Property
|
|
],
|
|
),
|
|
),
|
|
),
|
|
),
|
|
);
|
|
}
|
|
}
|