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 createState() => _SplashViewState(); } class _SplashViewState extends State { 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 ), ) ], ), ), ), ); } }