SearchMedicine.dart
7.49 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
import 'dart:convert';
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:http/http.dart' as http;
import 'package:flutter_dotenv/flutter_dotenv.dart';
import 'models/Bottle.dart';
import 'DashBoard.dart';
class SearchMedicine extends StatefulWidget {
@override
_SearchMedicineState createState() => _SearchMedicineState();
}
class _SearchMedicineState extends State<SearchMedicine> {
final medicineNameController = TextEditingController();
final medicineFactureController = TextEditingController();
Widget build(BuildContext context) {
bool isForward = false;
final Size size = MediaQuery.of(context).size;
// int goals = 60;
// int points = 75;
return Scaffold(
appBar: AppBar(
backgroundColor: Colors.white,
leading: new Icon(Icons.medical_services_rounded,
color: Colors.black, size: 45.0),
title: Text(
'Smart Medicine Box',
style: TextStyle(
color: Colors.black,
fontSize: 23,
fontFamily: 'Noto',
fontWeight: FontWeight.bold),
),
),
body: Container(
height: size.height,
padding: const EdgeInsets.all(10),
decoration: BoxDecoration(
border: Border.all(),
),
child: Column(
crossAxisAlignment: CrossAxisAlignment.center,
children: <Widget>[
SizedBox(height: 20),
Container(
height: size.height * 0.13,
decoration: BoxDecoration(
border: Border.all(),
color: Colors.white,
borderRadius: BorderRadius.circular(25),
),
child: Row(
children: [
Column(
children: [
Container(
height: size.height * 0.0635,
width: size.width * 0.75,
child: Row(
children: [
Container(
width: size.width * 0.16,
padding: const EdgeInsets.fromLTRB(10, 0, 0, 0),
child: Text('약이름:',
textAlign: TextAlign.center,
style: TextStyle(
fontSize: 16,
fontFamily: 'NotoSansKR',
fontWeight: FontWeight.w600)),
),
Container(
padding: const EdgeInsets.fromLTRB(5, 0, 0, 0),
width: size.width * 0.55,
child: TextFormField(
keyboardType: TextInputType.text,
controller: medicineNameController,
decoration: InputDecoration(
border: InputBorder.none,
focusedBorder: InputBorder.none,
enabledBorder: InputBorder.none,
errorBorder: InputBorder.none,
disabledBorder: InputBorder.none,
hintText: '약 이름을 입력하세요',
),
style: TextStyle(
fontSize: 16,
fontFamily: 'NotoSansKR',
fontWeight: FontWeight.w600)),
)
],
),
decoration: BoxDecoration(
border: Border(
bottom: BorderSide(
color: Colors.black,
width: 1,
style: BorderStyle.solid),
right: BorderSide(
color: Colors.black,
width: 1,
style: BorderStyle.solid),
),
),
),
Container(
height: size.height * 0.0635,
width: size.width * 0.75,
child: Row(
children: [
Container(
width: size.width * 0.16,
padding: const EdgeInsets.fromLTRB(5, 0, 0, 3),
child: Text('제조사:',
textAlign: TextAlign.center,
style: TextStyle(
fontSize: 16,
fontFamily: 'NotoSansKR',
fontWeight: FontWeight.w600)),
),
Container(
padding: const EdgeInsets.fromLTRB(6, 0, 0, 0),
width: size.width * 0.50,
child: TextFormField(
keyboardType: TextInputType.text,
controller: medicineFactureController,
decoration: InputDecoration(
border: InputBorder.none,
focusedBorder: InputBorder.none,
enabledBorder: InputBorder.none,
errorBorder: InputBorder.none,
disabledBorder: InputBorder.none,
hintText: '약 제조사 이름을 입력하세요',
),
style: TextStyle(
fontSize: 16,
fontFamily: 'NotoSansKR',
fontWeight: FontWeight.w600)),
)
],
),
decoration: BoxDecoration(
border: Border(
right: BorderSide(
color: Colors.black,
width: 1,
style: BorderStyle.solid),
),
),
),
],
),
Container(
height: size.height * 0.0635 * 2,
width: size.width * 0.14,
padding: const EdgeInsets.fromLTRB(10, 0, 0, 0),
child: IconButton(
icon: Icon(Icons.search, size: 40),
onPressed: () {
//검색 함수를 여기다가
},
),
),
],
),
),
SizedBox(height: 20),
Expanded(
child: ListView.separated(
itemBuilder: (BuildContext context, int index) {},
separatorBuilder: (BuildContext contetx, int index) =>
const Divider(),
itemCount: 0))
],
),
),
);
}
}