2024-08-29 17:56:21 +00:00
|
|
|
import 'package:flutter/material.dart';
|
|
|
|
import 'package:rhythm_box/platform.dart';
|
2024-08-30 11:53:53 +00:00
|
|
|
import 'package:window_manager/window_manager.dart';
|
2024-08-29 17:56:21 +00:00
|
|
|
|
|
|
|
class SystemShell extends StatelessWidget {
|
|
|
|
final Widget child;
|
|
|
|
|
|
|
|
const SystemShell({super.key, required this.child});
|
|
|
|
|
|
|
|
@override
|
|
|
|
Widget build(BuildContext context) {
|
2024-08-30 11:53:53 +00:00
|
|
|
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),
|
|
|
|
],
|
|
|
|
),
|
2024-08-29 17:56:21 +00:00
|
|
|
);
|
|
|
|
}
|
|
|
|
|
|
|
|
return child;
|
|
|
|
}
|
|
|
|
}
|