|
|
@ -3,7 +3,6 @@ import 'package:flutter_screenutil/flutter_screenutil.dart'; |
|
|
import 'package:get/get.dart'; |
|
|
import 'package:get/get.dart'; |
|
|
import 'dart:io'; |
|
|
import 'dart:io'; |
|
|
import '../../../routes/app_routes.dart'; |
|
|
import '../../../routes/app_routes.dart'; |
|
|
import '../../profile/controllers/profile_controller.dart'; |
|
|
|
|
|
|
|
|
|
|
|
import '../controllers/meeting_mine_controller.dart'; |
|
|
import '../controllers/meeting_mine_controller.dart'; |
|
|
import 'bottomSheet/statistics_bottom_sheet.dart'; |
|
|
import 'bottomSheet/statistics_bottom_sheet.dart'; |
|
|
@ -96,8 +95,6 @@ class MeetingMineView extends GetView<MeetingMineController> { |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
Widget _head() { |
|
|
Widget _head() { |
|
|
final ProfileController profileCtrl = |
|
|
|
|
|
Get.find<ProfileController>(); // 从GetX中获取ProfileController实例 |
|
|
|
|
|
return Padding( |
|
|
return Padding( |
|
|
padding: EdgeInsets.symmetric(vertical: 20.w), |
|
|
padding: EdgeInsets.symmetric(vertical: 20.w), |
|
|
child: GestureDetector( |
|
|
child: GestureDetector( |
|
|
@ -114,14 +111,19 @@ class MeetingMineView extends GetView<MeetingMineController> { |
|
|
), |
|
|
), |
|
|
child: CircleAvatar( |
|
|
child: CircleAvatar( |
|
|
radius: 25.w, |
|
|
radius: 25.w, |
|
|
backgroundImage: profileCtrl.localAvatar.value.isNotEmpty |
|
|
backgroundImage: controller |
|
|
? FileImage(File(profileCtrl.localAvatar.value)) |
|
|
.profileCtrl.localAvatar.value.isNotEmpty |
|
|
: (profileCtrl.userInfo.value.avatar.isNotEmpty |
|
|
? FileImage( |
|
|
? NetworkImage(profileCtrl.userInfo.value.avatar) |
|
|
File(controller.profileCtrl.localAvatar.value)) |
|
|
|
|
|
: (controller |
|
|
|
|
|
.profileCtrl.userInfo.value.avatar.isNotEmpty |
|
|
|
|
|
? NetworkImage( |
|
|
|
|
|
controller.profileCtrl.userInfo.value.avatar) |
|
|
: null) as ImageProvider<Object>?, |
|
|
: null) as ImageProvider<Object>?, |
|
|
backgroundColor: Colors.grey[200], |
|
|
backgroundColor: Colors.grey[200], |
|
|
child: (profileCtrl.localAvatar.value.isEmpty && |
|
|
child: (controller.profileCtrl.localAvatar.value.isEmpty && |
|
|
profileCtrl.userInfo.value.avatar.isEmpty) |
|
|
controller |
|
|
|
|
|
.profileCtrl.userInfo.value.avatar.isEmpty) |
|
|
? Icon( |
|
|
? Icon( |
|
|
Icons.person, |
|
|
Icons.person, |
|
|
size: 25.r, |
|
|
size: 25.r, |
|
|
@ -133,7 +135,7 @@ class MeetingMineView extends GetView<MeetingMineController> { |
|
|
Expanded( |
|
|
Expanded( |
|
|
child: Obx( |
|
|
child: Obx( |
|
|
() => Text( |
|
|
() => Text( |
|
|
profileCtrl.userInfo.value.name, |
|
|
controller.profileCtrl.userInfo.value.name, |
|
|
style: TextStyle( |
|
|
style: TextStyle( |
|
|
color: Colors.black87, |
|
|
color: Colors.black87, |
|
|
fontSize: 20.sp, |
|
|
fontSize: 20.sp, |
|
|
@ -203,9 +205,22 @@ class MeetingMineView extends GetView<MeetingMineController> { |
|
|
), |
|
|
), |
|
|
itemCount: 364, |
|
|
itemCount: 364, |
|
|
itemBuilder: (BuildContext context, int index) { |
|
|
itemBuilder: (BuildContext context, int index) { |
|
|
|
|
|
int type = 0; |
|
|
|
|
|
if (controller.statistics.containsKey(index + 1)) { |
|
|
|
|
|
if (controller.statistics[index + 1]['count'] <= |
|
|
|
|
|
controller.averageNumberFiles) { |
|
|
|
|
|
type = 1; |
|
|
|
|
|
} else { |
|
|
|
|
|
type = 2; |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
return Container( |
|
|
return Container( |
|
|
decoration: BoxDecoration( |
|
|
decoration: BoxDecoration( |
|
|
color: Colors.grey[200], |
|
|
color: type == 0 |
|
|
|
|
|
? Colors.grey[200] |
|
|
|
|
|
: type == 1 |
|
|
|
|
|
? Colors.red[100] |
|
|
|
|
|
: Colors.red, |
|
|
borderRadius: BorderRadius.circular(2.w), |
|
|
borderRadius: BorderRadius.circular(2.w), |
|
|
), |
|
|
), |
|
|
); |
|
|
); |
|
|
|