appinioGmbH / flutter_packages

Dart and Flutter plugins/packages used and maintained by @appinioGmbH
187 stars 214 forks source link

Error: Type 'SystemUiMode' not found. #3

Closed abkorim1998 closed 2 years ago

abkorim1998 commented 2 years ago

hello. I'm getting error called

Error: Type 'SystemUiMode' not found.

I don't know why. can you please tell me how I can fix it.

/E:/softwer/flutter/flutter/.pub-cache/hosted/pub.dartlang.org/appinio_video_player-1.0.1/lib/src/models/custom_video_player_settings.dart:31:9: Error: Type 'SystemUiMode' not found. final SystemUiMode systemUIModeAfterFullscreen; ^^^^^^^^^^^^ /E:/softwer/flutter/flutter/.pub-cache/hosted/pub.dartlang.org/appinio_video_player-1.0.1/lib/src/models/custom_video_player_settings.dart:34:9: Error: Type 'SystemUiMode' not found. final SystemUiMode systemUIModeInsideFullscreen; ^^^^^^^^^^^^ /E:/softwer/flutter/flutter/.pub-cache/hosted/pub.dartlang.org/appinio_video_player-1.0.1/lib/src/models/custom_video_player_settings.dart:31:9: Error: 'SystemUiMode' isn't a type. final SystemUiMode systemUIModeAfterFullscreen; ^^^^^^^^^^^^ /E:/softwer/flutter/flutter/.pub-cache/hosted/pub.dartlang.org/appinio_video_player-1.0.1/lib/src/models/custom_video_player_settings.dart:34:9: Error: 'SystemUiMode' isn't a type. final SystemUiMode systemUIModeInsideFullscreen; ^^^^^^^^^^^^ /E:/softwer/flutter/flutter/.pub-cache/hosted/pub.dartlang.org/appinio_video_player-1.0.1/lib/src/models/custom_video_player_settings.dart:104:40: Error: Getter not found: 'SystemUiMode'. this.systemUIModeAfterFullscreen = SystemUiMode.edgeToEdge, ^^^^^^^^^^^^ /E:/softwer/flutter/flutter/.pub-cache/hosted/pub.dartlang.org/appinio_video_player-1.0.1/lib/src/models/custom_video_player_settings.dart:105:41: Error: Getter not found: 'SystemUiMode'. this.systemUIModeInsideFullscreen = SystemUiMode.leanBack, ^^^^^^^^^^^^ /E:/softwer/flutter/flutter/.pub-cache/hosted/pub.dartlang.org/appinio_video_player-1.0.1/lib/src/custom_video_player_service.dart:28:18: Error: Method not found: 'SystemChrome.setEnabledSystemUIMode'. SystemChrome.setEnabledSystemUIMode(videoValuesProvider ^^^^^^^^^^^^^^^^^^^^^^ /E:/softwer/flutter/flutter/.pub-cache/hosted/pub.dartlang.org/appinio_video_player-1.0.1/lib/src/custom_video_player_service.dart:36:24: Error: Method not found: 'SystemChrome.setEnabledSystemUIMode'. await SystemChrome.setEnabledSystemUIMode(videoValuesProvider ^^^^^^^^^^^^^^^^^^^^^^

TheGlorySaint commented 2 years ago

Hi @abkorim1998,

cloning the example VideoPlayer Repo and running it in DebugMode, switching to FullScreen and closing it. Rotating to different Orientations on iOS and Android is not throwing any exception. Could you please provide more information? For Example like:

What did you do, when this issue was produced? Did you use the example Repo or in your own App? Can you provide more Information, iOS? Android? Web?

You can try to use the import import 'package:flutter/services.dart'; inside your file, where you use the VideoPlayer, that may be fixing the issue. In the custom_video_player_settings.dart File, there is the import, so that can't be the issue. I

abkorim1998 commented 2 years ago

sorry. the problem was solved by just upgrading flutter SDK