Skip to content

A Flutter package that enables users to resize the internal widgets by dragging.

License

Notifications You must be signed in to change notification settings

tsacdop/resizable_widget

 
 

Repository files navigation

resizable_widget

ResizableWidget enables users to resize the internal widgets by dragging.

This package contains simple APIs, but if needed, you can customize ResizableWidget flexibly.

Example

example

Shows a simple code example below.

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

class MyPage extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      body: ResizableWidget(
        children: [ // required
          Container(color: Colors.greenAccent),
          Container(color: Colors.yellowAccent),
          Container(color: Colors.redAccent),
        ],
        isHorizontalSeparator: false,   // optional
        isDisabledSmartHide: false,     // optional
        separatorColor: Colors.white12, // optional
        separatorSize: 4,               // optional
        percentages: [0.2, 0.5, 0.3],   // optional
        onResized: (infoList) =>        // optional
            print(infoList.map((x) => '(${x.size}, ${x.percentage}%)').join(", ")),
      ),
    );
  }
}

Package page (pub.dev)

https://pub.dev/packages/resizable_widget

API Document

https://pub.dev/documentation/resizable_widget/latest/resizable_widget/resizable_widget-library.html

About

A Flutter package that enables users to resize the internal widgets by dragging.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Dart 100.0%