-
Notifications
You must be signed in to change notification settings - Fork 86
Open
Description
I have read the docs about your package. I decided using it for my website. But one thing i wanna know.
Is this package can detect phone or tablet screen but in landscape mode. Thank you very much
class _MyHomePageState extends State<MyHomePage> {
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
backgroundColor: Theme.of(context).colorScheme.inversePrimary,
title: Text(widget.title),
),
body: ScreenTypeLayout.builder(
mobile: (BuildContext context) => OrientationLayoutBuilder(
portrait: (context) => Container(color: Colors.green),
landscape: (context) => Container(color: Colors.orange),
),
tablet: (BuildContext context) => Container(color: Colors.yellow),
desktop: (BuildContext context) => Container(color: Colors.red),
watch: (BuildContext context) => Container(color: Colors.purple),
),
);
}
}
I tried this code above but it's not working as my expectation
Metadata
Metadata
Assignees
Labels
No labels
