@@ -17,7 +17,6 @@ import '../../../utils/load_balancer_utils.dart';
1717import '../../../utils/logger.dart' ;
1818import '../../../utils/system/audio_session.dart' ;
1919import '../../../widgets/action_button.dart' ;
20- import '../../../widgets/brightness_observer.dart' ;
2120import '../../../widgets/dialog.dart' ;
2221import '../../../widgets/toast.dart' ;
2322import '../../../widgets/waveform_widget.dart' ;
@@ -192,15 +191,13 @@ class VoiceRecorderBarOverlayComposition extends HookConsumerWidget {
192191 converter: (state) => state.state != RecorderState .idle,
193192 );
194193 final link = useMemoized (LayerLink .new );
195- final overlay = Overlay .of (context, rootOverlay: true );
194+
195+ final overlay = Navigator .of (context).overlay ?? Overlay .of (context);
196196
197197 final recorderBottomBarEntry = useRef <OverlayEntry ?>(null );
198198
199199 final voiceRecorderCubit = context.read <VoiceRecorderCubit >();
200200
201- final value = BrightnessData .of (context);
202- final theme = BrightnessData .themeOf (context);
203-
204201 useEffect (
205202 () {
206203 recorderBottomBarEntry.value? .remove ();
@@ -215,20 +212,16 @@ class VoiceRecorderBarOverlayComposition extends HookConsumerWidget {
215212 value: voiceRecorderCubit,
216213 ),
217214 ],
218- child: BrightnessData (
219- value: value,
220- brightnessThemeData: theme,
221- child: _RecordingInterceptor (
222- child: UnconstrainedBox (
223- child: CompositedTransformFollower (
224- link: link,
225- showWhenUnlinked: false ,
226- targetAnchor: Alignment .center,
227- followerAnchor: Alignment .center,
228- child: SizedBox (
229- width: layoutWidth,
230- child: const Material (child: VoiceRecorderBottomBar ()),
231- ),
215+ child: _RecordingInterceptor (
216+ child: UnconstrainedBox (
217+ child: CompositedTransformFollower (
218+ link: link,
219+ showWhenUnlinked: false ,
220+ targetAnchor: Alignment .center,
221+ followerAnchor: Alignment .center,
222+ child: SizedBox (
223+ width: layoutWidth,
224+ child: const Material (child: VoiceRecorderBottomBar ()),
232225 ),
233226 ),
234227 ),
0 commit comments