fluttercommunity/flutter_after_layout

VS Code dart linter error

LRNZ09 opened this issue · 2 comments

Hi, I'm happily using this library but I have an error using it with Visual Studio Code.
In fact, it's telling me this:

[dart] The class 'AfterLayoutMixin' can't be used as a mixin because it extends a class other than Object.
abstract class AfterLayoutMixin<T extends StatefulWidget> extends State<T>

Except this, I have no problems compiling the app.

Create a file called analysis_options.yaml next to pubspec.yaml.

analyzer:
  language:
    enableSuperMixins: true

Should do the trick.

It worked, thanks a lot!