I'm a newbie to DART. Spent many years doing OO (PDC) Prolog. I have a beginner's knowledge of HTML5 and CSS3.
I've started playing around with Polymer paper elements, and (sampler-scaffold). I have (paper-item)s as a menu on the left, and each item opens a different HTML page. Visually, it looks and behaves fine.
1) As I understand it, main() is called for each of these HTML pages, since they're shadow doms. So my app has multiple main()s - is that OK? Each main() is called each time I choose its page from the menu. I'm trying to control what each main() does by using a global variable...next.
2) I have a top level DART variable - bool is_init, not initialised. In the main() call from index.dart, I set it to a value. I read it to check it is correct. After clicking the menu to open a "sub page", it is already NULL in that page's main().
I've also tried doing the same within a class in a library - but of course, the initialised object becomes null because of the said problem!
I obviously misunderstand something here. Clues and advice most appreciated. cheers Steve