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

Related tags

UI resizable_widget
Overview

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

Comments
  • Percentages reduce assert should have an epsilon check instead of checking if it's equal to 1

    Percentages reduce assert should have an epsilon check instead of checking if it's equal to 1

    I ran into an issue where these percentages: percentages: [0.1,0.1,0.1,0.3, 0.3, 0.1] were adding up to 1.0000000000000002 And triggering the assert on line 66.

    opened by DavidArppe 0
  • Apply Min/Max Constraints

    Apply Min/Max Constraints

    Addresses Request for applying Min/Max constraints to each Widget (https://github.com/ibako/resizable_widget/issues/11) Implementation requires providing a separate List<double?> array for the respective Min / Max behavior. These lists requires at least 1 element to be 0.0 / double.infinity (declaring a min / max value for each element would defeat the purpose of this package)

    Sample Declaration:

    return Scaffold(
          body: ResizableWidget(
            children: [
              itemA(context), itemB(context), itemC(context)
            ],
            isHorizontalSeparator: true,
            minPercentages: const [
              0.25, 0.0, 0.1
            ],
            maxPercentages: const [
              0.5, double.infinity, double.infinity
            ],
          ),
        );
      }
    
    opened by KevinMalm 0
  • Larger tap targets for separators

    Larger tap targets for separators

    Sometimes, it looks nicer to have a more Divider-like separator with a very thin thickness. If the thickness is set to a small number, however, the separator becomes very hard to drag.

    It'd be great if there was a way to increase the tap target of the separator without making it visually thicker.

    opened by hacker1024 0
  • [enhancement] Hide/show widgets using a variable, not just tapping the separator.

    [enhancement] Hide/show widgets using a variable, not just tapping the separator.

    Thank you for the package, it's great.

    I'd like to ask you to add this one more feature so that hiding can be controlled with other buttons in the app for example.

    opened by emmggi 0
  • Allow to fully customize separator widget with a builder

    Allow to fully customize separator widget with a builder

    I added a new parameter to ResizableWidget: separatorBuilder. This allows consumers to fully customize the separator using a builder.

    Please notice this patch is built on top of https://github.com/ibako/resizable_widget/pull/10.

    This lets you fully customize the separator like this:

        return ResizableWidget(
          isHorizontalSeparator: true,
          separatorSize: 16,
          separatorBuilder: (info, controller) => DefaultSeparatorWidget(
            info: info,
            controller: controller,
          ),
          children: [
            // ...
          ],
        );
    
    opened by mauriziopinotti 1
Owner
Software Engineer
null
A plugin for `flutter_map` that enables the use of vector tiles.

vector_map_tiles A plugin for flutter_map that enables the use of vector tiles. Usage class _MyHomePageState extends State<MyHomePage> { // provide

David Green 78 Jan 7, 2023
A TypeAhead widget for Flutter, where you can show suggestions to users as they type

Flutter TypeAhead A TypeAhead (autocomplete) widget for Flutter, where you can show suggestions to users as they type Features Shows suggestions in an

null 661 Jan 5, 2023
A better way for new feature introduction and step-by-step users guide for your Flutter project.

A better way for new feature introduction and step-by-step users guide for your Flutter project.

好未来技术 139 Oct 26, 2022
This package provides some widgets you can use to create a smooshy UI.

Dough Library Squishy widgets for Flutter. Quick Links Dough Demos Here are a few samples of the different widgets provided by this repo. You can find

Josiah Saunders 530 Dec 23, 2022
A simple package that provides you with some widgets and cutom clippers which implements the shape of a coupon card.

Coupon UI Kit A simple package that provides you with some widgets and cutom clippers which implements the shape of a coupon card. The example contain

AbdulMuaz Aqeel 15 Dec 20, 2022
Movies App UI in Flutter using Simple Widgets without Using API's in Flutter.

Movies App UI in Flutter using Simple Widgets without Using API's in Flutter.

Habib ullah 3 May 15, 2022
Flutter Widgets that you can touch and feel

Flutter widgets you haven't used yet. Problems that proximity solves Currently, Flutter has a lot of useful pre-built widgets, no, too many widgets. T

Masahiro Aoki 32 Nov 8, 2022
🔥 Flutter Widgets 掘金对应专栏,欢迎关注

Flutter Widgets 示例集合 本项目基于 Flutter 2.2.1 版本,是系列 Flutter Widget 示例源码,有对应的文章详细讲解,持续更新敬请关注。 在线预览 全景脑图 持续更新中 掘金专栏 欢迎关注 已完成文章 AnimatedContainer ClipRRect、C

Zero 12 Dec 14, 2022
Code generation for Flutter Padding widgets based on your constants

Paddinger Paddinger is a Flutter package to generate Padding widgets. Given a set of constants like: @paddinger const double PADDING_NORMAL = 8; A set

Emanuele 14 Oct 20, 2022
Build Beautiful UIs with Flutter Widgets

I learnt this following thing from this project How to create Stateless Widgets What is the difference between hot reload and hot refresh and running

Chitraarasu.k 2 Dec 31, 2021
A set of high-level Flutter UI components and stand-alone widgets for easier implementation of most used UI features

A set of high-level Flutter UI components and stand-alone widgets for easier implementation of most used UI features

Evgeny Cherkasov 37 Jul 25, 2022
Responsive Sizer helps implement are responsive layout by providing helper widgets and extensions

Responsive Sizer Responsive Sizer helps implement a responsive layout by providing helper widgets and extensions Content Installation Parameters Take

CoderUni 71 Jan 3, 2023
A wrapper to show a scroll to top prompt to the user on scrollable widgets.

flutter_scroll_to_top A wrapper to show a scroll to top prompt to the user on scrollable widgets. Installing Add the following dependency to your pubs

Naman Shergill 11 May 16, 2022
Allows widgets to be zoomed in and out by inserting a OverlayEntry which allows the widget to be on the front at all times.

zoom_pinch_overlay An instagram style pinch and zoom widget for all platform completely written in pure dart! All other "zoom_pinch" package doesnt di

Samuel 18 Nov 29, 2022
Display all stand alone widgets in a nice UI

flutter_organized_widgets Display all stand alone widgets in a nice UI How to install Add to dependencies: flutter_organized_widgets: git: https

Norbert Kozsir 10 Nov 18, 2022
A flutter package which makes it easier to display the difference between two images.

?? Before After A flutter package which makes it easier to display the differences between two images.. The source code is 100% Dart, and everything r

Sahil Kumar 741 Dec 30, 2022
A flutter package to help you beautify your app popups.

flutter_beautiful_popup 中文 A flutter package to help you beautify your app popup, can be used in all platform.Live Demo. Preview: Getting Started Add

朱嘉伟 568 Dec 30, 2022
A flutter package for building card based forms.

Card Settings NOTE: THIS IS EFFECTIVELY NULLSAFE BUT CANNOT REFLECT THIS UNTIL cupertino_settings IS UPGRADED. A flutter package for building settings

CodeGrue 445 Dec 26, 2022
A powerful & easy to use timeline package for Flutter! 🚀

A powerful & easy to use timeline package for Flutter! ?? Caveat: This package is an early stage. Not enough testing has been done to guarantee stabil

Chulwoo Park 566 Dec 30, 2022