Home > Software design >  String data doesn't return when I do that with a name containing _ in front of name
String data doesn't return when I do that with a name containing _ in front of name

Time:05-10

enter image description here

Plz let me know.. why it doesn't work here??

there says it is undefinied name.

CodePudding user response:

Define the function witin the StoryBrain class and call the function using StoryBrain().getStory()

CodePudding user response:

Firts, you define variable in a class, so you can't use it variable directly, you need an instance of class to call it variable.

Second, in dart _ mean private.

  • Related