Closed komape closed 3 years ago
@komape Thank you for your contribution;
@mehdok But then you get the following warning:
The type parameter 'autoStop' is annotated with @required but only named parameters without a default value can be annotated with it.
Remove @required.dart(invalid_required_named_param)
What do you prefer?
@required autoStop,
or
autoStop = false,
If the parameter is marked as @required
, everyone who updates their background_locator
will receive a warning if they don't set this parameter. In my opinion, this is enough.
You are right, but this parameter is really an optional one, it should be false unless the user wants it to be true. so I think it's better to remove the @required
and just provide a default value for it:
bool autoStop = false
Done.
This PR fixes the issue described in #175.
Alternatively the parameter could get a default value assigned but I wasn't sure if
true
orfalse
is better.