update
This commit is contained in:
+1
-8
@@ -27,7 +27,7 @@ import 'firebase_options.dart';
|
||||
import 'package:firebase_messaging/firebase_messaging.dart';
|
||||
//import 'package:flutter_web_plugins/url_strategy.dart';
|
||||
import 'package:flutter/foundation.dart' show kIsWeb; // Importa kIsWeb
|
||||
import 'dart:html' as html;
|
||||
//import 'dart:html' as html;
|
||||
|
||||
Future<void> _firebaseMessagingBackgroundHandler(RemoteMessage message) async {
|
||||
await Firebase.initializeApp();
|
||||
@@ -73,13 +73,6 @@ void main() async {
|
||||
DeviceOrientation.portraitDown,
|
||||
]);
|
||||
|
||||
html.window.onPopState.listen((event) {
|
||||
// Cuando cambia la URL, redirige a la ruta inicial
|
||||
html.window.history.replaceState(null, 'ProsApp', '/');
|
||||
// O puedes usar `pushState` si prefieres agregar una entrada al historial
|
||||
// html.window.history.pushState(null, 'ProsApp', '/');
|
||||
});
|
||||
|
||||
runApp(const MyApp());
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user