MyDrawer.dart 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150
  1. import 'package:deus_app/common/style/gsy_style.dart';
  2. import 'package:flutter/material.dart';
  3. class MyDrawer extends StatelessWidget {
  4. // const MyDrawer({
  5. // Key? key,
  6. // }) : super(key: key);
  7. @override
  8. Widget build(BuildContext context) {
  9. return Drawer(
  10. child: MediaQuery.removePadding(
  11. context: context,
  12. //移除抽屉菜单顶部默认留白
  13. removeTop: true,
  14. child: Column(
  15. crossAxisAlignment: CrossAxisAlignment.start,
  16. children: <Widget>[
  17. Padding(
  18. padding: const EdgeInsets.only(top: 38.0,left: 10,right: 10),
  19. child: Row(children: [
  20. Expanded(
  21. flex: 1,
  22. child: Text(
  23. '设备名称',
  24. style: TextStyle(
  25. color: Colors.black,
  26. fontSize: GSYConstant.minTextSize,
  27. fontWeight: FontWeight.bold,
  28. ),
  29. ),
  30. ),
  31. Expanded(
  32. child: Container(
  33. height: 40,
  34. child: TextField(
  35. decoration: InputDecoration(
  36. border: OutlineInputBorder(),
  37. ),style: TextStyle(fontSize: 14),
  38. onChanged: (value) {
  39. _device = value;
  40. },
  41. ),
  42. ),
  43. flex: 4,
  44. ),
  45. ]),
  46. ),
  47. Padding(
  48. padding: const EdgeInsets.only(top: 38.0,left: 10,right: 10),
  49. child: Row(children: [
  50. Expanded(
  51. flex: 1,
  52. child: Text(
  53. '展示名称',
  54. style: TextStyle(
  55. color: Colors.black,
  56. fontSize: GSYConstant.minTextSize,
  57. fontWeight: FontWeight.bold,
  58. ),
  59. ),
  60. ),
  61. Expanded(
  62. child: Container(
  63. height: 40,
  64. child: TextField(
  65. decoration: InputDecoration(
  66. border: OutlineInputBorder()
  67. ),style: TextStyle(fontSize: 14),
  68. onChanged: (value) {
  69. _username = value;
  70. },
  71. ),
  72. ),
  73. flex: 4,
  74. ),
  75. ]),
  76. ),
  77. Padding(
  78. padding: const EdgeInsets.only(top: 38.0,left: 10,right: 10),
  79. child: Row(children: [
  80. Expanded(
  81. flex: 1,
  82. child: Text(
  83. 'devicekey',
  84. style: TextStyle(
  85. color: Colors.black,
  86. fontSize: GSYConstant.minTextSize,
  87. fontWeight: FontWeight.bold,
  88. ),
  89. ),
  90. ),
  91. Expanded(
  92. child: Container(
  93. height: 40,
  94. child: TextField(
  95. decoration: InputDecoration(
  96. border: OutlineInputBorder()
  97. ),style: TextStyle(fontSize: 14),
  98. onChanged: (value) {
  99. _deviceKey = value;
  100. },
  101. ),
  102. ),
  103. flex: 4,
  104. ),
  105. ]),
  106. ),
  107. Padding(
  108. padding: const EdgeInsets.only(top: 38.0,left: 10,right: 10),
  109. child: Row(children: [
  110. Expanded(
  111. flex: 1,
  112. child: Text(
  113. '产品名称',
  114. style: TextStyle(
  115. color: Colors.black,
  116. fontSize: GSYConstant.minTextSize,
  117. fontWeight: FontWeight.bold,
  118. ),
  119. ),
  120. ),
  121. Expanded(
  122. flex: 4,
  123. child: Container(
  124. height: 40,
  125. child: TextField(
  126. decoration: InputDecoration(
  127. border: OutlineInputBorder()
  128. ),style: TextStyle(fontSize: 14),
  129. onChanged: (value) {
  130. _product = value;
  131. },
  132. ),
  133. ),
  134. ),
  135. ]),
  136. ),
  137. ],
  138. ),
  139. ),
  140. );
  141. }
  142. String _device = '',_username = '', _deviceKey = '', _product = '';
  143. }