Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set margin of SolidBottomSheet. #25

Open
Rashesh-Bosamiya opened this issue Sep 7, 2020 · 7 comments
Open

Set margin of SolidBottomSheet. #25

Rashesh-Bosamiya opened this issue Sep 7, 2020 · 7 comments

Comments

@Rashesh-Bosamiya
Copy link

Rashesh-Bosamiya commented Sep 7, 2020

How can I set margin of SolidBottomSheet?
However, I have set margin of widget that is inside body. That is working.
But showing white color in margin area of body.

See following screenshot.

Simulator Screen Shot - iPhone 11 - 2020-09-07 at 19 14 15

bottomSheet: SolidBottomSheet(
          draggableBody: true,
          minHeight: 20.vertical,
          maxHeight: 50.vertical,
          toggleVisibilityOnTap: false,
          canUserSwipe: true,
          showOnAppear: false,
          headerBar: null,
          body: MyBottomSheet()),

class MyBottomSheet extends StatelessWidget {
  BorderRadius get _radius {
    return BorderRadius.only(
      topRight: Radius.circular(4.horizontal),
      topLeft: Radius.circular(4.horizontal),
    );
  }

  @override
  Widget build(BuildContext context) {
    return Container(
      margin: EdgeInsets.symmetric(horizontal: 5.horizontal),
      height: 50.vertical,
      decoration: BoxDecoration(
          color: AppColors.red.withOpacity(0.2),
          borderRadius: _radius),
    );
  }
}
@dbenitez-bcn
Copy link
Owner

You see this color because I didn't set it as transparent... For now try to add the margin to the SolidBottomSheet itself instead of adding it into you body widget. I will try to set the background color of the body as transparent asap.

@Rashesh-Bosamiya
Copy link
Author

Thank you for quick reply.

As you said to add margin in SolidBottomSheet. But I did not find property for that.

There are only these properties available. (See below screenshot)

Screenshot 2020-09-07 at 8 03 22 PM

@Rashesh-Bosamiya
Copy link
Author

Rashesh-Bosamiya commented Sep 7, 2020

If you could quickly update this repository for this change, I will appreciate it.

Also, please acknowledge in this ticket once you update.

@dbenitez-bcn
Copy link
Owner

Wrap the SolidBottomSheet with a padding widget. Maybe this helps you

@Rashesh-Bosamiya
Copy link
Author

Nope, that is not working.

@Rashesh-Bosamiya
Copy link
Author

Any update on this ticket?

@dbenitez-bcn
Copy link
Owner

Here you can find a potential solution #29 (comment)

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

No branches or pull requests

2 participants