fix: load login background video from local asset instead of network URL

VideoPlayerController.networkUrl(Uri.parse('assets/login-bg.mp4')) silently
fails because 'assets/login-bg.mp4' is not a valid HTTP URL — the video
never initializes and the login screen shows a plain black background.

Fix: switch to VideoPlayerController.asset() and register the file in
pubspec.yaml. The MP4 is gitignored (22 MB) and kept local for builds.
This commit is contained in:
2026-03-18 16:43:40 +05:30
parent 2c109f692c
commit 9fd5fc3d3b
3 changed files with 4 additions and 3 deletions

View File

@@ -47,9 +47,7 @@ class _LoginScreenState extends State<LoginScreen> {
}
Future<void> _initVideo() async {
_videoController = VideoPlayerController.networkUrl(
Uri.parse('assets/login-bg.mp4'),
);
_videoController = VideoPlayerController.asset('assets/login-bg.mp4');
await _videoController.initialize();
_videoController.setLooping(true);
_videoController.setVolume(0);