Created
January 27, 2020 16:05
-
-
Save vishweshsoni/b414d6586cdef0cb10d19e2b7f555af8 to your computer and use it in GitHub Desktop.
ResponsiveScreen
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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