Advertisement
Guest User

Untitled

a guest
Dec 21st, 2024
105
0
5 days
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Dart 0.98 KB | Source Code | 0 0
  1. import 'package:flutter/material.dart';
  2. import 'package:mail_client/email/email_view.dart';
  3. import 'package:mail_client/my_custom_scroll_behavior.dart';
  4. import 'package:window_manager/window_manager.dart';
  5.  
  6. void main() async {
  7.   WidgetsFlutterBinding.ensureInitialized();
  8.   // Must add this line.
  9.   await windowManager.ensureInitialized();
  10.  
  11.   WindowOptions windowOptions = WindowOptions(
  12.     size: Size(800, 600),
  13.     center: true,
  14.     backgroundColor: Colors.transparent,
  15.     skipTaskbar: false,
  16.     titleBarStyle: TitleBarStyle.hidden,
  17.   );
  18.   windowManager.waitUntilReadyToShow(windowOptions, () async {
  19.     await windowManager.show();
  20.     await windowManager.focus();
  21.   });
  22.  
  23.   runApp(MyApp());
  24. }
  25.  
  26. class MyApp extends StatelessWidget {
  27.   const MyApp({super.key});
  28.  
  29.   @override
  30.   Widget build(BuildContext context) {
  31.     return MaterialApp(
  32.       debugShowCheckedModeBanner: false,
  33.       scrollBehavior: MyCustomScrollBehavior(),
  34.       home: EmailView(),
  35.     );
  36.   }
  37. }
  38.  
Tags: flutter
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement