[Solved] this method overrides a method annotated as @mustcallsuper

Exception:

this method overrides a method annotated as @mustcallsuper

Solution:

you need to call this “super.didChangeDependencies();” at the end of your “void didChangeDependencies()” method

Full code for reference:

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
void didChangeDependencies() {
if (!_initialized) {
// your logics
_initialized = true;
}
// add this to fix your this method overrides a method annotated as @mustcallsuper warning
super.didChangeDependencies();
}
void didChangeDependencies() { if (!_initialized) { // your logics _initialized = true; } // add this to fix your this method overrides a method annotated as @mustcallsuper warning super.didChangeDependencies(); }
 void didChangeDependencies() {
    if (!_initialized) {
    // your logics 
      _initialized = true;
    }
// add this to fix your this method overrides a method annotated as @mustcallsuper warning
   super.didChangeDependencies();
  }

Leave a Reply