Skip to content

❌ Switch video source in full-screen video playback, switch failed. #942

@shang1219178163

Description

@shang1219178163

I have a very strange issue where when I move the MaterialApp in app.dart to main.dart, the portrait screen switches to full screen to play the video, then switches the video source, and the switch fails.

我遇到了一个非常奇怪的问题,当我将 app.dart 中的 MaterialApp 移动到 main.dart 时,竖屏切换到全屏播放视频,再切换视频源,切换失败。

example project:

1、main.dart

Change before:
...
void main() {
runApp(const ChewieDemo());
}
...

Change after:
...
void main() {
runApp(const MyApp());
}

class MyApp extends StatelessWidget {
const MyApp({super.key});

@OverRide
Widget build(BuildContext context) {
return const MaterialApp(
title: 'ChewieDemo',
home: ChewieDemo(),
);
}
}
...

2、app.dart

Change before:

...
@OverRide
Widget build(BuildContext context) {
return MaterialApp(
title: widget.title,
theme: AppTheme.light.copyWith(
platform: _platform ?? Theme.of(context).platform,
),
home: Scaffold(
...

Change after:

...
@OverRide
Widget build(BuildContext context) {
return Scaffold(
...

chewie-1.10.0_problem.zip

2026-04-03.18.03.29.mov

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions