dart_roadsdata_http 1.0.0 copy "dart_roadsdata_http: ^1.0.0" to clipboard
dart_roadsdata_http: ^1.0.0 copied to clipboard

Integrate Roadsdata seamlessly in your Dart app with our HTTP Client package, featuring advanced network handling and automatic retries.

example/dart_roadsdata_http_example.dart

import 'dart:math';
import 'dart:convert';

import 'package:dart_roadsdata_http/dart_roadsdata_http.dart';

void main() {
  var random = Random.secure();
  String? host; // initialize with the received value
  String? clientId; // initialize with the received value
  String? accessToken; // initialize with the received value
  String? uuid =
      base64UrlEncode(List<int>.generate(8, (i) => random.nextInt(255)));
  if (host == null || clientId == null || accessToken == null) {
    print('Please provide the needed parameters.');
    return;
  }

  var httpClient = RoadsdataHttpClient.init(
      host: host, clientId: clientId, accessToken: accessToken, uuid: uuid);
  httpClient
      .checkAdForContainer('helloworld!')
      .then((value) => print(value.toString()))
      .catchError((error) => print(error.toString()));
}
0
likes
140
points
44
downloads

Publisher

verified publisherdeepcube.eu

Weekly Downloads

Integrate Roadsdata seamlessly in your Dart app with our HTTP Client package, featuring advanced network handling and automatic retries.

Homepage

Documentation

API reference

License

MIT (license)

Dependencies

dio, dio_smart_retry

More

Packages that depend on dart_roadsdata_http