skip to Main Content

flutter bottom navigation bar icon not showing

When I am used BottomNavigationBarItem, I can't showing my navigation icons. I am trying this code: import 'package:flutter/material.dart'; import 'package:task_manager/style/style.dart'; BottomNavigationBar AppBottomNav(currentIndex, OnItemTapped) { return BottomNavigationBar( items: const [ BottomNavigationBarItem( icon: Icon(Icons.list_alt), label: "New", ), BottomNavigationBarItem( icon: Icon(Icons.access_time_rounded), label: "Progress",…

VIEW QUESTION

Null check operator used on a null value when calling a function from another class – Flutter

I have a class called DataCollectionPage where I have the following function in the initState function: void establishConnection (){ BluetoothConnection.toAddress(widget.server!.address).then((connection) { Utils.showSnackBar2("Successfully connected to your device"); this.connection = connection; setState(() { isConnecting = false; isDisconnecting = false; }); this.connection!.input!.listen(_onDataReceived).onDone(() {…

VIEW QUESTION

Future not returning String – Flutter

Why do I keep getting 'Instance of...' when I'm trying to get a String. What's wrong with the function? Future<string?> counter() async { Future.delayed(const Duration(seconds: 5), () { context.watch<FoodCount>().display(widget.food).toString(); return widget.food.quantity.toString(); }); int count = widget.food.quantity; // print(count); return count;…

VIEW QUESTION
Back To Top
Search