Home > Blockchain >  flutter code does not run when two ..functions are present
flutter code does not run when two ..functions are present

Time:09-19

i was wondering if there was an expert that could help me out.

I am following a video for building an app...

For some weird reason, I can only have 1 one the following functions: ..addListener. <== line 27 OR ..addStatusListener. <== line 29

If I comment out one and leave the other, the code works. If I don't comment out one of them, the code does not work. any idea what the issue is?

video I am following is:: https://www.youtube.com/watch?v=Ck9L645ucrM&list=PLxefhmF0pcPlqR5FBT9_51HcIFLRvzci2&index=6 go to time=11:16

enter image description here

CodePudding user response:

We solved this in chat. Turns out OP was writing

..addListener( .... );
..addStatusListener( .... )

which of course is broken syntax. Removing the semicolon fixed it.

  • Related