desktop_ui 0.0.1 copy "desktop_ui: ^0.0.1" to clipboard
desktop_ui: ^0.0.1 copied to clipboard

outdated

一个桌面端的UI库。

example/lib/main.dart

import 'package:example/home.dart';
import 'package:flutter/material.dart';
import 'package:get/get.dart';
import 'package:window_manager/window_manager.dart';

void main() async {
  WidgetsFlutterBinding.ensureInitialized();

  // Must add this line.
  await windowManager.ensureInitialized();
  // Use it only after calling `hiddenWindowAtLaunch`
  windowManager.waitUntilReadyToShow().then((_) async {
    // Set to frameless window
    await windowManager.setAsFrameless();
    await windowManager.setSize(const Size(400, 600));
    // await windowManager.setPosition(Offset.zero);
    await windowManager.setHasShadow(true);
    await windowManager.setClosable(true);
    await windowManager.setSkipTaskbar(false);
    // await windowManager.setAlwaysOnTop(true);
    windowManager.show();
  });
  runApp(const MyApp());
}

class MyApp extends StatelessWidget {
  const MyApp({Key? key}) : super(key: key);
  @override
  Widget build(BuildContext context) {
    return GetMaterialApp(
      title: 'Flutter Demo',
      debugShowCheckedModeBanner: false,
      theme: ThemeData(
        primarySwatch: Colors.blue,
      ),
      home: const Home(),
    );
  }
}
6
likes
0
pub points
0%
popularity

Publisher

unverified uploader

一个桌面端的UI库。

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

flutter, url_launcher

More

Packages that depend on desktop_ui