@@ -141,49 +141,51 @@ class DisconnectObserverState extends State<DisconnectObserver>
141141 currentDisconnectedOverlay = OverlayEntry (
142142 builder: (context) => Positioned .fill (
143143 child: Material (
144- color: theme.colorScheme.surface,
145- child: MultiValueListenableBuilder (
146- listenables: [_isReconnecting, _reconnectErrorText],
147- builder: (context, values, _) {
148- final isReconnecting = values.first as bool ;
149- final reconnectErrorText = values[1 ] as String ? ;
150- return Center (
151- child: Column (
152- children: [
153- const Spacer (),
154- Text ('Disconnected' , style: theme.textTheme.headlineMedium),
155- const SizedBox (height: defaultSpacing),
156- if (isReconnecting)
157- const CircularProgressIndicator ()
158- else
159- _ReconnectActions (
160- theme: theme,
161- onReconnect: _attemptReconnect,
162- routerDelegate: widget.routerDelegate,
163- onConnectToNewApp: hideDisconnectedOverlay,
164- ),
165- if (reconnectErrorText case final error? ) ...[
166- const SizedBox (height: denseSpacing),
167- Text (
168- error,
169- style: theme.regularTextStyle.copyWith (
170- color: theme.colorScheme.error,
144+ child: Container (
145+ color: theme.colorScheme.surface,
146+ child: MultiValueListenableBuilder (
147+ listenables: [_isReconnecting, _reconnectErrorText],
148+ builder: (context, values, _) {
149+ final isReconnecting = values.first as bool ;
150+ final reconnectErrorText = values[1 ] as String ? ;
151+ return Center (
152+ child: Column (
153+ children: [
154+ const Spacer (),
155+ Text ('Disconnected' , style: theme.textTheme.headlineMedium),
156+ const SizedBox (height: defaultSpacing),
157+ if (isReconnecting)
158+ const CircularProgressIndicator ()
159+ else
160+ _ReconnectActions (
161+ theme: theme,
162+ onReconnect: _attemptReconnect,
163+ routerDelegate: widget.routerDelegate,
164+ onConnectToNewApp: hideDisconnectedOverlay,
171165 ),
172- textAlign: TextAlign .center,
173- ),
174- ],
175- const Spacer (),
176- if (offlineDataController.offlineDataJson.isNotEmpty) ...[
177- ElevatedButton (
178- onPressed: _reviewHistory,
179- child: const Text ('Review recent data (offline)' ),
180- ),
166+ if (reconnectErrorText case final error? ) ...[
167+ const SizedBox (height: denseSpacing),
168+ Text (
169+ error,
170+ style: theme.regularTextStyle.copyWith (
171+ color: theme.colorScheme.error,
172+ ),
173+ textAlign: TextAlign .center,
174+ ),
175+ ],
181176 const Spacer (),
177+ if (offlineDataController.offlineDataJson.isNotEmpty) ...[
178+ ElevatedButton (
179+ onPressed: _reviewHistory,
180+ child: const Text ('Review recent data (offline)' ),
181+ ),
182+ const Spacer (),
183+ ],
182184 ],
183- ] ,
184- ),
185- );
186- } ,
185+ ) ,
186+ );
187+ },
188+ ) ,
187189 ),
188190 ),
189191 ),
0 commit comments