https://javiercbk.github.io/json_to_dart/ สามารถแปลง json ให้เป็น dart เพื่อเอาไปสร้าง model ในโปรเจค Flutter
![](https://thana.in.th/wp-content/uploads/2021/06/Screen-Shot-2564-06-20-at-11.05.34.png)
![](https://thana.in.th/wp-content/uploads/2021/06/Screen-Shot-2564-06-20-at-11.05.59.png)
แต่เมื่อนำไปสร้าง model แล้วติด error ดังนี้
![](https://thana.in.th/wp-content/uploads/2021/06/Screen-Shot-2564-06-20-at-11.06.56.png)
Fix #1
![](https://thana.in.th/wp-content/uploads/2021/06/Screen-Shot-2564-06-20-at-11.07.21.png)
![](https://thana.in.th/wp-content/uploads/2021/06/Screen-Shot-2564-06-20-at-11.07.59.png)
Fix #2
![](https://thana.in.th/wp-content/uploads/2021/06/Screen-Shot-2564-06-20-at-11.08.14.png)
![](https://thana.in.th/wp-content/uploads/2021/06/Screen-Shot-2564-06-20-at-11.08.32.png)
Fix #3
![](https://thana.in.th/wp-content/uploads/2021/06/Screen-Shot-2564-06-20-at-11.08.44.png)
![](https://thana.in.th/wp-content/uploads/2021/06/Screen-Shot-2564-06-20-at-11.09.30.png)
late
https://dart.dev/tools/diagnostic-messages#not_initialized_non_nullable_instance_field
![](https://thana.in.th/wp-content/uploads/2021/06/Screen-Shot-2564-06-20-at-11.11.12.png)
(Visited 408 times, 1 visits today)