页面迁移完毕,相关不依赖业务状态添加完毕

This commit is contained in:
fuenmao 2024-11-22 14:27:56 +08:00
parent 666b10cbcf
commit 297d09ffd6
26 changed files with 1966 additions and 110 deletions

View File

@ -2,9 +2,11 @@ import 'dart:async';
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:get/get.dart';
import 'package:wgshare/common/models/user_info_detail.dart';
import 'package:wgshare/common/store/user_store.dart';
import 'package:wgshare/main.dart';
import 'package:wgshare/routes/app_routes.dart';
import 'package:wgshare/utils/my_text.dart';
import 'package:wgshare/utils/storage.dart';
@ -52,13 +54,13 @@ class HomePageState extends State<HomePage> with AutomaticKeepAliveClientMixin {
children: [
Container(
width: double.infinity,
height: 44,
height: 44.h,
alignment: Alignment.center,
color: Colors.white,
child: Text(
'会议列表',
style: TextStyle(
fontSize: 16,
fontSize: 16.sp,
color: ColorUtil.Color_51_51_51,
fontWeight: FontWeight.w500
),
@ -85,7 +87,7 @@ class HomePageState extends State<HomePage> with AutomaticKeepAliveClientMixin {
Text(
'奉节中学期末考试分析总结会议',
style: TextStyle(
fontSize: 14,
fontSize: 14.sp,
color: ColorUtil.Color_89_88_88,
fontWeight: FontWeight.w500
),
@ -94,13 +96,13 @@ class HomePageState extends State<HomePage> with AutomaticKeepAliveClientMixin {
children: [
Image.asset(
'assets/images/index_persons.png',
width: 16,
height: 16,
width: 16.w,
height: 16.h,
),
Text(
'2人',
style: TextStyle(
fontSize: 12,
fontSize: 12.sp,
color: ColorUtil.Color_177_177_177,
),
),
@ -108,7 +110,7 @@ class HomePageState extends State<HomePage> with AutomaticKeepAliveClientMixin {
)
],
),
const SizedBox(height: 20),
SizedBox(height: 20.h),
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
@ -117,22 +119,22 @@ class HomePageState extends State<HomePage> with AutomaticKeepAliveClientMixin {
Text(
'2525353',
style: TextStyle(
fontSize: 12,
fontSize: 12.sp,
color: ColorUtil.Color_177_177_177,
),
),
const SizedBox(width: 6),
SizedBox(width: 6.w),
Image.asset(
'assets/images/index_copy.png',
width: 16,
height: 16,
width: 16.w,
height: 16.h,
)
],
),
GestureDetector(
child: Container(
width: 78,
height: 30,
width: 78.w,
height: 30.h,
decoration: BoxDecoration(
borderRadius: const BorderRadius.all(Radius.circular(6)),
color: ColorUtil.Color_85_117_242,
@ -143,19 +145,20 @@ class HomePageState extends State<HomePage> with AutomaticKeepAliveClientMixin {
Text(
'进入',
style: TextStyle(
fontSize: 12,
fontSize: 12.sp,
color: Colors.white,
),
),
Image.asset(
'assets/images/index_right.png',
width: 16,
height: 16,
width: 16.w,
height: 16.h,
)
],
),
),
onTap: (){
Get.toNamed(Routes.meetingMainPage);
// Navigator.of(context).push(MaterialPageRoute(builder: (context) => MeetingMainPage()));
},
)

View File

@ -12,8 +12,8 @@ class LoginLogic extends GetxController with RequestToolMixin {
}
///
void changeAgreementState(int checkAgreementState){
state.checkAgreementState.value = checkAgreementState;
void changeAgreementState(bool checkAgreementBool){
state.checkAgreementBool.value = checkAgreementBool;
}
@override

View File

@ -14,6 +14,6 @@ class LoginState {
/// 01
late RxInt pageState = 0.obs;
/// 01
late RxInt checkAgreementState = 0.obs;
///
late RxBool checkAgreementBool = false.obs;
}

View File

@ -1,9 +1,12 @@
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:get/get.dart';
import 'package:wgshare/main.dart';
import 'package:wgshare/utils/my_text.dart';
import 'package:wgshare/utils/utils.dart';
import '../../routes/app_routes.dart';
import '../../utils/color_util.dart';
import 'login_logic.dart';
@ -51,14 +54,14 @@ class _LoginPageState extends State<LoginPage> {
children: [
Image.asset(
'assets/images/logo.png',
width: 80,
height: 80,
width: 80.w,
height: 80.h,
),
const SizedBox(height: 20),
SizedBox(height: 20.h),
Image.asset(
'assets/images/logo_title.png',
width: 70,
height: 24,
width: 70.w,
height: 24.h,
)
],
),
@ -86,8 +89,8 @@ class _LoginPageState extends State<LoginPage> {
children: [
GestureDetector(
child: Container(
width: 140,
height: 40,
width: 140.w,
height: 40.h,
decoration: BoxDecoration(
image: DecorationImage(
image: AssetImage(state.pageState.value == 0 ? 'assets/images/login_tab_left_select_y.png' : 'assets/images/login_tab_left_select_n.png'),
@ -98,7 +101,7 @@ class _LoginPageState extends State<LoginPage> {
child: Text(
'账号',
style: TextStyle(
fontSize: 14,
fontSize: 14.sp,
color: state.pageState.value == 0 ? Colors.white : ColorUtil.Color_120_137_203
),
),
@ -109,8 +112,8 @@ class _LoginPageState extends State<LoginPage> {
),
GestureDetector(
child: Container(
width: 140,
height: 40,
width: 140.w,
height: 40.h,
decoration: BoxDecoration(
image: DecorationImage(
image: AssetImage(state.pageState.value == 0 ? 'assets/images/login_tab_right_select_n.png' : 'assets/images/login_tab_right_select_y.png'),
@ -121,7 +124,7 @@ class _LoginPageState extends State<LoginPage> {
child: Text(
'会议号',
style: TextStyle(
fontSize: 14,
fontSize: 14.sp,
color: state.pageState.value == 0 ? ColorUtil.Color_120_137_203 : Colors.white
),
),
@ -140,20 +143,20 @@ class _LoginPageState extends State<LoginPage> {
Visibility(
visible: state.pageState.value == 0 ? true : false,
child: Container(
width: 280,
height: 40,
width: 280.w,
height: 40.h,
margin: const EdgeInsets.only(top: 30),
padding: const EdgeInsets.only(left: 12, right: 12),
decoration: BoxDecoration(
borderRadius: const BorderRadius.all(Radius.circular(99)),
border: Border.all(
width: 1,
width: 1.w,
color: ColorUtil.Color_153_153_153
),
),
child: TextField(
style: TextStyle(
fontSize: 14,
fontSize: 14.sp,
),
decoration: InputDecoration(
contentPadding: EdgeInsets.all(0),
@ -161,7 +164,7 @@ class _LoginPageState extends State<LoginPage> {
hintText: '请输入账号',
hintStyle: TextStyle(
color: ColorUtil.Color_153_153_153,
fontSize: 14)
fontSize: 14.sp)
),
),
),
@ -170,20 +173,20 @@ class _LoginPageState extends State<LoginPage> {
Visibility(
visible: state.pageState.value == 0 ? true : false,
child: Container(
width: 280,
height: 40,
width: 280.w,
height: 40.h,
margin: const EdgeInsets.only(top: 12),
padding: const EdgeInsets.only(left: 12, right: 12),
decoration: BoxDecoration(
borderRadius: const BorderRadius.all(Radius.circular(99)),
border: Border.all(
width: 1,
width: 1.w,
color: ColorUtil.Color_153_153_153
),
),
child: TextField(
style: TextStyle(
fontSize: 14,
fontSize: 14.sp,
),
decoration: InputDecoration(
contentPadding: EdgeInsets.all(0),
@ -191,7 +194,7 @@ class _LoginPageState extends State<LoginPage> {
hintText: '请输入密码',
hintStyle: TextStyle(
color: ColorUtil.Color_153_153_153,
fontSize: 14)
fontSize: 14.sp)
),
),
),
@ -201,20 +204,20 @@ class _LoginPageState extends State<LoginPage> {
Visibility(
visible: state.pageState.value == 0 ? false : true,
child: Container(
width: 280,
height: 40,
width: 280.w,
height: 40.h,
margin: const EdgeInsets.only(top: 30),
padding: const EdgeInsets.only(left: 12, right: 12),
decoration: BoxDecoration(
borderRadius: const BorderRadius.all(Radius.circular(99)),
border: Border.all(
width: 1,
width: 1.w,
color: ColorUtil.Color_153_153_153
),
),
child: TextField(
style: TextStyle(
fontSize: 14,
fontSize: 14.sp,
),
decoration: InputDecoration(
contentPadding: EdgeInsets.all(0),
@ -222,7 +225,7 @@ class _LoginPageState extends State<LoginPage> {
hintText: '请输入会议号',
hintStyle: TextStyle(
color: ColorUtil.Color_153_153_153,
fontSize: 14)
fontSize: 14.sp)
),
),
),
@ -230,50 +233,50 @@ class _LoginPageState extends State<LoginPage> {
///
Container(
width: 280,
width: 280.w,
margin: const EdgeInsets.only(top: 16),
child: Row(
children: [
GestureDetector(
child: Image.asset(
state.checkAgreementState.value == 0 ? 'assets/images/login_agreement_select_n.png' : 'assets/images/login_agreement_select_y.png',
width: 16,
height: 16,
state.checkAgreementBool.value == false ? 'assets/images/login_agreement_select_n.png' : 'assets/images/login_agreement_select_y.png',
width: 16.w,
height: 16.h,
),
onTap: (){
if(state.checkAgreementState.value == 0){
logic.changeAgreementState(1);
if(state.checkAgreementBool.value == false){
logic.changeAgreementState(true);
}else{
logic.changeAgreementState(0);
logic.changeAgreementState(false);
}
},
),
const SizedBox(width: 6),
const Text(
SizedBox(width: 6.w),
Text(
'我阅读并同意',
style: TextStyle(
fontSize: 12,
fontSize: 12.sp,
color: ColorUtil.Color_153_153_153,
),
),
const Text(
Text(
'《服务协议》',
style: TextStyle(
fontSize: 12,
fontSize: 12.sp,
color: ColorUtil.Color_153_153_153,
),
),
const Text(
Text(
'',
style: TextStyle(
fontSize: 12,
fontSize: 12.sp,
color: ColorUtil.Color_153_153_153,
),
),
const Text(
Text(
'《隐私政策》',
style: TextStyle(
fontSize: 12,
fontSize: 12.sp,
color: ColorUtil.Color_153_153_153,
),
)
@ -284,8 +287,8 @@ class _LoginPageState extends State<LoginPage> {
///
GestureDetector(
child: Container(
width: 280,
height: 44,
width: 280.w,
height: 44.h,
margin: const EdgeInsets.only(top: 50),
decoration: const BoxDecoration(
borderRadius: BorderRadius.all(Radius.circular(99)),
@ -295,13 +298,13 @@ class _LoginPageState extends State<LoginPage> {
child: Text(
state.pageState.value == 0 ? '登录' : '加入会议',
style: TextStyle(
fontSize: 16,
fontSize: 16.sp,
color: Colors.white,
),
),
),
onTap: (){
Get.toNamed("/startPage");
Get.toNamed(Routes.startPage);
},
)
],

View File

@ -0,0 +1,10 @@
import 'package:get/get.dart';
import 'meeting_main_logic.dart';
class MeetingMainBinding extends Bindings {
@override
void dependencies() {
Get.lazyPut(() => MeetingMainLogic());
}
}

View File

@ -0,0 +1,22 @@
import 'package:get/get.dart';
import 'meeting_main_state.dart';
class MeetingMainLogic extends GetxController {
final MeetingMainState state = MeetingMainState();
///
void changeMeetingInfoState(bool isShow){
state.isShowMeetingInfoFloatingLayer.value = isShow;
}
///
void changeMeetingAudioState(bool isShow){
state.isShowMeetingAudioFloatingLayer.value = isShow;
}
///
void changePageState(int pageState){
state.pageState.value = pageState;
}
}

View File

@ -0,0 +1,21 @@
import 'package:flutter/cupertino.dart';
import 'package:get/get.dart';
import 'package:get/get_rx/src/rx_types/rx_types.dart';
class MeetingMainState {
MeetingMainState() {
///Initialize variables
}
///
late RxBool isShowMeetingInfoFloatingLayer = false.obs;
///
late RxBool isShowMeetingAudioFloatingLayer = false.obs;
/// Listview控制器
late ScrollController chatController = ScrollController();
/// 012
late RxInt pageState = 0.obs;
}

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,10 @@
import 'package:get/get.dart';
import 'meeting_main_share_logic.dart';
class MeetingMainShareBinding extends Bindings {
@override
void dependencies() {
Get.lazyPut(() => MeetingMainShareLogic());
}
}

View File

@ -0,0 +1,7 @@
import 'package:get/get.dart';
import 'meeting_main_share_state.dart';
class MeetingMainShareLogic extends GetxController {
final MeetingMainShareState state = MeetingMainShareState();
}

View File

@ -0,0 +1,5 @@
class MeetingMainShareState {
MeetingMainShareState() {
///Initialize variables
}
}

View File

@ -0,0 +1,137 @@
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:get/get.dart';
import '../../../utils/color_util.dart';
import 'meeting_main_share_logic.dart';
import 'meeting_main_share_state.dart';
class MeetingMainShareComponent extends StatelessWidget {
MeetingMainShareComponent({Key? key}) : super(key: key);
final MeetingMainShareLogic logic = Get.put(MeetingMainShareLogic());
final MeetingMainShareState state = Get.find<MeetingMainShareLogic>().state;
@override
Widget build(BuildContext context) {
return Container(
child: Stack(
alignment: Alignment.center,
children: [
Container(
decoration: BoxDecoration(
image: DecorationImage(
fit: BoxFit.fill,
image: NetworkImage(
"https://tse4-mm.cn.bing.net/th/id/OIP-C.acWMNnQ04Ks6Bh2b9Zq8XwHaKF?rs=1&pid=ImgDetMain",
),
),
)),
Positioned(
bottom: 110,
child: Image.asset(
'assets/images/meeting_main_hang_up.png',
width: 50.w,
height: 50.h,
),
),
Positioned(
top: 16,
right: 16,
child: Container(
height: 30,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(8),
color: ColorUtil.Color_0_0_0_96),
padding: const EdgeInsets.only(left: 12, right: 12),
child: Row(
children: [
Text(
'正在讲话:',
style: TextStyle(
fontSize: 10.sp,
color: ColorUtil.Color_185_184_184),
),
Image.asset(
'assets/images/meeting_main_speak2.png',
width: 20.w,
height: 20.h,
),
Text(
'晓晓',
style: TextStyle(
fontSize: 10.sp,
color: ColorUtil.Color_185_184_184),
)
],
),
),
),
Positioned(
top: 58,
right: 13,
child: Stack(
children: [
Container(
width: 120.w,
height: 150.h,
padding: const EdgeInsets.only(left: 12, right: 12),
decoration: BoxDecoration(
image: DecorationImage(
fit: BoxFit.fill,
image: NetworkImage(
"https://tse1-mm.cn.bing.net/th/id/OIP-C.hdhK40Dw3yN_2mjNQNqFCgAAAA?w=186&h=186&c=7&r=0&o=5&pid=1.7",
),
),
)
),
Positioned(
left: 4,
bottom: 4,
child: Row(
children: [
Image.asset(
'assets/images/meeting_main_own.png',
width: 20.w,
height: 15.h,
),
Container(
height: 15,
margin: const EdgeInsets.only(left: 4),
padding: const EdgeInsets.only(left: 4, right: 4),
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(2),
color: ColorUtil.Color_0_0_0_96),
child: Row(
children: [
Image.asset(
'assets/images/meeting_main_microphone_close.png',
width: 13.w,
height: 14.h,
),
SizedBox(width: 4.w),
Text(
'晓晓的屏幕',
style: TextStyle(
fontSize: 10.sp,
color: ColorUtil.Color_185_184_184),
)
],
),
)
],
),
)
],
),
)
],
),
);
}
@override
void dispose() {
Get.delete<MeetingMainShareLogic>();
}
}

View File

@ -0,0 +1,10 @@
import 'package:get/get.dart';
import 'meeting_main_video_logic.dart';
class MeetingMainVideoBinding extends Bindings {
@override
void dependencies() {
Get.lazyPut(() => MeetingMainVideoLogic());
}
}

View File

@ -0,0 +1,7 @@
import 'package:get/get.dart';
import 'meeting_main_video_state.dart';
class MeetingMainVideoLogic extends GetxController {
final MeetingMainVideoState state = MeetingMainVideoState();
}

View File

@ -0,0 +1,5 @@
class MeetingMainVideoState {
MeetingMainVideoState() {
///Initialize variables
}
}

View File

@ -0,0 +1,246 @@
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:get/get.dart';
import '../../../utils/color_util.dart';
import 'meeting_main_video_logic.dart';
import 'meeting_main_video_state.dart';
class MeetingMainVideoComponent extends StatelessWidget {
MeetingMainVideoComponent({Key? key}) : super(key: key);
final MeetingMainVideoLogic logic = Get.put(MeetingMainVideoLogic());
final MeetingMainVideoState state = Get.find<MeetingMainVideoLogic>().state;
@override
Widget build(BuildContext context) {
return Stack(
alignment: Alignment.center,
children: [
PageView(
scrollDirection: Axis.horizontal,
reverse: false,
controller: PageController(
initialPage: 0,
viewportFraction: 1,
keepPage: true,
),
physics: const BouncingScrollPhysics(),
pageSnapping: true,
onPageChanged: (index) {
//
print('index=====$index');
},
children: <Widget>[
Container(
child: Stack(
alignment: Alignment.center,
children: [
Container(
decoration: BoxDecoration(
image: DecorationImage(
fit: BoxFit.fill,
image: NetworkImage(
"https://tse4-mm.cn.bing.net/th/id/OIP-C.acWMNnQ04Ks6Bh2b9Zq8XwHaKF?rs=1&pid=ImgDetMain",
),
),
)),
Positioned(
bottom: 110,
child: Image.asset(
'assets/images/meeting_main_hang_up.png',
width: 50.w,
height: 50.h,
),
),
Positioned(
top: 16,
right: 16,
child: Container(
height: 30,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(8),
color: ColorUtil.Color_0_0_0_96),
padding: const EdgeInsets.only(left: 12, right: 12),
child: Row(
children: [
Text(
'正在讲话:',
style: TextStyle(
fontSize: 10.sp,
color: ColorUtil.Color_185_184_184),
),
Image.asset(
'assets/images/meeting_main_speak2.png',
width: 20.w,
height: 20.h,
),
Text(
'晓晓',
style: TextStyle(
fontSize: 10.sp,
color: ColorUtil.Color_185_184_184),
)
],
),
),
),
Positioned(
top: 58,
right: 13,
child: Stack(
children: [
Container(
width: 120.w,
height: 150.h,
padding: const EdgeInsets.only(left: 12, right: 12),
decoration: BoxDecoration(
image: DecorationImage(
fit: BoxFit.fill,
image: NetworkImage(
"https://tse1-mm.cn.bing.net/th/id/OIP-C.hdhK40Dw3yN_2mjNQNqFCgAAAA?w=186&h=186&c=7&r=0&o=5&pid=1.7",
),
),
)
),
Positioned(
left: 4,
bottom: 4,
child: Row(
children: [
Image.asset(
'assets/images/meeting_main_own.png',
width: 20.w,
height: 15.h,
),
Container(
height: 15,
margin: const EdgeInsets.only(left: 4),
padding: const EdgeInsets.only(left: 4, right: 4),
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(2),
color: ColorUtil.Color_0_0_0_96),
child: Row(
children: [
Image.asset(
'assets/images/meeting_main_microphone_close.png',
width: 13.w,
height: 14.h,
),
SizedBox(width: 4.w),
Text(
'晓晓',
style: TextStyle(
fontSize: 10.sp,
color: ColorUtil.Color_185_184_184),
)
],
),
)
],
),
)
],
),
)
],
),
),
Container(
color: ColorUtil.Color_57_57_57,
child: GridView.builder(
gridDelegate:
SliverGridDelegateWithFixedCrossAxisCount(
crossAxisCount: 2,
childAspectRatio: 0.8,
crossAxisSpacing: 0),
itemCount: 5,
itemBuilder: (BuildContext ctx, index) {
return Stack(
children: [
Container(
padding: const EdgeInsets.only(left: 12, right: 12),
decoration: BoxDecoration(
image: DecorationImage(
fit: BoxFit.fill,
image: NetworkImage(
"https://tse1-mm.cn.bing.net/th/id/OIP-C.hdhK40Dw3yN_2mjNQNqFCgAAAA?w=186&h=186&c=7&r=0&o=5&pid=1.7",
),
),
)
),
Positioned(
left: 4,
bottom: 4,
child: Row(
children: [
Image.asset(
'assets/images/meeting_main_own.png',
width: 20.w,
height: 15.h,
),
Container(
height: 15,
margin: const EdgeInsets.only(left: 4),
padding: const EdgeInsets.only(left: 4, right: 4),
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(2),
color: ColorUtil.Color_0_0_0_96),
child: Row(
children: [
Image.asset(
'assets/images/meeting_main_microphone_close.png',
width: 13.w,
height: 14.h,
),
SizedBox(width: 4.w),
Text(
'晓晓',
style: TextStyle(
fontSize: 10.sp,
color: ColorUtil.Color_185_184_184),
)
],
),
)
],
),
)
],
);
}),
),
],
),
Positioned(
bottom: 16,
child: Row(
children: [
Container(
width: 8.w,
height: 8.h,
margin: const EdgeInsets.only(right: 6),
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(8),
color: ColorUtil.Color_255_255_255),
),
Container(
width: 8.w,
height: 8.h,
margin: const EdgeInsets.only(left: 6),
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(8),
color: ColorUtil.Color_108_108_108),
)
],
),
),
],
);
}
@override
void dispose() {
Get.delete<MeetingMainVideoLogic>();
}
}

View File

@ -0,0 +1,10 @@
import 'package:get/get.dart';
import 'meeting_main_voice_logic.dart';
class MeetingMainVoiceBinding extends Bindings {
@override
void dependencies() {
Get.lazyPut(() => MeetingMainVoiceLogic());
}
}

View File

@ -0,0 +1,7 @@
import 'package:get/get.dart';
import 'meeting_main_voice_state.dart';
class MeetingMainVoiceLogic extends GetxController {
final MeetingMainVoiceState state = MeetingMainVoiceState();
}

View File

@ -0,0 +1,5 @@
class MeetingMainVoiceState {
MeetingMainVoiceState() {
///Initialize variables
}
}

View File

@ -0,0 +1,75 @@
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:get/get.dart';
import '../../../utils/color_util.dart';
import '../../../utils/cus_behavior.dart';
import 'meeting_main_voice_logic.dart';
import 'meeting_main_voice_state.dart';
class MeetingMainVoiceComponent extends StatelessWidget {
MeetingMainVoiceComponent({Key? key}) : super(key: key);
final MeetingMainVoiceLogic logic = Get.put(MeetingMainVoiceLogic());
final MeetingMainVoiceState state = Get.find<MeetingMainVoiceLogic>().state;
@override
Widget build(BuildContext context) {
return Container(
alignment: Alignment.center,
padding: const EdgeInsets.only(left: 22, right: 22),
color: ColorUtil.Color_57_57_57,
child: ScrollConfiguration(
behavior: CusBehavior(),
child: GridView.builder(
gridDelegate:
SliverGridDelegateWithFixedCrossAxisCount(
crossAxisCount: 3,
childAspectRatio: 0.7,
crossAxisSpacing: 20),
itemCount: 15,
itemBuilder: (BuildContext ctx, index) {
return Column(
children: [
SizedBox(height: 20.h),
Container(
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(99),
image: DecorationImage(
fit: BoxFit.cover,
image: NetworkImage(
"https://ts4.cn.mm.bing.net/th?id=OIP-C.QDl_Z7HdQWX_XbVYgBLJLQAAAA&w=250&h=250&c=8&rs=1&qlt=90&o=6&pid=3.1&rm=2",
),
),
),
width: 76.w,
height: 76.h,
),
SizedBox(height: 6.h),
Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Image.asset(
'assets/images/meeting_main_speak1.png',
width: 22.w,
height: 22.h,
),
Text(
'张三啊',
style: TextStyle(
fontSize: 12.sp,
color: ColorUtil.Color_255_255_255),
)
],
),
],
);
})),
);
}
@override
void dispose() {
Get.delete<MeetingMainVoiceLogic>();
}
}

View File

@ -8,7 +8,7 @@ import 'package:wgshare/common/models/user_info_detail.dart';
import 'package:wgshare/common/store/user_store.dart';
import 'package:wgshare/pages/homePage/home_logic.dart';
import 'package:wgshare/pages/userPage/user_logic.dart';
import 'package:wgshare/pages/userPage/user_page.dart';
import 'package:wgshare/pages/userPage/user_view.dart';
import 'package:wgshare/utils/toast_utils.dart';
import '../utils/color_util.dart';
@ -94,35 +94,35 @@ class _StartPageState extends State<StartPage> with RequestToolMixin {
label: '首页',
icon: Image.asset(
'assets/images/home_index_select_n.png',
width: 22,
height: 22,
width: 22.w,
height: 22.h,
),
activeIcon: Image.asset(
'assets/images/home_index_select_y.png',
width: 22,
height: 22,
width: 22.w,
height: 22.h,
),
),
BottomNavigationBarItem(
label: '我的',
icon: Image.asset(
'assets/images/home_user_select_n.png',
width: 22,
height: 22,
width: 22.w,
height: 22.h,
),
activeIcon: Image.asset(
'assets/images/home_user_select_y.png',
width: 22,
height: 22,
width: 22.w,
height: 22.h,
),
),
],
//
type: BottomNavigationBarType.fixed,
backgroundColor: Colors.white,
selectedFontSize: 14,
selectedFontSize: 14.sp,
selectedItemColor: ColorUtil.Color_85_117_242,
unselectedFontSize: 14,
unselectedFontSize: 14.sp,
unselectedItemColor: ColorUtil.Color_80_87_103,
//
currentIndex: _pageController._pageIndexState.pageIndex.value,

View File

@ -1,7 +1,9 @@
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:wgshare/utils/my_text.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:get/get.dart';
import 'package:wgshare/main.dart';
import 'package:wgshare/pages/userPage/user_logic.dart';
import '../../utils/color_util.dart';
class UserPage extends StatefulWidget {
@ -11,13 +13,13 @@ class UserPage extends StatefulWidget {
State<UserPage> createState() => UserPageState();
}
class UserPageState extends State<UserPage> with AutomaticKeepAliveClientMixin {
@override
bool get wantKeepAlive => true;
class UserPageState extends State<UserPage> {
final logic = Get.find<UserLogic>();
final state = Get.find<UserLogic>().state;
@override
Widget build(BuildContext context) {
super.build(context);
return Scaffold(
appBar: AppBar(
surfaceTintColor: Colors.white,
@ -38,13 +40,13 @@ class UserPageState extends State<UserPage> with AutomaticKeepAliveClientMixin {
children: [
Container(
width: double.infinity,
height: 44,
height: 44.h,
color: Colors.white,
alignment: Alignment.center,
child: Text(
'我的',
style: TextStyle(
fontSize: 16,
fontSize: 16.sp,
color: ColorUtil.Color_51_51_51,
fontWeight: FontWeight.w500
),
@ -71,15 +73,15 @@ class UserPageState extends State<UserPage> with AutomaticKeepAliveClientMixin {
),
),
),
width: 132,
height: 132,
width: 132.w,
height: 132.h,
),
),
Container(
child: Text(
'晓晓',
style: TextStyle(
fontSize: 16,
fontSize: 16.sp,
fontWeight: FontWeight.w500,
color: ColorUtil.Color_85_117_242
),
@ -94,7 +96,7 @@ class UserPageState extends State<UserPage> with AutomaticKeepAliveClientMixin {
Text(
'名称',
style: TextStyle(
fontSize: 12,
fontSize: 12.sp,
color: ColorUtil.Color_134_134_134
),
),
@ -104,15 +106,15 @@ class UserPageState extends State<UserPage> with AutomaticKeepAliveClientMixin {
Text(
'晓晓',
style: TextStyle(
fontSize: 12,
fontSize: 12.sp,
color: ColorUtil.Color_51_51_51
),
),
const SizedBox(width: 12),
SizedBox(width: 12.w),
Image.asset(
'assets/images/user_right.png',
width: 10,
height: 10,
width: 10.w,
height: 10.h,
)
],
),
@ -121,7 +123,7 @@ class UserPageState extends State<UserPage> with AutomaticKeepAliveClientMixin {
),
Container(
width: double.infinity,
height: 1,
height: 1.h,
color: ColorUtil.Color_230_230_230,
margin: const EdgeInsets.only(top: 12, left: 16, right: 16),
),
@ -135,7 +137,7 @@ class UserPageState extends State<UserPage> with AutomaticKeepAliveClientMixin {
Text(
'登录密码',
style: TextStyle(
fontSize: 12,
fontSize: 12.sp,
color: ColorUtil.Color_134_134_134
),
),
@ -145,15 +147,15 @@ class UserPageState extends State<UserPage> with AutomaticKeepAliveClientMixin {
Text(
'********',
style: TextStyle(
fontSize: 12,
fontSize: 12.sp,
color: ColorUtil.Color_51_51_51
),
),
const SizedBox(width: 12),
SizedBox(width: 12.w),
Image.asset(
'assets/images/user_right.png',
width: 10,
height: 10,
width: 10.w,
height: 10.h,
)
],
),
@ -162,7 +164,7 @@ class UserPageState extends State<UserPage> with AutomaticKeepAliveClientMixin {
),
Container(
width: double.infinity,
height: 1,
height: 1.h,
color: ColorUtil.Color_230_230_230,
margin: const EdgeInsets.only(top: 12, left: 16, right: 16),
),
@ -172,18 +174,18 @@ class UserPageState extends State<UserPage> with AutomaticKeepAliveClientMixin {
),
Container(
width: 280,
height: 44,
width: 280.w,
height: 44.h,
margin: const EdgeInsets.only(top: 40),
decoration: const BoxDecoration(
borderRadius: BorderRadius.all(Radius.circular(99)),
color: ColorUtil.Color_85_117_242,
),
alignment: Alignment.center,
child: const Text(
child: Text(
'退出登录',
style: TextStyle(
fontSize: 16,
fontSize: 16.sp,
color: Colors.white,
),
),
@ -193,4 +195,10 @@ class UserPageState extends State<UserPage> with AutomaticKeepAliveClientMixin {
)
);
}
@override
void dispose() {
Get.delete<UserLogic>();
super.dispose();
}
}

View File

@ -3,17 +3,20 @@ import 'package:wgshare/pages/homePage/home_binding.dart';
import 'package:wgshare/pages/homePage/home_view.dart';
import 'package:wgshare/pages/loginPage/login_binding.dart';
import 'package:wgshare/pages/loginPage/login_view.dart';
import 'package:wgshare/pages/metting/meeting_main_binding.dart';
import 'package:wgshare/pages/metting/meeting_main_view.dart';
import 'package:wgshare/pages/start_page.dart';
import '../pages/userPage/user_binding.dart';
import '../pages/userPage/user_page.dart';
import '../pages/userPage/user_view.dart';
import 'app_routes.dart';
abstract class AppPages {
static final pages = [
GetPage(name: Routes.loginPage, page: () => const LoginPage(), binding: LoginBinding(), transition: Transition.noTransition),
GetPage(name: Routes.startPage, page: () => const StartPage(), binding: StartPageBinding(), transition: Transition.noTransition),
GetPage(name: Routes.homePage, page: () => const HomePage(), binding: HomeBinding(), transition: Transition.noTransition),
GetPage(name: Routes.userPage, page: () => const UserPage(), binding: UserBinding(), transition: Transition.noTransition),
GetPage(name: Routes.loginPage, page: () => const LoginPage(), binding: LoginBinding(), transition: Transition.noTransition),
GetPage(name: Routes.meetingMainPage, page: () => MeetingMainPage(), binding: MeetingMainBinding(), transition: Transition.noTransition),
];
}

View File

@ -1,7 +1,17 @@
// part of 'app_pages.dart';
abstract class Routes {
static const loginPage = '/loginPage'; //
static const startPage = '/startPage'; //TAB页面
static const homePage = '/homePage'; //
static const userPage = '/userPage'; //
//
static const loginPage = '/loginPage';
// TAB页面
static const startPage = '/startPage';
//
static const homePage = '/homePage';
//
static const userPage = '/userPage';
//
static const meetingMainPage = '/meetingMainPage';
}

View File

@ -67,6 +67,8 @@ class ColorUtil {
static const Color_230_230_230 = Color.fromRGBO(230, 230, 230, 1);
static const Color_99_111_158 = Color.fromRGBO(99, 111, 158, 1);
///
/// hex, 0xffffff,
/// alpha, [0.0,1.0]

View File

@ -0,0 +1,13 @@
import 'dart:io';
import 'package:flutter/widgets.dart';
/// List和Grid水波纹
class CusBehavior extends ScrollBehavior {
@override
Widget buildOverscrollIndicator(
BuildContext context, Widget child, ScrollableDetails details) {
if (Platform.isAndroid || Platform.isFuchsia) return child;
return super.buildOverscrollIndicator(context, child, details);
}
}