mirror of
https://github.com/lifegpc/eh_downloader_flutter.git
synced 2026-07-08 01:30:28 +08:00
Minor fix
This commit is contained in:
@@ -1 +0,0 @@
|
||||
export 'replace_current_route_none.dart' if (dart.library.html) 'replace_current_route_web.dart';
|
||||
@@ -1,3 +0,0 @@
|
||||
void replaceCurrentRoute(String query) {
|
||||
throw UnimplementedError();
|
||||
}
|
||||
@@ -1,13 +0,0 @@
|
||||
// ignore: avoid_web_libraries_in_flutter
|
||||
import 'dart:html';
|
||||
|
||||
void replaceCurrentRoute(String query) {
|
||||
const usePathUrl = bool.fromEnvironment("usePathUrl");
|
||||
if (usePathUrl) {
|
||||
final q = query.substring(1);
|
||||
final base = document.baseUri ?? "/";
|
||||
window.history.replaceState(null, "", "$base$q");
|
||||
} else {
|
||||
window.history.replaceState(null, "", "#$query");
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user