Commit c99cab77 authored by 林生雨's avatar 林生雨

Merge branch 'featrue/duxin' into 'test'

Ui走查

See merge request !60
parents 9148256d e52b4358
......@@ -53,7 +53,7 @@ class PlanCompareDetailPageState extends BaseState<PlanCompareDetailPage> {
screenWidth = MediaQuery.of(context).size.width;
return Scaffold(
appBar: baseAppBar(
title: "对比详情",
titleWidget: baseText("对比详情", 18, Color(0xff333333), bold: true),
centerTitle: true,
backClick: () {
if (RouterCenterImpl().findMainRouter().isWithNative()) {
......
......@@ -54,7 +54,7 @@ class _PlansCompareFeedState extends BaseState<PlansCompareFeedPage>
return Scaffold(
backgroundColor: Colors.white,
appBar: baseAppBar(
title: "方案对比",
titleWidget: baseText("方案对比", 18, Color(0xff333333), bold: true),
centerTitle: true,
backClick: () {
if (RouterCenterImpl().findMainRouter().isWithNative()) {
......
......@@ -47,7 +47,7 @@ class _ProjectDetailsState extends BaseState<ProjectDetailsPage> {
Widget buildItem(BuildContext context) {
return Scaffold(
appBar: baseAppBar(
title: "项目说明",
titleWidget: baseText("项目说明", 18, Color(0xff333333), bold: true),
centerTitle: true,
backClick: () {
if (RouterCenterImpl().findMainRouter().isWithNative()) {
......
......@@ -183,14 +183,14 @@ class LevelOneState extends BaseState<LevelOnePage>
child: newHome(),
)),
baseSliverTitle("${widget.title}", MediaQuery.of(context).size.width,
_model.textLive),
_model.textLive, context),
baseSliverBack(() {
if (RouterCenterImpl().findMainRouter().isWithNative()) {
FlutterBoost.singleton.closeCurrent();
} else {
Navigator.of(context).pop();
}
}),
}, context),
],
);
}
......
......@@ -174,14 +174,14 @@ class LevelTwoState extends BaseState<LevelTwoPage>
child: newHome(),
)),
baseSliverTitle("${_model.name}", MediaQuery.of(context).size.width,
_model.textLive),
_model.textLive, context),
baseSliverBack(() {
if (RouterCenterImpl().findMainRouter().isWithNative()) {
FlutterBoost.singleton.closeCurrent();
} else {
Navigator.of(context).pop();
}
}),
}, context),
],
);
}
......
......@@ -88,7 +88,6 @@ class MechanismBox implements IBottomPicker {
textController.dispose();
refreshController.dispose();
_model.dispose();
_model.dispose();
focusNode.dispose();
}
......
......@@ -148,9 +148,9 @@ class TopPageState extends BaseState<TopPage> with TickerProviderStateMixin {
} else {
Navigator.of(context).pop();
}
}),
}, context),
baseSliverTitle("${widget.title}", MediaQuery.of(context).size.width,
_model.textLive)
_model.textLive, context)
],
);
}
......
......@@ -3,6 +3,8 @@
* @date 2019-10-13
**/
import 'dart:io';
import 'package:cached_network_image/cached_network_image.dart';
import 'package:flutter/material.dart';
import 'package:flutter/rendering.dart';
......@@ -149,7 +151,7 @@ Widget netErrorItem() {}
Widget errorItem(double width, double height, VoidCallback retry,
{String errorText, String retryText, double paddingTop}) {
return Container(
color: Colors.white,
color: Colors.white,
width: width,
height: height,
padding: EdgeInsets.only(top: paddingTop ?? 0),
......@@ -502,20 +504,27 @@ Widget baseSliverAppBar(String url,
elevation: elevation ?? 0,
expandedHeight: height ?? 200,
automaticallyImplyLeading: false,
bottom: PreferredSize(
preferredSize: Size.fromHeight(Platform.isIOS ? -12 : -6),
child: SizedBox(
height: 0,
),
),
flexibleSpace: FlexibleSpaceBar(
background: needpic
? CachedNetworkImage(
imageUrl: url ?? '',
fit: BoxFit.cover,
fit: BoxFit.fitHeight,
)
: Container(),
),
);
}
Widget baseSliverBack(VoidCallback tap) {
Widget baseSliverBack(VoidCallback tap, context) {
final double topPadding = MediaQuery.of(context).padding.top;
return Positioned(
top: 45,
top: topPadding + 12,
left: 7,
child: GestureDetector(
behavior: HitTestBehavior.opaque,
......@@ -536,9 +545,10 @@ Widget baseSliverBack(VoidCallback tap) {
);
}
Widget baseSliverTitle(String text, double width, LiveData liveData) {
Widget baseSliverTitle(String text, double width, LiveData liveData, context) {
final double topPadding = MediaQuery.of(context).padding.top;
return Positioned(
top: 46,
top: topPadding + 13,
child: StreamBuilder(
stream: liveData.stream,
initialData: liveData.data ?? 0.0,
......
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