|
...
|
...
|
@@ -20,7 +20,6 @@ import 'package:one_key/widgets/page_exception.dart'; |
|
|
|
import 'package:provider/provider.dart';
|
|
|
|
|
|
|
|
class NoteBookPage extends StatefulWidget {
|
|
|
|
|
|
|
|
@override
|
|
|
|
State<StatefulWidget> createState() {
|
|
|
|
// TODO: implement createState
|
|
...
|
...
|
@@ -41,6 +40,8 @@ class NoteBookPageState extends State<NoteBookPage> { |
|
|
|
|
|
|
|
UserModel userModel;
|
|
|
|
|
|
|
|
int tabIndex = 0; //当前选中的tab 标签
|
|
|
|
|
|
|
|
@override
|
|
|
|
void initState() {
|
|
|
|
// TODO: implement initState
|
|
...
|
...
|
@@ -275,6 +276,116 @@ class NoteBookPageState extends State<NoteBookPage> { |
|
|
|
_reserveCountDay();
|
|
|
|
}
|
|
|
|
|
|
|
|
Widget _buildTabbar() {
|
|
|
|
Container container = Container(
|
|
|
|
color: MyColours.color_ffffff,
|
|
|
|
width: double.infinity,
|
|
|
|
padding: EdgeInsets.only(left: ScreenUtil().setWidth(20),top: ScreenUtil().setWidth(20)),
|
|
|
|
child: Row(
|
|
|
|
mainAxisSize: MainAxisSize.min,
|
|
|
|
children: <Widget>[
|
|
|
|
Container(
|
|
|
|
padding: EdgeInsets.symmetric(horizontal: ScreenUtil().setWidth(20)),
|
|
|
|
child: GestureDetector(
|
|
|
|
onTap: () {
|
|
|
|
setState(() {
|
|
|
|
tabIndex = 0;
|
|
|
|
});
|
|
|
|
},
|
|
|
|
child: Column(
|
|
|
|
mainAxisAlignment: MainAxisAlignment.center,
|
|
|
|
children: <Widget>[
|
|
|
|
Text(
|
|
|
|
"全部预订",
|
|
|
|
style: TextStyle(
|
|
|
|
color: tabIndex == 0
|
|
|
|
? MyColours.color_353535
|
|
|
|
: MyColours.color_999999,
|
|
|
|
fontSize: tabIndex == 0
|
|
|
|
? ScreenUtil().setSp(36)
|
|
|
|
: ScreenUtil().setSp(28),
|
|
|
|
fontWeight: tabIndex == 0
|
|
|
|
? FontWeight.bold
|
|
|
|
: FontWeight.normal),
|
|
|
|
),
|
|
|
|
Align(
|
|
|
|
alignment: Alignment.bottomCenter,
|
|
|
|
child: Container(
|
|
|
|
height: ScreenUtil().setWidth(6),
|
|
|
|
width: ScreenUtil().setWidth(60),
|
|
|
|
margin:
|
|
|
|
EdgeInsets.only(top: ScreenUtil().setWidth(8)),
|
|
|
|
decoration: tabIndex == 0
|
|
|
|
? BoxDecoration(color: MyColours.color_199095,borderRadius: BorderRadius.circular(
|
|
|
|
ScreenUtil()
|
|
|
|
.setWidth(
|
|
|
|
6)))
|
|
|
|
: BoxDecoration(
|
|
|
|
color: MyColours.color_ffffff,
|
|
|
|
borderRadius: BorderRadius.circular(
|
|
|
|
ScreenUtil()
|
|
|
|
.setWidth(
|
|
|
|
6))
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
],
|
|
|
|
)),
|
|
|
|
),
|
|
|
|
Container(
|
|
|
|
padding: EdgeInsets.symmetric(horizontal: ScreenUtil().setWidth(20)),
|
|
|
|
child: GestureDetector(
|
|
|
|
onTap: () {
|
|
|
|
setState(() {
|
|
|
|
tabIndex = 1;
|
|
|
|
});
|
|
|
|
},
|
|
|
|
child: Column(
|
|
|
|
mainAxisAlignment: MainAxisAlignment.center,
|
|
|
|
children: <Widget>[
|
|
|
|
Text(
|
|
|
|
"我录入的",
|
|
|
|
style: TextStyle(
|
|
|
|
color: tabIndex == 1
|
|
|
|
? MyColours.color_353535
|
|
|
|
: MyColours.color_999999,
|
|
|
|
fontSize: tabIndex == 1
|
|
|
|
? ScreenUtil().setSp(36)
|
|
|
|
: ScreenUtil().setSp(28),
|
|
|
|
fontWeight: tabIndex == 1
|
|
|
|
? FontWeight.bold
|
|
|
|
: FontWeight.normal),
|
|
|
|
),
|
|
|
|
Align(
|
|
|
|
alignment: Alignment.bottomCenter,
|
|
|
|
child: Container(
|
|
|
|
height: ScreenUtil().setWidth(6),
|
|
|
|
width: ScreenUtil().setWidth(60),
|
|
|
|
margin:
|
|
|
|
EdgeInsets.only(top: ScreenUtil().setWidth(8)),
|
|
|
|
decoration: tabIndex == 1
|
|
|
|
? BoxDecoration(color: MyColours.color_199095,borderRadius: BorderRadius.circular(
|
|
|
|
ScreenUtil()
|
|
|
|
.setWidth(
|
|
|
|
6)))
|
|
|
|
: BoxDecoration(
|
|
|
|
color: MyColours.color_ffffff,
|
|
|
|
borderRadius: BorderRadius.circular(
|
|
|
|
ScreenUtil()
|
|
|
|
.setWidth(
|
|
|
|
6))
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
],
|
|
|
|
)),
|
|
|
|
),
|
|
|
|
],
|
|
|
|
),
|
|
|
|
);
|
|
|
|
return container;
|
|
|
|
}
|
|
|
|
|
|
|
|
@override
|
|
|
|
Widget build(BuildContext context) {
|
|
|
|
// TODO: implement build
|
|
...
|
...
|
@@ -284,10 +395,7 @@ class NoteBookPageState extends State<NoteBookPage> { |
|
|
|
color: MyColours.color_f5f5f5,
|
|
|
|
child: Column(
|
|
|
|
children: <Widget>[
|
|
|
|
MyAppBar(
|
|
|
|
"已预订",
|
|
|
|
showBack: false,
|
|
|
|
),
|
|
|
|
_buildTabbar(),
|
|
|
|
Container(
|
|
|
|
color: MyColours.color_ffffff,
|
|
|
|
width: double.infinity,
|
...
|
...
|
|