@@ -1582,8 +1582,9 @@ steps:
1582
1582
return ListenableBuilder(
1583
1583
listenable: _heartbeatAnim,
1584
1584
builder: (_, __) {
1585
- final heartbeatEnergy =
1586
- _heartbeatAnim.drive(_heartbeatSequence).value;
1585
+ final heartbeatEnergy = _heartbeatAnim
1586
+ .drive(_heartbeatSequence)
1587
+ .value;
1587
1588
return TweenAnimationBuilder(
1588
1589
tween: Tween<double>(
1589
1590
begin: widget.minEnergy,
@@ -2566,7 +2567,7 @@ steps:
2566
2567
patch-u: |
2567
2568
--- b/next-gen-ui/step_04_c/lib/title_screen/title_screen_ui.dart
2568
2569
+++ a/next-gen-ui/step_04_c/lib/title_screen/title_screen_ui.dart
2569
- @@ -228,33 +228,40 @@ class _StartBtnState extends State<_StartBtn> {
2570
+ @@ -228,33 +228,41 @@ class _StartBtnState extends State<_StartBtn> {
2570
2571
}
2571
2572
_wasHovered = (state.isHovered || state.isFocused);
2572
2573
return SizedBox(
@@ -2589,43 +2590,45 @@ steps:
2589
2590
- style: TextStyles.btn.copyWith(
2590
2591
- fontSize: 24,
2591
2592
- letterSpacing: 18,
2592
- + width: 520,
2593
- + height: 100,
2594
- + child: Stack(
2595
- + children: [
2596
- + Positioned.fill(
2597
- + child: Image.asset(AssetPaths.titleStartBtn),
2598
- ),
2593
+ - ),
2599
2594
- ),
2600
2595
- ],
2601
2596
- ),
2602
2597
- ),
2603
2598
- ],
2604
2599
- ),
2605
2600
- );
2606
- + if (state.isHovered || state.isFocused) ...[
2607
- + Positioned.fill(
2608
- + child: Image.asset(AssetPaths.titleStartBtnHover),
2609
- + ),
2610
- + ],
2611
- + Center(
2612
- + child: Row(
2613
- + mainAxisAlignment: MainAxisAlignment.end,
2614
- + children: [
2615
- + Text(
2616
- + 'START MISSION',
2617
- + style: TextStyles.btn.copyWith(
2618
- + fontSize: 24,
2619
- + letterSpacing: 18,
2620
- + ),
2601
+ + width: 520,
2602
+ + height: 100,
2603
+ + child:
2604
+ + Stack(
2605
+ + children: [
2606
+ + Positioned.fill(
2607
+ + child: Image.asset(AssetPaths.titleStartBtn),
2608
+ + ),
2609
+ + if (state.isHovered || state.isFocused) ...[
2610
+ + Positioned.fill(
2611
+ + child: Image.asset(AssetPaths.titleStartBtnHover),
2621
2612
+ ),
2622
2613
+ ],
2623
- + ),
2624
- + ),
2625
- + ],
2626
- + )
2627
- + .animate(autoPlay: false, onInit: (c) => _btnAnim = c)
2628
- + .shimmer(duration: .7.seconds, color: Colors.black),
2614
+ + Center(
2615
+ + child: Row(
2616
+ + mainAxisAlignment: MainAxisAlignment.end,
2617
+ + children: [
2618
+ + Text(
2619
+ + 'START MISSION',
2620
+ + style: TextStyles.btn.copyWith(
2621
+ + fontSize: 24,
2622
+ + letterSpacing: 18,
2623
+ + ),
2624
+ + ),
2625
+ + ],
2626
+ + ),
2627
+ + ),
2628
+ + ],
2629
+ + )
2630
+ + .animate(autoPlay: false, onInit: (c) => _btnAnim = c)
2631
+ + .shimmer(duration: .7.seconds, color: Colors.black),
2629
2632
+ )
2630
2633
+ .animate()
2631
2634
+ .fadeIn(delay: 2.3.seconds)
@@ -2655,7 +2658,7 @@ steps:
2655
2658
patch-u: |
2656
2659
--- b/next-gen-ui/step_04_d/lib/title_screen/title_screen_ui.dart
2657
2660
+++ a/next-gen-ui/step_04_d/lib/title_screen/title_screen_ui.dart
2658
- @@ -169,10 +169,17 @@ class _DifficultyBtn extends StatelessWidget {
2661
+ @@ -169,10 +169,16 @@ class _DifficultyBtn extends StatelessWidget {
2659
2662
child: Stack(
2660
2663
children: [
2661
2664
/// Bg with fill and outline
@@ -2664,10 +2667,9 @@ steps:
2664
2667
- color: const Color(0xFF00D1FF).withAlpha(25),
2665
2668
- border: Border.all(color: Colors.white, width: 5),
2666
2669
+ AnimatedOpacity(
2667
- + opacity:
2668
- + (!selected && (state.isHovered || state.isFocused))
2669
- + ? 1
2670
- + : 0,
2670
+ + opacity: (!selected && (state.isHovered || state.isFocused))
2671
+ + ? 1
2672
+ + : 0,
2671
2673
+ duration: .3.seconds,
2672
2674
+ child: Container(
2673
2675
+ decoration: BoxDecoration(
@@ -3069,7 +3071,7 @@ steps:
3069
3071
Color get _emitColor =>
3070
3072
AppColors.emitColors[_difficultyOverride ?? _difficulty];
3071
3073
Color get _orbColor =>
3072
- @@ -27,88 +48,190 @@ class _TitleScreenState extends State<TitleScreen> {
3074
+ @@ -27,88 +48,189 @@ class _TitleScreenState extends State<TitleScreen> {
3073
3075
3074
3076
/// Currently focused difficulty (if any)
3075
3077
int? _difficultyOverride;
@@ -3259,10 +3261,9 @@ steps:
3259
3261
+ materialColor: orbColor,
3260
3262
+ lightColor: orbColor,
3261
3263
+ ),
3262
- + onUpdate:
3263
- + (energy) => setState(() {
3264
- + _orbEnergy = energy;
3265
- + }),
3264
+ + onUpdate: (energy) => setState(() {
3265
+ + _orbEnergy = energy;
3266
+ + }),
3266
3267
+ ),
3267
3268
+ ],
3268
3269
+ ),
@@ -3327,7 +3328,7 @@ steps:
3327
3328
),
3328
3329
),
3329
3330
);
3330
- @@ -119,19 +242 ,26 @@ class _LitImage extends StatelessWidget {
3331
+ @@ -119,19 +241 ,26 @@ class _LitImage extends StatelessWidget {
3331
3332
const _LitImage({
3332
3333
required this.color,
3333
3334
required this.imgSrc,
@@ -3460,7 +3461,7 @@ steps:
3460
3461
import 'title_screen_ui.dart';
3461
3462
3462
3463
class TitleScreen extends StatefulWidget {
3463
- @@ -200 ,6 +201 ,16 @@ class _TitleScreenState extends State<TitleScreen>
3464
+ @@ -199 ,6 +200 ,16 @@ class _TitleScreenState extends State<TitleScreen>
3464
3465
lightAmt: _finalEmitLightAmt,
3465
3466
),
3466
3467
0 commit comments