54 lines
1.5 KiB
Dart
54 lines
1.5 KiB
Dart
// Author: fruit.com.cn
|
|
|
|
import 'package:flutter/material.dart';
|
|
|
|
import '../../core/theme/app_colors.dart';
|
|
|
|
const double _markSize = 84;
|
|
const double _markRadius = 18;
|
|
const double _loaderSize = 22;
|
|
const double _loaderStroke = 2.5;
|
|
const String _markAsset = 'assets/icon/splash_mark.png';
|
|
|
|
/// 系统开屏已经放好同一块底和图标。这一页接上加载,直到首页数据回来。
|
|
class SplashPage extends StatelessWidget {
|
|
const SplashPage({super.key});
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return ColoredBox(
|
|
key: Key('splash-screen'),
|
|
color: AppColors.ink,
|
|
child: Stack(
|
|
fit: StackFit.expand,
|
|
children: [
|
|
Center(
|
|
child: ClipRRect(
|
|
borderRadius: BorderRadius.circular(_markRadius),
|
|
child: const Image(
|
|
image: AssetImage(_markAsset),
|
|
width: _markSize,
|
|
height: _markSize,
|
|
filterQuality: FilterQuality.medium,
|
|
gaplessPlayback: true,
|
|
),
|
|
),
|
|
),
|
|
Align(
|
|
alignment: Alignment(0, 0.24),
|
|
child: SizedBox(
|
|
width: _loaderSize,
|
|
height: _loaderSize,
|
|
child: CircularProgressIndicator(
|
|
key: Key('splash-loading'),
|
|
strokeWidth: _loaderStroke,
|
|
color: AppColors.gold,
|
|
),
|
|
),
|
|
),
|
|
],
|
|
),
|
|
);
|
|
}
|
|
}
|