Skip to content

Latest commit

 

History

History
27 lines (20 loc) · 490 Bytes

File metadata and controls

27 lines (20 loc) · 490 Bytes

useOrientation

Tracks screen orientation of user's device.

Installation

dependencies:
  flutter_use: 

Usage

class Sample extends HookWidget {
  @override
  Widget build(BuildContext context) {
    final orientation = useOrientation();

    return Container(
      child: Text("Orientation: $orientation"),
    );
  }
}