| @@ -1,7 +1,7 @@ | |||
| import 'package:flutter/material.dart'; | |||
| import 'package:zhiying_comm/zhiying_comm.dart' | |||
| ''; | |||
| import 'package:zhiying_comm/zhiying_comm.dart'; | |||
| import 'package:zhiying_base_widget/widgets/team/fans/team_fans_item.dart'; | |||
| /// | |||
| /// 我的团队 - 用户详情 | |||
| @@ -22,7 +22,41 @@ class _TeamDetailsPageState extends State<TeamDetailsPage> { | |||
| Widget _getMainWidget(){ | |||
| return Scaffold( | |||
| backgroundColor: HexColor.fromHex('#F9F9F9'), | |||
| body: Container(), | |||
| body: CustomScrollView( | |||
| slivers: <Widget>[ | |||
| /// 头部Bar | |||
| SliverAppBar( | |||
| // expandedHeight: 200.0, | |||
| leading: IconButton( | |||
| icon: Icon( | |||
| Icons.arrow_back_ios, | |||
| size: 22, | |||
| color: HexColor.fromHex('#333333'), | |||
| ), | |||
| onPressed: () => Navigator.maybePop(context), | |||
| ), | |||
| backgroundColor: Colors.white, | |||
| floating: true, | |||
| pinned: true, | |||
| title: Text( | |||
| '用户详情', | |||
| style: TextStyle(color: HexColor.fromHex('#333333'), fontWeight: FontWeight.bold, fontSize: 18), | |||
| ), | |||
| centerTitle: true, | |||
| elevation: 0, | |||
| ), | |||
| /// TA的推荐人 | |||
| /// 推荐人的信息 | |||
| SliverToBoxAdapter( | |||
| child: TeamFansItem(), | |||
| ), | |||
| ], | |||
| ), | |||
| ); | |||
| } | |||
| @@ -31,6 +65,7 @@ class _TeamDetailsPageState extends State<TeamDetailsPage> { | |||
| /// 推荐人的信息 | |||
| /// 本月数据 & 上个月数据 | |||
| } | |||
| @@ -2,6 +2,8 @@ import 'package:flutter/cupertino.dart'; | |||
| import 'package:flutter/material.dart'; | |||
| import 'package:tab_indicator_styler/tab_indicator_styler.dart'; | |||
| import 'package:zhiying_base_widget/widgets/team/data/team_data_widet.dart'; | |||
| import 'package:zhiying_base_widget/widgets/team/fans/team_fans_item.dart'; | |||
| import 'package:zhiying_base_widget/widgets/team/fans/team_fans_number_item.dart'; | |||
| import 'package:zhiying_base_widget/widgets/team/recommend/team_recommend_widget.dart'; | |||
| import 'package:zhiying_comm/util/custom_sliver_persistent_header_delegate.dart'; | |||
| import 'package:zhiying_comm/zhiying_comm.dart'; | |||
| @@ -204,8 +206,9 @@ class _TeamPageState extends State<TeamPage> { | |||
| controller: _controller, | |||
| children: tabTitle | |||
| .map((s) => ListView.builder( | |||
| itemBuilder: (context, int) => Text("123"), | |||
| itemCount: 100, | |||
| itemBuilder: (context, int) => int == 0 ? TeamFansNumberItemWidget() : TeamFansItem(), | |||
| itemCount: 10, | |||
| )) | |||
| .toList(), | |||
| ), | |||
| @@ -1,9 +1,12 @@ | |||
| import 'package:cached_network_image/cached_network_image.dart'; | |||
| import 'package:flutter/cupertino.dart'; | |||
| import 'package:flutter/material.dart'; | |||
| import 'package:flutter_bloc/flutter_bloc.dart'; | |||
| import 'package:flutter_swiper/flutter_swiper.dart'; | |||
| import 'package:provider/provider.dart'; | |||
| import 'package:zhiying_base_widget/pages/main_page/notifier/main_page_bg_notifier.dart'; | |||
| import 'package:zhiying_base_widget/pages/team_details_page/team_details_page.dart'; | |||
| import 'package:zhiying_base_widget/pages/team_page/team_page.dart'; | |||
| import 'package:zhiying_comm/zhiying_comm.dart'; | |||
| import 'bloc/bloc.dart'; | |||
| @@ -49,6 +52,10 @@ class _HomeSlideBannerContainerState extends State<HomeSlideBannerContainer> { | |||
| // Navigator.push(context, MaterialPageRoute( | |||
| // builder: (_) => PageFactory.create('goods_details', null) | |||
| // )); | |||
| // Navigator.push(context, CupertinoPageRoute(builder: (_)=> TeamPage())); | |||
| Navigator.push(context, MaterialPageRoute( | |||
| builder: (_)=> TeamDetailsPage() | |||
| )); | |||
| } | |||
| @override | |||
| @@ -136,13 +136,13 @@ class _SearchResultInputWidgetState extends State<SearchResultInputWidget> { | |||
| width: double.infinity, | |||
| child: Container( | |||
| height: 32, | |||
| alignment: Alignment.center, | |||
| decoration: BoxDecoration( | |||
| borderRadius: BorderRadius.circular(30), | |||
| color: HexColor.fromHex('#F9F9F9'), | |||
| ), | |||
| padding: const EdgeInsets.only(left: 12.5, right: 12.5), | |||
| child: TextField( | |||
| onTap: ()=> Navigator.maybePop(context), | |||
| // onChanged: (str) => _onChanged(str), | |||
| showCursor: true, | |||
| @@ -150,12 +150,14 @@ class _SearchResultInputWidgetState extends State<SearchResultInputWidget> { | |||
| onSubmitted: (text) => _onSearchButtomClick(), | |||
| controller: _textEditingController, | |||
| focusNode: _focusNode, | |||
| style: TextStyle(fontSize: 14, color: HexColor.fromHex('#333333')), | |||
| style: TextStyle(fontSize: 14, color: HexColor.fromHex('#333333'), textBaseline: TextBaseline.alphabetic), | |||
| decoration: InputDecoration( | |||
| // filled: true, | |||
| contentPadding: const EdgeInsets.only(left: 0, right: 0,top: 0 ,bottom: 12), | |||
| filled: true, | |||
| isDense: true, | |||
| contentPadding: EdgeInsets.zero, | |||
| // contentPadding: const EdgeInsets.only(left: 0, right: 0,top: 0 ,bottom: 12), | |||
| // focusColor: Colors.transparent, | |||
| // fillColor: Colors.transparent, | |||
| fillColor: Colors.transparent, | |||
| border: InputBorder.none, | |||
| focusedBorder: InputBorder.none, | |||
| focusedErrorBorder: InputBorder.none, | |||
| @@ -163,7 +165,7 @@ class _SearchResultInputWidgetState extends State<SearchResultInputWidget> { | |||
| disabledBorder: InputBorder.none, | |||
| enabledBorder: InputBorder.none, | |||
| hintText: model?.search_inpu_hint_text ?? '搜索更多优惠商品', | |||
| hintStyle: TextStyle(color: HexColor.fromHex('#999999'), fontSize: 14), | |||
| hintStyle: TextStyle(color: HexColor.fromHex('#999999'), fontSize: 14, textBaseline: TextBaseline.alphabetic), | |||
| ), | |||
| ), | |||
| ), | |||
| @@ -317,6 +317,7 @@ class _SearchResultSortWidgetState extends State<SearchResultSortWidget> { | |||
| var padding = EdgeInsets.only(left: 12.5, right: 12.5, top: 10, bottom: (i == model.length - 1) ? 15 : 0); | |||
| lists.add(GestureDetector( | |||
| behavior: HitTestBehavior.opaque, | |||
| onTap: () => _onClickZhSort(model, item, parentData), | |||
| child: Container( | |||
| padding: padding, | |||
| @@ -19,14 +19,16 @@ class _TeamFansItemState extends State<TeamFansItem> { | |||
| Widget _getMainWidget() { | |||
| return Container( | |||
| decoration: BoxDecoration(color: HexColor.fromHex('#FFFFFF'), borderRadius: BorderRadius.circular(10)), | |||
| margin: const EdgeInsets.only(left: 12.5, right: 12.5), | |||
| margin: const EdgeInsets.only(left: 12.5, right: 12.5, top: 8), | |||
| padding: const EdgeInsets.only(left: 20, right: 20, top: 17.5, bottom: 15), | |||
| child: Column( | |||
| children: <Widget>[ | |||
| // 粉丝头像信息等 | |||
| _getFansInfoWidget(), | |||
| const SizedBox(height: 10), | |||
| // 微信号码 | |||
| _getWXNumberInfoWidget(), | |||
| const SizedBox(height: 10), | |||
| // 数据信息 | |||
| _getDataWidget(), | |||
| ], | |||
| @@ -44,6 +46,8 @@ class _TeamFansItemState extends State<TeamFansItem> { | |||
| /// 信息 | |||
| Column( | |||
| mainAxisAlignment: MainAxisAlignment.center, | |||
| crossAxisAlignment: CrossAxisAlignment.start, | |||
| children: <Widget>[ | |||
| /// 会员等级 关系 昵称 | |||
| RichText( | |||
| @@ -107,88 +111,103 @@ class _TeamFansItemState extends State<TeamFansItem> { | |||
| /// 数据信息 | |||
| Widget _getDataWidget() { | |||
| return Row( | |||
| mainAxisAlignment: MainAxisAlignment.spaceAround, | |||
| children: <Widget>[ | |||
| /// 左边数据 | |||
| Column( | |||
| children: <Widget>[ | |||
| /// 邀请人数(人) | |||
| _getCustomWidget( | |||
| text: '邀请人数(人)', | |||
| textColor: '#333333', | |||
| textSize: 10, | |||
| number: '1578', | |||
| numberColor: '#FF4242', | |||
| numberSize: 20, | |||
| ), | |||
| /// 今日邀请 & 本月邀请 | |||
| Row( | |||
| children: <Widget>[ | |||
| /// 今日邀请 | |||
| _getCustomWidget( | |||
| text: '今日邀请', | |||
| textColor: '#909090', | |||
| textSize: 10, | |||
| number: '3258', | |||
| numberColor: '#333333', | |||
| numberSize: 15, | |||
| ), | |||
| /// 本月邀请 | |||
| _getCustomWidget( | |||
| text: '本月邀请', | |||
| textColor: '#909090', | |||
| textSize: 10, | |||
| number: '3258', | |||
| numberColor: '#333333', | |||
| numberSize: 15, | |||
| ), | |||
| ], | |||
| ) | |||
| ], | |||
| Flexible( | |||
| flex: 1, | |||
| child: Column( | |||
| mainAxisAlignment: MainAxisAlignment.center, | |||
| crossAxisAlignment: CrossAxisAlignment.center, | |||
| children: <Widget>[ | |||
| /// 邀请人数(人) | |||
| _getCustomWidget( | |||
| text: '邀请人数(人)', | |||
| textColor: '#333333', | |||
| textSize: 10, | |||
| number: '1578', | |||
| numberColor: '#FF4242', | |||
| numberSize: 20, | |||
| ), | |||
| const SizedBox(height: 15), | |||
| /// 今日邀请 & 本月邀请 | |||
| Row( | |||
| mainAxisAlignment: MainAxisAlignment.spaceAround, | |||
| children: <Widget>[ | |||
| /// 今日邀请 | |||
| _getCustomWidget( | |||
| text: '今日邀请', | |||
| textColor: '#909090', | |||
| textSize: 10, | |||
| number: '3258', | |||
| numberColor: '#333333', | |||
| numberSize: 15, | |||
| ), | |||
| /// 本月邀请 | |||
| _getCustomWidget( | |||
| text: '本月邀请', | |||
| textColor: '#909090', | |||
| textSize: 10, | |||
| number: '3258', | |||
| numberColor: '#333333', | |||
| numberSize: 15, | |||
| ), | |||
| ], | |||
| ) | |||
| ], | |||
| ), | |||
| ), | |||
| /// 分割线 | |||
| VerticalDivider(width: 65.5, thickness: 0.5), | |||
| SizedBox( height:65.5, width: 0.5,child: VerticalDivider(width: 0.5, thickness: 0.5, color: HexColor.fromHex('#F7F7F7'))), | |||
| /// 右边数据 | |||
| Column( | |||
| children: <Widget>[ | |||
| /// 累计收益(¥) | |||
| _getCustomWidget( | |||
| text: '累计收益(¥)', | |||
| textColor: '#333333', | |||
| textSize: 10, | |||
| number: '157.54', | |||
| numberColor: '#FF4242', | |||
| numberSize: 20, | |||
| ), | |||
| /// 近7天收益 & 本月收益 | |||
| Row( | |||
| children: <Widget>[ | |||
| /// 今日邀请 | |||
| _getCustomWidget( | |||
| text: '近7天收益', | |||
| textColor: '#909090', | |||
| textSize: 10, | |||
| number: '4.12', | |||
| numberColor: '#333333', | |||
| numberSize: 15, | |||
| ), | |||
| /// 本月邀请 | |||
| _getCustomWidget( | |||
| text: '本月收益', | |||
| textColor: '#909090', | |||
| textSize: 10, | |||
| number: '528.14', | |||
| numberColor: '#333333', | |||
| numberSize: 15, | |||
| ), | |||
| ], | |||
| ) | |||
| ], | |||
| Flexible( | |||
| flex: 1, | |||
| child: Column( | |||
| mainAxisAlignment: MainAxisAlignment.center, | |||
| crossAxisAlignment: CrossAxisAlignment.center, | |||
| children: <Widget>[ | |||
| /// 累计收益(¥) | |||
| _getCustomWidget( | |||
| text: '累计收益(¥)', | |||
| textColor: '#333333', | |||
| textSize: 10, | |||
| number: '157.54', | |||
| numberColor: '#FF4242', | |||
| numberSize: 20, | |||
| ), | |||
| const SizedBox(height: 15), | |||
| /// 近7天收益 & 本月收益 | |||
| Row( | |||
| mainAxisAlignment: MainAxisAlignment.spaceAround, | |||
| children: <Widget>[ | |||
| /// 今日邀请 | |||
| _getCustomWidget( | |||
| text: '近7天收益', | |||
| textColor: '#909090', | |||
| textSize: 10, | |||
| number: '4.12', | |||
| numberColor: '#333333', | |||
| numberSize: 15, | |||
| ), | |||
| /// 本月邀请 | |||
| _getCustomWidget( | |||
| text: '本月收益', | |||
| textColor: '#909090', | |||
| textSize: 10, | |||
| number: '528.14', | |||
| numberColor: '#333333', | |||
| numberSize: 15, | |||
| ), | |||
| ], | |||
| ) | |||
| ], | |||
| ), | |||
| ) | |||
| ], | |||
| ); | |||
| @@ -197,9 +216,13 @@ class _TeamFansItemState extends State<TeamFansItem> { | |||
| /// 自定义Widget(数字加粗) | |||
| Widget _getCustomWidget({String text, String textColor, double textSize, String number, String numberColor, double numberSize, String icon}) { | |||
| return Column( | |||
| mainAxisAlignment: MainAxisAlignment.center, | |||
| crossAxisAlignment: CrossAxisAlignment.center, | |||
| children: <Widget>[ | |||
| /// Number | |||
| Row( | |||
| mainAxisAlignment: MainAxisAlignment.center, | |||
| crossAxisAlignment: CrossAxisAlignment.center, | |||
| children: <Widget>[ | |||
| /// nummber\ | |||
| Text(number, | |||
| @@ -0,0 +1,21 @@ | |||
| import 'package:flutter/material.dart'; | |||
| import 'package:zhiying_comm/zhiying_comm.dart'; | |||
| class TeamFansNumberItemWidget extends StatelessWidget { | |||
| @override | |||
| Widget build(BuildContext context) { | |||
| return Container( | |||
| alignment: Alignment.center, | |||
| margin: const EdgeInsets.only(left: 12.5, right: 12.5, top: 8), | |||
| child: RichText( | |||
| text: TextSpan(text: '', children: [ | |||
| TextSpan(text: '粉丝总人数', style: TextStyle(fontSize: 12, color: HexColor.fromHex('#333333'), fontWeight: FontWeight.bold)), | |||
| TextSpan(text: '79', style: TextStyle(fontSize: 18, color: HexColor.fromHex('#FF4242'), fontFamily: 'Din', package: 'zhiying_base_widget', fontWeight: FontWeight.bold)), | |||
| TextSpan(text: '人 当前分类人数', style: TextStyle(fontSize: 12, color: HexColor.fromHex('#333333'), fontWeight: FontWeight.bold)), | |||
| TextSpan(text: '15', style: TextStyle(fontSize: 18, color: HexColor.fromHex('#FF4242'), fontFamily: 'Din', package: 'zhiying_base_widget', fontWeight: FontWeight.bold)), | |||
| TextSpan(text: '人', style: TextStyle(fontSize: 12, color: HexColor.fromHex('#333333'), fontWeight: FontWeight.bold)), | |||
| ]), | |||
| ), | |||
| ); | |||
| } | |||
| } | |||