Files
flame/examples/lib/platform/web_provider.dart
Eugene Kleshnin 11e329d665 docs: Fix non-web examples (#2411)
Fix build for non-web platforms, by hiding dart:html into platform-specific import.
2023-03-16 07:20:02 +01:00

14 lines
294 B
Dart

import 'dart:html';
import 'package:examples/platform/page_provider.dart';
class PageProviderImpl extends PageProvider {
@override
String? getPage() {
var page = window.location.search ?? '';
if (page.startsWith('?')) {
page = page.substring(1);
}
return page;
}
}