Skip to main content
Filter by
Sorted by
Tagged with
0 votes
2 answers
61 views

The following function is an example that represents a more complex situation that can not be simplified: String? intToString(int? i) { if (i == null) return null; return i.toString(); } Can this ...
Mr. Clear's user avatar
  • 662
-1 votes
4 answers
102 views

Why are we not adding Safe Call Operator(?.) instead of Not-Null Assertion(!!) in the attached code in Cache Interceptor ? The source code is : https://github.com/square/okhttp/blob/...
Kartik Bindal's user avatar
-1 votes
1 answer
94 views

I am trying to upgrade my existing Flutter project to null-safety. When I upgrade the Flutter version to the latest one, as expected it gives thousands of errors due to null safety. What is the best ...
Fahmidul Hasan's user avatar
0 votes
1 answer
54 views

════════ Exception caught by gesture ═══════════════════════════════════════════ Null check operator used on a null value ═══════════════════════════════════════════════════════════════════════════════...
Kabir kurd's user avatar
1 vote
1 answer
272 views

I'm integrating Riverpod for state management in a Flutter application and have encountered a null safety error related to accessing the 'state' property. This issue arises within my code that aims to ...
pomoworko.com's user avatar
0 votes
0 answers
504 views

The language version must be >=2.12.0. error in flutter I am receiving the following error in the line // @dart=2.9 My dart version is 3.0.3 I am receiving this error due to which my application ...
shubhangi mishra's user avatar
0 votes
1 answer
35 views

Why does Dart say the _parent variable is potentially null when there is a trivial if..then checking? How to get past this problem? class Scope { late final Map _map; Scope? _parent; ...
B So's user avatar
  • 1
-1 votes
1 answer
176 views

I'm developing a multiplayer sentence game using Flutter and ran into a problem with handling dynamic data coming from a server. Specifically, I'm encountering a TypeError related to null safety in ...
pomoworko.com's user avatar
1 vote
1 answer
241 views

i am trying to return value in users where i am getting this error if i am trying to fix this error by adding null sign it does not return any value becuase all this value is going to be null and i ...
Amazee21's user avatar
0 votes
1 answer
216 views

@required to a property gave such ERROR: The parameter 'lng' can't have a value of 'null' because of its type, but the implicit default value is 'null'. (Documentation) but removing @, removes the ...
Saad Mansoor's user avatar
0 votes
1 answer
59 views

In Flutter/Dart their is the null safety feature. In my scenario, I have null safety ON and I am trying to get the property 'myDateTime' of my object MyDateTime . But the compiler produce the error: ...
Christoforos Pantazis's user avatar
0 votes
3 answers
56 views

this is my model: // To parse this JSON data, do // // final economylistXml = economylistXmlFromJson(jsonString); import 'dart:convert'; EconomylistXml economylistXmlFromJson(String str) =&...
Mıktad Tahir Durak's user avatar
1 vote
4 answers
602 views

Im using a service to create api from xml. This is my model file: // To parse this JSON data, do // // final economylistXml = economylistXmlFromJson(jsonString); import 'dart:convert'; ...
Mıktad Tahir Durak's user avatar
0 votes
2 answers
4k views

I'm trying to call an API. This is my model : // To parse this JSON data, do // // final hisselist = hisselistFromJson(jsonString); import 'dart:convert'; Hisselist hisselistFromJson(String ...
Mıktad Tahir Durak's user avatar
0 votes
1 answer
3k views

im trying to call an api. This is my model; // To parse this JSON data, do // // final hisselist = hisselistFromJson(jsonString); import 'dart:convert'; Hisselist hisselistFromJson(String ...
Mıktad Tahir Durak's user avatar
-1 votes
1 answer
262 views

import 'package:flutter/material.dart'; import 'dart:async'; import 'crud.dart'; import 'class_penangkap.dart'; import 'acces_database.dart'; import 'enter.dart'; class ...
Bima Satria's user avatar
0 votes
2 answers
368 views

I have 3 errors I tried all possible solutions look at this Widget defaultFormField ({ @required TextEditingController? controller, @required TextInputType? keyboardType, @required IconData? ...
basel elazaly's user avatar
0 votes
1 answer
115 views

I have been studying over dart projects and tesing dart packages and interdependencies. I created a Dart Project called console_full_project, where within the project i made a package called ...
JabidHasan's user avatar
0 votes
1 answer
408 views

I'm encountering the following error in my Flutter project (Android Studio): Error: Cannot run with sound null safety, because the following dependencies don't support null safety: * package:fl_chart ...
pomoworko.com's user avatar
0 votes
4 answers
1k views

i am new in dart and just want to know how to take integer input from user in dart with null safety. i found out a way to take number input from dart which is: String? chossenNumber = stdin. ...
Saad Ebad's user avatar
  • 226
0 votes
1 answer
67 views

I only see use cases were null coalesing can be used to chain values, but not to omit any value. Am I missing something essential or is there really no shorthand way to write this: $model->name = &...
Alex's user avatar
  • 29
0 votes
2 answers
273 views

i have recently migrated my code to null safety. got the below error in dart migrate command. The argument type 'List<Slots?>?' can't be assigned to the parameter type 'List?' at lib/...
Venki's user avatar
  • 33
1 vote
2 answers
11k views

Im new to Flutter. I got this error Null check operator used on a null value error. but I could not solve it. This is the place where the second exception "The relevant error-causing widget was ...
user13943076's user avatar
1 vote
2 answers
116 views

I am using the Flutter null safety migration tool. What is your recommended workflow for null safety migration? For example: Start at main.dart first and work your way out from there? Start with ...
Mavrik00's user avatar
0 votes
1 answer
543 views

Is there an elegant way to write the following statement for a map? String? img = json['image']; if (img != null) { json['image'] = 'https://example.com/ingredients_100x100/' + img; } ...
lhengl's user avatar
  • 180