Advertisement
Guest User

Untitled

a guest
Oct 16th, 2019
123
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 10.13 KB | None | 0 0
  1. import 'package:flutter/material.dart';
  2. import 'dart:ui';
  3.  
  4. import 'colleges.dart';
  5.  
  6. void main() => runApp(MyApp());
  7.  
  8. class MyApp extends StatelessWidget {
  9. // This widget is the root of your application.
  10. @override
  11. Widget build(BuildContext context) {
  12. return MaterialApp(
  13. title: 'Flutter Demo',
  14. theme: ThemeData(
  15. // This is the theme of your application.
  16. //
  17. // Try running your application with "flutter run". You'll see the
  18. // application has a blue toolbar. Then, without quitting the app, try
  19. // changing the primarySwatch below to Colors.green and then invoke
  20. // "hot reload" (press "r" in the console where you ran "flutter run",
  21. // or simply save your changes to "hot reload" in a Flutter IDE).
  22. // Notice that the counter didn't reset back to zero; the application
  23. // is not restarted.
  24. primarySwatch: Colors.blue,
  25. ),
  26. home: MyHomePage(title: 'Arafat Asif'),
  27. );
  28. }
  29. }
  30.  
  31. class MyHomePage extends StatefulWidget {
  32. MyHomePage({Key key, this.title}) : super(key: key);
  33.  
  34. // This widget is the home page of your application. It is stateful, meaning
  35. // that it has a State object (defined below) that contains fields that affect
  36. // how it looks.
  37.  
  38. // This class is the configuration for the state. It holds the values (in this
  39. // case the title) provided by the parent (in this case the App widget) and
  40. // used by the build method of the State. Fields in a Widget subclass are
  41. // always marked "final".
  42.  
  43. final String title;
  44.  
  45. @override
  46. _MyHomePageState createState() => _MyHomePageState();
  47. }
  48.  
  49. class _MyHomePageState extends State<MyHomePage> {
  50. int _counter = 0;
  51.  
  52. void _incrementCounter() {
  53. setState(() {
  54. // This call to setState tells the Flutter framework that something has
  55. // changed in this State, which causes it to rerun the build method below
  56. // so that the display can reflect the updated values. If we changed
  57. // _counter without calling setState(), then the build method would not be
  58. // called again, and so nothing would appear to happen.
  59. _counter++;
  60. });
  61. }
  62.  
  63. @override
  64. Widget build(BuildContext context) {
  65. // This method is rerun every time setState is called, for instance as done
  66. // by the _incrementCounter method above.
  67. //
  68. // The Flutter framework has been optimized to make rerunning build methods
  69. // fast, so that you can just rebuild anything that needs updating rather
  70. // than having to individually change instances of widgets.
  71. return Scaffold(
  72. appBar: AppBar(
  73. // Here we take the value from the MyHomePage object that was created by
  74. // the App.build method, and use it to set our appbar title.
  75. title: Text(widget.title),
  76. ),
  77. body: Center (child: Row(
  78. mainAxisAlignment: MainAxisAlignment.spaceAround,
  79. children: <Widget>[
  80. Column(
  81. mainAxisAlignment: MainAxisAlignment.spaceAround,
  82. children: <Widget>[
  83. Container(padding: EdgeInsets.fromLTRB(1, 1, 1, 1),
  84. decoration: BoxDecoration(color: Colors.red),
  85. width: 100,
  86. height: 40,
  87. child: FlatButton(child: Text('WSU'),
  88. onPressed: ()=> Navigator.push(context,
  89. MaterialPageRoute(
  90. builder: (BuildContext context) => Wsu()
  91. )), ),
  92. ),
  93. Container(padding: EdgeInsets.fromLTRB(1, 1, 1, 1),
  94. decoration: BoxDecoration(color: Colors.red),
  95. width: 100,
  96. height: 40,
  97. child: FlatButton(child: Text('OU'),
  98. onPressed: ()=> Navigator.push(context,
  99. MaterialPageRoute(
  100. builder: (BuildContext context) => Ou()
  101. )), ),
  102. ),
  103. Container(padding: EdgeInsets.fromLTRB(1, 1, 1, 1),
  104. decoration: BoxDecoration(color: Colors.red),
  105. width: 100,
  106. height: 40,
  107. child: FlatButton(child: Text('OSU'),
  108. onPressed: ()=> Navigator.push(context,
  109. MaterialPageRoute(
  110. builder: (BuildContext context) => Osu()
  111. )), ),
  112. ),
  113. Container(padding: EdgeInsets.fromLTRB(1, 1, 1, 1),
  114. decoration: BoxDecoration(color: Colors.red),
  115. width: 100,
  116. height: 40,
  117. child: FlatButton(child: Text('KU'),
  118. onPressed: ()=> Navigator.push(context,
  119. MaterialPageRoute(
  120. builder: (BuildContext context) => Ku()
  121. )), ),
  122. ),
  123. Container(padding: EdgeInsets.fromLTRB(1, 1, 1, 1),
  124. decoration: BoxDecoration(color: Colors.red),
  125. width: 100,
  126. height: 40,
  127. child: FlatButton(child: Text('MIT'),
  128. onPressed: ()=> Navigator.push(context,
  129. MaterialPageRoute(
  130. builder: (BuildContext context) => Mit()
  131. )), ),
  132. ),
  133. ],
  134. ),
  135. Column(
  136. mainAxisAlignment: MainAxisAlignment.spaceAround,
  137. children: <Widget>[
  138. Container(padding: EdgeInsets.fromLTRB(1, 1, 1, 1),
  139. decoration: BoxDecoration(color: Colors.red),
  140. width: 100,
  141. height: 40,
  142. child: FlatButton(child: Text('CUNY'),
  143. onPressed: ()=> Navigator.push(context,
  144. MaterialPageRoute(
  145. builder: (BuildContext context) => Cuny()
  146. )), ),
  147. ),
  148. Container(padding: EdgeInsets.fromLTRB(1, 1, 1, 1),
  149. decoration: BoxDecoration(color: Colors.red),
  150. width: 100,
  151. height: 40,
  152. child: FlatButton(child: Text('NYU'),
  153. onPressed: ()=> Navigator.push(context,
  154. MaterialPageRoute(
  155. builder: (BuildContext context) => Nyu()
  156. )), ),
  157. ),
  158. Container(padding: EdgeInsets.fromLTRB(1, 1, 1, 1),
  159. decoration: BoxDecoration(color: Colors.red),
  160. width: 100,
  161. height: 40,
  162. child: FlatButton(child: Text('OPSU'),
  163. onPressed: ()=> Navigator.push(context,
  164. MaterialPageRoute(
  165. builder: (BuildContext context) => Opsu()
  166. )), ),
  167. ),
  168. Container(padding: EdgeInsets.fromLTRB(1, 1, 1, 1),
  169. decoration: BoxDecoration(color: Colors.red),
  170. width: 100,
  171. height: 40,
  172. child: FlatButton(child: Text('RICE'),
  173. onPressed: ()=> Navigator.push(context,
  174. MaterialPageRoute(
  175. builder: (BuildContext context) => Rice()
  176. )), ),
  177. ),
  178. Container(padding: EdgeInsets.fromLTRB(1, 1, 1, 1),
  179. decoration: BoxDecoration(color: Colors.red),
  180. width: 100,
  181. height: 40,
  182. child: FlatButton(child: Text('BROWN'),
  183. onPressed: ()=> Navigator.push(context,
  184. MaterialPageRoute(
  185. builder: (BuildContext context) => Brown()
  186. )), ),
  187. ),
  188. ],
  189. ),
  190. Column(
  191. mainAxisAlignment: MainAxisAlignment.spaceAround,
  192. children: <Widget>[
  193. Container(padding: EdgeInsets.fromLTRB(1, 1, 1, 1),
  194. decoration: BoxDecoration(color: Colors.red),
  195. width: 100,
  196. height: 40,
  197. child: FlatButton(child: Text('ISU'),
  198. onPressed: ()=> Navigator.push(context,
  199. MaterialPageRoute(
  200. builder: (BuildContext context) => Isu()
  201. )), ),
  202. ),
  203. Container(padding: EdgeInsets.fromLTRB(1, 1, 1, 1),
  204. decoration: BoxDecoration(color: Colors.red),
  205. width: 100,
  206. height: 40,
  207. child: FlatButton(child: Text('DUKE'),
  208. onPressed: ()=> Navigator.push(context,
  209. MaterialPageRoute(
  210. builder: (BuildContext context) => Duke()
  211. )), ),
  212. ),
  213. Container(padding: EdgeInsets.fromLTRB(0, 0, 0, 0),
  214. decoration: BoxDecoration(color: Colors.red),
  215. width: 100,
  216. height: 40,
  217. child: FlatButton(child: Text('UTULSA'),
  218. onPressed: ()=> Navigator.push(context,
  219. MaterialPageRoute(
  220. builder: (BuildContext context) => Utulsa()
  221. )), ),
  222. ),
  223. Container(padding: EdgeInsets.fromLTRB(1, 1, 1, 1),
  224. decoration: BoxDecoration(color: Colors.red),
  225. width: 100,
  226. height: 40,
  227. child: FlatButton(child: Text('BC'),
  228. onPressed: ()=> Navigator.push(context,
  229. MaterialPageRoute(
  230. builder: (BuildContext context) => Bc()
  231. )), ),
  232. ),
  233. Container(padding: EdgeInsets.fromLTRB(1, 1, 1, 1),
  234. decoration: BoxDecoration(color: Colors.red),
  235. width: 100,
  236. height: 40,
  237. child: FlatButton(child: Text('SUNY'),
  238. onPressed: ()=> Navigator.push(context,
  239. MaterialPageRoute(
  240. builder: (BuildContext context) => Suny()
  241. )), ),
  242. ),
  243. ],
  244. ),
  245. ],
  246. )),
  247. );
  248. }
  249. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement