feat: procedural season background with drifting petals

This commit is contained in:
2026-06-11 21:17:12 +09:00
parent d283bf6959
commit 6e4d3b60df
5 changed files with 222 additions and 45 deletions
+9
View File
@@ -0,0 +1,9 @@
import 'dart:async';
import 'package:block_seasons/ui/widgets/season_background.dart';
Future<void> testExecutable(FutureOr<void> Function() testMain) async {
// Looping ambience animations never settle under pumpAndSettle.
debugDisableLoopingAnimations = true;
await testMain();
}
Binary file not shown.

Before

Width:  |  Height:  |  Size: 31 KiB

After

Width:  |  Height:  |  Size: 41 KiB

+25
View File
@@ -0,0 +1,25 @@
import 'package:block_seasons/game/models/season.dart';
import 'package:block_seasons/ui/widgets/season_background.dart';
import 'package:flutter/material.dart';
import 'package:flutter_test/flutter_test.dart';
void main() {
testWidgets('renders and settles with looping animations disabled',
(tester) async {
await tester.pumpWidget(const MaterialApp(
home: SeasonBackground(theme: SeasonTheme.fallback),
));
await tester.pumpAndSettle();
expect(find.byType(SeasonBackground), findsOneWidget);
});
testWidgets('particleType none still renders', (tester) async {
await tester.pumpWidget(const MaterialApp(
home: SeasonBackground(
theme: SeasonTheme(particleType: 'none'),
),
));
await tester.pumpAndSettle();
expect(find.byType(CustomPaint), findsWidgets);
});
}