Tiwee icon indicating copy to clipboard operation
Tiwee copied to clipboard

Not parsing data on startup

Open spacie2136 opened this issue 2 years ago • 4 comments

Hi, first of all let me say i never used flutter nor dart. So im still lost in your code (well written btw.!).

I managed to set up everything but the app hangs on startup with this message:

I/flutter (30368): type 'String' is not a subtype of type 'Map<String, dynamic>' E/flutter (30368): [ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: Null check operator used on a null value E/flutter (30368): #0 categoryProvider.. (package:Tiwee/business_logic/provider/categoryprovider.dart:23:39)

Im not sure, but it seems to me there is a mismatch in the JSON format from the pulled API and the internal objects!? (Absolutly not sure!) I placed a try block over the for loop (just for testing) and managed to get the app running. But without any channels :-(

I'll be digging into it, but im still very lost as i said ;-) Do you maybe have an easy solution for this issue?

spacie2136 avatar Apr 01 '23 14:04 spacie2136

I'm currently investigating as well. For me, it looks like the countries are providing only one country which means it fails there.

Z0pyrus avatar Apr 02 '23 13:04 Z0pyrus

Apparently, this app uses an older API version that is not online anymore. Many Endpoints have changed, and the app could be rewritten.

Z0pyrus avatar Apr 02 '23 14:04 Z0pyrus

Hello, @spacie2136 @Z0pyrus sorry for the late response... this error is from APi as I used free API sometimes it does not respond correctly and returns empty data, as I find some free time I will refactor the code to handle errors better than past, meanwhile, ill appreciate any pull request from the community

neffex97 avatar Jul 24 '23 18:07 neffex97

Where I can write new API inside file code source app

tbukah avatar Oct 05 '23 19:10 tbukah