Skip to content

Commit 3c0bb44

Browse files
committed
api documentation
1 parent 831f0fe commit 3c0bb44

File tree

1 file changed

+26
-5
lines changed

1 file changed

+26
-5
lines changed

lib/src/helper/model/flutter_shortcut_item.dart

Lines changed: 26 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,27 @@ for more details.
99
*/
1010

1111
class FlutterShortcutItem {
12+
/// Create a flutter shortcut item.
13+
/// Eg.
14+
/// ```
15+
/// const FlutterShortcutItem(
16+
/// ```
17+
/// ```
18+
/// id: "1",
19+
/// ```
20+
/// ```
21+
/// action: 'Home page action',
22+
/// ```
23+
/// ```
24+
/// shortLabel: 'Home Page',
25+
/// ```
26+
/// ```
27+
/// icon: 'assets/icons/home.png',
28+
/// ```
29+
/// ```
30+
/// );
31+
/// ```
32+
1233
const FlutterShortcutItem({
1334
required this.id,
1435
required this.action,
@@ -17,18 +38,18 @@ class FlutterShortcutItem {
1738
this.icon,
1839
});
1940

20-
// Id of the shortcut
41+
/// ID of the shortcut that differentiates it from other shortcuts.
2142
final String id;
2243

23-
// Action performed by the shortcut
44+
/// Action performed by the shortcut
2445
final String action;
2546

26-
// Short label of the shortcut
47+
/// Short label of the shortcut
2748
final String shortLabel;
2849

29-
// Long label of the shortcut
50+
/// Long label of the shortcut
3051
final String? longLabel;
3152

32-
// Icon of the shortcut
53+
/// Flutter asset path. Only Supports image files. Eg. .png/.jpg
3354
final String? icon;
3455
}

0 commit comments

Comments
 (0)