feat: add alot
This commit is contained in:
@@ -2,10 +2,10 @@ import 'dart:io';
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:go_router/go_router.dart';
|
||||
import 'package:kooltab2/utils/app_update_util.dart';
|
||||
|
||||
import 'app_config.dart';
|
||||
import '../l10n/app_localizations.dart';
|
||||
import 'app_config.dart';
|
||||
import 'app_update_util.dart';
|
||||
|
||||
class UpdateChecker {
|
||||
static bool _hasChecked = false;
|
||||
@@ -13,7 +13,7 @@ class UpdateChecker {
|
||||
static Future<void> check(BuildContext context) async {
|
||||
if (!Platform.isAndroid) return;
|
||||
if (_hasChecked) {
|
||||
debugPrint("Update already checked this boot");
|
||||
debugPrint('Update already checked this boot');
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -25,17 +25,17 @@ class UpdateChecker {
|
||||
final update = await updater.checkForUpdate();
|
||||
|
||||
if (update == null) {
|
||||
debugPrint("No update available");
|
||||
debugPrint('No update available');
|
||||
return;
|
||||
}
|
||||
|
||||
debugPrint("Update available: ${update.version}");
|
||||
debugPrint('Update available: ${update.version}');
|
||||
|
||||
if (!context.mounted) return;
|
||||
|
||||
_showUpdateDialog(context, update);
|
||||
} catch (e) {
|
||||
debugPrint("Update check failed: $e");
|
||||
debugPrint('Update check failed: $e');
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user