FakeBaabaLocation constructor

FakeBaabaLocation({
  1. LocationConfig config = const LocationConfig(),
  2. LocationAccess permission = LocationAccess.grantedPrecise,
  3. bool serviceEnabled = true,
  4. Position? currentFix,
  5. bool supported = true,
  6. DateTime clock()?,
})

Implementation

FakeBaabaLocation({
  LocationConfig config = const LocationConfig(),
  LocationAccess permission = LocationAccess.grantedPrecise,
  bool serviceEnabled = true,
  Position? currentFix,
  bool supported = true,
  DateTime Function()? clock,
}) : platform = InMemoryLocationPlatform(
       access: permission,
       serviceEnabled: serviceEnabled,
       supported: supported,
       clock: clock,
     ) {
  platform.currentFix = currentFix;
  prompter = InMemoryPrompter(platform);
  _impl = BaabaLocationImpl(
    config: config,
    platform: platform,
    prompter: prompter,
    clock: clock,
    sleep: (_) async {},
    deviceLocale: () => const Locale('en', 'US'),
    platformGeocoder: InMemoryGeocodingProvider(platform),
  );
}