Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
G
gm_flutter
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
林生雨
gm_flutter
Commits
e56e58b0
Commit
e56e58b0
authored
Jul 13, 2020
by
朱翠翠
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'test' of
http://git.wanmeizhensuo.com/linshengyu/gm_flutter
into zcc/flutter
parents
9c0c815d
24856199
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
48 additions
and
43 deletions
+48
-43
MechanismBoxPage.dart
lib/ClueModel/page/mechanismBox/MechanismBoxPage.dart
+48
-43
No files found.
lib/ClueModel/page/mechanismBox/MechanismBoxPage.dart
View file @
e56e58b0
...
...
@@ -56,30 +56,32 @@ class MechanismBox implements IBottomPicker {
Widget
build
(
BuildContext
context
)
{
MediaQueryData
mq
=
MediaQuery
.
of
(
context
);
double
keyHeight
=
MediaQuery
.
of
(
context
).
viewInsets
.
bottom
;
return
Container
(
decoration:
BoxDecoration
(
borderRadius:
BorderRadius
.
only
(
topLeft:
Radius
.
circular
(
10.0
),
topRight:
Radius
.
circular
(
10.0
)),
color:
Colors
.
white
,
),
width:
mq
.
size
.
width
,
height:
mq
.
size
.
height
-
mq
.
size
.
height
/
5
,
child:
StreamBuilder
(
stream:
_model
.
stateLive
.
stream
,
initialData:
_model
.
stateLive
.
data
??
LOADING
,
builder:
(
c
,
data
)
{
if
(
data
.
data
==
FAIL
)
{
return
errorItem
(
MediaQuery
.
of
(
context
).
size
.
width
,
MediaQuery
.
of
(
context
).
size
.
height
,
()
{
_model
.
getQuestions
(
plan_id
);
});
}
if
(
data
.
data
==
LOADING
)
{
return
loadingItem
();
}
return
setupHome
(
mq
,
keyHeight
,
context
);
},
));
return
SafeArea
(
child:
Container
(
decoration:
BoxDecoration
(
borderRadius:
BorderRadius
.
only
(
topLeft:
Radius
.
circular
(
10.0
),
topRight:
Radius
.
circular
(
10.0
)),
color:
Colors
.
white
,
),
width:
mq
.
size
.
width
,
height:
mq
.
size
.
height
-
mq
.
size
.
height
/
5
,
child:
StreamBuilder
(
stream:
_model
.
stateLive
.
stream
,
initialData:
_model
.
stateLive
.
data
??
LOADING
,
builder:
(
c
,
data
)
{
if
(
data
.
data
==
FAIL
)
{
return
errorItem
(
MediaQuery
.
of
(
context
).
size
.
width
,
MediaQuery
.
of
(
context
).
size
.
height
,
()
{
_model
.
getQuestions
(
plan_id
);
});
}
if
(
data
.
data
==
LOADING
)
{
return
loadingItem
();
}
return
setupHome
(
mq
,
keyHeight
,
context
);
},
)));
}
@override
...
...
@@ -270,8 +272,8 @@ class MechanismBox implements IBottomPicker {
baseText
(
"¥"
,
12
,
Color
(
0xffFF5963
)),
baseText
(
hospital
.
minPrice
==
hospital
.
maxPrice
?
"
${hospital.minPrice}
-
${hospital.maxPrice}
"
:
"
${hospital.minPrice}
"
,
?
"
${hospital.minPrice}
"
:
"
${hospital.minPrice}
-
${hospital.maxPrice}
"
,
15
,
Color
(
0xffFF5963
),
bold:
true
)
...
...
@@ -382,31 +384,34 @@ class MechanismBox implements IBottomPicker {
focusNode:
focusNode
,
textInputAction:
TextInputAction
.
send
,
onSubmitted:
(
txt
)
{
if
(
txt
.
isNotEmpty
)
{
_model
.
sendMessage
(
_model
.
doctor_ids
.
join
(
','
),
_model
.
hospital_ids
.
join
(
','
),
txt
,
plan_id
,
(
i
)
{
if
(
i
==
0
)
{
dismissCall
();
textController
.
text
=
''
;
NativeToast
.
showNativeToast
(
'消息已发送成功'
);
}
});
int
length
=
_model
.
doctor_ids
.
length
;
if
(
length
>
3
||
length
==
0
)
{
NativeToast
.
showNativeToast
(
'请选择1-3个机构咨询'
);
}
else
{
if
(
txt
.
isNotEmpty
)
{
_model
.
sendMessage
(
_model
.
doctor_ids
.
join
(
','
),
_model
.
hospital_ids
.
join
(
','
),
txt
,
plan_id
,
(
i
)
{
if
(
i
==
0
)
{
dismissCall
();
textController
.
text
=
''
;
NativeToast
.
showNativeToast
(
'消息已发送成功'
);
}
});
}
}
},
style:
TextStyle
(
fontSize:
14
,
color:
Color
(
0xff282828
)),
maxLines:
1
,
decoration:
InputDecoration
(
contentPadding:
EdgeInsets
.
only
(
left:
16
,
top:
0
,
bottom:
11.5
,
right:
16
),
contentPadding:
EdgeInsets
.
only
(
left:
16
,
top:
12
,
bottom:
12
,
right:
16
),
hintText:
'请输入您想了解的问题'
,
hintStyle:
TextStyle
(
color:
Color
(
0xff999999
),
fontSize:
12
,
height:
2.3
),
color:
Color
(
0xff999999
),
fontSize:
12
),
border:
InputBorder
.
none
));
},
))
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment