Advertisement
Guest User

Untitled

a guest
Dec 7th, 2019
128
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.94 KB | None | 0 0
  1. import 'package:flutter/material.dart';
  2.  
  3. void main() => runApp(Home());
  4.  
  5. class Home extends StatelessWidget {
  6. @override
  7. Widget build(BuildContext context) {
  8. return MaterialApp(
  9. home: Scaffold(
  10. body: Column(
  11. children: <Widget>[
  12. Padding(padding: EdgeInsets.all(30)),
  13. Row(
  14. children: <Widget>[
  15. Expanded(child: Text("Hi Gilang"), flex: 1),
  16. Expanded(child: Container(child: Icon(Icons.search)), flex: 1),
  17. ],
  18. ),
  19. Row(
  20. children: <Widget>[
  21. Expanded(child: Image.asset("assets/matahari.jpg"), flex: 1),
  22. Expanded(
  23. child: Column(
  24. children: <Widget>[Text("Kota"), Text("Suhu")],
  25. ),
  26. flex: 1)
  27. ],
  28. ),
  29. Row(
  30. children: <Widget>[
  31. Expanded(flex: 1, child: Center(child: Text("Hari")))
  32. ],
  33. ),
  34. Row(
  35. children: <Widget>[
  36. Expanded(flex: 1, child: Center(child: Text("Tanggal")))
  37. ],
  38. ),
  39. Row(
  40. children: <Widget>[
  41. Expanded(
  42. flex: 1,
  43. child: Center(
  44. child: RawMaterialButton(
  45. child: Container(
  46. decoration: BoxDecoration(
  47. border: Border.all(color: Colors.green),
  48. color: Colors.green,
  49. borderRadius: BorderRadius.circular(20)),
  50. child: Padding(padding:
  51. EdgeInsets.only(top: 10, bottom: 10, left: 30, right: 30),
  52. child: Text("Show Weathers", style: TextStyle(color: Colors.white),)),
  53. ),
  54. onPressed: () {})))
  55. ],
  56. ),
  57. ],
  58. )));
  59. }
  60. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement