Skip to content

Commit

Permalink
Removed deprecated mounted methods in mjpeg
Browse files Browse the repository at this point in the history
  • Loading branch information
Gold872 committed Feb 24, 2024
1 parent 72ed221 commit a32fd29
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/widgets/mjpeg.dart
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ class Mjpeg extends HookWidget {
final state = useMemoized(() => _MjpegStateNotifier());
final visible = useListenable(state);
final errorState = useState<List<dynamic>?>(null);
final isMounted = useIsMounted();
isMounted() => context.mounted;

final manager = useMemoized(
() => _manager = _StreamManager(
Expand Down Expand Up @@ -219,7 +219,7 @@ class _StreamManager {
return;
}
try {
final request = Request("GET", Uri.parse(stream));
final request = Request('GET', Uri.parse(stream));
request.headers.addAll(headers);
final response = await _httpClient.send(request).timeout(
_timeout); //timeout is to prevent process to hang forever in some case
Expand Down

0 comments on commit a32fd29

Please sign in to comment.