How to hide sub domain from Flutter Web App? - flutter

I recently got started creating an app with flutter web. in my experience I am using a named navigator to navigate between pages. whatever name I give to the screen is the name that shows up in my URL.
for example if URL is https://www.example.com and Screen Name is home the URL when I navigate to this screen become https://www.example.com/home.
In my use case I hit an API on the splash screen which gets the contents of the next page and on flutter web if I was to reload my https://www.example.com/home page the screen is blank because it turns everything I got from the API into null.
Is there a way I can hide subdomain? so no matter which page the user is at he/she only sees the main domain https://www.example.com.
any help would be appreciated thanks.
PS: I already used setURLStrategy to remove the # symbol from my sub domains

Have you tried using non-named navigation like
Navigator.push, Navigator.pop
Looks like the path appears on the web when you use named routes.

Related

Flutter web url query parameters removed on initial load

I am hosting a flutter web app, which involves the initial url having query parameters (e.g. https://mysite.web.app/?k=ZF6K5UA7X3Jk9HJanla3). I use the url_strategy package to get rid of the #, however when the site loads, the query params are stripped off, leaving the bare-boned "https://mysite.web.app". I have got around the functionality aspect by storing the param as a cookie variable, however it is not ideal.
Is there any way to re-instate the params programmatically in the url bar of the browser? The reason for this is for both (i) giving the user the option to share the original URL, and (ii) allow them to add the app to their mobile device screen as a PWA (with the original full url).
Any suggestions welcomed.
I resolved this via the implementation of go_router. With the combination of state.queryParams and Router.neglect(context, () => context.go('/?k=$myOriginalParam')) (from any pages that wanted to go back to the original route with no browser back button history), I can retain the query parameter in the browser bar successfully.

Is it possible to have multiple PWA's on a single website?

Is it possible to have multiple PWA's on a single website? My website has certain subpages like this:
www.example.com/Page1
www.example.com/Page2
Now I want a PWA for "Page1" and a different PWA for "Page2". So if you go to Page1 you will get an add to home screen popup and if you go to Page2 you will get the add to home screen popup. So you have two different PWA's on your home screen.
Yes - this should work. You would need a separate manifest.json and service worker for each page. Please try it and let us know if you are successful.

Can't get rid of tabs when pushing to login

I have an Ionic 3 app where when a user logs out, I want to push them to the login page.
However, when I push to that page I can't seem to get ride of the tabs.
I'm useing:
this.navCtrl.push('LoginPage');
I've tried:
this.navCtrl.setRoot.push('LoginPage');
and a few other things I've seen, but nothing works.
How is this done?
In what page do you run this.navCtrl.push('LoginPage'); ? I'm guessing it is in one of your tab pages. (Side note: the argument for push is not a string, but a class.)
Instead of one of the tab pages, do this in app.component.ts.
this.nav.push(LoginPage);
or just use setRoot, but in app.component.ts
You will need to monitor the login status in app.component.ts, for which you can use a service or RxJS subject

Facebook Tabs - Difference between apps vs tabs

I have recently inherited the Admin/developer role for our page and I am new to Facebook Development. I am attempting to add a new tab to our page and the only option I am getting is to build an App but all of the App options I come across make it sound like it's trying to do more than what I want it to do.
What I want to do is produce a tab on the page. That will link to an app/canvas displaying an image that the user can click to go to our offer.
So far I've built a basic app with Display Name, namespace, Page Tab Name, Page Tab URL and a Tab image. but when I refresh my page I do not get a new tab and when I preview the app page it is not the format I am looking for.
I've tried going through the tutorials but since this is all new to me I ahve yet to make any sense as to what I'm looking for or missing. Could anyone let me know what app format I am looking for? Or am I in the wrong place entirely?
You need to explicitly add an app to a page. Not sure if you've tried it or not but navigate to:
https://www.facebook.com/dialog/pagetab?app_id=YOUR_APP_ID
&display=popup&next=YOUR_PAGE_TAB_URL
Replacing YOUR_APP_ID with your app id and YOUR_PAGE_TAB_URL with the url you set for you page tab.

How to create a new psml page?

I've encountered a .psml page in a portlet app and I don't know how it was created. There exists no physical file for the .psml page. In jetspeed is it possible to create a page via portlet UI, if so how is this achieved ?
Yes you can create a page in JetSpeed through the UI. To do this
Log in using your administrator account.
Click 'edit' (the little pencil icon that shows on each page)
You will see the Page, Folder and Layout configuration on that page.
My understanding is that .psml files are supposed to live inside the pages folder in your Jetspeed home.
Interestingly though, you say your .psml page is inside your app. I am not sure why this would be. If this is the case, perhaps the page was put there by accident?