76 lines
1.9 KiB
Dart
76 lines
1.9 KiB
Dart
import 'package:flutter/material.dart';
|
|
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
|
import 'package:get/get.dart';
|
|
import 'package:wallpaperx/generated/assets.dart';
|
|
import 'package:wallpaperx/page/splash_screen/splash_screen_controller.dart';
|
|
import 'package:wallpaperx/res/values/strings.dart';
|
|
|
|
class SplashScreenView extends GetView<SplashScreenController> {
|
|
const SplashScreenView({super.key});
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
Get.find<SplashScreenController>();
|
|
return Scaffold(
|
|
body: Stack(
|
|
children: [
|
|
_buildIconName(),
|
|
_buildProgress(),
|
|
],
|
|
),
|
|
);
|
|
}
|
|
|
|
Widget _buildIconName() {
|
|
return Center(
|
|
child: Column(
|
|
mainAxisAlignment: MainAxisAlignment.center,
|
|
children: [
|
|
Image.asset(
|
|
Assets.iconIconApp,
|
|
width: 96.w,
|
|
height: 96.w,
|
|
),
|
|
SizedBox(height: 20.h),
|
|
Text(
|
|
appName,
|
|
style: TextStyle(
|
|
color: Colors.black87,
|
|
fontSize: 22.sp,
|
|
fontWeight: FontWeight.w600,
|
|
),
|
|
),
|
|
],
|
|
),
|
|
);
|
|
}
|
|
|
|
Widget _buildProgress() {
|
|
return Container(
|
|
alignment: Alignment.center,
|
|
margin: const EdgeInsets.only(bottom: 60).h,
|
|
child: Column(
|
|
mainAxisAlignment: MainAxisAlignment.end,
|
|
children: [
|
|
SizedBox(
|
|
width: 0.5.sw,
|
|
child: LinearProgressIndicator(
|
|
backgroundColor: Colors.grey,
|
|
valueColor: const AlwaysStoppedAnimation<Color>(Colors.white),
|
|
borderRadius: BorderRadius.circular(8).r,
|
|
),
|
|
),
|
|
SizedBox(height: 14.h),
|
|
Text(
|
|
'Resource Loading...',
|
|
style: TextStyle(
|
|
color: Colors.white,
|
|
fontSize: 12.sp,
|
|
),
|
|
),
|
|
],
|
|
),
|
|
);
|
|
}
|
|
}
|