14 lines
493 B
Dart
14 lines
493 B
Dart
/// Platform-aware browser API abstraction.
|
|
///
|
|
/// On web, provides real browser localStorage and location APIs.
|
|
/// On non-web platforms (Android, iOS, desktop), returns no-op stubs.
|
|
///
|
|
/// Usage:
|
|
/// ```dart
|
|
/// import 'package:qpay/browser.dart';
|
|
/// Browser.localStorage.setItem('key', 'value');
|
|
/// Browser.localStorage.getItem('key');
|
|
/// Browser.location.href = 'https://example.com';
|
|
/// ```
|
|
export 'platform/browser_stub.dart'
|
|
if (dart.library.html) 'platform/browser_web.dart'; |