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
6cd8b6a0
Commit
6cd8b6a0
authored
Jul 02, 2020
by
林生雨
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'featrue/duxin' into 'test'
Featrue/duxin See merge request
!3
parents
59af1797
3235a999
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
830 additions
and
4 deletions
+830
-4
close-btn.png
assets/close-btn.png
+0
-0
ClueRouter.dart
lib/ClueModel/ClueRouter.dart
+2
-0
ClueRouterImpl.dart
lib/ClueModel/ClueRouterImpl.dart
+6
-0
LevelTwoModel.dart
lib/ClueModel/page/levelTwo/LevelTwoModel.dart
+100
-0
LevelTwoPage.dart
lib/ClueModel/page/levelTwo/LevelTwoPage.dart
+514
-0
MechanismBoxPage.dart
lib/ClueModel/page/mechanismBox/MechanismBoxPage.dart
+196
-0
TestPage.dart
lib/MainRouter/page/test/TestPage.dart
+12
-4
No files found.
assets/close-btn.png
0 → 100644
View file @
6cd8b6a0
566 Bytes
lib/ClueModel/ClueRouter.dart
View file @
6cd8b6a0
...
...
@@ -16,6 +16,8 @@ abstract class ClueRouter implements RouterBaser {
Widget
getLevelOnePage
();
Widget
getLevelTwoPage
();
Widget
getPlanPage
();
Widget
getPlanCompareDetailPage
();
}
lib/ClueModel/ClueRouterImpl.dart
View file @
6cd8b6a0
...
...
@@ -7,6 +7,7 @@ import 'package:gm_flutter/ClueModel/ClueRouter.dart';
import
'package:gm_flutter/ClueModel/page/PlansCompareFeed/PlansCompareFeedPage.dart'
;
import
'package:gm_flutter/ClueModel/page/ProjectDetails/ProjectDetailsPage.dart'
;
import
'package:gm_flutter/ClueModel/page/levelOne/LevelOnePage.dart'
;
import
'package:gm_flutter/ClueModel/page/levelTwo/LevelTwoPage.dart'
;
import
'package:gm_flutter/ClueModel/page/plan/PlanPage.dart'
;
import
'package:gm_flutter/ClueModel/page/PlanCompareDetail/PlanCompareDetailPage.dart'
;
...
...
@@ -20,6 +21,11 @@ class ClueRouterImpl implements ClueRouter {
Widget
getLevelOnePage
()
{
return
LevelOnePage
();
}
@override
Widget
getLevelTwoPage
()
{
return
LevelTwoPage
();
}
@override
Widget
getPlansCompareFeed
()
{
...
...
lib/ClueModel/page/levelTwo/LevelTwoModel.dart
0 → 100644
View file @
6cd8b6a0
/*
* @author lsy
* @date 2020/6/29
**/
import
'package:flutter/material.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'
;
import
'package:gm_flutter/ClueModel/server/entity/LevelOneFeedList.dart'
;
import
'package:gm_flutter/commonModel/GMBase.dart'
;
import
'package:gm_flutter/commonModel/bean/Pair.dart'
;
import
'package:gm_flutter/commonModel/rx/RxDispose.dart'
;
import
'package:pull_to_refresh/pull_to_refresh.dart'
;
class
LevelTwoModel
extends
BaseModel
{
LiveData
<
double
>
appBarLive
=
LiveData
();
LiveData
<
List
<
String
>>
rectLive
=
LiveData
();
LiveData
<
List
<
String
>>
explainLive
=
LiveData
();
LiveData
<
bool
>
showTab
=
LiveData
();
LiveData
<
int
>
topIndexLive
=
new
LiveData
();
LiveData
<
double
>
topScrollLive
=
new
LiveData
();
LiveData
<
bool
>
loadingLive
=
LiveData
();
RxDispose
rxDispose
=
RxDispose
();
LiveData
<
Pair
<
int
,
List
<
Cards
>>>
cardsLive
=
LiveData
();
Map
<
int
,
List
<
Cards
>>
data
=
new
Map
();
List
list
=
[
"plan"
,
"hospital"
,
"doctor"
,
"diary"
];
List
pageList
=
[
1
,
1
,
1
,
1
];
List
pageHeightList
=
[
118
,
149
,
118
,
118
];
void
refreshView
(
bool
clear
,
{
RefreshController
refreshListener
})
{
Future
.
delayed
(
Duration
(
seconds:
1
),
()
{
Cards
cards
=
Cards
(
cardType:
"plan"
,
plan:
Plan
(
planName:
"ww"
,
minPrice:
"50"
,
maxPrice:
"500"
));
List
<
Cards
>
a
=
[
cards
,
cards
,
cards
,
cards
,
cards
,
cards
,
cards
,
cards
,
cards
,
cards
,
cards
,
cards
,
];
List
<
Cards
>
b
=
[
cards
];
print
(
"INDEX
${currentIndex}
"
);
if
(
currentIndex
==
1
)
{
data
[
currentIndex
]
=
b
;
}
else
{
data
[
currentIndex
]
=
a
;
}
cardsLive
.
notifyView
(
Pair
(
ENDLOADING
,
data
));
});
// int index = currentIndex;
// if (clear) {
// data.clear();
// pageList = [1, 1, 1, 1];
// }
// ClueApiImpl.getInstance()
// .getLevelOneList(
// DioUtil.getInstance().getDio(), 123, list[index], pageList[index])
// .listen((event) {})
// .addToDispose(rxDispose)
// .onError((err) {});
}
int
currentIndex
=
0
;
@override
void
dispose
()
{
showTab
.
dispost
();
cardsLive
.
dispost
();
appBarLive
.
dispost
();
rectLive
.
dispost
();
topIndexLive
.
dispost
();
topScrollLive
.
dispost
();
loadingLive
.
dispost
();
}
void
selectPage
(
int
index
)
{
if
(
currentIndex
==
index
)
{
return
;
}
currentIndex
=
index
;
if
(
data
[
currentIndex
]
==
null
)
{
cardsLive
.
notifyView
(
Pair
(
LOADING
,
null
));
refreshView
(
true
);
}
else
{
cardsLive
.
notifyView
(
Pair
(
ENDLOADING
,
data
[
currentIndex
]));
}
}
void
loadMore
()
{}
}
lib/ClueModel/page/levelTwo/LevelTwoPage.dart
0 → 100644
View file @
6cd8b6a0
/*
* @author dx
* @date 2020-06-29
**/
import
'dart:math'
;
import
'package:cached_network_image/cached_network_image.dart'
;
import
'package:flutter/gestures.dart'
;
import
'package:flutter/material.dart'
;
import
'package:flutter_common/commonModel/picker/base/BaseBottomPicker.dart'
;
import
'package:gm_flutter/ClueModel/page/levelOne/LevelOneItem.dart'
;
import
'package:gm_flutter/ClueModel/page/levelTwo/LevelTwoModel.dart'
;
import
'package:gm_flutter/ClueModel/page/mechanismBox/MechanismBoxPage.dart'
;
import
'package:gm_flutter/ClueModel/server/entity/LevelOneFeedList.dart'
;
import
'package:gm_flutter/ClueModel/view/FiveStarView.dart'
;
import
'package:gm_flutter/commonModel/base/BaseState.dart'
;
import
'package:gm_flutter/commonModel/base/BaseUtil.dart'
;
import
'package:gm_flutter/commonModel/base/BaseComponent.dart'
;
import
'package:pull_to_refresh/pull_to_refresh.dart'
;
import
'package:gm_flutter/commonModel/bean/Pair.dart'
;
class
LevelTwoPage
extends
StatefulWidget
{
@override
_LevelTwoPageState
createState
()
=>
_LevelTwoPageState
();
}
class
_LevelTwoPageState
extends
BaseState
<
LevelTwoPage
>
with
SingleTickerProviderStateMixin
{
LevelTwoModel
_model
=
new
LevelTwoModel
();
RefreshController
_refreshController
=
RefreshController
();
PageController
pageController
=
new
PageController
();
TabController
tabController
;
@override
void
initState
()
{
super
.
initState
();
this
.
tabController
=
TabController
(
length:
2
,
vsync:
this
);
}
@override
void
dispose
()
{
_model
.
dispose
();
pageController
.
dispose
();
_refreshController
.
dispose
();
super
.
dispose
();
}
@override
Widget
buildItem
(
BuildContext
context
)
{
return
Scaffold
(
body:
Stack
(
children:
<
Widget
>[
CustomScrollView
(
slivers:
<
Widget
>[
SliverAppBar
(
pinned:
true
,
elevation:
0
,
expandedHeight:
0
,
flexibleSpace:
FlexibleSpaceBar
(
title:
Text
(
'二级方案'
)),
),
SliverToBoxAdapter
(
child:
Column
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
mainAxisSize:
MainAxisSize
.
max
,
children:
<
Widget
>[
good
(),
rect
(),
explain
()],
)),
SliverPersistentHeader
(
pinned:
true
,
delegate:
StickyTabBarDelegate
(
child:
TabBar
(
labelColor:
Color
(
0xff282828
),
labelStyle:
TextStyle
(
fontSize:
15.0
,
fontWeight:
FontWeight
.
bold
),
unselectedLabelColor:
Color
(
0xffB5B5B5
),
unselectedLabelStyle:
TextStyle
(
fontSize:
15.0
),
indicatorColor:
Color
(
0xff4ABAB4
),
indicatorWeight:
3.0
,
indicatorSize:
TabBarIndicatorSize
.
label
,
indicatorPadding:
EdgeInsets
.
only
(
left:
5.0
,
right:
5.0
),
controller:
this
.
tabController
,
tabs:
<
Widget
>[
Tab
(
text:
'医院'
),
Tab
(
text:
'医生'
)]),
),
),
SliverFillRemaining
(
child:
TabBarView
(
controller:
this
.
tabController
,
children:
<
Widget
>[
Container
(),
Container
()]))
]),
Positioned
(
left:
0
,
right:
0
,
bottom:
0
,
child:
bottomWidget
())
],
));
}
Widget
good
()
{
return
StreamBuilder
(
stream:
_model
.
rectLive
.
stream
,
initialData:
[
"w"
,
"w"
,
"q"
,
"w"
],
builder:
(
context
,
data
)
{
return
Padding
(
padding:
EdgeInsets
.
only
(
left:
15.0
,
right:
15.0
,
top:
8.0
),
child:
Row
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
mainAxisSize:
MainAxisSize
.
max
,
children:
<
Widget
>[
ClipRRect
(
borderRadius:
BorderRadius
.
circular
(
6
),
child:
Container
(
decoration:
BoxDecoration
(
borderRadius:
BorderRadius
.
circular
(
17
),
border:
Border
.
all
(
color:
Color
(
0xffF9F8FB
),
width:
1
)),
child:
Image
.
network
(
'https://img1.gamersky.com/image2019/07/20190725_ll_red_136_2/gamersky_07small_14_201972510258D0.jpg'
,
width:
86
,
height:
86
,
fit:
BoxFit
.
cover
,
),
)),
Padding
(
padding:
EdgeInsets
.
only
(
left:
12
,
top:
5
),
child:
Column
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
mainAxisSize:
MainAxisSize
.
max
,
children:
<
Widget
>[
Text
(
'乔雅登玻尿酸(药品类)'
,
style:
TextStyle
(
color:
Color
(
0xff333333
),
fontSize:
15
,
fontWeight:
FontWeight
.
bold
)),
Padding
(
padding:
EdgeInsets
.
only
(
top:
5
)),
Row
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
verticalDirection:
VerticalDirection
.
up
,
children:
<
Widget
>[
Text
(
'指导价:'
,
style:
TextStyle
(
color:
Color
(
0xff999999
),
fontSize:
12
)),
Text
(
'¥2000-5000'
,
style:
TextStyle
(
color:
Color
(
0xffFF5963
),
fontSize:
12
),
)
],
)
],
)),
],
),
);
},
);
}
Widget
rect
()
{
return
Padding
(
padding:
EdgeInsets
.
only
(
top:
20
),
child:
StreamBuilder
<
List
<
String
>>(
stream:
_model
.
rectLive
.
stream
,
initialData:
[
"w"
,
"w"
,
"q"
,
"w"
,
"w"
,
"w"
,
"q"
,
"w"
],
builder:
(
c
,
data
)
{
List
<
Widget
>
list
=
List
();
for
(
int
i
=
0
;
i
<
data
.
data
.
length
;
i
+=
2
)
{
list
.
add
(
Expanded
(
child:
Container
(
alignment:
Alignment
.
center
,
child:
Column
(
mainAxisSize:
MainAxisSize
.
min
,
crossAxisAlignment:
CrossAxisAlignment
.
center
,
children:
<
Widget
>[
baseText
(
data
.
data
[
i
],
14
,
Color
(
0xff282828
),
bold:
true
),
baseText
(
data
.
data
[
i
+
1
],
11
,
Color
(
0xff999999
)),
],
),
),
));
if
(
i
<
data
.
data
.
length
-
2
)
{
list
.
add
(
Container
(
width:
0.5
,
height:
18
,
color:
Color
(
0xFFE5E5E5
),
));
}
}
return
Container
(
decoration:
BoxDecoration
(
borderRadius:
BorderRadius
.
circular
(
4
),
color:
Color
(
0xffF9F8FB
),
),
width:
double
.
maxFinite
,
height:
62
,
margin:
EdgeInsets
.
only
(
left:
15
,
right:
15
,
bottom:
20
),
child:
Row
(
crossAxisAlignment:
CrossAxisAlignment
.
center
,
children:
list
,
),
);
},
),
);
}
Widget
explain
()
{
return
StreamBuilder
<
List
<
String
>>(
stream:
_model
.
explainLive
.
stream
,
initialData:
[
"www"
,
"www"
,
"www"
,
"??"
],
builder:
(
c
,
data
)
{
List
<
Widget
>
list
=
[];
list
.
add
(
Container
(
height:
31
,
child:
Row
(
children:
<
Widget
>[
baseText
(
"项目说明"
,
15
,
Color
(
0xff282828
)),
Expanded
(
child:
Container
(),
),
GestureDetector
(
onTap:
()
{
//TODO
},
behavior:
HitTestBehavior
.
opaque
,
child:
baseText
(
"了解更多"
,
12
,
Color
(
0xff3FB5AF
)),
)
],
),
));
for
(
int
i
=
0
;
i
<
data
.
data
.
length
;
i
+=
2
)
{
list
.
add
(
Container
(
height:
28
,
child:
Row
(
children:
<
Widget
>[
baseText
(
data
.
data
[
i
],
13
,
Color
(
0xff999999
)),
Container
(
margin:
EdgeInsets
.
only
(
left:
12
),
child:
baseText
(
data
.
data
[
i
+
1
],
13
,
Color
(
0xff666666
)),
)
],
),
));
}
return
Container
(
margin:
EdgeInsets
.
only
(
left:
15
,
right:
15
,
bottom:
20
),
child:
Column
(
mainAxisSize:
MainAxisSize
.
min
,
children:
list
,
),
);
},
);
}
Widget
bottomWidget
()
{
return
Container
(
width:
double
.
maxFinite
,
height:
55
,
child:
Row
(
mainAxisSize:
MainAxisSize
.
min
,
crossAxisAlignment:
CrossAxisAlignment
.
center
,
children:
<
Widget
>[
Container
(
margin:
EdgeInsets
.
only
(
left:
18
),
width:
30
,
child:
Column
(
mainAxisSize:
MainAxisSize
.
min
,
children:
<
Widget
>[
Container
(
width:
22
,
height:
22
,
child:
Image
.
asset
(
"assets/vs_black.png"
),
),
Container
(
margin:
EdgeInsets
.
only
(
top:
3
),
child:
baseText
(
"去比较"
,
10
,
Color
(
0xff282828
)),
)
],
),
),
GestureDetector
(
behavior:
HitTestBehavior
.
opaque
,
onTap:
()
{
BaseBottomPicker
()
..
setPicker
(
MechanismBox
())
..
show
(
context
);
},
child:
Container
(
margin:
EdgeInsets
.
only
(
left:
15
),
width:
135
,
height:
40
,
decoration:
BoxDecoration
(
color:
Color
(
0xff51CDC7
),
borderRadius:
BorderRadius
.
circular
(
20
)),
alignment:
Alignment
.
center
,
child:
baseText
(
"咨询"
,
14
,
Colors
.
white
,
bold:
true
),
)),
GestureDetector
(
behavior:
HitTestBehavior
.
opaque
,
onTap:
()
{},
child:
Container
(
margin:
EdgeInsets
.
only
(
left:
15
),
width:
135
,
height:
40
,
decoration:
BoxDecoration
(
color:
Color
(
0xffF96079
),
borderRadius:
BorderRadius
.
circular
(
20
)),
alignment:
Alignment
.
center
,
child:
baseText
(
"获取底价"
,
14
,
Colors
.
white
,
bold:
true
),
)),
Expanded
(
child:
Container
(),
)
],
),
);
}
Widget
pages
()
{
return
Container
(
margin:
EdgeInsets
.
only
(
top:
5
),
width:
double
.
maxFinite
,
child:
ListView
.
builder
(
physics:
NeverScrollableScrollPhysics
(),
itemBuilder:
(
c
,
index
)
{
return
DoctorItem
(
c
,
[]);
},
itemCount:
5
,
));
}
}
Widget
DoctorItem
(
BuildContext
context
,
cards
)
{
if
(
cards
.
doctor
==
null
&&
isDebug
)
{
throw
new
Exception
();
}
return
GestureDetector
(
child:
Container
(
margin:
EdgeInsets
.
only
(
left:
15
,
right:
15
),
height:
127
,
child:
Stack
(
children:
<
Widget
>[
Positioned
(
top:
15
,
child:
Container
(
width:
45
,
height:
45
,
child:
ClipOval
(
child:
CachedNetworkImage
(
imageUrl:
cards
.
doctor
.
portrait
,
),
),
),
),
Positioned
(
left:
57
,
top:
18
,
child:
Row
(
mainAxisSize:
MainAxisSize
.
min
,
crossAxisAlignment:
CrossAxisAlignment
.
end
,
children:
<
Widget
>[
baseText
(
cards
.
doctor
.
name
,
15
,
Color
(
0xff333333
),
bold:
true
),
Container
(
margin:
EdgeInsets
.
only
(
left:
4
),
child:
baseText
(
cards
.
doctor
.
name
,
15
,
Color
(
0xff333333
),
bold:
true
),
)
],
),
),
Positioned
(
top:
42
,
right:
0
,
child:
Row
(
crossAxisAlignment:
CrossAxisAlignment
.
end
,
mainAxisSize:
MainAxisSize
.
min
,
children:
<
Widget
>[
baseText
(
"¥"
,
12
,
Color
(
0xffFF5963
)),
baseText
(
"
${cards.doctor.minPrice}
-
${cards.doctor.maxPrice}
"
,
15
,
Color
(
0xffFF5963
)),
],
),
),
Positioned
(
bottom:
15
,
right:
0
,
child:
lowPriceWidget
(),
),
Positioned
(
bottom:
15
,
right:
187
,
child:
askWidget
(),
),
],
),
),
);
}
Widget
HospitalItem
(
BuildContext
context
,
cards
)
{
if
(
cards
.
hospital
==
null
&&
isDebug
)
{
throw
new
Exception
();
}
return
GestureDetector
(
onTap:
()
{},
child:
Container
(
margin:
EdgeInsets
.
only
(
left:
15
,
right:
15
),
height:
149
,
child:
Stack
(
children:
<
Widget
>[
Positioned
(
left:
0
,
top:
15
,
child:
Container
(
width:
45
,
height:
45
,
child:
ClipOval
(
child:
CachedNetworkImage
(
imageUrl:
cards
.
hospital
.
portrait
,
),
),
),
),
Positioned
(
left:
57
,
top:
17.5
,
child:
baseText
(
cards
.
hospital
.
name
,
15
,
Color
(
0xff333333
),
bold:
true
),
),
Positioned
(
top:
42.5
,
right:
0
,
child:
Row
(
crossAxisAlignment:
CrossAxisAlignment
.
end
,
mainAxisSize:
MainAxisSize
.
min
,
children:
<
Widget
>[
baseText
(
"¥"
,
12
,
Color
(
0xffFF5963
)),
baseText
(
"
${cards.hospital.minPrice}
-
${cards.hospital.maxPrice}
"
,
15
,
Color
(
0xffFF5963
)),
],
),
),
Positioned
(
bottom:
15
,
right:
0
,
child:
lowPriceWidget
(),
),
Positioned
(
bottom:
15
,
right:
187
,
child:
askWidget
(),
),
Positioned
(
bottom:
67
,
left:
57
,
child:
baseText
(
cards
.
hospital
.
address
,
12
,
Color
(
0xff666666
)),
),
Positioned
(
left:
57
,
top:
43.5
,
child:
FiveStarView
(
cards
.
hospital
.
star
,
5
),
)
],
),
));
}
Widget
lowPriceWidget
(
)
{
return
GestureDetector
(
behavior:
HitTestBehavior
.
opaque
,
child:
Container
(
width:
122
,
height:
37
,
decoration:
BoxDecoration
(
borderRadius:
BorderRadius
.
circular
(
18.5
),
color:
Color
(
0xffFFF5F5
)),
alignment:
Alignment
.
center
,
child:
baseText
(
"获取底价"
,
14
,
Color
(
0xffFF5963
),
bold:
true
),
),
);
}
Widget
askWidget
(
)
{
return
GestureDetector
(
behavior:
HitTestBehavior
.
opaque
,
child:
Container
(
width:
122
,
height:
37
,
decoration:
BoxDecoration
(
borderRadius:
BorderRadius
.
circular
(
18.5
),
color:
Color
(
0xffEEFDFD
)),
alignment:
Alignment
.
center
,
child:
baseText
(
"咨询"
,
14
,
Color
(
0xff3FB5AF
),
bold:
true
),
),
);
}
class
StickyTabBarDelegate
extends
SliverPersistentHeaderDelegate
{
final
TabBar
child
;
StickyTabBarDelegate
({
@required
this
.
child
});
@override
Widget
build
(
BuildContext
context
,
double
shrinkOffset
,
bool
overlapsContent
)
{
return
this
.
child
;
}
@override
double
get
maxExtent
=>
this
.
child
.
preferredSize
.
height
;
@override
double
get
minExtent
=>
this
.
child
.
preferredSize
.
height
;
@override
bool
shouldRebuild
(
SliverPersistentHeaderDelegate
oldDelegate
)
{
return
true
;
}
}
lib/ClueModel/page/mechanismBox/MechanismBoxPage.dart
0 → 100644
View file @
6cd8b6a0
import
'package:flutter/material.dart'
;
import
'package:flutter_common/commonModel/picker/base/BaseBottomPicker.dart'
;
import
'../../../commonModel/GMBase.dart'
;
import
'../../../commonModel/base/BaseComponent.dart'
;
import
'../../../commonModel/base/BaseComponent.dart'
;
class
MechanismBox
implements
IBottomPicker
{
VoidCallback
dismissCall
;
@override
initState
(
dismissCall
,
BuildContext
context
)
{
this
.
dismissCall
=
dismissCall
;
}
Widget
build
(
BuildContext
context
)
{
MediaQueryData
mq
=
MediaQuery
.
of
(
context
);
TextEditingController
textController
=
TextEditingController
();
return
ClipRRect
(
borderRadius:
BorderRadius
.
only
(
topLeft:
Radius
.
circular
(
10.0
),
topRight:
Radius
.
circular
(
10.0
)),
child:
Container
(
width:
mq
.
size
.
width
,
height:
mq
.
size
.
height
-
140
,
color:
Colors
.
white
,
child:
Column
(
mainAxisAlignment:
MainAxisAlignment
.
start
,
children:
<
Widget
>[
Container
(
margin:
EdgeInsets
.
only
(
left:
20
,
right:
20
),
width:
mq
.
size
.
width
,
decoration:
BoxDecoration
(
border:
Border
(
bottom:
BorderSide
(
width:
1
,
color:
Color
(
0xffE5E5E5
)))),
height:
50
,
child:
Stack
(
alignment:
Alignment
.
center
,
children:
<
Widget
>[
Container
(
child:
Text
(
'请选择要咨询的机构'
,
style:
TextStyle
(
color:
Color
(
0xff282828
),
fontSize:
17
,
fontWeight:
FontWeight
.
bold
),
),
),
Positioned
(
right:
0
,
top:
16.0
,
child:
GestureDetector
(
onTap:
()
{
dismissCall
();
},
child:
Container
(
width:
14
,
height:
14
,
child:
Image
.
asset
(
"assets/close-btn.png"
),
),
))
],
),
),
Container
(
height:
mq
.
size
.
height
-
140
-
50
-
96
,
width:
mq
.
size
.
width
,
padding:
EdgeInsets
.
only
(
left:
20
,
right:
20
),
child:
ListView
.
separated
(
itemCount:
100
,
itemBuilder:
(
BuildContext
context
,
int
index
)
{
return
ListTile
(
title:
Text
(
"
$index
"
));
},
separatorBuilder:
(
BuildContext
context
,
int
index
)
{
return
Divider
(
color:
Color
(
0xffE5E5E5
));
},
)),
Container
(
height:
96
,
color:
Color
(
0xffF9F8FB
),
child:
Column
(
children:
<
Widget
>[
Container
(
height:
25
,
width:
double
.
maxFinite
,
margin:
EdgeInsets
.
only
(
top:
12
),
child:
ListView
(
scrollDirection:
Axis
.
horizontal
,
//横向滚动
children:
<
Widget
>[
Container
(
margin:
EdgeInsets
.
only
(
left:
15
,
right:
8
),
height:
25
,
child:
Text
(
'我想'
,
style:
TextStyle
(
height:
2
,
color:
Color
(
0xff666666
),
fontSize:
12
),
)),
Container
(
height:
25
,
margin:
EdgeInsets
.
only
(
right:
12
),
padding:
EdgeInsets
.
only
(
left:
8
,
right:
8
),
decoration:
BoxDecoration
(
border:
Border
.
all
(
color:
Color
(
0xffE5E5E5
),
width:
0.5
),
color:
Color
(
0xffffffff
),
borderRadius:
BorderRadius
.
circular
(
20
)),
child:
Text
(
'有优惠活动吗?'
,
style:
TextStyle
(
fontSize:
12
,
color:
Color
(
0xff666666
),
height:
1.8
),
),
),
Container
(
height:
25
,
margin:
EdgeInsets
.
only
(
right:
12
),
padding:
EdgeInsets
.
only
(
left:
8
,
right:
8
),
decoration:
BoxDecoration
(
border:
Border
.
all
(
color:
Color
(
0xffE5E5E5
),
width:
0.5
),
color:
Color
(
0xffffffff
),
borderRadius:
BorderRadius
.
circular
(
20
)),
child:
Text
(
'111有优惠活动吗?'
,
style:
TextStyle
(
fontSize:
12
,
color:
Color
(
0xff666666
),
height:
1.8
),
)),
Container
(
height:
25
,
margin:
EdgeInsets
.
only
(
right:
12
),
padding:
EdgeInsets
.
only
(
left:
8
,
right:
8
),
decoration:
BoxDecoration
(
border:
Border
.
all
(
color:
Color
(
0xffE5E5E5
),
width:
0.5
),
color:
Color
(
0xffffffff
),
borderRadius:
BorderRadius
.
circular
(
20
)),
child:
Text
(
'111有优惠活动吗?'
,
style:
TextStyle
(
fontSize:
12
,
color:
Color
(
0xff666666
),
height:
1.8
),
)),
Container
(
height:
25
,
margin:
EdgeInsets
.
only
(
right:
12
),
padding:
EdgeInsets
.
only
(
left:
8
,
right:
8
),
decoration:
BoxDecoration
(
border:
Border
.
all
(
color:
Color
(
0xffE5E5E5
),
width:
0.5
),
color:
Color
(
0xffffffff
),
borderRadius:
BorderRadius
.
circular
(
20
)),
child:
Text
(
'111有优惠活动吗?'
,
style:
TextStyle
(
fontSize:
12
,
color:
Color
(
0xff666666
),
height:
1.8
),
))
],
),
),
Container
(
height:
35
,
margin:
EdgeInsets
.
only
(
top:
12
,
left:
15
,
right:
15
),
decoration:
BoxDecoration
(
border:
Border
.
all
(
color:
Color
(
0xffE5E5E5
),
width:
0.5
),
color:
Color
(
0xffffffff
),
borderRadius:
BorderRadius
.
circular
(
35
)),
child:
TextField
(
controller:
textController
,
keyboardType:
TextInputType
.
text
,
decoration:
InputDecoration
(
contentPadding:
EdgeInsets
.
all
(
16.0
),
labelText:
'文案文案文案不知道文案是啥'
,
border:
InputBorder
.
none
),
autofocus:
false
,
),
)
],
))
],
)),
);
}
@override
void
dispose
()
{
dismissCall
();
}
}
lib/MainRouter/page/test/TestPage.dart
View file @
6cd8b6a0
...
...
@@ -26,16 +26,24 @@ class TestState extends BaseState<TestPage> {
JumpUtil
.
jumpToPageRight
(
context
,
NetProxyPage
());
}));
list
.
add
(
listItem
(
"一级列表页"
,
()
{
JumpUtil
.
jumpToPageRight
(
context
,
RouterCenterImpl
().
findClueRouter
().
getLevelOnePage
());
JumpUtil
.
jumpToPageRight
(
context
,
RouterCenterImpl
().
findClueRouter
().
getLevelOnePage
());
}));
list
.
add
(
listItem
(
"二级列表页"
,
()
{
JumpUtil
.
jumpToPageRight
(
context
,
RouterCenterImpl
().
findClueRouter
().
getLevelTwoPage
());
}));
list
.
add
(
listItem
(
"方案页面"
,
()
{
JumpUtil
.
jumpToPageRight
(
context
,
RouterCenterImpl
().
findClueRouter
().
getPlanPage
());
JumpUtil
.
jumpToPageRight
(
context
,
RouterCenterImpl
().
findClueRouter
().
getPlanPage
());
}));
list
.
add
(
listItem
(
"对比详情页"
,
()
{
JumpUtil
.
jumpToPageRight
(
context
,
RouterCenterImpl
().
findClueRouter
().
getPlanCompareDetailPage
());
JumpUtil
.
jumpToPageRight
(
context
,
RouterCenterImpl
().
findClueRouter
().
getPlanCompareDetailPage
());
}));
list
.
add
(
listItem
(
"项目说明"
,
()
{
JumpUtil
.
jumpToPageRight
(
context
,
RouterCenterImpl
().
findClueRouter
().
getProjectDetailsPage
());
JumpUtil
.
jumpToPageRight
(
context
,
RouterCenterImpl
().
findClueRouter
().
getProjectDetailsPage
());
}));
return
list
;
}
...
...
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