closeBackButton function

Align closeBackButton(
  1. BuildContext context, {
  2. dynamic hasBackground = false,
})

Implementation

Align closeBackButton(BuildContext context,{hasBackground = false}) {
  return Align(alignment: Alignment.centerRight,
    child: Padding(
      padding: const EdgeInsets.only(right: 15,top: 35),
      child: GestureDetector(
        onTap: () {
          pageBack();
        },
        child: Container(
          height: 36,width: 36,
          decoration: BoxDecoration(
              color: hasBackground ? Colors.black26 : Colors.transparent,
              shape: BoxShape.circle
          ),
          child: const Icon(Icons.close),
        ),
      ),
    ),
  );
}