A general comment about the Flutter quickstart is that it is overly complicated for being a "quick start". The messageCallback and eventCallback seem to be an opinionated messaging system built along with the quickstart. This seems to be an extra feature, that is unnecessary to start.
Not only that, those functions are not covered anywhere on this page. So, if a user copies all the code into their project, they will have errors.
Removing this messaging system would remove about 75% of the code in this snippet, making it much more readable. Any gaps left by this can be filled in with a paragraph above.
There are other examples of unnecessary code throughout the document. For example int localUid = -1 is declared, but never used. Same thing with isBroadcaster.
A general comment about the Flutter quickstart is that it is overly complicated for being a "quick start". The
messageCallback
andeventCallback
seem to be an opinionated messaging system built along with the quickstart. This seems to be an extra feature, that is unnecessary to start.Not only that, those functions are not covered anywhere on this page. So, if a user copies all the code into their project, they will have errors.
Removing this messaging system would remove about 75% of the code in this snippet, making it much more readable. Any gaps left by this can be filled in with a paragraph above.
There are other examples of unnecessary code throughout the document. For example
int localUid = -1
is declared, but never used. Same thing withisBroadcaster
.