import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:huixiang/generated/l10n.dart'; import 'package:huixiang/utils/font_weight.dart'; import 'package:huixiang/view_widget/border_text.dart'; import 'package:shared_preferences/shared_preferences.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; class StartPage extends StatefulWidget { final bool isFirst; StartPage(this.isFirst); @override State createState() { return _StartPage(); } } class _StartPage extends State { @override Widget build(BuildContext context) { return Container( color: Colors.white, width: double.infinity, height: double.infinity, child: Image.asset( "assets/image/ic_splash_bg.webp", width: double.infinity, height: double.infinity, // fit: BoxFit.cover, ), ); } @override void initState() { super.initState(); Future.delayed(Duration(seconds:3), () { Navigator.of(context).popAndPushNamed((widget.isFirst ?? true) ? '/router/guide_Page' : '/router/new_login_page'); }); } }