Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import 'package:flutter/material.dart';
- import 'package:mail_client/email/email_view.dart';
- import 'package:mail_client/my_custom_scroll_behavior.dart';
- import 'package:window_manager/window_manager.dart';
- void main() async {
- WidgetsFlutterBinding.ensureInitialized();
- // Must add this line.
- 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(MyApp());
- }
- class MyApp extends StatelessWidget {
- const MyApp({super.key});
- @override
- Widget build(BuildContext context) {
- return MaterialApp(
- debugShowCheckedModeBanner: false,
- scrollBehavior: MyCustomScrollBehavior(),
- home: EmailView(),
- );
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement