Skip to content

Widget with final field declaration causes error after lints application #2

@vlastachu

Description

@vlastachu

For example you have

final controller = TextEditingController();

applying lint causes such error

final controller = TextEditingController().closeWith(this);
//                                                   ^^^^
// Invalid reference to 'this' expression

Because this reference is unavailable at initialization moment. Possible fix is to add late modificator to such fields

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions