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

22 lines
579 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, this.label}) : super(key: key);
final String uri;
final String? label;
@override
Widget build(BuildContext context) {
return MouseRegion(
cursor: SystemMouseCursors.click,
child: GestureDetector(
child: Text(label ?? uri,
style: const TextStyle(decoration: TextDecoration.underline)),
onTap: () {
launch(uri);
}),
);
}
}