import 'package:diplomaticquarterapp/pages/landing/landing_page.dart';
import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart';
import 'package:flutter/material.dart';
import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
import 'package:diplomaticquarterapp/Constants.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: 22.0,
                ),
                SizedBox(
                  height: 9,
                ),
                Texts(
                  title,
                  textAlign: TextAlign.start,
                  color: currentIndex == index ? Colors.grey : Colors.grey,
                  fontSize: 11,
                ),
                // Added TextAlign Property
              ],
            ),
          ),
        ),
      ),
    );
  }
}
