text stringlengths 1 474 |
|---|
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 |
Dart calls libraries that contain platform-specific code plugins. |
When developing an app with Flutter, you use plugins to interact |
with system libraries.In your Dart code, you use the plugin’s Dart API to call the native |
code from the system library being used. This means that you can write |
the code to call the Dart API. The API then makes it work for all |
platforms that the plugin supports.To learn more about plugins, see Using packages. |
Though this page links to some popular plugins, |
you can find thousands more, along with examples, |
on pub.dev. The following table does not endorse any particular plugin. |
If you can’t find a package that meets your need, |
you can create your own or use platform channels directly in your project. |
To learn more, see Writing platform-specific code.<topic_end> |
<topic_start> |
Adding a plugin to your project |
To use an Apple framework within your native project, |
import it into your Swift or Objective-C file.To add a Flutter plugin, run flutter pub add package_name |
from the root of your project. |
This adds the dependency to your pubspec.yaml file. |
After you add the dependency, add an import statement for the package |
in your Dart file.You might need to change app settings or initialization logic. |
If that’s needed, the package’s “Readme” page on pub.dev |
should provide details.<topic_end> |
<topic_start> |
Flutter Plugins and Apple Frameworks |
Supports both Google Play Store on Android and Apple App Store on iOS. ↩Adds Google Pay payments on Android and Apple Pay payments on iOS. ↩Uses Firebase Cloud Messaging |
and integrates with APNs. ↩Includes sensors like accelerometer, gyroscope, etc. ↩Uses Google’s ML Kit and supports various features like text recognition, face detection, image labeling, |
landmark recognition, and barcode scanning. You can also create a custom model with Firebase. To learn more, see Use a custom TensorFlow Lite model with Flutter. ↩ ↩2Uses the OpenWeatherMap API. |
Other packages exist that can pull from different weather APIs. ↩ |
<topic_end> |
<topic_start>Adding a launch screen to your iOS app |
Launch screens provide a simple initial experience while your iOS app loads. |
They set the stage for your application, while allowing time for the app engine |
to load and your app to initialize.All apps submitted to the Apple App Store |
must provide a launch screen |
with an Xcode storyboard.<topic_end> |
<topic_start>Customize the launch screen |
The default Flutter template includes an Xcode |
storyboard named LaunchScreen.storyboard |
that can be customized your own assets. |
By default, the storyboard displays a blank image, |
but you can change this. To do so, |
open the Flutter app’s Xcode project |
by typing open ios/Runner.xcworkspace |
from the root of your app directory. |
Then select Runner/Assets.xcassets |
from the Project Navigator and |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.