@@ -17,7 +17,6 @@ import '../../../utils/load_balancer_utils.dart';
17
17
import '../../../utils/logger.dart' ;
18
18
import '../../../utils/system/audio_session.dart' ;
19
19
import '../../../widgets/action_button.dart' ;
20
- import '../../../widgets/brightness_observer.dart' ;
21
20
import '../../../widgets/dialog.dart' ;
22
21
import '../../../widgets/toast.dart' ;
23
22
import '../../../widgets/waveform_widget.dart' ;
@@ -192,15 +191,13 @@ class VoiceRecorderBarOverlayComposition extends HookConsumerWidget {
192
191
converter: (state) => state.state != RecorderState .idle,
193
192
);
194
193
final link = useMemoized (LayerLink .new );
195
- final overlay = Overlay .of (context, rootOverlay: true );
194
+
195
+ final overlay = Navigator .of (context).overlay ?? Overlay .of (context);
196
196
197
197
final recorderBottomBarEntry = useRef <OverlayEntry ?>(null );
198
198
199
199
final voiceRecorderCubit = context.read <VoiceRecorderCubit >();
200
200
201
- final value = BrightnessData .of (context);
202
- final theme = BrightnessData .themeOf (context);
203
-
204
201
useEffect (
205
202
() {
206
203
recorderBottomBarEntry.value? .remove ();
@@ -215,20 +212,16 @@ class VoiceRecorderBarOverlayComposition extends HookConsumerWidget {
215
212
value: voiceRecorderCubit,
216
213
),
217
214
],
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 ()),
232
225
),
233
226
),
234
227
),
0 commit comments