From b1c95c0cbd8e04f460bed2607b0bea58e1545283 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B1=8C=E6=9D=82?= <1147192855@qq.com> Date: Thu, 18 Jul 2024 15:20:48 +0800 Subject: [PATCH] 1111 --- making_school_asignment_app/lib/main.dart | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/making_school_asignment_app/lib/main.dart b/making_school_asignment_app/lib/main.dart index 11a40c8..73c9a62 100644 --- a/making_school_asignment_app/lib/main.dart +++ b/making_school_asignment_app/lib/main.dart @@ -1,3 +1,4 @@ +import 'dart:io'; import 'package:auto_updater/auto_updater.dart'; import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; @@ -29,10 +30,12 @@ void main() async { WidgetsFlutterBinding.ensureInitialized(); // Windows - String feedURL = '${RequestConfig.imgUrl}infra-app/job/3/appcast.xml'; - await autoUpdater.setFeedURL(feedURL); - await autoUpdater.checkForUpdates(); - await autoUpdater.setScheduledCheckInterval(3600); + if(Platform.isWindows){ + String feedURL = '${RequestConfig.imgUrl}infra-app/job/3/appcast.xml'; + await autoUpdater.setFeedURL(feedURL); + await autoUpdater.checkForUpdates(); + await autoUpdater.setScheduledCheckInterval(3600); + } SystemChrome.setSystemUIOverlayStyle(const SystemUiOverlayStyle( statusBarColor: Colors.transparent, //状态栏背景颜色