text stringlengths 1 474 |
|---|
These are already automatically adapted when using |
the Material AppBar and SliverAppBar widgets. |
You can also further customize the properties of these widgets to better |
match iOS platform styles, as shown below.But, because app bars are displayed alongside |
other content in your page, it’s only recommended to adapt the styling |
so long as its cohesive with the rest of your application. You can see |
additional code samples and a further explanation in |
the GitHub discussion on app bar adaptations.<topic_end> |
<topic_start> |
Bottom navigation bars |
Since Android 12, the default UI for bottom navigation |
bars follow the design guidelines defined in Material 3. |
On iOS, an equivalent component called “Tab Bars” |
is defined in Apple’s Human Interface Guidelines (HIG).Since tab bars are persistent across your app, they should match your |
own branding. However, if you choose to use Material’s default |
styling on Android, you might consider adapting to the default iOS |
tab bars.To implement platform-specific bottom navigation bars, |
you can use Flutter’s NavigationBar widget on Android |
and the CupertinoTabBar widget on iOS. |
Below is a code snippet you can |
adapt to show a platform-specific navigation bars.<topic_end> |
<topic_start> |
Text fields |
Since Android 12, text fields follow the |
Material 3 (M3) design guidelines. |
On iOS, Apple’s Human Interface Guidelines (HIG) define |
an equivalent component.Since text fields require user input, |
their design should follow platform conventions.To implement a platform-specific TextField |
in Flutter, you can adapt the styling of the |
Material TextField.To learn more about adapting text fields, check out |
the GitHub discussion on text fields. |
You can leave feedback or ask questions in the discussion.<topic_end> |
<topic_start> |
Alert dialog |
Since Android 12, the default UI of alert dialogs |
(also known as a “basic dialog”) follows the design guidelines |
defined in Material 3 (M3). |
On iOS, an equivalent component called “alert” is defined in Apple’s |
Human Interface Guidelines (HIG).Since alert dialogs are often tightly integrated with the operating system, |
their design generally needs to follow the platform conventions. |
This is especially important when a dialog is used to request user input |
about security, privacy, and destructive operations (e.g., deleting files |
permanently). As an exception, a branded alert dialog design can be used on |
non-critical user flows to highlight specific information or messages.To implement platform-specific alert dialogs, |
you can use Flutter’s AlertDialog widget on Android |
and the CupertinoAlertDialog widget on iOS. Below is a code snippet you can |
adapt to show a platform-specific alert dialog.To learn more about adapting alert dialogs, check out |
the GitHub discussion on dialog adaptations. |
You can leave feedback or ask questions in the discussion. |
<topic_end> |
<topic_start>Android |
<topic_end> |
<topic_start> |
Topics |
<topic_end> |
<topic_start>Add Android devtools for Flutter |
To choose the guide to add Android Studio to your Flutter configuration, |
click the Getting Started path you followed. |
<topic_end> |
<topic_start>Adding a splash screen to your Android app |
Splash screens (also known as launch screens) provide |
a simple initial experience while your Android app loads. |
They set the stage for your application, |
while allowing time for the app engine |
to load and your app to initialize.<topic_end> |
<topic_start> |
Overview |
warning Warning |
If you are experiencing a crash from implementing a splash screen, you |
might need to migrate your code. See detailed instructions in the |
Deprecated Splash Screen API Migration guide.In Android, there are two separate screens that you can control: |
a launch screen shown while your Android app initializes, |
and a splash screen that displays while the Flutter experience |
initializes.info Note |
As of Flutter 2.5, the launch and splash screens have been |
consolidated—Flutter now only implements the Android launch screen, |
which is displayed until the framework draws the first frame. |
This launch screen can act as both an Android launch screen and an |
Android splash screen via customization, and thus, is referred to |
as both terms. For example of such customization, check out the |
Android splash screen sample app.If, prior to 2.5, you used flutter create to create an app, |
and you run the app on 2.5 or later, the app might crash. |
For more info, see the Deprecated Splash Screen API Migration guide.info Note |
For apps that embed one or more Flutter screens within an |
existing Android app, consider |
pre-warming a FlutterEngine and reusing the |
same engine throughout your app to minimize wait |
time associated with initialization of the Flutter engine.<topic_end> |
<topic_start> |
Initializing the app |
Every Android app requires initialization time while the |
operating system sets up the app’s process. |
Android provides the concept of a launch screen to |
display a Drawable while the app is initializing.A Drawable is an Android graphic. |
To learn how to add a Drawable to your |
Flutter project in Android Studio, |
check out Import drawables into your project |
in the Android developer documentation.The default Flutter project template includes a definition |
of a launch theme and a launch background. You can customize |
this by editing styles.xml, where you can define a theme |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.