import 'package:flutter/material.dart'; import 'package:teso/util/SizeConfig.dart'; class FirstTimeIntro extends StatefulWidget { const FirstTimeIntro({Key key}) : super(key: key); @override _FirstTimeIntroState createState() => _FirstTimeIntroState(); } class _FirstTimeIntroState extends State { @override Widget build(BuildContext context) { return Scaffold( backgroundColor: Colors.transparent, extendBodyBehindAppBar: false, appBar: AppBar( automaticallyImplyLeading: false, toolbarHeight: 05, backgroundColor: Colors.transparent, ), body: GestureDetector( onPanUpdate: (details) { // Swiping in right direction. if (details.delta.dx > 0) { Navigator.pop(context, 0); } // Swiping in left direction. if (details.delta.dx < 0) { Navigator.pop(context, 2); } }, onTap: () => Navigator.pop(context, 1), child: Container( width: SizeConfig.blockSizeHorizontal * 100, height: SizeConfig.blockSizeVertical * 100, child: Image.asset( "assets/images/firstTime.png", fit: BoxFit.fitHeight, ), ), ), ); } }