mirror of
https://github.com/foss42/apidash.git
synced 2025-05-23 01:06:46 +08:00
Update Platform identifiers
This commit is contained in:
@ -9,10 +9,12 @@ const kDiscordUrl = "https://bit.ly/heyfoss";
|
|||||||
const kGitUrl = "https://github.com/foss42/api-dash";
|
const kGitUrl = "https://github.com/foss42/api-dash";
|
||||||
const kIssueUrl = "$kGitUrl/issues";
|
const kIssueUrl = "$kGitUrl/issues";
|
||||||
|
|
||||||
final kIsMacOS = Platform.isMacOS;
|
final kIsMacOS = !kIsWeb && Platform.isMacOS;
|
||||||
final kIsWindows = Platform.isWindows;
|
final kIsWindows = !kIsWeb && Platform.isWindows;
|
||||||
final kIsLinux = Platform.isLinux;
|
final kIsLinux = !kIsWeb && Platform.isLinux;
|
||||||
final kIsDesktop = kIsMacOS || kIsWindows || kIsLinux;
|
final kIsApple = !kIsWeb && (Platform.isIOS || Platform.isMacOS);
|
||||||
|
final kIsDesktop =
|
||||||
|
!kIsWeb && (Platform.isMacOS || Platform.isWindows || Platform.isLinux);
|
||||||
|
|
||||||
final kColorTransparentState =
|
final kColorTransparentState =
|
||||||
MaterialStateProperty.all<Color>(Colors.transparent);
|
MaterialStateProperty.all<Color>(Colors.transparent);
|
||||||
@ -26,9 +28,8 @@ const kMinInitialWindowHeight = 800.0;
|
|||||||
|
|
||||||
const kColorSchemeSeed = Colors.blue;
|
const kColorSchemeSeed = Colors.blue;
|
||||||
final kFontFamily = GoogleFonts.openSans().fontFamily;
|
final kFontFamily = GoogleFonts.openSans().fontFamily;
|
||||||
final kFontFamilyFallback = (!kIsWeb && (Platform.isIOS || Platform.isMacOS))
|
final kFontFamilyFallback =
|
||||||
? null
|
kIsApple ? null : <String>[GoogleFonts.notoColorEmoji().fontFamily!];
|
||||||
: <String>[GoogleFonts.notoColorEmoji().fontFamily!];
|
|
||||||
|
|
||||||
final kCodeStyle = TextStyle(
|
final kCodeStyle = TextStyle(
|
||||||
fontFamily: GoogleFonts.sourceCodePro().fontFamily,
|
fontFamily: GoogleFonts.sourceCodePro().fontFamily,
|
||||||
|
@ -6,7 +6,7 @@ import 'package:window_manager/window_manager.dart';
|
|||||||
import '../consts.dart';
|
import '../consts.dart';
|
||||||
|
|
||||||
Future<void> setupInitialWindow(Size? sz) async {
|
Future<void> setupInitialWindow(Size? sz) async {
|
||||||
if (!kIsWeb && kIsDesktop) {
|
if (kIsDesktop) {
|
||||||
await window_size.getWindowInfo().then((window) {
|
await window_size.getWindowInfo().then((window) {
|
||||||
final screen = window.screen;
|
final screen = window.screen;
|
||||||
if (screen != null) {
|
if (screen != null) {
|
||||||
@ -38,7 +38,7 @@ Future<void> resetWindowSize() async {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Future<void> setupWindow({Size? sz, Offset? off, bool center = false}) async {
|
Future<void> setupWindow({Size? sz, Offset? off, bool center = false}) async {
|
||||||
if (!kIsWeb && kIsDesktop) {
|
if (kIsDesktop) {
|
||||||
double width = kMinInitialWindowWidth, height = kMinInitialWindowHeight;
|
double width = kMinInitialWindowWidth, height = kMinInitialWindowHeight;
|
||||||
if (sz == null) {
|
if (sz == null) {
|
||||||
await window_size.getWindowInfo().then((window) {
|
await window_size.getWindowInfo().then((window) {
|
||||||
|
Reference in New Issue
Block a user