Skip to content

Instantly share code, notes, and snippets.

@rei-codes
Created May 13, 2023 13:55
Show Gist options
  • Save rei-codes/2740501451a438cd00b7f575acc931ea to your computer and use it in GitHub Desktop.
Save rei-codes/2740501451a438cd00b7f575acc931ea to your computer and use it in GitHub Desktop.
MediaQuery as an InheritedWidget
class DetailsPage extends StatelessWidget {
const DetailsPage({super.key});
@override
Widget build(BuildContext context) {
log('DetailsPage');
return Scaffold(
appBar: AppBar(),
body: const Center(
child: Padding(
padding: EdgeInsets.symmetric(horizontal: 24),
child: TextField(
decoration: InputDecoration(
border: OutlineInputBorder(),
),
),
),
),
);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment