skip to Main Content

I want to show popup box above button navigation when user pressed ‘beranda’ button, it’s possible using showdialog? but how can I remove that dark background

enter image description here

2

Answers


  1. use

    showDialog<void>(
          barrierColor: Color(0x01000000),
    )
    
    Login or Signup to reply.
  2. you can use custom pop box like this as a widget easy to use :

    customAlert() {
        showDialog(
          context: context,
          builder: (BuildContext context) {
            return SizedBox(
              height: MediaQuery.of(context).size.height / 2,
              child: Column(
                mainAxisAlignment: MainAxisAlignment.center,
                children: [
                  Container(
                    margin: const EdgeInsets.all(10),
                    height: 150,
                    decoration: const BoxDecoration(
                      borderRadius: BorderRadius.all(
                        Radius.circular(16.0),
                      ),
                      color: Colors.blue,
                    ),
                    child: const Center(
                      child: Text("Add Your Text"),
                    ),
                  ),
                ],
              ),
            );
          },
        );
      }
    
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search