switch_orientation 0.0.1 copy "switch_orientation: ^0.0.1" to clipboard
switch_orientation: ^0.0.1 copied to clipboard

PlatformiOS

A Flutter plugin that switches device orientation.

switch_orientation #

A Flutter plugin that switches device orientation.

☕ Support me #

ko-fi wechat

Chat: Join WeChat group

📦 Installing #

Add switch_orientation to your pubspec.yaml file:

dependencies:
  switch_orientation: latest_version

Import switch_orientation in files that it will be used:

import 'package:switch_orientation/switch_orientation.dart';

📚 Usage #

iOS #

In AppDelegate

import LXFProtocolTool

func application(_ application: UIApplication, supportedInterfaceOrientationsFor window: UIWindow?) -> UIInterfaceOrientationMask {
    return UIApplication.shared.lxf.currentVcOrientationMask
}

Android #

Nothing to do.

Dart #

SwitchOrientation.setPreferredOrientations([
  DeviceOrientation.portraitUp,
  DeviceOrientation.portraitDown,
  DeviceOrientation.landscapeLeft,
  DeviceOrientation.landscapeRight,
]);

FAQ #

🖨 About Me #

4
likes
130
points
31
downloads

Publisher

verified publisherfullstackaction.com

Weekly Downloads

A Flutter plugin that switches device orientation.

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (license)

Dependencies

flutter, plugin_platform_interface

More

Packages that depend on switch_orientation