🐛 Fix bugs on windows

This commit is contained in:
2024-08-30 19:53:53 +08:00
parent b7b673c96d
commit 1ac7704080
3 changed files with 20 additions and 17 deletions

View File

@ -1,5 +1,6 @@
import 'package:flutter/material.dart';
import 'package:rhythm_box/platform.dart';
import 'package:window_manager/window_manager.dart';
class SystemShell extends StatelessWidget {
final Widget child;
@ -8,19 +9,21 @@ class SystemShell extends StatelessWidget {
@override
Widget build(BuildContext context) {
if (PlatformInfo.isMacOS) {
return Column(
children: [
Container(
height: 28,
color: Theme.of(context).colorScheme.surface,
),
const Divider(
thickness: 0.3,
height: 0.3,
),
Expanded(child: child),
],
if (PlatformInfo.isDesktop) {
return DragToMoveArea(
child: Column(
children: [
Container(
height: 28,
color: Theme.of(context).colorScheme.surface,
),
const Divider(
thickness: 0.3,
height: 0.3,
),
Expanded(child: child),
],
),
);
}