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

discontinued
PlatformWindows

A Flutter plugin for enlarging window resize borders on Windows.

example/lib/main.dart

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

void main() {
  runApp(const MyApp());
}

class MyApp extends StatefulWidget {
  const MyApp({super.key});

  @override
  State<MyApp> createState() => _MyAppState();
}

class _MyAppState extends State<MyApp> {
  final _windowResizeBorderPlugin = WindowResizeBorder();
  bool _enlargedBordersEnabled = false;
  int _borderWidth = 8;

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        appBar: AppBar(
          title: const Text('Window Resize Border Example'),
        ),
        body: Center(
          child: Column(
            mainAxisAlignment: MainAxisAlignment.center,
            children: [
              Text(
                'Enlarged borders are ${_enlargedBordersEnabled ? 'enabled' : 'disabled'}',
                style: const TextStyle(fontSize: 18),
              ),
              const SizedBox(height: 20),
              if (_enlargedBordersEnabled)
                Slider(
                  value: _borderWidth.toDouble(),
                  min: 1,
                  max: 20,
                  divisions: 19,
                  label: _borderWidth.toString(),
                  onChanged: (value) {
                    setState(() {
                      _borderWidth = value.toInt();
                    });
                    _windowResizeBorderPlugin.enableEnlargedBorders(
                      borderWidth: _borderWidth,
                    );
                  },
                ),
              const SizedBox(height: 20),
              ElevatedButton(
                onPressed: () async {
                  bool success;
                  if (_enlargedBordersEnabled) {
                    success = await _windowResizeBorderPlugin.disableEnlargedBorders();
                  } else {
                    success = await _windowResizeBorderPlugin.enableEnlargedBorders(
                      borderWidth: _borderWidth,
                    );
                  }
                  
                  if (success) {
                    setState(() {
                      _enlargedBordersEnabled = !_enlargedBordersEnabled;
                    });
                  }
                },
                child: Text(
                  _enlargedBordersEnabled ? 'Disable Enlarged Borders' : 'Enable Enlarged Borders',
                ),
              ),
            ],
          ),
        ),
      ),
    );
  }
}
0
likes
150
points
19
downloads

Publisher

unverified uploader

Weekly Downloads

A Flutter plugin for enlarging window resize borders on Windows.

Repository (GitHub)
View/report issues

Documentation

API reference

License

Apache-2.0 (license)

Dependencies

flutter, plugin_platform_interface

More

Packages that depend on window_resize_border