66 lines
1.7 KiB
Dart
66 lines
1.7 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/launch/launch_controller.dart';
|
|
|
|
class LaunchView extends StatelessWidget {
|
|
LaunchView({super.key});
|
|
|
|
final controller = Get.find<LaunchController>();
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return Scaffold(
|
|
body: Stack(
|
|
children: [
|
|
_buildImageBg(),
|
|
_buildProgress(),
|
|
],
|
|
),
|
|
);
|
|
}
|
|
|
|
Widget _buildImageBg() {
|
|
return Image.asset(
|
|
Assets.imagesSplashBackground,
|
|
width: 1.sw,
|
|
height: 1.sh,
|
|
fit: BoxFit.cover,
|
|
);
|
|
}
|
|
|
|
Widget _buildProgress() {
|
|
return Container(
|
|
alignment: Alignment.center,
|
|
margin: const EdgeInsets.only(bottom: 60).h,
|
|
child: Column(
|
|
mainAxisAlignment: MainAxisAlignment.end,
|
|
children: [
|
|
SizedBox(
|
|
width: 0.6.sw,
|
|
child: Obx(() {
|
|
return LinearProgressIndicator(
|
|
value: controller.currentProcess.value / controller.timeTotal,
|
|
valueColor: const AlwaysStoppedAnimation<Color>(Color(0xff32ABD1)),
|
|
backgroundColor: const Color(0xff32ABD1).withOpacity(0.2),
|
|
borderRadius: BorderRadius.circular(8).r,
|
|
minHeight: 6.h,
|
|
);
|
|
}),
|
|
),
|
|
SizedBox(height: 10.h),
|
|
Text(
|
|
'Resource Loading...',
|
|
style: TextStyle(
|
|
color: Colors.white,
|
|
fontSize: 12.sp,
|
|
fontWeight: FontWeight.w500,
|
|
),
|
|
),
|
|
],
|
|
),
|
|
);
|
|
}
|
|
}
|