import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:flutter/src/widgets/framework.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:get/get.dart'; import 'package:starwork_flutter/common/constant/app_colors.dart'; import 'package:starwork_flutter/common/widgets/custom_app_bar_widget.dart'; import 'package:starwork_flutter/extension/function_extension.dart'; import 'package:starwork_flutter/views/team/teamManage/team_manage_controller.dart'; class TeamManageView extends GetView { @override Widget build(BuildContext context) { return Scaffold( backgroundColor: AppColors.scaffoldBackgroundColor, appBar: CustomAppBarWidget( title: '团队管理'.tr, ), body: Padding( padding: EdgeInsets.symmetric(horizontal: 10.w, vertical: 10.h), child: Column( children: [ _buildHeadRow(), SizedBox( height: 10.h, ), Expanded( child: _buildOther(), ), // 分割线 Divider( height: 1.h, color: Colors.grey.withOpacity(0.2), ), SizedBox( height: 10.h, ), SizedBox( width: double.infinity, child: Row( children: [ Expanded( child: ElevatedButton( onPressed: () {}.debounce(), style: ElevatedButton.styleFrom( backgroundColor: Colors.grey[200], padding: EdgeInsets.symmetric(vertical: 12.h), shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(8.r)), ), child: Text( '解散团队'.tr, style: TextStyle( fontSize: 16.sp, color: Colors.blue, fontWeight: FontWeight.w500, ), ), ), ), SizedBox( width: 10.w, ), Expanded( child: ElevatedButton( onPressed: () {}.debounce(), style: ElevatedButton.styleFrom( backgroundColor: Colors.blue, padding: EdgeInsets.symmetric(vertical: 12.h), shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(8.r)), ), child: Text( '转让团队'.tr, style: TextStyle( fontSize: 16.sp, color: Colors.white, fontWeight: FontWeight.w500, ), ), ), ), ], ), ), SizedBox( height: 20.h, ), ], ), ), ); } _buildHeadRow() { return Container( padding: EdgeInsets.symmetric(horizontal: 10.w, vertical: 10.h), decoration: BoxDecoration( borderRadius: BorderRadius.circular(8.r), color: Colors.blue, boxShadow: [ BoxShadow( color: Colors.blue.withOpacity(0.2), spreadRadius: 2, blurRadius: 3, offset: const Offset(0, 3), // changes position of shadow ), ], ), child: Row( mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ Text( '团队名称', style: TextStyle( fontSize: 16.sp, fontWeight: FontWeight.w500, color: Colors.white, ), ), SizedBox( height: 8.h, ), Row( mainAxisAlignment: MainAxisAlignment.center, children: [ Container( padding: EdgeInsets.symmetric(horizontal: 4.w, vertical: 2.h), decoration: BoxDecoration( borderRadius: BorderRadius.circular(8.r), color: Colors.white.withOpacity(0.3), ), child: Text( '小区/公寓'.tr, style: TextStyle( fontSize: 10.sp, fontWeight: FontWeight.w500, color: Colors.white, ), ), ), SizedBox( width: 4.w, ), Text( 'TD01022881', style: TextStyle( fontSize: 10.sp, fontWeight: FontWeight.w500, color: Colors.white, ), ) ], ) ], ), const Icon( Icons.arrow_forward_ios_rounded, color: Colors.white, ) ], ), ); } _buildOther() { return Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ Text( '其他', style: TextStyle( fontSize: 14.sp, fontWeight: FontWeight.w500, color: Colors.grey[400], ), ), SizedBox( height: 10.h, ), Container( width: double.infinity, padding: EdgeInsets.symmetric(horizontal: 10.w, vertical: 10.h), decoration: BoxDecoration( borderRadius: BorderRadius.circular(8.r), color: Colors.white, ), child: Column( children: [ Row( mainAxisAlignment: MainAxisAlignment.spaceBetween, crossAxisAlignment: CrossAxisAlignment.center, children: [ Row( children: [ Icon( Icons.assignment_outlined, color: Colors.blue.withOpacity(0.8), ), SizedBox( width: 8.w, ), Text( '运维服务', style: TextStyle( fontSize: 14.sp, fontWeight: FontWeight.w500, color: Colors.black87, ), ), ], ), Icon( Icons.arrow_forward_ios_rounded, color: Colors.grey, size: 14.sp, ) ], ), SizedBox(height: 10.h), // 分割线 Divider( height: 1.h, color: Colors.grey.withOpacity(0.2), ), SizedBox(height: 10.h), Row( mainAxisAlignment: MainAxisAlignment.spaceBetween, crossAxisAlignment: CrossAxisAlignment.center, children: [ Row( children: [ Icon( Icons.assignment_outlined, color: Colors.blue.withOpacity(0.8), ), SizedBox( width: 8.w, ), Text( '操作日志', style: TextStyle( fontSize: 14.sp, fontWeight: FontWeight.w500, color: Colors.black87, ), ), ], ), Icon( Icons.arrow_forward_ios_rounded, color: Colors.grey, size: 14.sp, ) ], ), SizedBox(height: 10.h), Divider( height: 1.h, color: Colors.grey.withOpacity(0.2), ), SizedBox(height: 10.h), Row( mainAxisAlignment: MainAxisAlignment.spaceBetween, crossAxisAlignment: CrossAxisAlignment.center, children: [ Row( children: [ Icon( Icons.assignment_outlined, color: Colors.blue.withOpacity(0.8), ), SizedBox( width: 8.w, ), Text( '团队二维码', style: TextStyle( fontSize: 14.sp, fontWeight: FontWeight.w500, color: Colors.black87, ), ), ], ), Icon( Icons.arrow_forward_ios_rounded, color: Colors.grey, size: 14.sp, ) ], ) ], ), ) ], ); } }