skip to Main Content

I´ve a problem with the BottomNavigationBar in Flutter . BottomNavigationBarItem: title is not working and there is error

enter image description herethis is the error occur. bottomNavigationBar: BottomNavigationBar( items: const <BottomNavigationBarItem>[ BottomNavigationBarItem( icon: Icon( Icons.home, ), title: Text( 'Home', ), ), BottomNavigationBarItem( icon: Icon( Icons.message, ), title: Text( 'Messages', ), ), BottomNavigationBarItem( icon: Icon( Icons.person, ), title: Text(…

VIEW QUESTION

Flutter – How to modify a Model in Dart?

I try to modify an object: void main() { Model item = Model(list: [3,4]); print(item.list); Model test = item; List modifyList = test.list!; modifyList[0] = 999; test = Model(list: modifyList); print("original: " + item.list.toString()); print("modified: " + test.list.toString()); } class…

VIEW QUESTION

After I update the flutter there's an import error in flutter

/C:/Users/DL/AppData/Local/Pub/Cache/hosted/pub.dev/flutter_datetime_picker-1.5.1/lib/flutter_datetime_picker.dart:6:1: Error: 'DatePickerTheme' is imported from both 'package:flutter/src/material/date_picker_theme.dart' and 'package:flutter_datetime_picker/src/datetime_picker_theme.dart'. import 'package:flutter_datetime_picker/src/datetime_picker_theme.dart'; datetime_picker_theme.dart:1 ^^^^^^^^^^^^^^^ /C:/Users/DL/AppData/Local/Pub/Cache/hosted/pub.dev/flutter_datetime_picker-1.5.1/lib/flutter_datetime_picker.dart:199:31: Error: 'DatePickerTheme' is imported from both 'package:flutter/src/material/date_picker_theme.dart' and 'package:flutter_datetime_picker/src/datetime_picker_theme.dart'. this.theme = theme ?? DatePickerTheme(), ^^^^^^^^^^^^^^^ Failed to compile application. this error happens after I update

VIEW QUESTION

Flutter – Set Future<Model> as null

I have a variable late Future<QuestionModel> question; and a function that fetches QuestionModel fetchQuestion(){ // Question model is initialised here } It is being used in build to display a UI FutureBuilder( future: question, builder: (context, snapshot) { if (snapshot.data…

VIEW QUESTION

Future API Call Flutter

Im trying to create an simple Network class on dart, to centralize all my calls to an specific API. So i create an Service class, and create an mock and a get function using Dio. import 'package:dio/dio.dart'; import 'package:flutter/services.dart'; import…

VIEW QUESTION
Back To Top
Search