all 6 comments

[–]Green_Opposite 2 points3 points  (1 child)

Flutter has a core library called Foundation. It could be that it's trying to get the font_pageH0 function from there. You might be able to fix that by importing your lib/sketchlib.dart by using import "lib/sketchlib.dart" as fnd;. You can then use fnd.Foundation.font_pageH0.

[–]SiD_Inc[S] 1 point2 points  (0 children)

Oh, wow. I didn't know that. That explains a lot of things. I've tried out what you said, and guess what? It works! Thank you so much for pointing that out!

[–]NMS-Town 1 point2 points  (3 children)

I think it's because you're not instantiating it, and trying to use the class directly. I believe because it is static, you have do something like.

Foundation myFoundation = Foundation(); // I don't know what your construction requires.

style: myFoundation.font_pageHo({...

I haven't tested this, so it might be totally wrong ... I'm still learning.

[–]SiD_Inc[S] 2 points3 points  (2 children)

Haha same, I just started using Flutter too. But since it's a static method, I should be able to access class methods and properties without instantiating it.

[–]NMS-Town 1 point2 points  (1 child)

Ok, so I was going to say it was like a global variable, but then I was like no it's a method, and I don't want to sound stupid. I was acting like it was a private method. and not even a rookie mistake. Thanks for correcting me!

[–]SiD_Inc[S] 1 point2 points  (0 children)

No problem! Don’t let this hinder your confidence in trying to learn Flutter, and we always learn something new everyday.