Usage

SwipeEffect(
      color: Colors.cyanAccent.withAlpha(50),
      callback: () {
        Navigator.pop(context);
      },
      child: Scaffold(
        appBar: AppBar(
          title: Text(widget.title),
        ),
        floatingActionButton: FloatingActionButton(
          onPressed: () {
            Navigator.pushNamed(context, 'second');
          },
          child: const Icon(Icons.arrow_forward_rounded),
        ),
      ),
    );

Libraries

swipe_effect