@override as an explicit or an implicit annotation

I just started reading your book. Great job.

I particularly like your code annotations, with notes such as // 1 in the code keyed to the related description in your text:

  1. A widget’s build() method is the entry point for composing together other widgets to make a new widget.

You have a wonderful opportunity to do a similar annotation for an annotation that appears everywhere and that the official Dart documentation doesn’t manage to clarify:

@override

See: override constant - dart:core library - Dart API

Nobody seems to have mentioned, in a clear way, the motivation (and the tradeoffs) behind @override.

Search for @override in your book and you’ll get 82 results. Unfortunately, all of them are occurrences of the annotation and, as far as I can tell, there’s not a single annotation regarding why.

In any case (whether @override must be explicit or could be implicit), please consider providing a good description of the concept before the first appearance of @override in section 2 (Hello, Flutter).

Thanks for an excellent book.

1 Like

@panchoybook Thanks for your kind words!
We’ll definitely add some more details about @override

In the meantime you can check out our Dart book which provide more details about it: https://www.raywenderlich.com/books/dart-apprentice/v1.1/chapters/6-classes#895e7e6f2be59219f7d4abde52a4273477b867cd7f1b6653a0879621808d032a

1 Like

Thanks for your consideration, @funkyboy. That will make your book unique in the Flutter industry. The idea is quite simple but, somehow, quite elusive:

Describe a concept before using it.

Euclid did it. Go for it!

I really appreciate the link to your Dart book.

My best to you and all of your colleagues, who are obviously working hard and with enthusiasm to benefit the rest of us.

1 Like

Ok. Here’s some info on @override straight from the source of truth for Dart:

To find both @override and overriding on this web page, search for the partial word:
overrid

This info is good but you have to dig for it and search for it explicitly. As one of my physics professors used to say: You have to know everything before you can do anything.

I still believe that you have the golden opportunity to do a superb job introducing and clarifying this concept before using it (or, following your annotation style, as you use it).

Thanks.

1 Like

Another useful piece from the linter: annotate_overrides

https://dart-lang.github.io/linter/lints/annotate_overrides.html

1 Like

The second sentence in your note (1.) is perfect.

You have now described/defined/explained/clarified the term the first time it appears.

Great job with your Release v2.0.1 .

ps 2021-12-01 at 3.08.30 PM

For the curious: I’m still @panchoybook but I have a new account, due to some bureaucratic labyrinths having to do with non-first-class citizenship. Problem solved.