premium fix

This commit is contained in:
Kima
2023-05-27 11:05:03 +02:00
parent ba52926d1f
commit d04c2951b5
5 changed files with 97 additions and 77 deletions

View File

@@ -52,6 +52,8 @@ PODS:
- Flutter
- flutter_native_image (0.0.1):
- Flutter
- flutter_native_splash (0.0.1):
- Flutter
- FMDB (2.7.5):
- FMDB/standard (= 2.7.5)
- FMDB/standard (2.7.5)
@@ -113,6 +115,7 @@ DEPENDENCIES:
- flutter_image_compress (from `.symlinks/plugins/flutter_image_compress/ios`)
- flutter_local_notifications (from `.symlinks/plugins/flutter_local_notifications/ios`)
- flutter_native_image (from `.symlinks/plugins/flutter_native_image/ios`)
- flutter_native_splash (from `.symlinks/plugins/flutter_native_splash/ios`)
- home_widget (from `.symlinks/plugins/home_widget/ios`)
- image_picker_ios (from `.symlinks/plugins/image_picker_ios/ios`)
- live_activities (from `.symlinks/plugins/live_activities/ios`)
@@ -158,6 +161,8 @@ EXTERNAL SOURCES:
:path: ".symlinks/plugins/flutter_local_notifications/ios"
flutter_native_image:
:path: ".symlinks/plugins/flutter_native_image/ios"
flutter_native_splash:
:path: ".symlinks/plugins/flutter_native_splash/ios"
home_widget:
:path: ".symlinks/plugins/home_widget/ios"
image_picker_ios:
@@ -200,6 +205,7 @@ SPEC CHECKSUMS:
flutter_image_compress: 5a5e9aee05b6553048b8df1c3bc456d0afaac433
flutter_local_notifications: 0c0b1ae97e741e1521e4c1629a459d04b9aec743
flutter_native_image: 9c0b7451838484458e5b0fae007b86a4c2d4bdfe
flutter_native_splash: 52501b97d1c0a5f898d687f1646226c1f93c56ef
FMDB: 2ce00b547f966261cd18927a3ddb07cb6f3db82a
home_widget: 2829415127ee92e876f816cbbe44c0b6601b8a37
image_picker_ios: 4a8aadfbb6dc30ad5141a2ce3832af9214a705b5

View File

@@ -26,14 +26,18 @@ class FilcAPI {
static const repo = "filc/naplo";
static const releases = "https://api.github.com/repos/$repo/releases";
static Future<bool> checkConnectivity() async => (await Connectivity().checkConnectivity()) != ConnectivityResult.none;
static Future<bool> checkConnectivity() async =>
(await Connectivity().checkConnectivity()) != ConnectivityResult.none;
static Future<List<School>?> getSchools() async {
try {
http.Response res = await http.get(Uri.parse(schoolList));
if (res.statusCode == 200) {
List<School> schools = (jsonDecode(res.body) as List).cast<Map>().map((json) => School.fromJson(json)).toList();
List<School> schools = (jsonDecode(res.body) as List)
.cast<Map>()
.map((json) => School.fromJson(json))
.toList();
schools.add(School(
city: "Tiszabura",
instituteCode: "supporttest-reni-tiszabura-teszt01",
@@ -81,7 +85,10 @@ class FilcAPI {
http.Response res = await http.get(Uri.parse(news));
if (res.statusCode == 200) {
return (jsonDecode(res.body) as List).cast<Map>().map((e) => News.fromJson(e)).toList();
return (jsonDecode(res.body) as List)
.cast<Map>()
.map((e) => News.fromJson(e))
.toList();
} else {
throw "HTTP ${res.statusCode}: ${res.body}";
}
@@ -111,7 +118,10 @@ class FilcAPI {
http.Response res = await http.get(Uri.parse(releases));
if (res.statusCode == 200) {
return (jsonDecode(res.body) as List).cast<Map>().map((e) => Release.fromJson(e)).toList();
return (jsonDecode(res.body) as List)
.cast<Map>()
.map((e) => Release.fromJson(e))
.toList();
} else {
throw "HTTP ${res.statusCode}: ${res.body}";
}
@@ -121,7 +131,8 @@ class FilcAPI {
return null;
}
static Future<http.StreamedResponse?> downloadRelease(ReleaseDownload release) {
static Future<http.StreamedResponse?> downloadRelease(
ReleaseDownload release) {
try {
var client = http.Client();
var request = http.Request('GET', Uri.parse(release.url));

View File

@@ -33,11 +33,14 @@ class FilcIcons {
static const IconData gradesfill = IconData(0x29, fontFamily: iconFontFamily);
/// timetablefill
static const IconData timetablefill = IconData(0x2a, fontFamily: iconFontFamily);
static const IconData timetablefill =
IconData(0x2a, fontFamily: iconFontFamily);
/// messagesfill
static const IconData messagesfill = IconData(0x2b, fontFamily: iconFontFamily);
static const IconData messagesfill =
IconData(0x2b, fontFamily: iconFontFamily);
/// absencesfill
static const IconData absencesfill = IconData(0x2c, fontFamily: iconFontFamily);
static const IconData absencesfill =
IconData(0x2c, fontFamily: iconFontFamily);
}