顾海波

【需求】移除win

import 'dart:io';
import 'package:flutter/foundation.dart';
import 'package:wakelock/src/windows_stub.dart'
if (dart.library.io) 'package:wakelock_windows/wakelock_windows.dart';
// import 'package:wakelock/src/windows_stub.dart'
// if (dart.library.io) 'package:wakelock_windows/wakelock_windows.dart';
import 'package:wakelock_macos/wakelock_macos.dart';
import 'package:wakelock_platform_interface/wakelock_platform_interface.dart';
... ... @@ -36,12 +36,12 @@ WakelockPlatformInterface get _defaultPlatformInstance {
return WakelockMacOS();
}
if (Platform.isWindows) {
// This does not feel like the correct way to assign the Windows
// implementation, however, the platform channels do not have to be used
// thanks to the win32 package. See https://github.com/flutter/flutter/issues/52267.
return WakelockWindows();
}
// if (Platform.isWindows) {
// // This does not feel like the correct way to assign the Windows
// // implementation, however, the platform channels do not have to be used
// // thanks to the win32 package. See https://github.com/flutter/flutter/issues/52267.
// return WakelockWindows();
// }
return WakelockPlatformInterface.instance;
}
... ...