import 'package:flutter/material.dart'; import 'package:testmoduleb_1/Login.dart'; import 'homepage.dart'; class Welcome extends StatefulWidget { const Welcome({super.key}); @override State createState() => _WelcomeState(); } class _WelcomeState extends State { @override Widget build(BuildContext context) { return Scaffold( body: Container( decoration: BoxDecoration( image: DecorationImage( image: AssetImage("lib/image/image_1.jpg"), fit: BoxFit.cover)), child: Column( mainAxisAlignment: MainAxisAlignment.center, children: [ Center( child: Image.asset( "lib/image/logo.png", height: 150, width: 150, fit: BoxFit.cover, )), Container( height: 280, width: 260, margin: EdgeInsets.symmetric(vertical: 16,horizontal: 16), padding: EdgeInsets.symmetric(vertical: 16), alignment: Alignment.center, decoration: BoxDecoration( borderRadius: BorderRadius.circular(16), color: Colors.black54, ), child: Column( mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ Padding( padding: const EdgeInsets.all(8.0), child: Text( "join us\nright now", textAlign: TextAlign.center, style: TextStyle( fontSize: 34, fontWeight: FontWeight.w500, color: Colors.white), ), ), Spacer(), SizedBox( width: 200, child: ElevatedButton( onPressed: ()=>Navigator.of(context).push(MaterialPageRoute(builder: (c)=>HomePage())), style: ElevatedButton.styleFrom( backgroundColor: Colors.amber), child: Text("Login", style: TextStyle( fontSize: 14, fontWeight: FontWeight.w500, color: Colors.white)), ), ), Padding( padding: const EdgeInsets.symmetric(horizontal: 16), child: Row( children: [ Expanded( child: Divider( color: Colors.white, thickness: 2, )), Padding( padding: const EdgeInsets.all(8.0), child: Text( "or", style: TextStyle(color: Colors.white), ), ), Expanded( child: Divider( color: Colors.white, thickness: 2, )), ], ), ), SizedBox( width: 200, child: ElevatedButton( onPressed: ()=>Navigator.of(context).push(MaterialPageRoute(builder: (c)=>Login())), style: ElevatedButton.styleFrom( backgroundColor: Colors.white), child: Text("Register", style: TextStyle( fontSize: 14, fontWeight: FontWeight.w500, color: Colors.amber)), ), ) ], )) ], ))); } }