Code Monkey home page Code Monkey logo

align_positioned's People

Contributors

marcglasberg avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

align_positioned's Issues

Is it possible to make secondary widget bigger than main one in .relative

AlignPositioned.relative(
  widgetA(),
  widgetB(),
  moveByContainerHeight: 0.5,
  moveByChildHeight: 0.5,
),

Seems like widgetB can't be bigger than widgetA. Is it possible to do?
What I want to achieve is to make widgetA an icon and widgetB a GestureDetector of a bigger size. So that button icon perfectly fits into the design but with a bigger touch area.

Offset by 50% of child width, when parent widget has no fixed size, and child size is unknown

Assume we have a parent widget (a Container), with no fixed size, and positioned absolutely (within it's own parent) at a top/left (x/y) coordinate. Then we place a child widget (with no fixed or known size) within the parent. Using your library, is there a way to position the child at -0.5 of its own width and height, such that the child's center appears at the x/y coordinate of its parent? I'm trying to achieve this using your (fantastic) library but when I don't specify the width/height of the parent, I get the following error.

RenderBox was not laid out: _RenderAlignPositionedBox#7e614 relayoutBoundary=up10
'package:flutter/src/rendering/box.dart':
Failed assertion: line 1694 pos 12: 'hasSize'

childHeightRatio as a proportion to parent's Width

Is there any way to set child's height as a proportion to parent's width? This is a very common need and it would be very nice if it would be supported internally from the plugin (without writing a setState manually). Example use case: size a container with the same width and heigh that equals to 1/5 of parent's width.

Kudos for your excellent work with all your published plugins!

Problem with SingleChildScrollView

Hi and thank you for share you very good library with us...
I've a problem when use it with SingleChildScrollView.
I use SingleChildScrollView as child of AlignPositioned and the scrolling is not handled by SingleChildScrollView.

Is it possible with nested stacks?

First of all, thank you for making this library, very easy to use.

The issue I am facing now is that when I try to use AlignPositioned in another stack nested inside the parent AlignPositioned widget, the layout is messed up.

I am wondering if there is any solution for this. Thanks

Stack
 |-- AlignPositioned
       |-- Stack
             |-- AlignPositioned

Documentation Request

Hi there, feel free to close if it's not within the scope of this project. I would be nice to have a couple animated GIF examples, especially AnimChained. Thanks!

[Feature Request] Add the `.expand()`constructor for the AnimatedAlignPositioned widget.

Hi dear @marcglasberg . I hope you are doing great.

I've been a user of this package for a long time. I just forgot to say you that it is needed to add the.expand() constructor for the AnimatedAlignPositioned widget.

You already added it for the AlignPositioned. Currently, I am solving this issue by wrapping the widgets like this:

Stack(
  children: [
    Positioned(
      top: 0,
      right: 0,
      left: 0,
      bottom: 0,
        child: AnimatedAlignPositioned(
...
...
...

So the the Positioned(top: 0, right: 0, left: 0, bottom: 0, child: child) widget let the AnimatedAlignPositioned take the size of the parent Stack widget.

Use Case

I have another widget inside the stack that basically shows an image pager whose height is determined by an AspectRatio. Since I use the AspectRatio widget, the non-positioned child of the stack (the image pager) has no height value. However, it can be laid out. So in such a case, without the .expand() constructor, I have to use a Positioned widget.

Not a big deal but it could be easier to implement. (Also there might be people that do not know how the stack widget works. Sometimes, even I forget to wrap it with the Positioned(top: right: left: bottom: 0, child: child) that makes me wonder "What I did wrong?" There can be a documentation update too.)

Thanks a lot!

GestureDetector outside the original area.

Try to recreate a sample code from the first example (with a semi-transparent circle on the left of the red container) and wrap that circle into Material -> InkWell.

Tap will be recognized only if you tap on the overlapping with the red container section of the circle, otherwise, it will be ignored.

Working tap area is this:

edInkedalignPos1_LI

Whereas anyone would expect it to be the whole circle widget.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.