🐛 Fix bugs on windows
This commit is contained in:
parent
b7b673c96d
commit
1ac7704080
@ -52,11 +52,11 @@ Future<void> main(List<String> rawArgs) async {
|
||||
await KVStoreService.initialize();
|
||||
await EncryptedKvStoreService.initialize();
|
||||
|
||||
runApp(const MyApp());
|
||||
runApp(const RhythmApp());
|
||||
}
|
||||
|
||||
class MyApp extends StatelessWidget {
|
||||
const MyApp({super.key});
|
||||
class RhythmApp extends StatelessWidget {
|
||||
const RhythmApp({super.key});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
|
@ -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),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -13,7 +13,7 @@ import 'package:rhythm_box/main.dart';
|
||||
void main() {
|
||||
testWidgets('Counter increments smoke test', (WidgetTester tester) async {
|
||||
// Build our app and trigger a frame.
|
||||
await tester.pumpWidget(const MyApp());
|
||||
await tester.pumpWidget(const RhythmApp());
|
||||
|
||||
// Verify that our counter starts at 0.
|
||||
expect(find.text('0'), findsOneWidget);
|
||||
|
Loading…
Reference in New Issue
Block a user