text
stringlengths
1
372
store their state. a restorationId means the widget
(and its children) store the data in the surrounding bucket.
<topic_end>
<topic_start>
restoring navigation state
if you want your app to return to a particular route
that the user was most recently viewing
(the shopping cart, for example), then you must implement
restoration state for navigation, as well.
if you use the navigator API directly,
migrate the standard methods to restorable
methods (that have “restorable” in the name).
for example, replace push with restorablePush.
the VeggieSeasons example (listed under “other resources” below)
implements navigation with the go_router package.
setting the restorationId
values occur in the lib/screens classes.
<topic_end>
<topic_start>
testing state restoration
to test state restoration, set up your mobile device so that
it doesn’t save state once an app is backgrounded.
to learn how to do this for both iOS and android,
check out testing state restoration on the
RestorationManager page.
warning warning
don’t forget to reenable
storing state on your device once you are
finished with testing!
<topic_end>
<topic_start>
other resources
for further information on state restoration,
check out the following resources:
to learn more about short term and long term state,
check out differentiate between ephemeral state
and app state.
you might want to check out packages on pub.dev that
perform state restoration, such as statePersistence.
<topic_end>
<topic_start>
targeting ChromeOS with android
this page discusses considerations unique to building
android apps that support ChromeOS with flutter.
<topic_end>
<topic_start>
flutter & ChromeOS tips & tricks
for the current versions of ChromeOS, only certain ports from
linux are exposed to the rest of the environment.
here’s an example of how to launch
flutter DevTools for an android app with ports
that will work:
then, navigate to http://127.0.0.1:8000/#
in your chrome browser and enter the URL to your
application. the last flutter run command you
just ran should output a URL similar to the format
of http://127.0.0.1:8080/auth_code=/. use this URL
and select “connect” to start the flutter DevTools
for your android app.
<topic_end>
<topic_start>
flutter ChromeOS lint analysis
flutter has ChromeOS-specific lint analysis checks
to make sure that the app that you’re building
works well on ChromeOS. it looks for things
like required hardware in your android manifest
that aren’t available on ChromeOS devices,
permissions that imply requests for unsupported
hardware, as well as other properties or code
that would bring a lesser experience on these devices.
to activate these,
you need to create a new analysis_options.yaml
file in your project folder to include these options.
(if you have an existing analysis_options.yaml file,
you can update it)
to run these from the command line, use the following command:
sample output for this command might look like:
<topic_end>
<topic_start>
iOS
<topic_end>
<topic_start>
topics
<topic_end>
<topic_start>
add iOS devtools for flutter
to choose the guide to add iOS devtools to your flutter configuration,
click the getting started path you followed.
<topic_end>
<topic_start>
leveraging apple's system APIs and frameworks
when you come from iOS development, you might need to find
flutter plugins that offer the same abilities as apple’s system
libraries. this might include accessing device hardware or interacting
with specific frameworks like HealthKit or MapKit.
for an overview of how the SwiftUI framework compares to flutter,
see flutter for SwiftUI developers.
<topic_end>
<topic_start>
introducing flutter plugins