我正在构建一个包含通过chewie库安装的视频的应用程序,但是当我运行该应用程序时,它收到的错误。未为_MaterialControlState类定义方法mouseregion。
> Container(
> color: Colors.black,
> height: MediaQuery.of(context).size.height*(30/100),
> width: MediaQuery.of(context).size.width*(100/100),
> child: videoFile==null?Center(
> child: Icon(Icons.videocam,color: Colors.red,size: 50.0,),
> ):FittedBox(
> fit: BoxFit.contain,
> child: mounted?Chewie(
> controller: ChewieController(
> videoPlayerController: VideoPlayerController.file(videoFile),
> aspectRatio: 3/2,
> autoPlay: true,
> looping: true,
> ),
> ):Container(),
>
> )
> ),
The following _CompileTimeError was thrown building MaterialControls(dirty, dependencies: [_ChewieControllerProvider], state: _MaterialControlsState#e4cc6):
'package:chewie/src/material_controls.dart': error: file:///C:/flutter/.pub-cache/hosted/pub.dartlang.org/chewie-0.9.8/lib/src/material_controls.dart:52:12: Error: The method 'MouseRegion' isn't defined for the class '_MaterialControlsState'.