43 lines
1.1 KiB
Dart
43 lines
1.1 KiB
Dart
import 'package:flutter/material.dart';
|
|
import 'package:testmoduleb_1/welcome.dart';
|
|
|
|
void main(){
|
|
runApp(
|
|
MaterialApp(
|
|
home: StartGame(),
|
|
debugShowCheckedModeBanner: false,
|
|
));
|
|
}
|
|
|
|
|
|
class StartGame extends StatefulWidget {
|
|
const StartGame({super.key});
|
|
|
|
@override
|
|
State<StartGame> createState() => _StartGameState();
|
|
}
|
|
|
|
class _StartGameState extends State<StartGame> {
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return Scaffold(
|
|
body: Container(
|
|
decoration: BoxDecoration(
|
|
image:DecorationImage(
|
|
image: AssetImage("lib/image/image_1.jpg"),
|
|
fit: BoxFit.cover
|
|
)
|
|
),
|
|
child: Center(
|
|
child: Image.asset("lib/image/logo.png",height: 150,width: 150,fit: BoxFit.cover,)
|
|
)
|
|
),
|
|
floatingActionButton: FloatingActionButton(
|
|
backgroundColor: Colors.white,
|
|
child: Text("Skip",style: TextStyle(fontSize: 14,color: Colors.brown),),
|
|
onPressed: ()=>Navigator.of(context).push(MaterialPageRoute(builder: (c)=>Welcome())),
|
|
),
|
|
);
|
|
}
|
|
}
|