I'm using GetX for bottom sheet purpose. i used this below code to implement the functionality. when i press the (i)-info icon i want the bottom sheet to pop-up but instead i'm getting this error.
The following _CastError was thrown while handling a gesture: Null check operator used on a null value
This is the code:
GestureDetector(
onTap:(){
Get.bottomSheet(
Container(
child: Wrap(
children:<Widget>[
ListTile(
leading: Icon(Icons.wb_incandescent),
title: Text("Testing"),
onTap: () => {Get.changeTheme(ThemeData.light())},
),
ListTile(
leading: Icon(Icons.wb_incandescent),
title: Text("Testing"),
onTap: () => {Get.changeTheme(ThemeData.dark())},
),
]
),
),
);
},
child: Container(
width: 30.0,
height: 30.0,
decoration: BoxDecoration(
color: Color(0xFF1D265F),
borderRadius: BorderRadius.circular(80.0),
),
child: new LayoutBuilder(
builder: (context, constraint) {
return new Icon(
Icons.info_outline_rounded,
color: widget.cardContent.cardColor,
size: constraint.biggest.height,
);
},
),
),
),