mirror of
https://github.com/supanadit/geo-smart-app.git
synced 2024-11-14 04:02:23 +00:00
18 lines
419 B
Dart
18 lines
419 B
Dart
import 'package:dio/dio.dart';
|
|
import 'package:geosmart/model/unique_id_model.dart';
|
|
|
|
class UniqueIDService {
|
|
final String _endpoint = "/id/get/unique";
|
|
|
|
Future<UniqueIDModel> getUniqueID(String host, Dio dio) async {
|
|
try {
|
|
Response response = await dio.get(
|
|
host + _endpoint,
|
|
);
|
|
return UniqueIDModel.fromJson(response.data);
|
|
} on DioError catch (e) {
|
|
throw (e);
|
|
}
|
|
}
|
|
}
|