rekabhq / background_locator

A Flutter plugin for updating location in background.
MIT License
287 stars 321 forks source link

fix json decoding error when provider is null #363

Open tomadimitrie opened 1 year ago

tomadimitrie commented 1 year ago

In LocationDto, provider is declared as such:

final String provider;

, with the assumption that it is always non-null. However, when receiving locations (tested on an iOS device), provider can be null, thus throwing an exception.

This PR makes the field optional.