Skip to content

Comments

Apply Min/Max Constraints#18

Open
KevinMalm wants to merge 3 commits intoibako:mainfrom
KevinMalm:feature/add_min_max_constraints
Open

Apply Min/Max Constraints#18
KevinMalm wants to merge 3 commits intoibako:mainfrom
KevinMalm:feature/add_min_max_constraints

Conversation

@KevinMalm
Copy link

@KevinMalm KevinMalm commented Jul 8, 2022

Addresses Request for applying Min/Max constraints to each Widget (#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
        ],
      ),
    );
  }

@JerContact
Copy link

any word on this? This would be great to have!

@elio1fiore
Copy link

MERGE!!!!

@elio1fiore
Copy link

elio1fiore commented Aug 3, 2023

There are some bugs, some times I manage to decrease beyond the minimum.

But in the meantime there are the min and max

ResizableWidget(
        children: [
          Container(color: Colors.greenAccent),
          Container(color: Colors.yellowAccent),
        ],
        minPercentages: const [
          0.1,
          0.0,
        ],
        maxPercentages: const [0.17, double.infinity],
      ),

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants