bottom_aligned_button 0.0.3 copy "bottom_aligned_button: ^0.0.3" to clipboard
bottom_aligned_button: ^0.0.3 copied to clipboard

A Flutter package to place button at the bottom

Provides BottomAlignedButton and DistancedWidgets widget that helps to place button (or any widget) at the bottom of the screen.

Example

Usage #

BottomAlignedButton #

Places child on top of itself and button on bottom. If child takes more height than BottomAlignedButton itself then bottom is moved to end of created list and becomes scrollable with child.

example:

BottomAlignedButton(
  button: ElevatedButton(
    onPressed: () {},
    child: const Text('Sign In'),
  ),
  child: Column(
    children: [
      // some widgets, for example textfield of login form
    ],
  ),
)

DistancedWidgets #

Places top on top and bottom on bottom. If top takes more than DistancedWidgets itself then bottom is hide.

onBottomHide is called after each RenderObject.performLayout when bottom is not rendering. onBottomShow is called after each RenderObject.performLayout when bottom is rendering

example:

DistancedWidgets(
  top: Column(
    children: [
      // some widgets
    ]
  ),
  bottom: ElevatedButton(
    onPressed: () {},
    child: const Text('Sign In'),
  ),
  onBottomHide: () {},
  onBottomShow: () {},
)
2
likes
140
pub points
0%
popularity

Publisher

unverified uploader

A Flutter package to place button at the bottom

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (license)

Dependencies

flutter

More

Packages that depend on bottom_aligned_button