Watch
1
0
Fork
You've already forked arc
0
forked from hesabix/arc
arc/hesabixUI/hesabix_ui/lib/utils/web/web_utils_stub.dart

40 lines
1.1 KiB
Dart
Executable file

String createObjectUrlFromBytes(
List<int> bytes, {
String mimeType = 'application/octet-stream',
}) {
throw UnsupportedError('Blob URLs are only supported on web.');
}
void revokeBlobUrl(String url) {}
Future<void> saveBytesAsFileWeb(
List<int> bytes,
String filename, {
String mimeType = 'application/octet-stream',
}) async {
throw UnsupportedError('File download is only supported on web.');
}
void openUrlInNewTabWeb(String url) {
throw UnsupportedError('Opening URLs in new tab is only supported on web.');
}
String? getLocalStorageValue(String key) => null;
void setLocalStorageValue(String key, String value) {}
/// Desktop/mobile use one application window, so parked-sale storage needs no
/// browser-tab suffix.
String? getOrCreateSessionStorageValue(String key, String fallbackValue) =>
null;
/// Signals the HTML boot loader to hide (web only).
void notifyWebAppReady() {}
/// Updates HTML boot loader during Flutter init (web only).
void notifyWebInitProgress({
required double initProgress,
required int currentStep,
required int totalSteps,
String? statusKey,
}) {}