Skip to content

Commit

Permalink
fix open url
Browse files Browse the repository at this point in the history
  • Loading branch information
waozixyz committed Nov 7, 2023
1 parent cd44025 commit cc960bb
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lib/screens/settings_screen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -89,13 +89,14 @@ class _SettingsScreenState extends State<SettingsScreen> {
Widget _buildIconLink(dynamic iconOrImagePath, String tooltip, String url) {
return IconButton(
icon: (iconOrImagePath is IconData)
? Icon(iconOrImagePath, color: Colors.teal)
? Icon(iconOrImagePath, color: Colors.teal)
: (iconOrImagePath.endsWith('.svg')
? SvgPicture.asset(iconOrImagePath, color: Colors.teal, width: 24, height: 24)
: Image.asset(iconOrImagePath, color: Colors.teal, width: 24, height: 24)),
tooltip: tooltip,
onPressed: () => launchUrl(url as Uri),
onPressed: () => launchUrl(Uri.parse(url)),
);
}


}

0 comments on commit cc960bb

Please sign in to comment.