import 'package:flutter/material.dart'; import 'package:url_launcher/url_launcher.dart'; class FooterLogWidget extends StatelessWidget { final TextStyle style = TextStyle(fontFamily: 'Varela Round', fontSize: 20.0); @override Widget build(BuildContext context) { return Center( child: Column( children: [ _enDIUrl(), SizedBox(height: 5), _astrolabeUrl() ], ), ); } Widget _enDIUrl() { return InkWell( onTap: _launchLinkEnDI, child: Text( "En collaboration avec enDI", style: style.copyWith( color: Colors.black, fontSize: 15.0, decoration: TextDecoration.underline), ), ); } Widget _astrolabeUrl() { return InkWell( onTap: _launchLinkAstrolabe, child: Text( "Développé par Astrolabe", style: style.copyWith( color: Colors.black, fontSize: 15, decoration: TextDecoration.underline), ), ); } void _launchLinkEnDI() async { const urlEndi = "https://endi.coop"; if (await canLaunch(urlEndi)) { await launch(urlEndi); } else { //TODO : error message } } void _launchLinkAstrolabe() async { const url = "https://astrolabe.coop"; if (await canLaunch(url)) { await launch(url); } else { //TODO : error message } } }