doc(lib): add documentation for the dart side

This commit is contained in:
ksenia312
2024-01-31 22:21:52 +01:00
parent e7995d1c3a
commit 880cded058
28 changed files with 905 additions and 97 deletions
+11
View File
@@ -2,17 +2,28 @@ import 'dart:io';
import 'package:nearby_service/src/utils/logger.dart';
///
/// Nearby Service Plugin Exception.
///
/// Indicates what problem occurred in the plugin operation.
///
class NearbyServiceException implements Exception {
NearbyServiceException(this.error) {
Logger.error(error);
}
///
/// A call from an unsupported platform.
///
factory NearbyServiceException.unsupportedPlatform({required String caller}) {
return NearbyServiceException(
'$caller is not supported for platform ${Platform.operatingSystem}',
);
}
///
/// A decoding error.
///
factory NearbyServiceException.unsupportedDecoding(dynamic value) {
return NearbyServiceException(
'Got unknown value=$value with runtimeType=${value.runtimeType}',