import 'package:flutter/material.dart';

class SplashScreen extends StatelessWidget {
  int duration = 0;
  Widget goToPage;

  SplashScreen({Key? key, required this.duration, required this.goToPage})
      : super(key: key);

  @override
  Widget build(BuildContext context) {
    Future.delayed(Duration(seconds: duration), () {
      Navigator.push(
          context, MaterialPageRoute(builder: (context) => goToPage));
    });

    return Scaffold(
      body: Container(
        color: Colors.cyan,
        alignment: Alignment.center,
        child: Image.asset("images/logo.png"),
        // child: const IconFont(
        //   color: Colors.white,
        //   size: 100,
        //   iconName: 'a',
        // ),
      ),
    );
  }
}
