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

19 lines
452 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) {
return GestureDetector(
child: Text(uri,
style: const TextStyle(decoration: TextDecoration.underline)),
onTap: () {
launch(uri);
});
}
}