Skip to content

Commit 8238e1c

Browse files
authored
[quick_actions] add localizedSubtitle for iOS (#8038)
Add the localizedSubtitle field on quick actions for iOS flutter/flutter#129759 Pre-launch Checklist I read and followed the [relevant style guides](https://github.com/flutter/packages/blob/main/CONTRIBUTING.md#style) and ran the auto-formatter. (Unlike the flutter/flutter repo, the flutter/packages repo does use dart format.)
1 parent 374d1be commit 8238e1c

File tree

4 files changed

+13
-7
lines changed

4 files changed

+13
-7
lines changed

packages/quick_actions/quick_actions/CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## 1.1.0
2+
3+
* Adds localizedSubtitle field for iOS quick actions.
4+
15
## 1.0.8
26

37
* Updates minimum supported SDK version to Flutter 3.19/Dart 3.3.

packages/quick_actions/quick_actions/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ Finally, manage the app's quick actions, for instance:
3434
```dart
3535
quickActions.setShortcutItems(<ShortcutItem>[
3636
const ShortcutItem(type: 'action_main', localizedTitle: 'Main view', icon: 'icon_main'),
37-
const ShortcutItem(type: 'action_help', localizedTitle: 'Help', icon: 'icon_help')
37+
const ShortcutItem(type: 'action_help', localizedTitle: 'Help', localizedSubtitle: 'Tap to get help', icon: 'icon_help')
3838
]);
3939
```
4040

packages/quick_actions/quick_actions/example/lib/main.dart

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,14 +53,16 @@ class _MyHomePageState extends State<MyHomePage> {
5353
const ShortcutItem(
5454
type: 'action_one',
5555
localizedTitle: 'Action one',
56+
localizedSubtitle: 'Action one subtitle',
5657
icon: 'AppIcon',
5758
),
5859
// NOTE: This second action icon will only work on Android.
5960
// In a real world project keep the same file name for both platforms.
6061
const ShortcutItem(
61-
type: 'action_two',
62-
localizedTitle: 'Action two',
63-
icon: 'ic_launcher'),
62+
type: 'action_two',
63+
localizedTitle: 'Action two',
64+
icon: 'ic_launcher',
65+
),
6466
]).then((void _) {
6567
setState(() {
6668
if (shortcut == 'no action set') {

packages/quick_actions/quick_actions/pubspec.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ description: Flutter plugin for creating shortcuts on home screen, also known as
33
Quick Actions on iOS and App Shortcuts on Android.
44
repository: https://github.com/flutter/packages/tree/main/packages/quick_actions/quick_actions
55
issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A+quick_actions%22
6-
version: 1.0.8
6+
version: 1.1.0
77

88
environment:
99
sdk: ^3.3.0
@@ -21,8 +21,8 @@ dependencies:
2121
flutter:
2222
sdk: flutter
2323
quick_actions_android: ^1.0.0
24-
quick_actions_ios: ^1.0.0
25-
quick_actions_platform_interface: ^1.0.0
24+
quick_actions_ios: ^1.2.0
25+
quick_actions_platform_interface: ^1.1.0
2626

2727
dev_dependencies:
2828
flutter_test:

0 commit comments

Comments
 (0)