Commit 109daea9 authored by 林生雨's avatar 林生雨

Merge branch 'featrue/duxin' into 'test'

Featrue/duxin

See merge request !4
parents a5a10489 8c323111
...@@ -84,7 +84,7 @@ class _LevelTwoPageState extends BaseState<LevelTwoPage> ...@@ -84,7 +84,7 @@ class _LevelTwoPageState extends BaseState<LevelTwoPage>
SliverFillRemaining( SliverFillRemaining(
child: TabBarView( child: TabBarView(
controller: this.tabController, controller: this.tabController,
children: <Widget>[Container(), Container()])) children: <Widget>[pages(), pages()]))
]), ]),
Positioned(left: 0, right: 0, bottom: 0, child: bottomWidget()) Positioned(left: 0, right: 0, bottom: 0, child: bottomWidget())
], ],
...@@ -318,7 +318,7 @@ class _LevelTwoPageState extends BaseState<LevelTwoPage> ...@@ -318,7 +318,7 @@ class _LevelTwoPageState extends BaseState<LevelTwoPage>
child: ListView.builder( child: ListView.builder(
physics: NeverScrollableScrollPhysics(), physics: NeverScrollableScrollPhysics(),
itemBuilder: (c, index) { itemBuilder: (c, index) {
return DoctorItem(c, []); return Text('$index');
}, },
itemCount: 5, itemCount: 5,
)); ));
......
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter_common/commonModel/picker/base/BaseBottomPicker.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 { class MechanismBox implements IBottomPicker {
VoidCallback dismissCall; VoidCallback dismissCall;
TextEditingController textController = TextEditingController();
@override @override
initState(dismissCall, BuildContext context) { initState(dismissCall, BuildContext context) {
this.dismissCall = dismissCall; this.dismissCall = dismissCall;
...@@ -14,7 +11,7 @@ class MechanismBox implements IBottomPicker { ...@@ -14,7 +11,7 @@ class MechanismBox implements IBottomPicker {
Widget build(BuildContext context) { Widget build(BuildContext context) {
MediaQueryData mq = MediaQuery.of(context); MediaQueryData mq = MediaQuery.of(context);
TextEditingController textController = TextEditingController(); double keyHeight = MediaQuery.of(context).viewInsets.bottom;
return ClipRRect( return ClipRRect(
borderRadius: BorderRadius.only( borderRadius: BorderRadius.only(
topLeft: Radius.circular(10.0), topRight: Radius.circular(10.0)), topLeft: Radius.circular(10.0), topRight: Radius.circular(10.0)),
...@@ -22,8 +19,7 @@ class MechanismBox implements IBottomPicker { ...@@ -22,8 +19,7 @@ class MechanismBox implements IBottomPicker {
width: mq.size.width, width: mq.size.width,
height: mq.size.height - 140, height: mq.size.height - 140,
color: Colors.white, color: Colors.white,
child: Column( child: Stack(
mainAxisAlignment: MainAxisAlignment.start,
children: <Widget>[ children: <Widget>[
Container( Container(
margin: EdgeInsets.only(left: 20, right: 20), margin: EdgeInsets.only(left: 20, right: 20),
...@@ -62,8 +58,9 @@ class MechanismBox implements IBottomPicker { ...@@ -62,8 +58,9 @@ class MechanismBox implements IBottomPicker {
), ),
), ),
Container( Container(
height: mq.size.height - 140 - 50 - 96, height: mq.size.height - 140 - 96 - 50,
width: mq.size.width, width: mq.size.width,
margin: EdgeInsets.only(top: 50),
padding: EdgeInsets.only(left: 20, right: 20), padding: EdgeInsets.only(left: 20, right: 20),
child: ListView.separated( child: ListView.separated(
itemCount: 100, itemCount: 100,
...@@ -74,116 +71,129 @@ class MechanismBox implements IBottomPicker { ...@@ -74,116 +71,129 @@ class MechanismBox implements IBottomPicker {
return Divider(color: Color(0xffE5E5E5)); return Divider(color: Color(0xffE5E5E5));
}, },
)), )),
Container( Positioned(
bottom: keyHeight == 0 ? 0 : keyHeight,
left: 0,
width: double.maxFinite,
height: 96, height: 96,
color: Color(0xffF9F8FB), child: Container(
child: Column( height: 96,
children: <Widget>[ color: Color(0xffF9F8FB),
Container( child: Column(
height: 25, children: <Widget>[
width: double.maxFinite, Container(
margin: EdgeInsets.only(top: 12), height: 25,
child: ListView( color: Colors.black,
scrollDirection: Axis.horizontal, //横向滚动 width: double.maxFinite,
children: <Widget>[ margin: EdgeInsets.only(top: 12),
Container( child: ListView(
margin: EdgeInsets.only(left: 15, right: 8), scrollDirection: Axis.horizontal, //横向滚动
height: 25, children: <Widget>[
child: Text( Container(
'我想', margin: EdgeInsets.only(left: 15, right: 8),
style: TextStyle( height: 25,
height: 2, child: Text(
color: Color(0xff666666), '我想',
fontSize: 12), style: TextStyle(
)), height: 2,
Container( color: Color(0xff666666),
height: 25, fontSize: 12),
margin: EdgeInsets.only(right: 12), )),
padding: EdgeInsets.only(left: 8, right: 8), Container(
decoration: BoxDecoration( height: 25,
border: Border.all( margin: EdgeInsets.only(right: 12),
color: Color(0xffE5E5E5), width: 0.5), padding: EdgeInsets.only(left: 8, right: 8),
color: Color(0xffffffff), decoration: BoxDecoration(
borderRadius: BorderRadius.circular(20)), border: Border.all(
child: Text( color: Color(0xffE5E5E5), width: 0.5),
'有优惠活动吗?', color: Color(0xffffffff),
style: TextStyle( borderRadius: BorderRadius.circular(20)),
fontSize: 12, child: Text(
color: Color(0xff666666), '有优惠活动吗?',
height: 1.8), 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: 25, Container(
margin: EdgeInsets.only(right: 12), height: 35,
padding: EdgeInsets.only(left: 8, right: 8), margin:
decoration: BoxDecoration( EdgeInsets.only(top: 12, left: 15, right: 15),
border: Border.all( decoration: BoxDecoration(
color: Color(0xffE5E5E5), width: 0.5), border: Border.all(
color: Color(0xffffffff), color: Color(0xffE5E5E5), width: 0.5),
borderRadius: BorderRadius.circular(20)), color: Color(0xffffffff),
child: Text( borderRadius: BorderRadius.circular(35)),
'111有优惠活动吗?', child: TextField(
style: TextStyle( controller: textController,
fontSize: 12, keyboardType: TextInputType.text,
color: Color(0xff666666), textInputAction: TextInputAction.send,
height: 1.8), onSubmitted: (txt) {},
)), decoration: InputDecoration(
Container( contentPadding: EdgeInsets.all(16.0),
height: 25, labelText: '文案文案文案不知道文案是啥',
margin: EdgeInsets.only(right: 12), border: InputBorder.none)),
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,
),
)
],
))
], ],
)), )),
); );
...@@ -191,6 +201,6 @@ class MechanismBox implements IBottomPicker { ...@@ -191,6 +201,6 @@ class MechanismBox implements IBottomPicker {
@override @override
void dispose() { void dispose() {
dismissCall(); textController.dispose();
} }
} }
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