Skip to content

Instantly share code, notes, and snippets.

@vishweshsoni
Created January 27, 2020 16:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save vishweshsoni/b414d6586cdef0cb10d19e2b7f555af8 to your computer and use it in GitHub Desktop.
Save vishweshsoni/b414d6586cdef0cb10d19e2b7f555af8 to your computer and use it in GitHub Desktop.
ResponsiveScreen
import 'package:flutter/material.dart';
void main() => runApp(MyApp());
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
debugShowCheckedModeBanner: false,
title: 'Show up Demo',
theme: ThemeData(
primarySwatch: Colors.blue,
),
home: SetitUp(),
);
}
}
class SetitUp extends StatefulWidget {
@override
_SetitUpState createState() => _SetitUpState();
}
class _SetitUpState extends State<SetitUp> {
@override
Widget build(BuildContext context) {
return Scaffold(
body: Stack(
children: <Widget>[
Center(
child: Column(
mainAxisAlignment: MainAxisAlignment.start,
children: <Widget>[
Container(
height: MediaQuery.of(context).size.height/4,
width: MediaQuery.of(context).size.width /1,
margin: EdgeInsets.all(10.0),
child: Placeholder(),
),
Container(
height: MediaQuery.of(context).size.height/1.5,
width: MediaQuery.of(context).size.width /1,
margin: EdgeInsets.all(10.0),
child: Placeholder(),
),
],
),
)
],
),
);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment