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
006e8411
Commit
006e8411
authored
Jul 07, 2020
by
林生雨
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
commit
parent
d97ed16c
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
32 additions
and
11 deletions
+32
-11
DiscussLowPriceModel.dart
lib/ClueModel/page/DiscussLowPrice/DiscussLowPriceModel.dart
+7
-3
DiscussLowPricePopView.dart
...lueModel/page/DiscussLowPrice/DiscussLowPricePopView.dart
+13
-1
LevelOneList.dart
lib/ClueModel/page/levelOne/LevelOneList.dart
+5
-2
LevelOnePage.dart
lib/ClueModel/page/levelOne/LevelOnePage.dart
+7
-5
No files found.
lib/ClueModel/page/DiscussLowPrice/DiscussLowPriceModel.dart
View file @
006e8411
...
...
@@ -5,6 +5,7 @@
* @Last Modified time: 2020-07-04 14:41:41
*/
import
'package:dio/dio.dart'
;
import
'package:flutter/foundation.dart'
;
import
'package:flutter_common/commonModel/live/BaseModel.dart'
;
import
'package:flutter_common/commonModel/live/LiveData.dart'
;
import
'package:gm_flutter/ClueModel/server/api/ClueApi.serv.dart'
;
...
...
@@ -18,7 +19,8 @@ class DiscussLowPriceModel extends BaseModel {
LiveData
<
Pair
<
int
,
DiscussLowPriceModelBean
>>
popViewLive
=
LiveData
();
RxDispose
rxDispose
=
RxDispose
();
fetchPopviewData
(
String
planId
,
String
hospitalId
,
String
doctorId
)
{
fetchPopviewData
(
String
planId
,
String
hospitalId
,
String
doctorId
,
VoidCallback
fail
)
{
ClueApiImpl
.
getInstance
()
.
getPopviewData
(
DioUtil
.
getInstance
().
getDio
(),
planId
,
hospitalId
,
doctorId
)
...
...
@@ -31,13 +33,15 @@ class DiscussLowPriceModel extends BaseModel {
}
}
else
{
NativeToast
.
showNativeToast
(
event
.
message
);
popViewLive
.
notifyView
(
Pair
(
FAIL
,
null
));
// popViewLive.notifyView(Pair(FAIL, null));
fail
();
}
})
.
addToDispose
(
rxDispose
)
.
onError
((
err
)
{
popViewLive
.
notifyView
(
Pair
(
FAIL
,
null
));
//
popViewLive.notifyView(Pair(FAIL, null));
NativeToast
.
showNativeToast
(
err
.
message
);
fail
();
});
}
...
...
lib/ClueModel/page/DiscussLowPrice/DiscussLowPricePopView.dart
View file @
006e8411
...
...
@@ -42,6 +42,16 @@ class _PopView implements ICenterPicker {
if
(
data
.
data
.
first
==
LOADING
)
{
return
loadingItem
();
}
// if(data.data.first==EMPTY||data.data.first==FAIL){
// return Container(
// decoration: BoxDecoration(
// borderRadius: BorderRadius.circular(7),
// color: Colors.white,
// ),
// width: contentWidth,
// height: 308.5,
// );
// }
if
(
data
.
data
.
second
==
null
||
data
.
data
.
first
==
FAIL
)
{
return
errorItem
(
contentWidth
,
308.5
,
()
{});
}
...
...
@@ -183,6 +193,8 @@ class _PopView implements ICenterPicker {
@override
void
initState
(
VoidCallback
dismissCall
,
BuildContext
context
)
{
this
.
dismissCallback
=
dismissCall
;
_model
.
fetchPopviewData
(
this
.
planId
,
this
.
hospitalId
,
this
.
doctorId
);
_model
.
fetchPopviewData
(
this
.
planId
,
this
.
hospitalId
,
this
.
doctorId
,(){
dismissCallback
();
});
}
}
lib/ClueModel/page/levelOne/LevelOneList.dart
View file @
006e8411
...
...
@@ -56,8 +56,11 @@ class LevelOneListState extends State<LevelOneList>
@override
Widget
build
(
BuildContext
context
)
{
super
.
build
(
context
);
return
baseStateView
(
MediaQuery
.
of
(
context
).
size
.
width
,
MediaQuery
.
of
(
context
).
size
.
height
,
_model
.
stateLive
,
pages
(),
()
{
return
baseStateView
(
MediaQuery
.
of
(
context
).
size
.
width
,
MediaQuery
.
of
(
context
).
size
.
height
,
_model
.
stateLive
,
pages
(),
()
{
_model
.
refreshView
(
true
);
},
paddingTop:
widget
.
topHeight
);
}
...
...
lib/ClueModel/page/levelOne/LevelOnePage.dart
View file @
006e8411
...
...
@@ -47,6 +47,8 @@ class LevelOneState extends BaseState<LevelOnePage>
int
index
=
0
;
double
stateBarHeight
=
0
;
@override
void
initState
()
{
DioUtil
.
getInstance
().
setProxy
(
"172.30.8.245"
);
...
...
@@ -84,6 +86,8 @@ class LevelOneState extends BaseState<LevelOnePage>
@override
Widget
buildItem
(
BuildContext
context
)
{
stateBarHeight
=
MediaQueryData
.
fromWindow
(
window
).
padding
.
top
;
oneList
.
clear
();
oneList
.
add
(
good
());
oneList
.
add
(
rect
());
...
...
@@ -165,12 +169,11 @@ class LevelOneState extends BaseState<LevelOnePage>
Widget
newHome
()
{
List
<
Widget
>
list
=
[];
var
d
=
MediaQueryData
.
fromWindow
(
window
).
padding
.
top
;
for
(
int
i
=
0
;
i
<
_model
.
tabsList
.
length
;
i
++)
{
list
.
add
(
extend
.
NestedScrollViewInnerScrollPositionKeyWidget
(
Key
(
"Tab
${i}
"
),
LevelOneList
(
widget
.
planId
,
_model
.
tabsList
[
i
].
tabType
,
kToolbarHeight
+
d
)));
LevelOneList
(
widget
.
planId
,
_model
.
tabsList
[
i
].
tabType
,
kToolbarHeight
+
stateBarHeight
)));
}
final
double
statusBarHeight
=
MediaQuery
.
of
(
context
).
padding
.
top
;
final
double
pinnedHeaderHeight
=
statusBarHeight
+
kToolbarHeight
;
...
...
@@ -184,8 +187,7 @@ class LevelOneState extends BaseState<LevelOnePage>
SliverOverlapAbsorber
(
handle:
extend
.
NestedScrollView
.
sliverOverlapAbsorberHandleFor
(
context
),
sliver:
baseSliverAppBar
(
_model
.
imageUrl
)),
sliver:
baseSliverAppBar
(
_model
.
imageUrl
)),
SliverList
(
delegate:
SliverChildBuilderDelegate
((
BuildContext
c
,
int
i
)
{
if
(
i
==
0
)
{
...
...
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