Skip to content

Commit 73e2d00

Browse files
Merge pull request #20 from Captured-Heart/main
Updated the windows resize method
2 parents 7a0284c + 69c9cfa commit 73e2d00

File tree

5 files changed

+38
-12
lines changed

5 files changed

+38
-12
lines changed

.gitignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,3 +43,8 @@ app.*.map.json
4343
/android/app/debug
4444
/android/app/profile
4545
/android/app/release
46+
47+
# FVM Version Cache
48+
.fvm/
49+
.fvmrc
50+
.vscode/settings.json

.vscode/settings.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
{
2-
"dart.lineLength": 120
3-
}
2+
"dart.lineLength": 120,
3+
"dart.flutterSdkPath": ".fvm/versions/3.27.1"
4+
}

lib/features/dashboard/presentation/screens/dashboard_view.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ class _DashboardViewState extends State<DashboardView> {
1515
final size = MediaQuery.sizeOf(context);
1616
return DefaultTabController(
1717
length: 2,
18-
child: Column(
19-
crossAxisAlignment: CrossAxisAlignment.start,
18+
child: ListView(
19+
// crossAxisAlignment: CrossAxisAlignment.start,
2020
children: <Widget>[
2121
const SizedBox(height: 20),
2222
Container(

lib/main.dart

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,11 @@ import 'package:socket_probe/my_app.dart';
55
void main() {
66
runApp(const MyApp());
77

8-
doWhenWindowReady(() {
9-
final win = appWindow;
10-
win.minSize = const Size(1024, 768);
11-
win.size = const Size(1024, 768);
12-
win.alignment = Alignment.center;
13-
win.show();
14-
});
8+
// doWhenWindowReady(() {
9+
// final win = appWindow;
10+
// win.minSize = const Size(1024, 768);
11+
// win.size = const Size(1024, 768);
12+
// win.alignment = Alignment.center;
13+
// win.show();
14+
// });
1515
}

lib/my_app.dart

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import 'package:bitsdojo_window/bitsdojo_window.dart';
12
import 'package:flutter/material.dart';
23
import 'package:flutter_bloc/flutter_bloc.dart';
34
import 'package:socket_probe/common/themes/app_theme.dart';
@@ -8,9 +9,28 @@ import 'package:socket_probe/features/event_sockets/bloc/event_sockets_bloc.dart
89
import 'package:socket_probe/features/navigation/bloc/navigation_cubit.dart';
910
import 'package:socket_probe/features/wsprotocol/bloc/wsprotocol_bloc.dart';
1011

11-
class MyApp extends StatelessWidget {
12+
class MyApp extends StatefulWidget {
1213
const MyApp({super.key});
1314

15+
@override
16+
State<MyApp> createState() => _MyAppState();
17+
}
18+
19+
class _MyAppState extends State<MyApp> {
20+
@override
21+
void initState() {
22+
super.initState();
23+
WidgetsBinding.instance.addPostFrameCallback((_) {
24+
doWhenWindowReady(() {
25+
final win = appWindow;
26+
win.minSize = const Size(1024, 768);
27+
win.size = const Size(1024, 768);
28+
win.alignment = Alignment.center;
29+
win.show();
30+
});
31+
});
32+
}
33+
1434
@override
1535
Widget build(BuildContext context) {
1636
return MultiBlocProvider(

0 commit comments

Comments
 (0)