javascript – my flutter backside navigation bar icon buttons is just not navigating my app to subsequent display screen

Spread the love


when I’m attempting to navigate to a different web page utilizing backside navigation bar icons it isn’t working I do not know why my icon button is just not working my screens would not have any issues I assume some type of drawback i am going through with icon buttons I assume assist me guys.
github hyperlink:https://github.com/ajitzz/perumpallil_public#perumpallil_public2

import 'bundle:flutter/materials.dart';
import 'bundle:flutter/companies.dart';
import 'bundle:united21/screens/mortgage.dart';

import '../../../frequent/color_extension.dart';

class MyBottomNavigation extends StatefulWidget {
  @override
  State<MyBottomNavigation> createState() => _MyBottomNavigationState();
}

class _MyBottomNavigationState extends State<MyBottomNavigation> {
  int selectTab = 0;
  @override
  Widget construct(BuildContext context) {
    return Padding(
      padding: const EdgeInsets.symmetric(vertical: 8, horizontal: 20),
      baby: Stack(
        alignment: Alignment.bottomCenter,
        youngsters: [
          Stack(
            alignment: Alignment.center,
            children: [
              ColorFiltered(
                colorFilter: const ColorFilter.mode(
                  Colors.black, // Change this color to the desired tint color
                  BlendMode.modulate,
                ),
                child: Image.asset("assets/images/bottom_bar_bg.png"),
              ),
              Row(
                mainAxisAlignment: MainAxisAlignment.spaceAround,
                children: [
                  IconButton(
                    onPressed: () {
                      setState(() {
                        selectTab = 0;
                        var currentTabView = const LoanScreen();
                      });
                    },
                    icon: Image.asset(
                      "assets/images/home.png",
                      width: 20,
                      height: 20,
                      color:
                          selectTab == 0 ? TColor.redshade500 : TColor.gray30,
                    ),
                  ),
                  IconButton(
                    onPressed: () {
                      setState(() {
                        selectTab = 1;
                        // ignore: unused_local_variable
                        var currentTabView = const LoanScreen();
                      });
                    },
                    icon: Image.asset(
                      "assets/images/budgets.png",
                      width: 20,
                      height: 20,
                      color:
                          selectTab == 1 ? TColor.redshade500 : TColor.gray30,
                    ),
                  ),
                  const SizedBox(
                    width: 50,
                    height: 50,
                  ),
                  IconButton(
                    onPressed: () {
                      setState(() {
                        selectTab = 2;
                        var currentTabView = CalenderView();
                      });
                    },
                    icon: Image.asset(
                      "assets/images/calendar.png",
                      width: 20,
                      height: 20,
                      color:
                          selectTab == 2 ? TColor.redshade500 : TColor.gray30,
                    ),
                  ),
                  IconButton(
                    onPressed: () {
                      setState(() {
                        selectTab = 3;
                        var currentTabView = CardsView();
                      });
                    },
                    icon: Image.asset(
                      "assets/images/creditcards.png",
                      width: 20,
                      height: 20,
                      color:
                          selectTab == 3 ? TColor.redshade500 : TColor.gray30,
                    ),
                  ),
                ],
              )
            ],
          ),
          InkWell(
            onTap: () {
              Navigator.push(context,
                  MaterialPageRoute(builder: (context) => const LoanScreen()));
            },
            baby: Container(
              margin: const EdgeInsets.all(20),
              ornament: BoxDecoration(boxShadow: [
                BoxShadow(
                    color: TColor.secondary.withOpacity(0.25),
                    blurRadius: 10,
                    offset: const Offset(0, 4))
              ], borderRadius: BorderRadius.round(50)),
              baby: CircleAvatar(
                radius: 32,
                backgroundColor: Colours.purple.shade900,
                baby: IconButton(
                  shade: Colours.white,
                  onPressed: () {
                    Navigator.pushNamed(context, LoanScreen.id);
                  },
                  icon: const Icon(
                    Icons.currency_rupee_sharp,
                  ),
                ),
              ),
            ),
          )
        ],
      ),
    );
  }
}

I attempted to navigate to subsequent web page but it surely would not work and it would not exhibiting any errors additionally as a substitute icon button I attempted to navigate straight it labored …?

Leave a Reply

Your email address will not be published. Required fields are marked *