21 lines
535 B
Dart
21 lines
535 B
Dart
import 'package:flutter/material.dart';
|
|
import 'package:url_launcher/url_launcher.dart';
|
|
|
|
class Link extends StatelessWidget {
|
|
const Link({Key? key, required this.uri}) : super(key: key);
|
|
|
|
final String uri;
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return MouseRegion(
|
|
cursor: SystemMouseCursors.click,
|
|
child: GestureDetector(
|
|
child: Text(uri,
|
|
style: const TextStyle(decoration: TextDecoration.underline)),
|
|
onTap: () {
|
|
launch(uri);
|
|
}),
|
|
);
|
|
}
|
|
}
|