switch_orientation

Creator: coderz1093

Last updated:

0 purchases

TODO
Add to Cart

Description:

switch orientation

switch_orientation #
A Flutter plugin that switches device orientation.
☕ Support me #

Chat: Join WeChat group
📦 Installing #
Add switch_orientation to your pubspec.yaml file:
dependencies:
switch_orientation: latest_version
copied to clipboard
Import switch_orientation in files that it will be used:
import 'package:switch_orientation/switch_orientation.dart';
copied to clipboard
📚 Usage #
iOS #
In AppDelegate
import LXFProtocolTool

func application(_ application: UIApplication, supportedInterfaceOrientationsFor window: UIWindow?) -> UIInterfaceOrientationMask {
return UIApplication.shared.lxf.currentVcOrientationMask
}
copied to clipboard
Android #
Nothing to do.
Dart #
SwitchOrientation.setPreferredOrientations([
DeviceOrientation.portraitUp,
DeviceOrientation.portraitDown,
DeviceOrientation.landscapeLeft,
DeviceOrientation.landscapeRight,
]);
copied to clipboard
FAQ #

Flutter: Failed to change device orientation on Ipad
How to enable upside down orientation on flutter for iOS?

🖨 About Me #

GitHub: https://github.com/LinXunFeng
Email: linxunfeng@yeah.net
Blogs:

全栈行动: https://fullstackaction.com
掘金: https://juejin.cn/user/1820446984512392

License

For personal and professional use. You cannot resell or redistribute these repositories in their original state.

Files In This Product:

Customer Reviews

There are no reviews.