Advertisement
Guest User

main.dart

a guest
Sep 4th, 2019
118
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Dart 4.67 KB | None | 0 0
  1. class _MyHomePageState extends State<MyHomePage> {
  2.   @override
  3.   Widget build(BuildContext context) {
  4.     return Scaffold(
  5.       backgroundColor: Color(0xFF3e3963),
  6.       body: SingleChildScrollView(
  7.         child: Column(
  8.           children: <Widget>[
  9.             Container( // APPBAR
  10.               decoration: BoxDecoration(
  11.                 gradient: LinearGradient(
  12.                   begin: Alignment.topRight,
  13.                   end: Alignment.bottomLeft,
  14.                   stops: [0.1, 0.3, 0.5, 0.7],
  15.                   colors: [
  16.                     Colors.blue[500],
  17.                     Colors.blue[600],
  18.                     Colors.blue[700],
  19.                     Colors.blue[800],
  20.                   ],
  21.                 ),
  22.               ),
  23.               child: Padding(
  24.                 padding: EdgeInsets.only(left: 15.0, right: 15.0, top: 40.0, bottom: 10.0),
  25.                 child: Row(  
  26.                   mainAxisAlignment: MainAxisAlignment.spaceBetween,
  27.                   children: <Widget> [
  28.                     IconButton(
  29.                       icon: Icon(
  30.                         Icons.menu,
  31.                         color: Colors.white,
  32.                         size: 30.0,
  33.                       ),
  34.                       onPressed: () {},
  35.                     ),
  36.                     Text(
  37.                       "Planets",
  38.                       style: TextStyle(
  39.                         color: Colors.white,
  40.                         fontFamily: "ProductSans",
  41.                         fontSize: 40.0,
  42.                       )
  43.                     ),
  44.                     IconButton(
  45.                       icon: Icon(
  46.                         Icons.search,
  47.                         color: Colors.white,
  48.                         size: 30.0,
  49.                       ),
  50.                       onPressed: () {},
  51.                     ),
  52.                   ],
  53.                 ),
  54.               ),
  55.             ),
  56.             SizedBox(height: 50.0),
  57.             Row(
  58.               children: <Widget>[
  59.                 SizedBox(width: 90.0),
  60.                 /* Positioned(
  61.                   child: DecoratedBox(
  62.                     decoration: BoxDecoration(
  63.                       image: DecorationImage(
  64.                         image: AssetImage("img/earth.png")
  65.                       )
  66.                     ),
  67.                   ),
  68.                 ), */
  69.                 Container(
  70.                   decoration: BoxDecoration(
  71.                     color: Color(0xFF434273),
  72.                     borderRadius: BorderRadius.circular(15.0),
  73.                     boxShadow: [
  74.                       BoxShadow(
  75.                         color: Colors.black26,
  76.                         blurRadius: 20.0,
  77.                         offset: Offset(20.0, 10.0)
  78.                       )
  79.                     ],
  80.                   ),
  81.                   child: SizedBox(
  82.                     width: 300.0,
  83.                     height: 150.0,
  84.                     child: Row(
  85.                       mainAxisAlignment: MainAxisAlignment.start,
  86.                       children: <Widget> [
  87.                         SizedBox(width: 130.0),
  88.                         Column(
  89.                           mainAxisAlignment: MainAxisAlignment.center,
  90.                           children: <Widget> [
  91.                             SizedBox(
  92.                               width: 160.0,
  93.                               child: Text(
  94.                                 "Earth",
  95.                                 style: TextStyle(
  96.                                   fontFamily: "ProductSans",
  97.                                   fontSize: 40.0,
  98.                                   color: Colors.white,
  99.                                   fontWeight: FontWeight.bold,
  100.                                 ),
  101.                                 textAlign: TextAlign.start
  102.                               )
  103.                             ),
  104.                             SizedBox(
  105.                               width: 160.0,
  106.                               child: Text(
  107.                                 "Milkyway Galaxy",
  108.                                 style: TextStyle(
  109.                                   fontFamily: "ProductSans",
  110.                                   fontSize: 15.0,
  111.                                   color: Colors.white,
  112.                                 ),
  113.                                 textAlign: TextAlign.start
  114.                               ),
  115.                             )
  116.                           ]
  117.                         ),
  118.                         //SizedBox(height: 30.0)
  119.                       ]
  120.                     )
  121.                   )
  122.                 )
  123.               ],
  124.             )
  125.           ],
  126.         )
  127.       )
  128.     );
  129.   }
  130. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement