@@ -8,35 +8,11 @@ import 'package:catalyst_voices_shared/catalyst_voices_shared.dart';
88import 'package:catalyst_voices_view_models/catalyst_voices_view_models.dart' ;
99import 'package:flutter/material.dart' ;
1010
11- class SetupPanel extends StatelessWidget {
11+ class SetupPanel extends StatefulWidget {
1212 const SetupPanel ({super .key});
1313
1414 @override
15- Widget build (BuildContext context) {
16- return Column (
17- crossAxisAlignment: CrossAxisAlignment .start,
18- children: [
19- const SizedBox (height: 24 ),
20- const _Title (),
21- Expanded (
22- child: FocusScope (
23- child: ListView (
24- padding: const EdgeInsets .symmetric (vertical: 24 ),
25- children: const [
26- _DisplayNameSelector (),
27- SizedBox (height: 24 ),
28- _EmailSelector (),
29- ],
30- ),
31- ),
32- ),
33- const SizedBox (height: 24 ),
34- const _IdeascaleInfoCard (),
35- const SizedBox (height: 24 ),
36- const _NavigationSelector (),
37- ],
38- );
39- }
15+ State <SetupPanel > createState () => _SetupPanelState ();
4016}
4117
4218class _DisplayNameSelector extends StatelessWidget {
@@ -186,6 +162,55 @@ class _NavigationSelector extends StatelessWidget {
186162 }
187163}
188164
165+ class _SetupPanelState extends State <SetupPanel > {
166+ late final ScrollController _scrollController;
167+
168+ @override
169+ Widget build (BuildContext context) {
170+ return Column (
171+ crossAxisAlignment: CrossAxisAlignment .start,
172+ children: [
173+ const SizedBox (height: 24 ),
174+ const _Title (),
175+ Expanded (
176+ child: FocusScope (
177+ child: VoicesScrollbar (
178+ controller: _scrollController,
179+ alwaysVisible: true ,
180+ padding: const EdgeInsets .only (left: 10 ),
181+ child: ListView (
182+ controller: _scrollController,
183+ padding: const EdgeInsets .symmetric (vertical: 24 ),
184+ children: const [
185+ _DisplayNameSelector (),
186+ SizedBox (height: 24 ),
187+ _EmailSelector (),
188+ ],
189+ ),
190+ ),
191+ ),
192+ ),
193+ const SizedBox (height: 24 ),
194+ const _IdeascaleInfoCard (),
195+ const SizedBox (height: 24 ),
196+ const _NavigationSelector (),
197+ ],
198+ );
199+ }
200+
201+ @override
202+ void dispose () {
203+ _scrollController.dispose ();
204+ super .dispose ();
205+ }
206+
207+ @override
208+ void initState () {
209+ super .initState ();
210+ _scrollController = ScrollController ();
211+ }
212+ }
213+
189214class _Title extends StatelessWidget {
190215 const _Title ();
191216
0 commit comments