hnvn/flutter_flip_panel

FlipClock.simple positioned at bottom of parent container always

danielhakimi opened this issue · 3 comments

I would like to modify the height of the parent container to remove the padding around the Simple FlipClock, but if I resize the parent container it does not reposition the clock panel. Is there a way to do this?

The following code produces the image attached in the issue:
screenshot 2019-01-22 at 10 19 41

Container(
      height: 220,
        color: Colors.yellow,
        child: Center(
          child: FlipClock.simple(
            startTime: DateTime.now(),
            digitColor: Colors.white,
            backgroundColor: Colors.red,
            digitSize: 48.0,
            borderRadius: const BorderRadius.all(Radius.circular(3.0)),
          ),
        ),
      ),

I'm having the same problem... I haven't looked into it yet, but I'm guessing that the test is set up to display the flip clock in the center of the screen. In this test, you might not notice if there is a spacing problem placing the Widget into a smaller container. It might be worth looking at the test again and trying to embed the clock widget into a smaller container. Until this is sorted out, the code will remain commented out in my app... otherwise, it looks like a great component! :-)

After a further look it's a padding setting in flip_pannel.dart line 291:

padding: const EdgeInsets.only(top: 180.0),
IMO I think it would be more benificial to have all the padding set to 0 as default and then just let a parent widget dictate the padding.

Overall though I agree with @James-A-White it's a great component! Love the animations.

hnvn commented

You guys already got around this matter, didn't you? I'm quite busy this moment. I will have a closer look in this matter when I have a bit spare time.