Flutter - How can I add a widget to the border of a Container?

Thanh Bình Nguyễn

Assuming that I have an ordinary container. How can I add a widget, for example, a Button to the border of my Container?

Container with a button on border

Henok

You can use Badges plugin. for example, in your case you can wrap the container with Badge and modify the position parameter which is a BadgePosition to the exact bottom and right values.

Badge(
      position: BadgePosition.bottomRight(bottom: 0,right: 0),//change this to get the right location
      badgeContent: YourWidgetAtTheBorder(),
      child: YourContainer(),
       
    )
  

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

Flutter - How can I add a border to vertical BorderRadius in Container?

How to add border on a container inside a row widget in Flutter?

How to add a border to a widget in Flutter?

How can i add a border to flutter container with child size instead of parent size?

How to add spacing between border and container widget

Flutter: How can I customize the Border of a Container (or other Widgets)?

How can I center Row widget in container Flutter?

Flutter: How can I add a box shadow to this widget?

How can use if statement with Container widget in flutter

Add border to a Container with borderRadius in Flutter

How do I add a border to a flutter button?

Flutter / how can i set border to container like samsung one ui app icon

How to add a colored bottom border on a rounded corner Container in flutter?

Flutter container pop up how can I do like in the gif? What type of widget?

How can i achieve this kind of border in Flutter

How to animate border for a container in flutter

Add border Radius in the Inkwell widget in flutter

How can I paint a Widget on a Canvas in Flutter?

How can I get the height of a flutter widget?

How can I implement this widget in Flutter

how can I make this stack widget in flutter?

How can I add a border to an image in Java?

How can I add a border frame in the camera?

How can i add a logo (and a border) to an image?

How can i add border to bottom of image?

How do i make background images in container widget change in flutter

How can I put a widget above another widget in Flutter?

How can I add a new callback for Flutter's Material Slider Widget to access touch active/inactive status?

How to underline a Container Widget in Flutter