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

Curved container showing white edges #24

Open
jay2jp opened this issue Jun 7, 2021 · 0 comments
Open

Curved container showing white edges #24

jay2jp opened this issue Jun 7, 2021 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@jay2jp
Copy link

jay2jp commented Jun 7, 2021

I just upgraded my app to flutter 2.2 and I noticed a graphical issue with the package, we use a rounded container as a child and it seems that the background of the package is white, so now the corners of the container are showing where the curves are. This was not happening pre-flutter 2.2.

image

To Reproduce
We just built a menubutton using this close

                          MenuButton(
                            child: Container(
                                decoration: BoxDecoration(
                                    color: BaseTheme.colorScheme().dropColor,
                                    borderRadius:
                                        BorderRadius.all(Radius.circular(7))),
                                child: SizedBox(
                                  width: 121,
                                  height: 51,
                                  child: Padding(
                                    padding: const EdgeInsets.only(
                                        left: 16, right: 11),
                                    child: Row(
                                      mainAxisAlignment:
                                          MainAxisAlignment.spaceBetween,
                                      children: <Widget>[
                                        Flexible(
                                          child: Text(
                                            widget.selectedDay,
                                            textScaleFactor:
                                                MediaQuery.of(context)
                                                    .textScaleFactor
                                                    .clamp(1.0, 1.5),
                                            style: TextStyle(
                                                color: BaseTheme.colorScheme()
                                                    .dropTextColor,
                                                fontSize: 18,
                                                fontWeight: FontWeight.w500),
                                            overflow: TextOverflow.ellipsis,
                                          ),
                                        ),
                                        SizedBox(
                                            width: 30,
                                            height: 30,
                                            child: FittedBox(
                                                fit: BoxFit.fill,
                                                child: Icon(
                                                  Icons.keyboard_arrow_down,
                                                  //Icons.arrow_drop_down,
                                                  size: 19,
                                                  color: Color(0xffD1DDE6),
                                                ))),
                                      ],
                                    ),
                                  ),
                                )), // Widget displayed as the button
                            items: <String>[
                              '1',
                              '2',
                              '3',
                              '4',
                              '5',
                              '6',
                              '7',
                            ], // List of your items
                            topDivider: true,
                            popupHeight: 200,
                            selectedItem: widget.selectedDay,

                            //dontShowTheSameItemSelected: true,
                            scrollPhysics:
                                AlwaysScrollableScrollPhysics(), // Change the physics of opened menu (example: you can remove or add scroll to menu)
                            itemBuilder: (value) => Container(
                              width: 121,
                              height: 51,
                              alignment: Alignment.centerLeft,
                              padding:
                                  const EdgeInsets.symmetric(horizontal: 16),
                              child: Text(
                                value,
                                textScaleFactor: MediaQuery.of(context)
                                    .textScaleFactor
                                    .clamp(1.0, 1.5),
                                style: TextStyle(
                                    color: Color(0xFF8E8E8E),
                                    fontSize: 12,
                                    fontWeight: FontWeight.w800),
                              ),
                              decoration: BoxDecoration(
                                color: Color(0xFFF5F5F5),
                                //border: Border.all(width: 2, color: Color(0xFF79D7F7)),
                              ),
                            ), // Widget displayed for each item
                            toggledChild: Container(
                              color: BaseTheme.colorScheme().dropColor,
                              child: SizedBox(
                                width: 121,
                                height: 51,
                                child: Padding(
                                  padding: const EdgeInsets.only(
                                      left: 16, right: 11),
                                  child: Row(
                                    mainAxisAlignment:
                                        MainAxisAlignment.spaceBetween,
                                    children: <Widget>[
                                      Flexible(
                                        child: Text(
                                          widget.selectedDay,
                                          textScaleFactor:
                                              MediaQuery.of(context)
                                                  .textScaleFactor
                                                  .clamp(1.0, 1.5),
                                          style: TextStyle(
                                              color: Color(0xFFF5F5F5),
                                              fontSize: 18,
                                              fontWeight: FontWeight.w500),
                                          overflow: TextOverflow.ellipsis,
                                        ),
                                      ),
                                      SizedBox(
                                          width: 30,
                                          height: 30,
                                          child: FittedBox(
                                              fit: BoxFit.fill,
                                              child: Icon(
                                                Icons.keyboard_arrow_up,
                                                //Icons.arrow_drop_down,
                                                size: 19,
                                                color: Colors.white,
                                              ))),
                                    ],
                                  ),
                                ),
                              ), // Widget displayed as the button,
                            ),
                            divider: Container(
                              height: 1,
                              color:
                                  BaseTheme.colorScheme().blueButtonTextColor,
                            ),
                            onItemSelected: (value) async {


                              setState(() {
                                widget.selectedDay = value;
                                //print(monthValue);
                              });

                              // Action when new item is selected
                            },
                            decoration: BoxDecoration(
                              //border: Border.all(color: Colors.grey[300]),
                              borderRadius:
                                  const BorderRadius.all(Radius.circular(8.0)),
                              //color: Color(0xFF4E709F),
                              color: daysBackground,
                            ),
                            onMenuButtonToggle: (isToggle) {
                              //print(isToggle);
                              setState(() {
                                daysBackground = Color(0xFF4E709F);
                              });
                            },
                          ),
@jay2jp jay2jp added the bug Something isn't working label Jun 7, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants