Why changing Theme isn't applied in full screen in a Chewie Video in Flutter?

431 Views Asked by At

I have applied Custom theme data to a Chewie video it works fine but it doesn't work when playing the video in full screen it just returns to the default theme

@override
  Widget build(BuildContext context) {
    return Column(
      children: <Widget>[
        Expanded(
          child: Center(
            child: _chewieController != null &&
                    _chewieController.videoPlayerController.value.isInitialized
                ? Theme(
                    data: Theme.of(context).copyWith(
                      accentColor: kPrimaryColor,
                      backgroundColor: kLightPrimaryColor,
                      iconTheme: IconThemeData(color: kPrimaryColor),
                    ),
                    child: Chewie(
                      controller: _chewieController,
                    ),
                  )
                : Column(
                    mainAxisAlignment: MainAxisAlignment.center,
                    children: [
                      LoadingCircle(),
                      SizedBox(height: 20),
                      Text('Loading'),
                    ],
                  ),
          ),
        ),
      ],
    );
  }
1

There are 1 best solutions below

0
On

The only way I found to be working for now is adding the theme to the whole app