lukepighetti / fluro

Fluro is a Flutter routing library that adds flexible routing options like wildcards, named parameters and clear route definitions.
https://pub.dev/packages/fluro
MIT License
3.66k stars 416 forks source link

firebase dynamic link doesn't work #271

Closed mohadel92 closed 2 years ago

mohadel92 commented 2 years ago

Hi, i used to implement dynamic link in all of my project so , I can parse link deep url and extract my params from it

but in a newer project fluro is being used and it block my navigation and reroute me to unknown route

lukepighetti commented 2 years ago

Can you provide a MCVE?

mohadel92 commented 2 years ago

after disabling the notFoundHandler this behavior vanished

but with

`class Routes { static const String Root = "/"; static const String MainScreen = "/MainScreen"; static const String Order = "/order"; static const String Home = '/HomeScreen'; static const String Category = '/CategoryScreen'; static const String Product = '/ProductScreen'; //Checkout Screens static const String Cart = '/CartScreen'; static const String Checkout = '/CheckoutScreen'; // Customer Screens static const String SignIn = '/SignInScreen'; static const String SignUp = '/SignUpScreen'; static const String AccountInfo = '/AccountInfoScreen'; static const String OrderList = '/OrderListScreen'; static const String OrderPayment = '/OrderPaymentScreen'; static const String OrderDetail = '/OrderDetailScreen'; static const String OrderPlaced = '/OrderPlacedScreen'; static const String WishList = '/WishListScreen'; static const String AddressList = '/AddressListScreen'; static const String EditAddress = '/EditAddressScreen'; static const String ReviewList = '/ReviewListScreen'; // General App Related Screens static const String NotificationList = '/NotificationScreen'; static const String CurrencySetUp = '/CurrencySetupScreen'; static const String CmsDetails = '/CmsDetailsScreen'; static const String ContactUs = '/ContactUsScreen'; static const String LoginAndSignUp = '/LoginandSignUpScreen';

static const String SubCategory = '/SubCategoryScreen'; static const String Catalog = '/CatalogScreen'; static const String CatalogCustomCaraouselCollection = '/CatalogCustomCaraouselCollection';

//Search Screen static const String Search = '/SearchScreen';

//notification screen static const String Notifications = '/NotificationScreen';

static void configureRoutes(FluroRouter router) { router.notFoundHandler = Handler( handlerFunc: (BuildContext? context, Map<String, List> params) {

      print(params);
  print("ROUTE WAS NOT FOUND !!!");
  return;
});
router.define(Root, handler: rootHandler);
router.define(MainScreen, handler: homeHanlder);
router.define(Search, handler: searchHandler);
router.define(CurrencySetUp, handler: currencySetUp);
router.define(Order, handler: orderHandler);
router.define(Home, handler: homeHanlder);
router.define(Product, handler: productScreen);
router.define(Cart, handler: cartScreen);
router.define(Checkout, handler: checkOutScreen);
router.define(SignIn, handler: signInScreen);
router.define(SignUp, handler: signUpScreen);
router.define(AccountInfo, handler: accountInfoScreen);
router.define(AddressList, handler: addressListScreen);
router.define(EditAddress, handler: addEditAddressScreen);
router.define(NotificationList, handler: notificationScreen);
router.define(CmsDetails, handler: cmsDetailScreen);
router.define(ContactUs, handler: contactUsScreen);
router.define(LoginAndSignUp, handler: loginAndSignUpScreen);
router.define(SubCategory, handler: subCategoryScreen);
router.define(Catalog, handler: catalogScreen);
router.define(CatalogCustomCaraouselCollection,
    handler: catalogScreenCustomCollection);
router.define(OrderPayment, handler: orderPaymentScreen);
router.define(OrderList, handler: orderListScreen);

} } `

inside main.dart

final router = FluroRouter(); Routes.configureRoutes(router); Application.router = router;

lukepighetti commented 2 years ago

Can you please reduce this example to its key components and make sure it's properly formatted?

mohadel92 commented 2 years ago

there is no need for any example my question is that any dynamic link is considered as notFoundHandler(unknown route) how to fix this situation

lukepighetti commented 2 years ago

Please feel free to reopen if you can provide a suitable example

mohadel92 commented 2 years ago

the issue is not resolved for me an arbitrary closing for real issue @lukepighetti

lukepighetti commented 2 years ago

If you provide a reproduction we can reopen this, thanks.