Hi I'm trying to use aligned_dialog package from flutter to show certain dialog for my button in my separated class but it show argument type error co-related to the builder. How can I fix this ?
error: The argument type 'BuildContext' can't be assigned to the parameter type 'Widget Function(BuildContext)'. (argument_type_not_assignable at [tiket_kerja] lib\widgets\reusable_role_container.dart:172)
Here's my code:
GestureDetector(
onTap: (){
showAlignedDialog(
context: context,
builder: context,
followerAnchor: Alignment.topLeft,
targetAnchor: Alignment.bottomRight,
barrierColor: Colors.transparent,
avoidOverflow: true,
);
},
child: Container(
width: 20,
height: 20,
child: SvgPicture.asset(
'assets/logo/Information.svg',
),
),
),
I tried to use this.context but it still show the error. Can someone please explain the problem please ? Is it related to the stateless widget and not stateful ?