当前位置:网站首页>Flutter reports an error type 'Int' is not a subtype of type 'string' wonderful experience
Flutter reports an error type 'Int' is not a subtype of type 'string' wonderful experience
2022-06-13 02:52:00 【Programming Bruce Lee】
problem
Today, suddenly this code message int transformation string error , And the error code is actually if Code for comparing values ?
type 'int' is not a subtype of type 'String'

And I clearly use dynamic Data type , Then I'll send a message int It should be able to compare ?
solve
I found many things on the Internet that are different from my situation , It took more than an hour , The discovery is of this class get The return value of the statement …
So I use this class json The script is automatically generated , And then put it's _value The type of this attribute is changed to dynamic, however get Method still returns string, While using object .xxx When you use the privatized attribute, you will automatically call get Method , The return value is string, And I define it as dynamic( Any type ), What's coming in is int,dart in int Can't automatically convert to string, So report a mistake , Just put get The return value of the method is changed to dynamic that will do 
边栏推荐
- Opencv 07, pixel read, change and bitmap write
- vant实现移动端的适配
- Stack: daily temperature
- [reading point paper] yolo9000:better, faster, stronger, (yolov2), integrating various methods to improve the idea of map and wordtree data fusion
- [reading papers] comparison of deeplobv1-v3 series, brief review
- Why does it feel that most papers still use RESNET as the backbone network rather than densenet?
- Multiple knapsack problem
- Modify the color of El input, textarea and El checkbox when they are disabled
- Example 4 linear filtering and built-in filtering
- [data analysis and visualization] key points of data drawing 8- use of circular bar chart
猜你喜欢

Pycharm and Anaconda ultra detailed installation and configuration tutorial

Radio design and implementation in IVI system

AAR packaging and confusion

六款国产飞机专用GPU产品通过鉴定审查

Linked list: orderly circular linked list

Mp4 playback

01 initial knowledge of wechat applet

Six special GPU products for domestic aircraft passed the appraisal and review

Linked lists: rearranging linked lists
![[reading papers] visual convolution zfnet](/img/01/4181f19b2d24b842488522c2001970.jpg)
[reading papers] visual convolution zfnet
随机推荐
[common tools] pyautogui tutorial
How to destroy a fragment- How to destroy Fragment?
Hash table: least recently used cache
[data analysis and visualization] key points of data drawing 10- construction of legend
Android lightweight cache processing
Stack: daily temperature
Opencv 15 face recognition and eye recognition
[data analysis and visualization] key points of data drawing 9- color selection
HEAP[xxx.exe]: Invalid address specified to RtlValidateHeap( 0xxxxxx, 0x000xx)
Traverse the array and delete an element until it is deleted
Graduation project - campus old thing recycling system based on stm32
Bi modal progressive mask attention for fine graded recognition
PK of dotnet architecture
Linked list: adding numbers in the linked list
[data analysis and visualization] key points of data drawing 4- problems of pie chart
数字IC设计——FIFO的设计
小程序 input,textarea组件权重比fixed的z-index都高
Linked list: palindrome linked list
[data and Analysis Visualization] D3 introductory tutorial 2- building shapes in D3
Ffmpeg principle