You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
when i want to use window_manager package in my flutter app in ubuntu 22.04 os, i got this message: Lost connection to device.
and suddenly the opened app windows close!
my code is here:
import 'package:get/get.dart';
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:window_manager/window_manager.dart';
import 'src/core/core.dart';
import 'src/view/view.dart';
void main() async {
// ====================== new ========================
WidgetsFlutterBinding.ensureInitialized();
await windowManager.ensureInitialized();
WindowOptions windowOptions = WindowOptions(
size: Size(800, 600),
center: true,
backgroundColor: Colors.transparent,
skipTaskbar: false,
titleBarStyle: TitleBarStyle.hidden,
);
windowManager.waitUntilReadyToShow(windowOptions, () async {
await windowManager.show();
await windowManager.focus();
});
runApp(const MyApp());
}
class MyApp extends StatelessWidget {
const MyApp({Key? key}) : super(key: key);
@override
Widget build(BuildContext context) {
//Set the fit size (Find your UI design, look at the dimensions of the device screen and fill it in,unit in dp)
return ScreenUtilInit(
designSize: designSize,
minTextAdapt: true,
splitScreenMode: true,
builder: (context, _) {
return GetMaterialApp(
debugShowCheckedModeBanner: false,
initialRoute: RoutesName.portConfigScreen,
getPages: AppPages.pages,
);
},
);
}
}
but if i comment this part, the app run healthy without setting my size properly:
user@I1081:~/dev/work/with-ssh/panel$ flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 3.3.9, on Ubuntu 22.04.1 LTS 5.15.0-56-generic, locale en_US.UTF-8)
[✓] Android toolchain - develop for Android devices (Android SDK version 33.0.0)
[✓] Chrome - develop for the web
[✓] Linux toolchain - develop for Linux desktop
[✓] Android Studio (version 2021.3)
[✓] VS Code
[✓] Connected device (2 available)
HTTP Host availability check is taking a long time...[✓] HTTP Host Availability
• No issues found!
The text was updated successfully, but these errors were encountered:
hosseinvejdani
changed the title
Lost connection to device.
Lost connection to device. (on ubuntu 22.04 LTS)
Dec 20, 2022
when i want to use window_manager package in my flutter app in ubuntu 22.04 os, i got this message:
Lost connection to device.
and suddenly the opened app windows close!
my code is here:
but if i comment this part, the app run healthy without setting my size properly:
and finally this is my flutter doctor result:
The text was updated successfully, but these errors were encountered: