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

Type 'List<Widget?>' is not a subtype of type 'List<Widget>'

I’m using connectivity_wrapper: ^1.0.6 in flutter application. while passing child to connectivity_wrapper it generates an error type ‘List<Widget?>’ is not a subtype of type ‘List’ in type cast I have googled it but not able to find any solution. and also want to know the difference between List<Widget?> and ‘List.

@override
Widget build(BuildContext context) {
return Scaffold(
  appBar: appBarCustom(
    onBackTap: onBackTab,
    color: Colors.black,
    title: Strings.appName,
    textStyle: TextStyles.appBarBold,
    actions: [
      C0(),
    ],
  ),
  body: ConnectivityWidgetWrapper(
    child: ListView(
      children: <Widget>[
        ListTile(
          title: Text("EX1"),
          onTap: () {

          },
        ),
        Divider(),
        ListTile(
          title: Text("EX@"),
          onTap: () {

          },
        ),
        Divider(),
      ],
    ),
  ),
);
}

Error: type ‘List<Widget?>’ is not a subtype of type ‘List’ in type cast

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 :

there is an issue in github.so track that issue to solve your problem.
it’s all about null safety.

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