1
0
Fork 0
mrtiboute/lib/widgets/components/link.dart

22 lines
535 B
Dart
Raw Normal View History

2022-03-30 21:37:32 +02:00
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) {
2022-03-30 21:44:38 +02:00
return MouseRegion(
cursor: SystemMouseCursors.click,
child: GestureDetector(
child: Text(uri,
style: const TextStyle(decoration: TextDecoration.underline)),
onTap: () {
launch(uri);
}),
);
2022-03-30 21:37:32 +02:00
}
}