-
Notifications
You must be signed in to change notification settings - Fork 2.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[quick_actions] add localizedSubtitle for iOS #6973
Changes from all commits
929fdea
4bea2bc
fd8a73a
4cba4da
1886a75
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -34,7 +34,7 @@ Finally, manage the app's quick actions, for instance: | |
```dart | ||
quickActions.setShortcutItems(<ShortcutItem>[ | ||
const ShortcutItem(type: 'action_main', localizedTitle: 'Main view', icon: 'icon_main'), | ||
const ShortcutItem(type: 'action_help', localizedTitle: 'Help', icon: 'icon_help') | ||
const ShortcutItem(type: 'action_help', localizedTitle: 'Help', localizedSubtitle: 'Tap to get help', icon: 'icon_help') | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It's not clear to me that this is a common enough option that we actually need to update the README and example app to demonstrate it. |
||
]); | ||
``` | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -26,3 +26,8 @@ dev_dependencies: | |
|
||
flutter: | ||
uses-material-design: true | ||
|
||
# FOR TESTING AND INITIAL REVIEW ONLY. DO NOT MERGE. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Please revert all of the |
||
# See https://github.com/flutter/flutter/blob/master/docs/ecosystem/contributing/README.md#changing-federated-plugins | ||
dependency_overrides: | ||
{quick_actions_platform_interface: {path: ../../../quick_actions/quick_actions_platform_interface}} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,7 @@ | ||
## NEXT | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Please see the versioning policy linked in from the PR checklist. |
||
|
||
* Add localizedSubtitle field | ||
|
||
## 1.1.1 | ||
|
||
* Updates to a newer version of Pigeon. | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This change should have corresponding native testing. |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -92,6 +92,7 @@ public final class QuickActionsPlugin: NSObject, FlutterPlugin, IOSQuickActionsA | |
|
||
let type = shortcut.type | ||
let localizedTitle = shortcut.localizedTitle | ||
let localizedSubtitle = shortcut.localizedSubtitle | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This should just be inlined below, as it doesn't seem like the local variables are adding any value here. (The ones above may well be left over from a direct Pigeon conversion, as they would have been more useful prior to Pigeon.) |
||
|
||
let icon = (shortcut.icon).map { | ||
UIApplicationShortcutIcon(templateImageName: $0) | ||
|
@@ -101,7 +102,7 @@ public final class QuickActionsPlugin: NSObject, FlutterPlugin, IOSQuickActionsA | |
return UIApplicationShortcutItem( | ||
type: type, | ||
localizedTitle: localizedTitle, | ||
localizedSubtitle: nil, | ||
localizedSubtitle: localizedSubtitle, | ||
icon: icon, | ||
userInfo: nil) | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please see the CHANGELOG style guide linked from the PR checklist.