Commit 3d2d9451 authored by 林生雨's avatar 林生雨

w

parent 7fa04e7f
...@@ -206,7 +206,10 @@ class PlanCompareDetailPageState extends BaseState<PlanCompareDetailPage> { ...@@ -206,7 +206,10 @@ class PlanCompareDetailPageState extends BaseState<PlanCompareDetailPage> {
Positioned( Positioned(
left: 12, left: 12,
top: 56, top: 56,
child: Column( child: Row(
mainAxisSize: MainAxisSize.min,
crossAxisAlignment: CrossAxisAlignment.baseline,
textBaseline: TextBaseline.alphabetic,
children: <Widget>[ children: <Widget>[
price == "暂无报价" price == "暂无报价"
? Container( ? Container(
......
...@@ -111,6 +111,8 @@ class _PlansCompareFeedItemViewState ...@@ -111,6 +111,8 @@ class _PlansCompareFeedItemViewState
), ),
), ),
Row( Row(
crossAxisAlignment: CrossAxisAlignment.baseline,
textBaseline: TextBaseline.alphabetic,
children: <Widget>[ children: <Widget>[
price == "暂无报价" price == "暂无报价"
? Container( ? Container(
...@@ -166,6 +168,8 @@ class _PlansCompareFeedItemViewState ...@@ -166,6 +168,8 @@ class _PlansCompareFeedItemViewState
bold: true), bold: true),
), ),
Row( Row(
crossAxisAlignment: CrossAxisAlignment.baseline,
textBaseline: TextBaseline.alphabetic,
children: <Widget>[ children: <Widget>[
price == "暂无报价" price == "暂无报价"
? Container( ? Container(
......
...@@ -67,7 +67,8 @@ class LevelOneItem extends StatelessWidget { ...@@ -67,7 +67,8 @@ class LevelOneItem extends StatelessWidget {
if (cards.doctor == null && isDebug) { if (cards.doctor == null && isDebug) {
throw new Exception(); throw new Exception();
} }
var price = NumPlanUtil.getPrice(cards.doctor.minPrice, cards.doctor.maxPrice); var price =
NumPlanUtil.getPrice(cards.doctor.minPrice, cards.doctor.maxPrice);
return GestureDetector( return GestureDetector(
behavior: HitTestBehavior.opaque, behavior: HitTestBehavior.opaque,
onTap: () { onTap: () {
...@@ -108,7 +109,8 @@ class LevelOneItem extends StatelessWidget { ...@@ -108,7 +109,8 @@ class LevelOneItem extends StatelessWidget {
top: 18, top: 18,
child: Row( child: Row(
mainAxisSize: MainAxisSize.min, mainAxisSize: MainAxisSize.min,
crossAxisAlignment: CrossAxisAlignment.center, crossAxisAlignment: CrossAxisAlignment.baseline,
textBaseline: TextBaseline.alphabetic,
children: <Widget>[ children: <Widget>[
baseText(cards.doctor.name, 15, Color(0xff333333), baseText(cards.doctor.name, 15, Color(0xff333333),
bold: true), bold: true),
...@@ -124,7 +126,8 @@ class LevelOneItem extends StatelessWidget { ...@@ -124,7 +126,8 @@ class LevelOneItem extends StatelessWidget {
top: 42, top: 42,
right: 0, right: 0,
child: Row( child: Row(
crossAxisAlignment: CrossAxisAlignment.end, crossAxisAlignment: CrossAxisAlignment.baseline,
textBaseline: TextBaseline.alphabetic,
mainAxisSize: MainAxisSize.min, mainAxisSize: MainAxisSize.min,
children: <Widget>[ children: <Widget>[
price == "暂无报价" price == "暂无报价"
...@@ -193,7 +196,8 @@ class LevelOneItem extends StatelessWidget { ...@@ -193,7 +196,8 @@ class LevelOneItem extends StatelessWidget {
if (cards.hospital == null && isDebug) { if (cards.hospital == null && isDebug) {
throw new Exception(); throw new Exception();
} }
var price = NumPlanUtil.getPrice(cards.hospital.minPrice, cards.hospital.maxPrice); var price =
NumPlanUtil.getPrice(cards.hospital.minPrice, cards.hospital.maxPrice);
return GestureDetector( return GestureDetector(
behavior: HitTestBehavior.opaque, behavior: HitTestBehavior.opaque,
onTap: () { onTap: () {
...@@ -220,6 +224,7 @@ class LevelOneItem extends StatelessWidget { ...@@ -220,6 +224,7 @@ class LevelOneItem extends StatelessWidget {
child: ClipOval( child: ClipOval(
child: CachedNetworkImage( child: CachedNetworkImage(
imageUrl: cards.hospital.portrait, imageUrl: cards.hospital.portrait,
fit: BoxFit.cover,
), ),
), ),
), ),
...@@ -237,7 +242,8 @@ class LevelOneItem extends StatelessWidget { ...@@ -237,7 +242,8 @@ class LevelOneItem extends StatelessWidget {
top: 42.5, top: 42.5,
right: 0, right: 0,
child: Row( child: Row(
crossAxisAlignment: CrossAxisAlignment.end, crossAxisAlignment: CrossAxisAlignment.baseline,
textBaseline: TextBaseline.alphabetic,
mainAxisSize: MainAxisSize.min, mainAxisSize: MainAxisSize.min,
children: <Widget>[ children: <Widget>[
price == "暂无报价" price == "暂无报价"
...@@ -290,7 +296,11 @@ class LevelOneItem extends StatelessWidget { ...@@ -290,7 +296,11 @@ class LevelOneItem extends StatelessWidget {
Positioned( Positioned(
bottom: 63.5, bottom: 63.5,
left: 57, left: 57,
child: baseText(cards.hospital.address, 12, Color(0xff666666)), child: Container(
width: MediaQuery.of(context).size.width - 30 - 57,
child:
baseText(cards.hospital.address, 12, Color(0xff666666)),
),
), ),
Positioned( Positioned(
left: 57, left: 57,
...@@ -336,7 +346,8 @@ class LevelOneItem extends StatelessWidget { ...@@ -336,7 +346,8 @@ class LevelOneItem extends StatelessWidget {
top: 15, top: 15,
child: Row( child: Row(
mainAxisSize: MainAxisSize.min, mainAxisSize: MainAxisSize.min,
crossAxisAlignment: CrossAxisAlignment.end, crossAxisAlignment: CrossAxisAlignment.baseline,
textBaseline: TextBaseline.alphabetic,
children: <Widget>[ children: <Widget>[
price == "暂无报价" price == "暂无报价"
? Container( ? Container(
...@@ -364,8 +375,8 @@ class LevelOneItem extends StatelessWidget { ...@@ -364,8 +375,8 @@ class LevelOneItem extends StatelessWidget {
Positioned( Positioned(
top: 40, top: 40,
right: 0, right: 0,
child: baseText( child: baseText("指导价:${cards.plan.guide_price ?? "暂无报价"}", 11,
"指导价:${cards.plan.guide_price??"暂无报价"}", 11, Color(0xff666666)), Color(0xff666666)),
), ),
Positioned( Positioned(
left: 0, left: 0,
......
...@@ -314,7 +314,8 @@ class LevelOneState extends BaseState<LevelOnePage> ...@@ -314,7 +314,8 @@ class LevelOneState extends BaseState<LevelOnePage>
top: 6, top: 6,
child: Row( child: Row(
mainAxisSize: MainAxisSize.min, mainAxisSize: MainAxisSize.min,
crossAxisAlignment: CrossAxisAlignment.end, crossAxisAlignment: CrossAxisAlignment.baseline,
textBaseline: TextBaseline.alphabetic,
children: <Widget>[ children: <Widget>[
baseText("好评率", 11, Color(0xff282828)), baseText("好评率", 11, Color(0xff282828)),
Container( Container(
......
...@@ -68,12 +68,13 @@ class PlanBarView extends StatelessWidget { ...@@ -68,12 +68,13 @@ class PlanBarView extends StatelessWidget {
alignment: Alignment.center, alignment: Alignment.center,
child: Row( child: Row(
mainAxisSize: MainAxisSize.min, mainAxisSize: MainAxisSize.min,
crossAxisAlignment: CrossAxisAlignment.end,
children: <Widget>[ children: <Widget>[
baseText(text, 14, baseText(text, 14,
index == showIndex ? Color(0xff3FB5AF) : Color(0xff666666)), index == showIndex ? Color(0xff3FB5AF) : Color(0xff666666)),
Container( Container(
width: 10, width: 10,
height: 10, height: 13,
padding: EdgeInsets.only(top: 3), padding: EdgeInsets.only(top: 3),
alignment: Alignment.topCenter, alignment: Alignment.topCenter,
child: Container( child: Container(
......
...@@ -28,8 +28,8 @@ class PlanItem extends StatelessWidget { ...@@ -28,8 +28,8 @@ class PlanItem extends StatelessWidget {
if (i != plans.baseAttrs.length - 1) { if (i != plans.baseAttrs.length - 1) {
list.add(Container( list.add(Container(
width: 8.5, width: 8.5,
height: 8, height: 10,
alignment: Alignment.center, alignment: Alignment.topCenter,
child: Container( child: Container(
width: 0.5, width: 0.5,
height: 8, height: 8,
...@@ -47,6 +47,7 @@ class PlanItem extends StatelessWidget { ...@@ -47,6 +47,7 @@ class PlanItem extends StatelessWidget {
rate = rate.split(".")[0]; rate = rate.split(".")[0];
} }
rate = rate.replaceAll("%", ""); rate = rate.replaceAll("%", "");
var price = NumPlanUtil.getPrice(plans.minPrice, plans.maxPrice);
return Container( return Container(
margin: EdgeInsets.only(top: 10, left: 10, right: 10), margin: EdgeInsets.only(top: 10, left: 10, right: 10),
child: Card( child: Card(
...@@ -80,7 +81,7 @@ class PlanItem extends StatelessWidget { ...@@ -80,7 +81,7 @@ class PlanItem extends StatelessWidget {
mainAxisSize: MainAxisSize.min, mainAxisSize: MainAxisSize.min,
children: <Widget>[ children: <Widget>[
Container( Container(
constraints: BoxConstraints(maxWidth: 110), constraints: BoxConstraints(maxWidth: 95),
child: baseText(plans.name, 14, Color(0xff282828), child: baseText(plans.name, 14, Color(0xff282828),
bold: true), bold: true),
), ),
...@@ -111,9 +112,9 @@ class PlanItem extends StatelessWidget { ...@@ -111,9 +112,9 @@ class PlanItem extends StatelessWidget {
top: 15, top: 15,
right: 10, right: 10,
child: Row( child: Row(
textBaseline: TextBaseline.alphabetic,
crossAxisAlignment: CrossAxisAlignment.baseline,
mainAxisSize: MainAxisSize.min, mainAxisSize: MainAxisSize.min,
// crossAxisAlignment: CrossAxisAlignment.end,
verticalDirection: VerticalDirection.down,
children: <Widget>[ children: <Widget>[
baseText("好评率", 11, Color(0xff282828)), baseText("好评率", 11, Color(0xff282828)),
Container( Container(
...@@ -125,7 +126,7 @@ class PlanItem extends StatelessWidget { ...@@ -125,7 +126,7 @@ class PlanItem extends StatelessWidget {
), ),
), ),
Positioned( Positioned(
bottom: 14, bottom: 16,
right: 10, right: 10,
child: child:
baseText("销量${plans.salesCount}", 11, Color(0xff282828)), baseText("销量${plans.salesCount}", 11, Color(0xff282828)),
...@@ -134,13 +135,23 @@ class PlanItem extends StatelessWidget { ...@@ -134,13 +135,23 @@ class PlanItem extends StatelessWidget {
left: 91, left: 91,
bottom: 14, bottom: 14,
child: Row( child: Row(
verticalDirection: VerticalDirection.down, textBaseline: TextBaseline.alphabetic,
crossAxisAlignment: CrossAxisAlignment.baseline,
mainAxisSize: MainAxisSize.min, mainAxisSize: MainAxisSize.min,
children: <Widget>[ children: <Widget>[
baseText("¥", 10, Color(0xffFF5963)), price == "暂无报价"
baseText("${plans.minPrice}-${plans.maxPrice}", 13, ? Container(
Color(0xffFF5963), width: 0,
bold: true), height: 0,
)
: baseText("¥", 12, Color(0xffFF5963)),
baseText(
price,
price == "暂无报价" ? 13 : 15,
price == "暂无报价"
? Color(0xff999999)
: Color(0xffFF5963),
bold: price != "暂无报价")
], ],
), ),
), ),
...@@ -149,7 +160,7 @@ class PlanItem extends StatelessWidget { ...@@ -149,7 +160,7 @@ class PlanItem extends StatelessWidget {
top: 36, top: 36,
child: Row( child: Row(
mainAxisSize: MainAxisSize.min, mainAxisSize: MainAxisSize.min,
crossAxisAlignment: CrossAxisAlignment.center, crossAxisAlignment: CrossAxisAlignment.end,
children: list, children: list,
), ),
) )
......
...@@ -425,7 +425,7 @@ class PlanState extends BaseState<PlanPage> with TickerProviderStateMixin { ...@@ -425,7 +425,7 @@ class PlanState extends BaseState<PlanPage> with TickerProviderStateMixin {
Widget towPic() { Widget towPic() {
return Container( return Container(
height: 90, height: 90,
margin: EdgeInsets.only(left: 15, right: 15, top: 15, bottom: 0), margin: EdgeInsets.only(left: 15, right: 15, top: 0, bottom: 0),
child: Row( child: Row(
children: <Widget>[ children: <Widget>[
Expanded( Expanded(
......
...@@ -84,8 +84,8 @@ Text baseText(String text, double fontSize, Color color, ...@@ -84,8 +84,8 @@ Text baseText(String text, double fontSize, Color color,
{bool bold = false, {bool bold = false,
TextAlign textAlign, TextAlign textAlign,
int maxLines = 1, int maxLines = 1,
TextOverflow overflow TextOverflow overflow,
,bool isWarp=false}) { bool isWarp = false}) {
return Text( return Text(
text, text,
textAlign: textAlign ?? TextAlign.start, textAlign: textAlign ?? TextAlign.start,
...@@ -436,8 +436,7 @@ Widget baseTabBar( ...@@ -436,8 +436,7 @@ Widget baseTabBar(
color: Colors.black12, color: Colors.black12,
offset: Offset(0.0, 2.0), offset: Offset(0.0, 2.0),
blurRadius: 0.5, blurRadius: 0.5,
spreadRadius: 0.5 spreadRadius: 0.5)
)
], ],
), ),
child: TabBar( child: TabBar(
...@@ -555,4 +554,3 @@ Widget baseStateView(double width, double height, LiveData<int> stateLive, ...@@ -555,4 +554,3 @@ Widget baseStateView(double width, double height, LiveData<int> stateLive,
}, },
); );
} }
...@@ -43,14 +43,15 @@ class _MD2Painter extends BoxPainter { ...@@ -43,14 +43,15 @@ class _MD2Painter extends BoxPainter {
void paint(Canvas canvas, Offset offset, ImageConfiguration configuration) { void paint(Canvas canvas, Offset offset, ImageConfiguration configuration) {
assert(configuration != null); assert(configuration != null);
assert(configuration.size != null); assert(configuration.size != null);
double width = (configuration.size.width-50) / 3.0 * 2.0;
Rect rect = Offset( Rect rect = Offset(
offset.dx + offset.dx +
configuration.size.width / 2 - configuration.size.width / 2 -
decoration.indicatorWidth / 2, width / 2,
(configuration.size.height - (configuration.size.height -
decoration.indicatorHeight - decoration.indicatorHeight -
decoration.indicatorPaddingBottom)) & decoration.indicatorPaddingBottom)) &
Size(decoration.indicatorWidth, decoration.indicatorHeight); Size(width, decoration.indicatorHeight);
final Paint paint = Paint(); final Paint paint = Paint();
paint.color = decoration.indicatorColor; paint.color = decoration.indicatorColor;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment