mirror of
https://github.com/foss42/apidash.git
synced 2025-12-01 18:28:25 +08:00
add titlebar
This commit is contained in:
30
lib/app.dart
30
lib/app.dart
@@ -4,8 +4,8 @@ import 'package:apidash_design_system/apidash_design_system.dart';
|
|||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter_portal/flutter_portal.dart';
|
import 'package:flutter_portal/flutter_portal.dart';
|
||||||
import 'package:flutter_riverpod/flutter_riverpod.dart';
|
import 'package:flutter_riverpod/flutter_riverpod.dart';
|
||||||
import 'package:window_manager/window_manager.dart' hide WindowCaption;
|
import 'package:window_manager/window_manager.dart';
|
||||||
import 'widgets/widgets.dart' show WindowCaption, WorkspaceSelector;
|
import 'widgets/widgets.dart';
|
||||||
import 'providers/providers.dart';
|
import 'providers/providers.dart';
|
||||||
import 'services/services.dart';
|
import 'services/services.dart';
|
||||||
import 'screens/screens.dart';
|
import 'screens/screens.dart';
|
||||||
@@ -134,8 +134,8 @@ class DashApp extends ConsumerWidget {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
)
|
)
|
||||||
: Stack(
|
: //Stack(
|
||||||
children: [
|
// children: [
|
||||||
!kIsLinux && !kIsMobile
|
!kIsLinux && !kIsMobile
|
||||||
? const App()
|
? const App()
|
||||||
: context.isMediumWindow
|
: context.isMediumWindow
|
||||||
@@ -152,17 +152,17 @@ class DashApp extends ConsumerWidget {
|
|||||||
)
|
)
|
||||||
: const MobileDashboard()
|
: const MobileDashboard()
|
||||||
: const Dashboard(),
|
: const Dashboard(),
|
||||||
if (kIsWindows)
|
// if (kIsWindows)
|
||||||
SizedBox(
|
// SizedBox(
|
||||||
height: 29,
|
// height: 29,
|
||||||
child: WindowCaption(
|
// child: WindowCaption(
|
||||||
backgroundColor: Colors.transparent,
|
// backgroundColor: Colors.transparent,
|
||||||
brightness:
|
// brightness:
|
||||||
isDarkMode ? Brightness.dark : Brightness.light,
|
// isDarkMode ? Brightness.dark : Brightness.light,
|
||||||
),
|
// ),
|
||||||
),
|
// ),
|
||||||
],
|
// ],
|
||||||
),
|
// ),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -62,7 +62,7 @@ Future<void> setupWindow({Size? sz, Offset? off, bool center = false}) async {
|
|||||||
minimumSize: kMinWindowSize,
|
minimumSize: kMinWindowSize,
|
||||||
skipTaskbar: false,
|
skipTaskbar: false,
|
||||||
title: kWindowTitle,
|
title: kWindowTitle,
|
||||||
titleBarStyle: kIsMacOS || kIsWindows ? TitleBarStyle.hidden : null,
|
titleBarStyle: kIsMacOS ? TitleBarStyle.hidden : null,
|
||||||
);
|
);
|
||||||
if (off != null) {
|
if (off != null) {
|
||||||
await windowManager.setPosition(off);
|
await windowManager.setPosition(off);
|
||||||
|
|||||||
@@ -75,5 +75,5 @@ export 'texts.dart';
|
|||||||
export 'uint8_audio_player.dart';
|
export 'uint8_audio_player.dart';
|
||||||
export 'widget_not_sent.dart';
|
export 'widget_not_sent.dart';
|
||||||
export 'widget_sending.dart';
|
export 'widget_sending.dart';
|
||||||
export 'window_caption.dart';
|
// export 'window_caption.dart';
|
||||||
export 'workspace_selector.dart';
|
export 'workspace_selector.dart';
|
||||||
|
|||||||
Reference in New Issue
Block a user