flutter


How to navigate between flutter screen to native(android/ios) screens


Iam new to flutter,tried hello_services example provided by flutter.io .
in that example both flutter view and native view are in same screen.
My question is, how to navigate to two different screens like one written in flutter and another in native(android/ios) with params or extras.Please help !!!! thanks
The only solution I found, it is to send a message to your native view (https://flutter.io/platform-services/), catch the message in Java or Swift/ObjectiveC code then navigate to the other view.
Dart Code
Map params = <String, dynamic>{
"view": "MyView"
};
PlatformMessages.sendJson("navigateTo", params);
Java Code
flutterView.addOnMessageListener("navigateTo", new FlutterView.OnMessageListener() {
#Override
public String onMessage(FlutterView view, String message) {
try {
JSONObject object = new JSONObject(message);
if (object.getString("view") == "MyView") {
// navigate to MyView
}
} catch (JSONException e) {
e.printStackTrace();
}
return null;
}
});

Related Links

How can I target status bar color or opacity in a Flutter app?
How do I supply an initial value to a text field?
How to control sizing behaviour to be based on parent or child?
Programmatically scrolling to the end of a ListView
Get Tap Position Relative to Widget
How to get the smallest child in a box?
Replace initial Route in MaterialApp without animation?
How to make 1/3 of an image take up the full screen
How to make an Input's hintText disappear when the user starts typing?
PageStorage in Flutter - how does it work?
How to select Development team for iOS app created in Flutter
Sizing elements to percentage of screen width/height
Animated Widget only animates once
How can I dial the phone from Flutter?
How do I open a web browser (URL) from my Flutter code?
Unable to install Flutter on my windows machine

Categories

HOME
azure
tcl
azure-web-sites
garbage-collection
linear-programming
genetic-algorithm
weblogic11g
textbox
vsix
encog
geany
windows-server-2012-r2
restsharp
splunk
mobilefirst-adapters
wso2-das
xorg
light-inject
session-cookies
coreos
fbx
amadeus
eigen3
amplitude
org-mode
procedure
google-finance
sfsafariviewcontroller
man
rgdal
nice-language
precision
italic
centos6
desire2learn
masstransit
editorconfig
codeceptjs
kprobe
python-behave
udid
directx-12
azure-api-apps
mobilefirst-bluemix
fipy
zipline
consistency
linear
nexus-5
tabview
backwards-compatibility
powerpc
uifont
multistore
paypal-webhooks
jce
a-star
android-touch-event
mysql-error-1050
agile-processes
bootstrap-slider
android-chips
jasny-bootstrap
turnjs
ios-frameworks
isapi-rewrite
highslide
asp.net-webpages
filenet-content-engine
laravel-forge
symbian
spymemcached
selectsinglenode
gem5
mks
puppet-enterprise
modern-ui
mysql5
sendto
dynamic-data-display
spread-toolkit
email-spam
yourls
css3pie
antisamy
dfsort
disabled-input
xidel
chomsky-hierarchy
couchpotato
virtual-earth
timespan
gigaspaces
adaboost
magento-1.5
bapi
ember-router
ondraw
program-files
mate
blackberry-jde
pastebin
unitils
seam-conversation
spquery
gumstix

Resources

Mobile Apps Dev
Database Users
javascript
java
csharp
php
android
MS Developer
developer works
python
ios
c
html
jquery
RDBMS discuss
Cloud Virtualization
Database Dev&Adm
javascript
java
csharp
php
python
android
jquery
ruby
ios
html
Mobile App
Mobile App
Mobile App