Log incoming route information from platform
Added a handler for PlatformDispatcher.onRouteInformationUpdated to log every incoming route or deeplink. This helps with debugging and tracking navigation events from the platform.
This commit is contained in:
parent
12973817b4
commit
3389845651
|
|
@ -1,5 +1,6 @@
|
||||||
import 'dart:async';
|
import 'dart:async';
|
||||||
import 'dart:io';
|
import 'dart:io';
|
||||||
|
import 'dart:ui';
|
||||||
|
|
||||||
import 'package:flet/flet.dart';
|
import 'package:flet/flet.dart';
|
||||||
import 'package:flutter/foundation.dart';
|
import 'package:flutter/foundation.dart';
|
||||||
|
|
@ -67,6 +68,13 @@ String appDir = "";
|
||||||
Map<String, String> environmentVariables = {};
|
Map<String, String> environmentVariables = {};
|
||||||
|
|
||||||
void main(List<String> args) async {
|
void main(List<String> args) async {
|
||||||
|
|
||||||
|
PlatformDispatcher.instance.onRouteInformationUpdated =
|
||||||
|
(RouteInformation routeInformation) {
|
||||||
|
// This logs every incoming route/deeplink from the platform
|
||||||
|
print('📩 routeInformation: ${routeInformation.uri}');
|
||||||
|
};
|
||||||
|
|
||||||
_args = List<String>.from(args);
|
_args = List<String>.from(args);
|
||||||
|
|
||||||
var devPageUrl = const String.fromEnvironment("FLET_PAGE_URL");
|
var devPageUrl = const String.fromEnvironment("FLET_PAGE_URL");
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue