diff --git a/CHANGELOG.md b/CHANGELOG.md index fce5a51c5..4ecff84aa 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +## [next] + +- Exposing the cursor attribute on the ListTile widget + ## 4.7.1 - Add vertical support to `CommandBar`. ([#872](https://github.com/bdlukaa/fluent_ui/pull/872)) diff --git a/lib/src/controls/surfaces/list_tile.dart b/lib/src/controls/surfaces/list_tile.dart index 951a2da80..9a3ee67fb 100644 --- a/lib/src/controls/surfaces/list_tile.dart +++ b/lib/src/controls/surfaces/list_tile.dart @@ -41,6 +41,7 @@ class ListTile extends StatelessWidget { this.focusNode, this.autofocus = false, this.semanticLabel, + this.cursor, }) : assert( subtitle != null ? title != null : true, 'To have a subtitle, there must be a title', @@ -65,6 +66,7 @@ class ListTile extends StatelessWidget { this.selectionMode = ListTileSelectionMode.single, this.onSelectionChange, this.semanticLabel, + this.cursor, }) : assert( subtitle != null ? title != null : true, 'To have a subtitle, there must be a title', @@ -140,9 +142,18 @@ class ListTile extends StatelessWidget { /// {@macro flutter.widgets.Focus.autofocus} final bool autofocus; - // {@macro fluent_ui.controls.inputs.HoverButton.semanticLabel} + /// {@macro fluent_ui.controls.inputs.HoverButton.semanticLabel} final String? semanticLabel; + /// Mouse Cursor to display + /// + /// If null, [MouseCursor.defer] is used by default + /// + /// See also cursors like: + /// + /// * [SystemMouseCursors.click], which turns the mouse cursor to click + final MouseCursor? cursor; + @override void debugFillProperties(DiagnosticPropertiesBuilder properties) { super.debugFillProperties(properties); @@ -187,6 +198,7 @@ class ListTile extends StatelessWidget { onPressed ?? (onSelectionChange != null ? _onSelectionChange : null), focusNode: focusNode, autofocus: autofocus, + cursor: cursor, semanticLabel: semanticLabel, builder: (context, states) { final tileColor = () {