You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/ff-concepts/writing-custom-code/custom-files.md
+9-5Lines changed: 9 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -12,13 +12,16 @@ By default, the file you want to edit is in 'read-only' mode. However, using our
12
12
You can only add custom actions that have no arguments (including *BuildContext*).
13
13
:::
14
14
15
-
## Edit *main.dart*
15
+
## Edit `main.dart`
16
16
17
-
The *main.dart* is a critical file in your project, as it serves as the entry point for the application. This file contains the `main()` function, which is responsible for starting the application by running the code that builds the UI and initializes any other necessary components.
17
+
The **main.dart** is a critical file in your project, as it serves as the entry point for the
18
+
application. This file contains the `main()` function, which is responsible for starting the application by running the code that builds the UI and initializes any other necessary components.
18
19
19
-
You can edit the *main.dart* file to include anything in `main()` function that we don't yet support. For example, initializing third-party plugins or libraries and setting up system-level configurations, such as changing the status bar color or orientation.
20
+
You can edit the **main.dart** file to include anything in `main()` function that we don't yet
21
+
support. For example, initializing third-party plugins or libraries and setting up system-level configurations, such as changing the status bar color or orientation.
20
22
21
-
Let's see an example of how you can add a code in *main.dart* file to change the status bar color for the mobile app. Here's how it looks:
23
+
Let's see an example of how you can add a code in **main.dart** file to change the status bar
24
+
color for the mobile app. Here's how it looks:
22
25
23
26
<figure>
24
27

@@ -27,7 +30,8 @@ Let's see an example of how you can add a code in *main.dart* file to change the
27
30
28
31
To do so, you can edit *main.dart* file by following the steps below:
29
32
30
-
2. Create a [custom action](/customizing-your-app/custom-functions/custom-actions#adding-custom-action) for the code you want to include in a *main.dart* file. For this example, here's code in a custom action named 'setStatusbarColor'.
33
+
1. Create a [custom action](/customizing-your-app/custom-functions/custom-actions#adding-custom
34
+
-action) for the code you want to include in a *main.dart* file. For this example, here's code in a custom action named 'setStatusbarColor'.
0 commit comments