Skip to content

Commit aa11353

Browse files
authored
Merge pull request #375 from richardnhek/fix-shortcut-spelling
Fix spelling: correct 'shorcut' to 'shortcut' in page lifecycle documentation
2 parents c13efdf + 600cbe6 commit aa11353

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

docs/resources/ui/pages/page-lifecycle.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -108,17 +108,17 @@ This action trigger allows you to bind keyboard shortcuts to actions. This is in
108108
:::
109109

110110
:::info[important]
111-
- When a keyboard shortcut is created at the page level, it won't trigger if a TextField is in focus, and you also wont be able to type the shortcut key into the TextField.
112-
- When a keyboard shortcut is created at the component level, it also won't trigger if a TextField is in focus, but youll still be able to type the shortcut key into the TextField.
111+
- When a keyboard shortcut is created at the page level, it won't trigger if a TextField is in focus, and you also won't be able to type the shortcut key into the TextField.
112+
- When a keyboard shortcut is created at the component level, it also won't trigger if a TextField is in focus, but you'll still be able to type the shortcut key into the TextField.
113113
- **To avoid conflicts, it's recommended to use shortcuts that users are unlikely to type, such as Command + S, instead of a single key like 'S'.**
114-
- Theres currently a known issue with Flutter's autofocus functionality. If a TextField inside a component has autofocus enabled, and the component has a keyboard shortcut, the TextField will not autofocus as expected.
114+
- There's currently a known issue with Flutter's autofocus functionality. If a TextField inside a component has autofocus enabled, and the component has a keyboard shortcut, the TextField will not autofocus as expected.
115115
:::
116116

117117

118-
Implementing keyboard shortcuts is a straightforward process in FlutterFlow. You can define as many shortcuts as you want, each mapped to specific actions that will trigger when the corresponding key combination is pressed. Lets see an example of an eCommerce web app where users can quickly access the cart page by pressing the `C` key.
118+
Implementing keyboard shortcuts is a straightforward process in FlutterFlow. You can define as many shortcuts as you want, each mapped to specific actions that will trigger when the corresponding key combination is pressed. Let's see an example of an eCommerce web app where users can quickly access the cart page by pressing the `C` key.
119119

120120

121-
To create a shortcut, use the **On Shorcut Press** action trigger, then type the keys that you want your app to listen for.
121+
To create a shortcut, use the **On Shortcut Press** action trigger, then type the keys that you want your app to listen for.
122122

123123
<div style={{
124124
position: 'relative',
@@ -146,12 +146,12 @@ To create a shortcut, use the **On Shorcut Press** action trigger, then type the
146146
</div>
147147
<p></p>
148148

149-
:::warning[Keyboard Shorcuts & Text Fields]
149+
:::warning[Keyboard Shortcuts & Text Fields]
150150
When implementing keyboard shortcuts on a page or component with a text field, you may need to ensure the text field ignores those shortcuts.
151151

152152
For instance, if you have a shortcut assigned to the letter "C" and a user tries to type "C" in the text field, you likely want the input to capture the keypress without triggering the shortcut.
153153

154-
To handle this, you can enable the option on the `TextField` widget to bypass keyboard shortcuts. However, its generally better to assign more unique combinations, like Cmd + C, which are less likely to conflict with normal typing in a text field.
154+
To handle this, you can enable the option on the `TextField` widget to bypass keyboard shortcuts. However, it's generally better to assign more unique combinations, like Cmd + C, which are less likely to conflict with normal typing in a text field.
155155
:::
156156

157157
### On Dispose [Action Trigger]
@@ -163,10 +163,10 @@ Imagine a scenario where [audio recording](../../../ff-concepts/file-handling/di
163163
Additionally, if you are using a third-party package that relies on persistent connections or listeners, you can leverage [Custom Actions](../../../ff-concepts/adding-customization/custom-actions.md) with the On Dispose action trigger to close streams or cancel subscriptions.
164164

165165
:::tip[Possible Use Cases]
166-
- **Cleaning Up Resources:** Use this action trigger to cancel timers, close database connections, or unsubscribe from streams to prevent memory leaks and unnecessary processing.
166+
- **Cleaning Up Resources:** Use this action trigger to cancel timers, close database connections, or unsubscribe from streams to prevent memory leaks and unnecessary processing.
167167
- For example, real-time applications, such as stock trading platforms, rely on WebSocket connections to fetch live updates. A homepage displaying a live ticker of stock prices would require opening the WebSocket connection on page load and closing it on On Dispose. Without an On Dispose trigger, the WebSocket connection could remain open unnecessarily, leading to wasted resources and app instability.
168168
- **Finalizing Database Transactions**: Commit or roll back database transactions if the user leaves the page before completing the process.
169-
- **Logging or Analytics:** Track user behavior or log events (e.g., page exit or time spent on a page) to monitor user engagement and improve the application experience.
169+
- **Logging or Analytics:** Track user behavior or log events (e.g., page exit or time spent on a page) to monitor user engagement and improve the application experience.
170170
:::
171171
![page-on-dispose.avif](imgs/page-on-dispose.avif)
172172

@@ -281,7 +281,7 @@ current value of a given Page State variable, either for directly displaying it
281281
transactional logic.
282282

283283
You can set the source value of the widget wherever you see the following icon. This icon indicates
284-
that you can link the widgets value to a variable.
284+
that you can link the widget's value to a variable.
285285

286286
![Page-State.png](../imgs/page-state.png)
287287

0 commit comments

Comments
 (0)