|
|
@ -1,5 +1,6 @@
|
|
|
|
import 'package:flutter/cupertino.dart';
|
|
|
|
import 'package:flutter/cupertino.dart';
|
|
|
|
import 'package:flutter/material.dart';
|
|
|
|
import 'package:flutter/material.dart';
|
|
|
|
|
|
|
|
import 'package:flutter_easyrefresh/easy_refresh.dart';
|
|
|
|
|
|
|
|
|
|
|
|
import 'package:flutter_icons/flutter_icons.dart';
|
|
|
|
import 'package:flutter_icons/flutter_icons.dart';
|
|
|
|
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
|
|
|
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
|
|
@ -34,7 +35,6 @@ class _PersonalIndexState extends State<PersonalIndex>
|
|
|
|
pinned: true,
|
|
|
|
pinned: true,
|
|
|
|
toolbarHeight: 0,
|
|
|
|
toolbarHeight: 0,
|
|
|
|
elevation: 0,
|
|
|
|
elevation: 0,
|
|
|
|
stretch: true,
|
|
|
|
|
|
|
|
floating: true,
|
|
|
|
floating: true,
|
|
|
|
expandedHeight: 450.w - height,
|
|
|
|
expandedHeight: 450.w - height,
|
|
|
|
backgroundColor: Colors.white,
|
|
|
|
backgroundColor: Colors.white,
|
|
|
@ -191,79 +191,86 @@ class _PersonalIndexState extends State<PersonalIndex>
|
|
|
|
|
|
|
|
|
|
|
|
@override
|
|
|
|
@override
|
|
|
|
Widget build(BuildContext context) {
|
|
|
|
Widget build(BuildContext context) {
|
|
|
|
double _statusHeight = MediaQuery.of(context).padding.top;
|
|
|
|
final double _statusHeight = MediaQuery.of(context).padding.top;
|
|
|
|
|
|
|
|
final userProvider = Provider.of<UserProvider>(context);
|
|
|
|
return Scaffold(
|
|
|
|
return Scaffold(
|
|
|
|
body: CustomScrollView(
|
|
|
|
body: EasyRefresh(
|
|
|
|
physics: AlwaysScrollableScrollPhysics(parent: BouncingScrollPhysics()),
|
|
|
|
header: MaterialHeader(),
|
|
|
|
slivers: <Widget>[
|
|
|
|
onRefresh: () async {
|
|
|
|
_sliverAppBar(_statusHeight),
|
|
|
|
await userProvider.updateProfile();
|
|
|
|
// SliverToBoxAdapter(
|
|
|
|
await userProvider.updateUserDetail();
|
|
|
|
// child: _containerBar('我的订单'),
|
|
|
|
},
|
|
|
|
// ),
|
|
|
|
child: CustomScrollView(
|
|
|
|
// SliverToBoxAdapter(
|
|
|
|
slivers: <Widget>[
|
|
|
|
// child: Container(
|
|
|
|
_sliverAppBar(_statusHeight),
|
|
|
|
// margin: EdgeInsets.only(top: 10.w),
|
|
|
|
// SliverToBoxAdapter(
|
|
|
|
// color: BaseStyle.colorf9f9f9,
|
|
|
|
// child: _containerBar('我的订单'),
|
|
|
|
// child: GridButtons(
|
|
|
|
// ),
|
|
|
|
// gridList: _orderList,
|
|
|
|
// SliverToBoxAdapter(
|
|
|
|
// crossCount: 5,
|
|
|
|
// child: Container(
|
|
|
|
// ),
|
|
|
|
// margin: EdgeInsets.only(top: 10.w),
|
|
|
|
// ),
|
|
|
|
// color: BaseStyle.colorf9f9f9,
|
|
|
|
// ),
|
|
|
|
// child: GridButtons(
|
|
|
|
// SliverToBoxAdapter(
|
|
|
|
// gridList: _orderList,
|
|
|
|
// child: Container(
|
|
|
|
// crossCount: 5,
|
|
|
|
// margin: EdgeInsets.only(top: 32.w, left: 32.w, right: 32.w),
|
|
|
|
// ),
|
|
|
|
// child: Divider(
|
|
|
|
// ),
|
|
|
|
// color: Color(0xffd8d8d8),
|
|
|
|
// ),
|
|
|
|
// ),
|
|
|
|
// SliverToBoxAdapter(
|
|
|
|
// ),
|
|
|
|
// child: Container(
|
|
|
|
// ),
|
|
|
|
// margin: EdgeInsets.only(top: 32.w, left: 32.w, right: 32.w),
|
|
|
|
// SliverToBoxAdapter(
|
|
|
|
// child: Divider(
|
|
|
|
// child: _containerBar('我的团购'),
|
|
|
|
// color: Color(0xffd8d8d8),
|
|
|
|
// ),
|
|
|
|
// ),
|
|
|
|
// SliverToBoxAdapter(
|
|
|
|
// ),
|
|
|
|
// child: Container(
|
|
|
|
// ),
|
|
|
|
// color: BaseStyle.colorf9f9f9,
|
|
|
|
// SliverToBoxAdapter(
|
|
|
|
// margin: EdgeInsets.only(top: 10.w),
|
|
|
|
// child: _containerBar('我的团购'),
|
|
|
|
// alignment: Alignment.center,
|
|
|
|
// ),
|
|
|
|
// child: GridButtons(
|
|
|
|
// SliverToBoxAdapter(
|
|
|
|
// gridList: _groupOrderList,
|
|
|
|
// child: Container(
|
|
|
|
// crossCount: 5,
|
|
|
|
// color: BaseStyle.colorf9f9f9,
|
|
|
|
// ),
|
|
|
|
// margin: EdgeInsets.only(top: 10.w),
|
|
|
|
// ),
|
|
|
|
// alignment: Alignment.center,
|
|
|
|
// ),
|
|
|
|
// child: GridButtons(
|
|
|
|
// SliverToBoxAdapter(
|
|
|
|
// gridList: _groupOrderList,
|
|
|
|
// child: SingleAdSpace(
|
|
|
|
// crossCount: 5,
|
|
|
|
// imagePath: 'assets/example/guanggao7.png',
|
|
|
|
// ),
|
|
|
|
// ),
|
|
|
|
// ),
|
|
|
|
// ),
|
|
|
|
// ),
|
|
|
|
SliverToBoxAdapter(
|
|
|
|
// SliverToBoxAdapter(
|
|
|
|
child: Container(
|
|
|
|
// child: SingleAdSpace(
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
// imagePath: 'assets/example/guanggao7.png',
|
|
|
|
color: Color(0xffffffff),
|
|
|
|
// ),
|
|
|
|
borderRadius: BorderRadius.all(Radius.circular(8)),
|
|
|
|
// ),
|
|
|
|
boxShadow: <BoxShadow>[
|
|
|
|
SliverToBoxAdapter(
|
|
|
|
BoxShadow(
|
|
|
|
child: Container(
|
|
|
|
color: Colors.grey.withOpacity(0.1),
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
offset: Offset(1, 1),
|
|
|
|
color: Color(0xffffffff),
|
|
|
|
),
|
|
|
|
borderRadius: BorderRadius.all(Radius.circular(8)),
|
|
|
|
],
|
|
|
|
boxShadow: <BoxShadow>[
|
|
|
|
),
|
|
|
|
BoxShadow(
|
|
|
|
margin: EdgeInsets.all(20.w),
|
|
|
|
color: Colors.grey.withOpacity(0.1),
|
|
|
|
padding: EdgeInsets.all(12.w),
|
|
|
|
offset: Offset(1, 1),
|
|
|
|
child: Column(
|
|
|
|
),
|
|
|
|
mainAxisAlignment: MainAxisAlignment.center,
|
|
|
|
],
|
|
|
|
children: [
|
|
|
|
),
|
|
|
|
_containerBar('我的物业'),
|
|
|
|
margin: EdgeInsets.all(20.w),
|
|
|
|
ApplicationView.custom(
|
|
|
|
padding: EdgeInsets.all(12.w),
|
|
|
|
items: userAppObjects,
|
|
|
|
child: Column(
|
|
|
|
needAllApp: false,
|
|
|
|
mainAxisAlignment: MainAxisAlignment.center,
|
|
|
|
),
|
|
|
|
children: [
|
|
|
|
],
|
|
|
|
_containerBar('我的物业'),
|
|
|
|
|
|
|
|
ApplicationView.custom(
|
|
|
|
|
|
|
|
items: userAppObjects,
|
|
|
|
|
|
|
|
needAllApp: false,
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
],
|
|
|
|
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
],
|
|
|
|
],
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
);
|
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|
|
|
|