You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

63 lines
1.7 KiB

11 months ago
import 'package:flutter/material.dart';
import 'package:get/get.dart';
import 'package:music_player_miao/view_model/splash_view_model.dart';
class SplashView extends StatefulWidget {
const SplashView({super.key});
@override
State<SplashView> createState() => _SplashViewState();
}
class _SplashViewState extends State<SplashView> {
final splashVM = Get.put(SplashViewModel());
@override
void initState(){
super.initState();
splashVM.loadView();
}
@override
Widget build(BuildContext context) {
var media = MediaQuery.sizeOf(context);
return Container(
decoration: const BoxDecoration(
image: DecorationImage(
image: AssetImage("assets/img/app_bg.png"),
fit: BoxFit.cover,
),
),
child: Scaffold(
backgroundColor: Colors.transparent,
body: Container(
alignment: Alignment.center,
child: Column(
children: [
const SizedBox(height: 280,),
Image.asset("assets/img/app_logo.png", width: media.width * 0.50,),
const SizedBox(height: 150,),
const Text(
"喵听",
style: TextStyle(
color: Colors.black,
fontSize: 40,
fontWeight: FontWeight.w600
),
),
const Text(
"你的云端音乐库",
style: TextStyle(
color: Colors.black,
fontSize: 16,
fontWeight: FontWeight.w500
),
)
],
),
),
),
);
}
}