crime 0.1.0 copy "crime: ^0.1.0" to clipboard
crime: ^0.1.0 copied to clipboard

outdated

Package to make requests to the Crime API crimeometer. It exposes four methods to gather information about crime stats and crime reports around the world.

example/main.dart

import 'package:crime/crime.dart';

void main() async {
  try {
    const String API_KEY = "XXXXXXXXXXXXXXX"; // Your private API Key.

    final Crime crime = Crime(apiKey: API_KEY);

    final CrimeIncidents crimeIncidents = await crime.getCrimeIncidents(
      37.773972,
      -122.431297,
      "50mi",
      DateTime(2021, 1, 1),
      DateTime(2021, 2, 7),
    );

    crimeIncidents.incidents?.forEach((CrimeRawData crimeData) {
      print(
          "Crime incident [${crimeData.incidentOffense}] at [${crimeData.cityKey}]");
    });
  } catch (e) {
    print(e);
  }
}
1
likes
0
pub points
0%
popularity

Publisher

verified publisherimanol.dev

Package to make requests to the Crime API crimeometer. It exposes four methods to gather information about crime stats and crime reports around the world.

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

http, intl

More

Packages that depend on crime