@@ -66,88 +66,93 @@ class _IslandMapShareDialogState extends State<IslandMapShareDialog>
6666 }
6767
6868 @override
69- Widget build (BuildContext context) => AudioControlListener (
70- key: const Key ('island_map_share_dialog_success_audio_player' ),
71- audioPlayer: _successAudioPlayer,
69+ Widget build (BuildContext context) => SizedBox (
70+ height: 700 ,
7271 child: AudioControlListener (
73- key: const Key ('island_map_share_dialog_click_audio_player' ),
74- audioPlayer: _clickAudioPlayer,
75- child: ResponsiveLayoutBuilder (
76- small: (_, child) => child! ,
77- medium: (_, child) => child! ,
78- child: (currentSize) {
79- final padding = currentSize == ResponsiveLayoutSize .medium
80- ? const EdgeInsets .fromLTRB (48 , 54 , 48 , 53 )
81- : const EdgeInsets .fromLTRB (20 , 99 , 20 , 76 );
72+ key: const Key ('island_map_share_dialog_success_audio_player' ),
73+ audioPlayer: _successAudioPlayer,
74+ child: AudioControlListener (
75+ key: const Key ('island_map_share_dialog_click_audio_player' ),
76+ audioPlayer: _clickAudioPlayer,
77+ child: ResponsiveLayoutBuilder (
78+ small: (_, child) => child! ,
79+ medium: (_, child) => child! ,
80+ child: (currentSize) {
81+ final padding = currentSize == ResponsiveLayoutSize .medium
82+ ? const EdgeInsets .fromLTRB (48 , 54 , 48 , 53 )
83+ : const EdgeInsets .fromLTRB (20 , 99 , 20 , 76 );
8284
83- final closeIconOffset = currentSize == ResponsiveLayoutSize .medium
84- ? const Offset (25 , 28 )
85- : const Offset (17 , 63 );
85+ final closeIconOffset =
86+ currentSize == ResponsiveLayoutSize .medium
87+ ? const Offset (25 , 28 )
88+ : const Offset (17 , 63 );
8689
87- return Stack (
88- key: const Key ('island_map_share_dialog' ),
89- children: [
90- SingleChildScrollView (
91- child: LayoutBuilder (
92- builder: (context, constraints) => SizedBox (
93- width: constraints.maxWidth,
94- child: Padding (
95- padding: padding,
96- child: IslandMapShareDialogAnimatedBuilder (
97- animation: _controller,
98- builder: (context, child, animation) => Column (
99- mainAxisSize: MainAxisSize .min,
100- children: [
101- SlideTransition (
102- position: animation.scoreOffset,
103- child: Opacity (
104- opacity: animation.scoreOpacity.value,
105- child: const IslandMapScore (),
90+ return Stack (
91+ alignment: Alignment .center,
92+ key: const Key ('island_map_share_dialog' ),
93+ children: [
94+ SingleChildScrollView (
95+ child: LayoutBuilder (
96+ builder: (context, constraints) => SizedBox (
97+ width: constraints.maxWidth,
98+ child: Padding (
99+ padding: padding,
100+ child: IslandMapShareDialogAnimatedBuilder (
101+ animation: _controller,
102+ builder: (context, child, animation) => Column (
103+ mainAxisSize: MainAxisSize .min,
104+ children: [
105+ SlideTransition (
106+ position: animation.scoreOffset,
107+ child: Opacity (
108+ opacity: animation.scoreOpacity.value,
109+ child: const IslandMapScore (),
110+ ),
106111 ),
107- ),
108- const ResponsiveGap (small : 32 , medium : 32 ),
109- IslandMapShareYourScore (
110- animation : animation ,
111- ) ,
112- ] ,
112+ const ResponsiveGap (small : 32 , medium : 32 ),
113+ IslandMapShareYourScore (
114+ animation : animation,
115+ ) ,
116+ ] ,
117+ ) ,
113118 ),
114119 ),
115120 ),
116121 ),
117122 ),
118- ),
119- Align (
120- alignment : Alignment .topCenter,
121- child : ConfettiWidget (
122- confettiController : _confettiController ,
123- blastDirectionality : BlastDirectionality .explosive ,
124- shouldLoop : true ,
123+ Align (
124+ alignment : Alignment .topCenter,
125+ child : ConfettiWidget (
126+ confettiController : _confettiController,
127+ blastDirectionality : BlastDirectionality .explosive ,
128+ shouldLoop : true ,
129+ ) ,
125130 ),
126- ),
127- Positioned (
128- right: closeIconOffset.dx,
129- top: closeIconOffset.dy,
130- child: IconButton (
131- key: const Key ('island_map_share_dialog_close_button' ),
132- splashColor: Colors .transparent,
133- highlightColor: Colors .transparent,
134- hoverColor: Colors .transparent,
135- padding: EdgeInsets .zero,
136- constraints: const BoxConstraints (),
137- iconSize: 18 ,
138- icon: const Icon (
139- Icons .close,
140- color: PuzzleColors .black,
131+ Positioned (
132+ right: closeIconOffset.dx,
133+ top: closeIconOffset.dy,
134+ child: IconButton (
135+ key: const Key ('island_map_share_dialog_close_button' ),
136+ splashColor: Colors .transparent,
137+ highlightColor: Colors .transparent,
138+ hoverColor: Colors .transparent,
139+ padding: EdgeInsets .zero,
140+ constraints: const BoxConstraints (),
141+ iconSize: 18 ,
142+ icon: const Icon (
143+ Icons .close,
144+ color: PuzzleColors .black,
145+ ),
146+ onPressed: () {
147+ unawaited (_clickAudioPlayer.play ());
148+ Navigator .of (context).pop ();
149+ },
141150 ),
142- onPressed: () {
143- unawaited (_clickAudioPlayer.play ());
144- Navigator .of (context).pop ();
145- },
146151 ),
147- ) ,
148- ],
149- );
150- } ,
152+ ] ,
153+ );
154+ },
155+ ) ,
151156 ),
152157 ),
153158 );
0 commit comments