merge: 合并 K58 浅色开屏
This commit is contained in:
commit
da549492b0
3 files changed
+20
-12
No files matched your search
@@ -2,6 +2,6 @@
|
|||||||
<!-- Author: fruit.com.cn -->
|
<!-- Author: fruit.com.cn -->
|
||||||
|
|
||||||
<resources>
|
<resources>
|
||||||
<color name="splash_background">#FF100C0A</color>
|
<color name="splash_background">#FFF8F0</color>
|
||||||
<color name="ic_launcher_background">#FFF1E5</color>
|
<color name="ic_launcher_background">#FFF1E5</color>
|
||||||
</resources>
|
</resources>
|
||||||
@@ -7,8 +7,7 @@ import 'package:flutter/services.dart';
|
|||||||
|
|
||||||
import '../../core/theme/app_colors.dart';
|
import '../../core/theme/app_colors.dart';
|
||||||
|
|
||||||
const Color _splashBackground = Color(0xFF100C0A);
|
const Color _markGlow = Color(0x33FF7A1A);
|
||||||
const Color _markGlow = Color(0x40FF7A1A);
|
|
||||||
const double _markSize = 112;
|
const double _markSize = 112;
|
||||||
const double _markRadius = 24;
|
const double _markRadius = 24;
|
||||||
const double _logoGlowSize = 144;
|
const double _logoGlowSize = 144;
|
||||||
@@ -18,7 +17,7 @@ const double _loaderStroke = 2;
|
|||||||
const String _markAsset = 'assets/icon/splash_mark.png';
|
const String _markAsset = 'assets/icon/splash_mark.png';
|
||||||
const Duration _introDuration = Duration(milliseconds: 1200);
|
const Duration _introDuration = Duration(milliseconds: 1200);
|
||||||
|
|
||||||
/// 品牌开屏:深暖底上依次呈现水果标记、FruitShorts 与中文标语。
|
/// 品牌开屏:浅暖底上依次呈现水果标记、FruitShorts 与中文标语。
|
||||||
class SplashPage extends StatefulWidget {
|
class SplashPage extends StatefulWidget {
|
||||||
const SplashPage({super.key});
|
const SplashPage({super.key});
|
||||||
|
|
||||||
@@ -75,10 +74,10 @@ class _SplashPageState extends State<SplashPage>
|
|||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return AnnotatedRegion<SystemUiOverlayStyle>(
|
return AnnotatedRegion<SystemUiOverlayStyle>(
|
||||||
value: SystemUiOverlayStyle.light,
|
value: SystemUiOverlayStyle.dark,
|
||||||
child: ColoredBox(
|
child: ColoredBox(
|
||||||
key: const Key('splash-screen'),
|
key: const Key('splash-screen'),
|
||||||
color: _splashBackground,
|
color: AppColors.ink,
|
||||||
child: Stack(
|
child: Stack(
|
||||||
fit: StackFit.expand,
|
fit: StackFit.expand,
|
||||||
children: [
|
children: [
|
||||||
@@ -178,7 +177,7 @@ class _SplashPageState extends State<SplashPage>
|
|||||||
'FruitShorts',
|
'FruitShorts',
|
||||||
key: Key('splash-brand'),
|
key: Key('splash-brand'),
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
color: Colors.white,
|
color: AppColors.onSurface,
|
||||||
fontSize: 28,
|
fontSize: 28,
|
||||||
fontWeight: FontWeight.w900,
|
fontWeight: FontWeight.w900,
|
||||||
fontFamily: 'Outfit',
|
fontFamily: 'Outfit',
|
||||||
@@ -202,7 +201,7 @@ class _SplashPageState extends State<SplashPage>
|
|||||||
'水果短剧',
|
'水果短剧',
|
||||||
key: Key('splash-tagline'),
|
key: Key('splash-tagline'),
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
color: Colors.white70,
|
color: AppColors.muted,
|
||||||
fontSize: 13,
|
fontSize: 13,
|
||||||
letterSpacing: 4,
|
letterSpacing: 4,
|
||||||
),
|
),
|
||||||
|
|||||||
@@ -9,6 +9,7 @@ import 'package:fruitshorts/core/data/models/drama.dart';
|
|||||||
import 'package:fruitshorts/core/data/models/home_feed.dart';
|
import 'package:fruitshorts/core/data/models/home_feed.dart';
|
||||||
import 'package:fruitshorts/core/data/repositories/catalog_repository.dart';
|
import 'package:fruitshorts/core/data/repositories/catalog_repository.dart';
|
||||||
import 'package:fruitshorts/core/data/services/catalog_controller.dart';
|
import 'package:fruitshorts/core/data/services/catalog_controller.dart';
|
||||||
|
import 'package:fruitshorts/core/theme/app_colors.dart';
|
||||||
import 'package:fruitshorts/l10n/app_localizations.dart';
|
import 'package:fruitshorts/l10n/app_localizations.dart';
|
||||||
import 'package:fruitshorts/pages/home/home_view.dart';
|
import 'package:fruitshorts/pages/home/home_view.dart';
|
||||||
import 'package:fruitshorts/pages/splash/splash_page.dart';
|
import 'package:fruitshorts/pages/splash/splash_page.dart';
|
||||||
@@ -68,16 +69,24 @@ void main() {
|
|||||||
final glowGradient = (glow.decoration as BoxDecoration).gradient;
|
final glowGradient = (glow.decoration as BoxDecoration).gradient;
|
||||||
expect(
|
expect(
|
||||||
(glowGradient as RadialGradient).colors.first,
|
(glowGradient as RadialGradient).colors.first,
|
||||||
const Color(0x40FF7A1A),
|
const Color(0x33FF7A1A),
|
||||||
);
|
);
|
||||||
expect(
|
expect(
|
||||||
tester.widget<ColoredBox>(find.byKey(const Key('splash-screen'))).color,
|
tester.widget<ColoredBox>(find.byKey(const Key('splash-screen'))).color,
|
||||||
const Color(0xFF100C0A),
|
AppColors.ink,
|
||||||
|
);
|
||||||
|
expect(
|
||||||
|
tester.widget<Text>(find.byKey(const Key('splash-brand'))).style?.color,
|
||||||
|
AppColors.onSurface,
|
||||||
|
);
|
||||||
|
expect(
|
||||||
|
tester.widget<Text>(find.byKey(const Key('splash-tagline'))).style?.color,
|
||||||
|
AppColors.muted,
|
||||||
);
|
);
|
||||||
final overlay = tester.widget<AnnotatedRegion<SystemUiOverlayStyle>>(
|
final overlay = tester.widget<AnnotatedRegion<SystemUiOverlayStyle>>(
|
||||||
find.byType(AnnotatedRegion<SystemUiOverlayStyle>).first,
|
find.byType(AnnotatedRegion<SystemUiOverlayStyle>).first,
|
||||||
);
|
);
|
||||||
expect(overlay.value.statusBarIconBrightness, Brightness.light);
|
expect(overlay.value.statusBarIconBrightness, Brightness.dark);
|
||||||
|
|
||||||
await tester.pump(const Duration(milliseconds: 1200));
|
await tester.pump(const Duration(milliseconds: 1200));
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user