How do you get the cursor to change on hyperlinked text.
Currently only see for button. (Not sure if this will be resolved in 2.0 when released?)
Thanks in advance.
1 Like
Hey @L2Build Nice to have you in this community as well.
So we will add a wrapper in the future to control the cursor, but for now you can use Nowa 2.0 to do it with custom code.
All you have to do is to create a custom widget that has MouseRegion
. Here’s an example:
@CustomWidget()
class HyperlinkText extends StatelessWidget {
HyperlinkText(this.text, {required this.url});
@override
Widget build(BuildContext context) {
return MouseRegion(
cursor: SystemMouseCursors.click,
child: GestureDetector(
onTap: () {
// Add your hyperlink functionality here.
print('Navigate to: $url');
},
child: Text(
"text",
style: TextStyle(
color: Colors.blue,
decoration: TextDecoration.underline,
),
),
),
);
}
}
let me know if you still need any help