Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

Function of calling a dialog box, when displaying a list in a dialog box, all text is underlined with two yellow bars. How to remove them?

 Future<void> _showDialog(BuildContext context) async {
    return showDialog<void>(
      context: context,
      builder: (BuildContext context) {
        return Center(
          child: Container(
            decoration: BoxDecoration(
                color: Colors.white, borderRadius: BorderRadius.circular(12)),
            margin: const EdgeInsets.all(16),
            padding: const EdgeInsets.all(12),
            child: ListView.builder(
              itemCount: codeCountryList.length,
              shrinkWrap: true,
              itemBuilder: (context, index) {
                return GestureDetector(
                  onTap: () {
                    _indexFlag.value = index;
                    Navigator.pop(context);
                  },
                  child: Padding(
                    padding: const EdgeInsets.only(bottom: 20),
                    child: Container(
                      padding: const EdgeInsets.all(10),
                      child: Row(
                        children: [
                          Image.asset(
                            codeCountryList[index].image,
                            height: 30,
                          ),
                          const SizedBox(width: 20),
                          Text(codeCountryList[index].country,
                              style: StyleTextUtils.textCode),
                          const SizedBox(width: 20),
                          Text(codeCountryList[index].prefix,
                              style: StyleTextUtils.textCode),
                        ],
                      ),
                    ),
                  ),
                );
              },
            ),
          ),
        );
      },
    );
  }

enter image description here

how to get rid of it?

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

>Solution :

try to wrap it in the Material()..

return showDialog<void>(
      context: context,
      builder: (BuildContext context) {
        return Material(
                 child: Center(....
Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading