skip to Main Content

handle null values in flutter/dart model

i have a model it looks like this class UserModel { final String? username; final int? age; final String? phoneNumber; UserModel( {required this.age, required this.phoneNumber, required this.username}); @override String toString() { return 'Username => $usernamenAge => $agenPhone number => $phoneNumber';…

VIEW QUESTION

Flutter – FutureBuilder weird behaviour

I have a FutureBuilder which the future is this : Future<Tutor> future(Object? args) async { print("running future ...${args}"); String title = ""; String content = ""; final SharedPreferences prefs = await SharedPreferences.getInstance(); if (args != null) { debugPrint("args is not…

VIEW QUESTION

Git push fails due to large file error (Flutter SDK)

No amount of stack overflow research has lead me to a solution. PS C:Usersbenia_6dpynbzStartupApp> git push origin BensVersion Enumerating objects: 933, done. Counting objects: 100% (878/878), done. Delta compression using up to 12 threads Compressing objects: 100% (362/362), done. Writing…

VIEW QUESTION
Back To Top
Search