mirror of
https://github.com/pd4d10/git-touch.git
synced 2026-04-29 02:52:20 -05:00
refactor: launch url
This commit is contained in:
@@ -184,3 +184,13 @@ class PrimerBranchName extends StatelessWidget {
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
launchUrl(String url) async {
|
||||
if (url == null) return;
|
||||
|
||||
if (await canLaunch(url)) {
|
||||
await launch(url);
|
||||
} else {
|
||||
// TODO: fallback
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user