Erweiterungen

This commit is contained in:
Sven committed 2024-02-06 11:49:50 +01:00
1 parent dd88480f29
commit 3c2e9ceecb
14 files changed
+180 -27

No files matched your search

+7
View File
@@ -6,6 +6,7 @@ import 'package:flutter/services.dart';
import 'package:image_picker/image_picker.dart';
import 'package:shared_preferences/shared_preferences.dart';
import 'package:stadtbote/tools/constants.dart';
import 'package:url_launcher/url_launcher.dart';
import 'package:uuid/uuid.dart';
import '../Tools/colored_safe_area.dart';
@@ -174,6 +175,12 @@ class Util {
return null;
}
static Future<void> startBrowser(String websiteUrl) async {
if (!await launchUrl(Uri.parse(websiteUrl))) {
throw Exception('Could not launch $websiteUrl');
}
}
}
Widget getDefaultButton(String text, Function() onPressed, {Image? image, double? buttonHeight}) {