onSourceExit method
- {required AppModel appModel,
- required BuildContext context,
- required WidgetRef ref}
override
Executed when this media source is closed. Perform this step to clean up resources or refresh media history.
Implementation
@override
Future<void> onSourceExit({
required AppModel appModel,
required BuildContext context,
required WidgetRef ref,
}) async {
await SystemChrome.setPreferredOrientations([
DeviceOrientation.portraitUp,
DeviceOrientation.landscapeLeft,
DeviceOrientation.landscapeRight,
]);
}