Skip to content
pubscout

bitsdojo_window

0.1.6, released 3 years ago by bitsdojo.com

Create custom desktop windows and handle window operations on Windows, macOS, and Linux.

Quiet but busy
$ flutter pub add bitsdojo_window
Source repository

What it does

A Flutter desktop plugin that lets developers remove standard OS titlebars, build custom window frames, and control window position, size, state, and visibility across Windows, macOS, and Linux.

AI-written summary of version 0.1.6, based on the package's README and metadata. Report an inaccuracy

Use it when

  • You are building a Flutter desktop application for Windows, macOS, or Linux.
  • You need a custom window frame, titlebar, or custom window control buttons.

Skip it when

  • You are building a mobile or web-only application.
  • You prefer sticking to the standard OS-provided window titlebars and native buttons.

Strengths

  • Cross-platform support for Windows, macOS, and Linux.
  • Provides widgets for moving and resizing the window easily from Flutter UI.
  • Supports hiding the window on startup to prevent flickering.

Weaknesses

  • Requires manual configuration changes in native project files (C++, Swift, or C) for each platform.
  • Limited to desktop targets.

Setup

Kind
Plugin (native code)
Effort
Medium
Code generation
No
Direct dependencies
4

Requires native code configuration changes in windows\runner\main.cpp, macos\runner\MainFlutterWindow.swift, and linux\my_application.cc.

import 'package:flutter/material.dart';
import 'package:bitsdojo_window/bitsdojo_window.dart';

void main() {
  runApp(const MyApp());
  doWhenWindowReady(() {
    final win = appWindow;
    const initialSize = Size(600, 450);
    win.minSize = initialSize;
    win.size = initialSize;
    win.alignment = Alignment.center;
    win.title = "Custom window with Flutter";
    win.show();
  });
}

class MyApp extends StatelessWidget {
  const MyApp({Key? key}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      debugShowCheckedModeBanner: false,
      home: Scaffold(
        body: WindowBorder(
          color: Colors.blue,
          width: 1,
          child: Row(
            children: const [LeftSide(), RightSide()],
          ),
        ),
      ),
    );
  }
}

class LeftSide extends StatelessWidget {
  const LeftSide({Key? key}) : super(key: key);
  @override
  Widget build(BuildContext context) {
    return SizedBox(
        width: 200,
        child: Container(
            color: Colors.orange,
            child: Column(
              children: [
                WindowTitleBarBox(child: MoveWindow()),
                Expanded(child: Container())
              ],
            )));
  }
}

class RightSide extends StatelessWidget {
  const RightSide({Key? key}) : super(key: key);
  @override
  Widget build(BuildContext context) {
    return Expanded(
      child: Container(
        child: Column(children: [
          WindowTitleBarBox(
            child: Row(
              children: [Expanded(child: MoveWindow())],
            ),
          )
        ]),
      ),
    );
  }
}

Alternatives

Packages that do the same job and could replace bitsdojo_window.