mirror of
https://github.com/simon-ding/polaris.git
synced 2026-03-19 01:37:32 +08:00
chore: remove isdesktop check
This commit is contained in:
@@ -2,14 +2,14 @@ import 'dart:ffi';
|
||||
import 'dart:io';
|
||||
import 'dart:isolate';
|
||||
|
||||
import 'package:ui/widgets/utils.dart' as Utils;
|
||||
import 'package:flutter/foundation.dart';
|
||||
|
||||
|
||||
class FFIBackend {
|
||||
final lib = DynamicLibrary.open(libname());
|
||||
|
||||
static String libname() {
|
||||
if (Utils.isDesktop()) {
|
||||
if (!kIsWeb) {
|
||||
if (Platform.isWindows) {
|
||||
return 'libpolaris.dll';
|
||||
} else if (Platform.isLinux) {
|
||||
|
||||
@@ -55,10 +55,6 @@ extension FileFormatter on num {
|
||||
}
|
||||
}
|
||||
|
||||
bool isDesktop() {
|
||||
return Platform.isLinux || Platform.isWindows || Platform.isMacOS;
|
||||
}
|
||||
|
||||
bool isSmallScreen(BuildContext context) {
|
||||
final screenWidth = MediaQuery.of(context).size.width;
|
||||
return screenWidth < Breakpoints.small.endWidth!.toDouble();
|
||||
|
||||
Reference in New Issue
Block a user