howtodothisinflutter icon indicating copy to clipboard operation
howtodothisinflutter copied to clipboard

isDev not working with package:lint

Open CanRau opened this issue 5 years ago • 0 comments

@lesnitsky I like the Check if dev snippet. Sadly lint isn't happy about it. And as I'm pretty new to dart I'm not sure what to do^^

The function assert should have a return type but doesn't.
Try adding a return type to the function.dart(always_declare_return_types)
Type annotate public APIs.dart(type_annotate_public_apis)
Expected an identifier.dart(missing_identifier)

and it thinks (isDev = true) is a named parameter

Named parameters must be enclosed in curly braces ('{' and '}').
Try surrounding the named parameters in curly braces.dart(named_parameter_outside_group)

and the last one

A function body must be provided.
Try adding a function body.dart(missing_function_body)

I'm actually not really in need for this, just curious. So it's no urgent issue.

CanRau avatar Feb 19 '20 19:02 CanRau