Advertisement
Guest User

Untitled

a guest
Jul 16th, 2019
109
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.65 KB | None | 0 0
  1. import 'package:flutter/material.dart';
  2.  
  3. void main() => runApp(MyApp());
  4.  
  5. class MyApp extends StatelessWidget {
  6. @override
  7. Widget build(BuildContext context) {
  8. return MaterialApp(
  9. title: 'IoT Smart Rain',
  10. theme: ThemeData(
  11. primaryColor: Colors.blueGrey[600],
  12. ),
  13. home: Device(),
  14. );
  15. }
  16. }
  17.  
  18. class Device extends StatefulWidget {
  19. @override
  20. DeviceState createState() => DeviceState();
  21. }
  22.  
  23. class DeviceState extends State<Device> {
  24. final TextStyle _biggestFont = const TextStyle(fontSize: 34);
  25. final TextStyle _biggerFont = const TextStyle(fontSize: 15);
  26.  
  27. Widget build(BuildContext context) {
  28. return Scaffold(
  29. appBar: AppBar(
  30. title: Center(
  31. child: Text('Smart Rain'),
  32. )),
  33. body: Column(
  34. children: <Widget>[
  35. Card(
  36. elevation: 5.0,
  37. margin: EdgeInsets.all(3),
  38. child: Row(
  39. mainAxisAlignment: MainAxisAlignment.spaceBetween,
  40. mainAxisSize: MainAxisSize.max,
  41. children: <Widget>[
  42. Image.asset(
  43. 'assets/images/elco_logo.png',
  44. width: 210,
  45. height: 100,
  46. fit: BoxFit.fill,
  47. ),
  48. Column(
  49. mainAxisAlignment: MainAxisAlignment.start,
  50. mainAxisSize: MainAxisSize.max,
  51. crossAxisAlignment: CrossAxisAlignment.start,
  52. children: <Widget>[
  53. Row(
  54. mainAxisAlignment: MainAxisAlignment.spaceBetween,
  55. mainAxisSize: MainAxisSize.max,
  56. crossAxisAlignment: CrossAxisAlignment.center,
  57. children: <Widget>[
  58. Text(
  59. 'SR-001',
  60. style: _biggestFont,
  61. ),
  62. Icon(
  63. Icons.check_circle,
  64. )
  65. ],
  66. ),
  67. Card(
  68. color: Colors.green,
  69. child: Text(
  70. '4500AMP Remaining',
  71. style: _biggerFont,
  72. ),
  73. ),
  74. ]),
  75. ],
  76. ),
  77. ),
  78. Container(
  79. color: Colors.blue,
  80. constraints: BoxConstraints.expand(height: 400, width: 400),
  81. alignment: Alignment.center,
  82. )
  83. ],
  84. ));
  85. }
  86. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement