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