lock_orientation_screen 0.0.3 copy "lock_orientation_screen: ^0.0.3" to clipboard
lock_orientation_screen: ^0.0.3 copied to clipboard

A Flutter package to lock the screen orientation to portrait mode and restore default orientations when disposed.

example/lib/main.dart

import 'package:flutter/material.dart';
import 'package:lock_orientation_screen/lock_orientation_screen.dart';

void main() {
  runApp(const ExampleApp());
}

class ExampleApp extends StatelessWidget {
  const ExampleApp({super.key});

  @override
  Widget build(BuildContext context) {
    return LockOrientation(
      child: MaterialApp(
        home: Scaffold(
          appBar: AppBar(
            title: const Text('Lock Orientation Example'),
          ),
          body: const Center(
            child: Text('This screen is locked in portrait mode!'),
          ),
        ),
      ),
    );
  }
}
4
likes
160
points
79
downloads

Publisher

unverified uploader

Weekly Downloads

A Flutter package to lock the screen orientation to portrait mode and restore default orientations when disposed.

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (license)

Dependencies

flutter

More

Packages that depend on lock_orientation_screen