ソースを参照

我的房产 - 分页列表,刷新与加载列表,悬停头实现。
我的家庭成员 - 普通刷新加载列表,列表头实现

liukai 1 週間 前
コミット
032e4e99e5
共有21 個のファイルを変更した662 個の追加11 個の削除を含む
  1. 1 1
      packages/cpt_main/lib/modules/feedback/history/feedback_history.dart
  2. 0 1
      packages/cpt_main/lib/modules/notification/notification_page.dart
  3. 6 0
      packages/cpt_profile/lib/modules/my_estate/estate_group_data.dart
  4. 98 0
      packages/cpt_profile/lib/modules/my_estate/item_estate.dart
  5. 26 0
      packages/cpt_profile/lib/modules/my_estate/item_estate_header.dart
  6. 63 3
      packages/cpt_profile/lib/modules/my_estate/my_estate_page.dart
  7. 30 0
      packages/cpt_profile/lib/modules/my_estate/my_estate_state.dart
  8. 139 1
      packages/cpt_profile/lib/modules/my_estate/my_estate_view_model.dart
  9. 45 0
      packages/cpt_profile/lib/modules/my_household/item_household.dart
  10. 68 3
      packages/cpt_profile/lib/modules/my_household/my_household_page.dart
  11. 29 0
      packages/cpt_profile/lib/modules/my_household/my_household_state.dart
  12. 118 1
      packages/cpt_profile/lib/modules/my_household/my_household_view_model.dart
  13. 0 1
      packages/cpt_profile/lib/modules/profile_edit/dialog/avatar_edit_dialog.dart
  14. 3 0
      packages/cs_resources/lib/generated/intl/messages_en.dart
  15. 2 0
      packages/cs_resources/lib/generated/intl/messages_zh_CN.dart
  16. 2 0
      packages/cs_resources/lib/generated/intl/messages_zh_HK.dart
  17. 20 0
      packages/cs_resources/lib/generated/l10n.dart
  18. 2 0
      packages/cs_resources/lib/l10n/intl_en.arb
  19. 2 0
      packages/cs_resources/lib/l10n/intl_zh_CN.arb
  20. 2 0
      packages/cs_resources/lib/l10n/intl_zh_HK.arb
  21. 6 0
      packages/cs_resources/lib/theme/app_colors_theme.dart

+ 1 - 1
packages/cpt_main/lib/modules/feedback/history/feedback_history.dart

@@ -28,7 +28,7 @@ class FeedbackHistoryScreen extends HookConsumerWidget {
       };
     }, []);
 
-    return Container(
+    return SizedBox(
       width: double.infinity,
       height: double.infinity,
       child: EasyRefresh(

+ 0 - 1
packages/cpt_main/lib/modules/notification/notification_page.dart

@@ -7,7 +7,6 @@ import 'package:auto_route/auto_route.dart';
 import 'package:flutter_hooks/flutter_hooks.dart';
 import 'package:hooks_riverpod/hooks_riverpod.dart';
 import 'package:router/ext/auto_router_extensions.dart';
-import 'package:widgets/ext/ex_widget.dart';
 import 'package:widgets/load_state_layout.dart';
 import 'package:widgets/my_appbar.dart';
 import 'package:widgets/my_text_view.dart';

+ 6 - 0
packages/cpt_profile/lib/modules/my_estate/estate_group_data.dart

@@ -0,0 +1,6 @@
+
+//对应分组的数据,需要在ViewModel中处理每一个组的数据
+class EstateGroupData{
+  String? groupId;
+  List<String>? groupDatas=[];
+}

+ 98 - 0
packages/cpt_profile/lib/modules/my_estate/item_estate.dart

@@ -0,0 +1,98 @@
+import 'package:cs_resources/generated/l10n.dart';
+import 'package:cs_resources/theme/app_colors_theme.dart';
+import 'package:flutter/material.dart';
+import 'package:widgets/ext/ex_widget.dart';
+import 'package:widgets/my_load_image.dart';
+import 'package:widgets/my_text_view.dart';
+
+class EstateItem extends StatelessWidget {
+  final int childIndex;  //组内的索引
+  final String item;
+
+  const EstateItem({
+    required this.childIndex,
+    required this.item,
+  });
+
+  @override
+  Widget build(BuildContext context) {
+    return Container(
+      width: double.infinity,
+      color: context.appColors.whiteBG,
+      margin: EdgeInsets.only(top: childIndex == 0 ? 0 : 10),
+      padding: const EdgeInsets.only(top: 22.5),
+      child: Column(
+        children: [
+          Row(
+            children: [
+              MyLoadImage(
+                "https://img1.baidu.com/it/u=1656098746,3560654086&fm=253&fmt=auto&app=120&f=JPEG?w=800&h=800",
+                width: 65,
+                height: 65,
+                isCircle: true,
+              ).marginOnly(right: 17, left: 15),
+              Column(
+                crossAxisAlignment: CrossAxisAlignment.start,
+                children: [
+                  //标题
+                  Row(
+                    mainAxisSize: MainAxisSize.max,
+                    crossAxisAlignment: CrossAxisAlignment.center,
+                    children: [
+                      //姓名
+                      MyTextView(
+                        "Wu Bing Bing",
+                        fontSize: 16,
+                        isFontBold: true,
+                        textColor: context.appColors.textBlack,
+                        maxLines: 2,
+                      ).expanded(),
+
+                      //删除
+                      MyTextView(
+                        S.current.remove,
+                        marginRight: 15,
+                        fontSize: 16,
+                        isFontMedium: true,
+                        textColor: context.appColors.deleteRed,
+                      ),
+                    ],
+                  ),
+
+                  MyTextView(
+                    "Owner",
+                    fontSize: 15,
+                    isFontRegular: true,
+                    textColor: context.appColors.textBlack,
+                  ),
+
+                  MyTextView(
+                    "Block 35 #08-29",
+                    fontSize: 15,
+                    isFontRegular: true,
+                    textColor: context.appColors.textBlack,
+                  ),
+                ],
+              ).expanded(),
+            ],
+          ),
+          const SizedBox(height: 22.5),
+          Divider(
+            height: 0.5,
+            color: context.appColors.backgroundDark,
+          ),
+          Center(
+            child: MyTextView(
+              S.current.active,
+              paddingTop: 16,
+              paddingBottom: 16,
+              fontSize: 16,
+              isFontMedium: true,
+              textColor: context.appColors.textPrimary,
+            ),
+          )
+        ],
+      ),
+    );
+  }
+}

+ 26 - 0
packages/cpt_profile/lib/modules/my_estate/item_estate_header.dart

@@ -0,0 +1,26 @@
+import 'package:cs_resources/theme/app_colors_theme.dart';
+import 'package:flutter/material.dart';
+import 'package:widgets/my_text_view.dart';
+
+class EstateItemHeader extends StatelessWidget {
+  String? groupId;
+
+  EstateItemHeader(this.groupId);
+
+  @override
+  Widget build(BuildContext context) {
+    return Container(
+      width: double.infinity,
+      color: context.appColors.backgroundDark,
+      child: MyTextView(
+        groupId ?? "-",
+        fontSize: 20,
+        paddingTop: 18,
+        paddingLeft: 15,
+        paddingBottom: 18,
+        isFontMedium: true,
+        textColor: context.appColors.textBlack,
+      ),
+    );
+  }
+}

+ 63 - 3
packages/cpt_profile/lib/modules/my_estate/my_estate_page.dart

@@ -1,8 +1,16 @@
+import 'package:cs_resources/generated/l10n.dart';
+import 'package:cs_resources/theme/app_colors_theme.dart';
 import 'package:flutter/material.dart';
 import 'package:auto_route/auto_route.dart';
+import 'package:flutter_hooks/flutter_hooks.dart';
 import 'package:hooks_riverpod/hooks_riverpod.dart';
 import 'package:router/ext/auto_router_extensions.dart';
+import 'package:widgets/load_state_layout.dart';
+import 'package:widgets/my_appbar.dart';
+import 'package:widgets/widget_export.dart';
 import '../../router/page/profile_page_router.dart';
+import 'item_estate.dart';
+import 'item_estate_header.dart';
 import 'my_estate_view_model.dart';
 
 @RoutePage()
@@ -21,12 +29,64 @@ class MyEstatePage extends HookConsumerWidget {
   @override
   Widget build(BuildContext context, WidgetRef ref) {
     final viewModel = ref.watch(myEstateViewModelProvider.notifier);
+    final state = ref.watch(myEstateViewModelProvider);
+
+    useEffect(() {
+      // 组件挂载时执行 - 执行接口请求
+      Future.microtask(() => viewModel.fetchList());
+      return () {
+        // 组件卸载时执行
+      };
+    }, []);
 
     return Scaffold(
-      appBar: AppBar(title: Text("Profile Edit Page")),
-      body: Center(
-        child: Text("Profile Edit Page"),
+      appBar: MyAppBar.appBar(
+        context,
+        S.current.yy_home_accounts,
+        backgroundColor: context.appColors.whiteBG,
+      ),
+      backgroundColor: context.appColors.backgroundDark,
+      body: SizedBox(
+        width: double.infinity,
+        height: double.infinity,
+        child: EasyRefresh(
+          controller: viewModel.refreshController,
+          onRefresh: viewModel.onRefresh,
+          onLoad: viewModel.loadMore,
+          child: LoadStateLayout(
+            state: state.loadingState,
+            errorMessage: state.errorMessage,
+            errorRetry: () {
+              viewModel.retryRequest();
+            },
+            successSliverWidget: [
+              SliverList(
+                  delegate: SliverChildBuilderDelegate(
+                (context, index) {
+                  return StickyHeader(
+                    header: EstateItemHeader(state.datas[index].groupId),
+                    content: Column(
+                      children: _buildGroup(state.datas[index].groupDatas!, index),
+                    ),
+                  );
+                },
+                childCount: state.datas.length,
+              ))
+            ],
+          ),
+        ),
       ),
     );
   }
+
+  //当前组内的子数据
+  List<Widget> _buildGroup(List<String> list, int index) {
+    return list
+        .asMap()
+        .map((childIndex, item) {
+          return MapEntry(childIndex, EstateItem(item: item, childIndex: childIndex));
+        })
+        .values
+        .toList();
+  }
 }

+ 30 - 0
packages/cpt_profile/lib/modules/my_estate/my_estate_state.dart

@@ -1,3 +1,33 @@
+import 'package:widgets/load_state_layout.dart';
+import 'estate_group_data.dart';
+
 class MyEstateState{
 
+  //页面 LoadView 状态的展示
+  LoadState loadingState;
+  String? errorMessage;
+
+  List<EstateGroupData> datas; //页面列表数据
+
+  // ===================================  Begin  ↓  ===================================
+
+  MyEstateState({
+    this.loadingState = LoadState.State_Loading,
+    this.errorMessage,
+    required this.datas,
+  });
+
+  MyEstateState copyWith({
+    LoadState? loadingState,
+    String? errorMessage,
+    bool? needShowPlaceholder,
+    List<EstateGroupData>? datas,
+  }) {
+    return MyEstateState(
+      errorMessage: errorMessage ?? this.errorMessage,
+      loadingState: loadingState ?? this.loadingState,
+      datas: datas ?? this.datas,
+    );
+  }
+
 }

+ 139 - 1
packages/cpt_profile/lib/modules/my_estate/my_estate_view_model.dart

@@ -1,4 +1,7 @@
+import 'package:cpt_profile/modules/my_estate/estate_group_data.dart';
 import 'package:riverpod_annotation/riverpod_annotation.dart';
+import 'package:widgets/load_state_layout.dart';
+import 'package:widgets/widget_export.dart';
 
 import 'my_estate_state.dart';
 
@@ -8,6 +11,141 @@ part 'my_estate_view_model.g.dart';
 class MyEstateViewModel extends _$MyEstateViewModel {
   @override
   MyEstateState build() {
-    return MyEstateState();
+    return MyEstateState(datas: []);
   }
+
+  var _curPage = 1; //请求参数当前的页面
+  var _needShowPlaceholder = true; //是否展示LoadingView
+
+  // Refresh 控制器
+  final EasyRefreshController refreshController = EasyRefreshController(
+    controlFinishRefresh: true, //允许刷新
+    controlFinishLoad: true, //允许加载
+  );
+
+  //刷新页面状态
+  void changeLoadingState(LoadState loadState, String? errorMsg) {
+    state = state.copyWith(loadingState: loadState, errorMessage: errorMsg);
+  }
+
+  // Refresh 刷新事件
+  Future onRefresh() async {
+    _curPage = 1;
+    fetchList();
+  }
+
+  // Refresh 加载事件
+  Future loadMore() async {
+    _curPage++;
+    fetchList();
+  }
+
+  // 重试请求
+  Future retryRequest() async {
+    _curPage = 1;
+    _needShowPlaceholder = true;
+    fetchList();
+  }
+
+  /// 获取服务器数据
+  Future fetchList() async {
+    if (_needShowPlaceholder) {
+      changeLoadingState(LoadState.State_Loading, null);
+    }
+
+    // 获取 Applied 列表
+    // var listResult = await _jobRepository.fetchJobAppliedList(
+    //   state.jobId,
+    //   state.selectedStatusId,
+    //   state.keyword,
+    //   curPage: _curPage,
+    //   cancelToken: cancelToken,
+    // );
+    //
+    // // 处理数据
+    // if (listResult.isSuccess) {
+    //   handleList(listResult.data?.rows);
+    // } else {
+    //   errorMessage = listResult.errorMsg;
+    //   changeLoadingState(LoadState.State_Error);
+    // }
+
+    await Future.delayed(const Duration(milliseconds: 1500));
+
+    List<EstateGroupData> list = [];
+    if (_curPage > 1) {
+
+      //这里只加载一页吧
+    } else {
+
+      list.add(EstateGroupData()
+        ..groupId = "Parc Life"
+        ..groupDatas = ["1", "2",]);
+
+      list.add(EstateGroupData()
+        ..groupId = "Little India"
+        ..groupDatas = ["1", "2",]);
+
+      list.add(EstateGroupData()
+        ..groupId = "Marina Bay Sands"
+        ..groupDatas = ["1"]);
+
+    }
+
+
+    if (_curPage == 1) {
+      //刷新的方式
+      state = state.copyWith(datas: list);
+      refreshController.finishRefresh();
+
+      //更新展示的状态
+      changeLoadingState(LoadState.State_Success, null);
+    } else {
+      //加载更多
+      final allList = state.datas;
+      allList.addAll(list);
+      state.datas.addAll(list);
+
+      // refreshController.finishLoad();
+      refreshController.finishLoad(IndicatorResult.noMore);
+
+      state = state.copyWith(datas: allList);
+    }
+
+    // 最后赋值
+    _needShowPlaceholder = false;
+  }
+
+// 处理数据与展示的逻辑
+// void handleList(List<JobAppliedListSGRows>? list) {
+//   if (list != null && list.isNotEmpty) {
+//     //有数据,判断是刷新还是加载更多的数据
+//     if (_curPage == 1) {
+//       //刷新的方式
+//       state.datas.clear();
+//       state.datas.addAll(list);
+//       refreshController.finishRefresh();
+//
+//       //更新展示的状态
+//       changeLoadingState(LoadState.State_Success);
+//     } else {
+//       //加载更多
+//       state.datas.addAll(list);
+//       refreshController.finishLoad();
+//       update();
+//     }
+//   } else {
+//     if (_curPage == 1) {
+//       //展示无数据的布局
+//       state.datas.clear();
+//       changeLoadingState(LoadState.State_Empty);
+//       refreshController.finishRefresh();
+//     } else {
+//       //展示加载完成,没有更多数据了
+//       refreshController.finishLoad(IndicatorResult.noMore);
+//     }
+//   }
+// }
+
+
 }

+ 45 - 0
packages/cpt_profile/lib/modules/my_household/item_household.dart

@@ -0,0 +1,45 @@
+import 'package:cs_resources/generated/l10n.dart';
+import 'package:cs_resources/theme/app_colors_theme.dart';
+import 'package:flutter/material.dart';
+import 'package:widgets/ext/ex_widget.dart';
+import 'package:widgets/my_load_image.dart';
+import 'package:widgets/my_text_view.dart';
+
+class HouseholdItem extends StatelessWidget {
+  final int index;
+  final String item;
+
+  const HouseholdItem({
+    required this.index,
+    required this.item,
+  });
+
+  @override
+  Widget build(BuildContext context) {
+    return Container(
+      width: double.infinity,
+      color: context.appColors.whiteBG,
+      margin: const EdgeInsets.only(bottom: 5),
+      padding: const EdgeInsets.symmetric(horizontal: 15, vertical: 15),
+      child: Row(
+        mainAxisSize: MainAxisSize.max,
+        children: [
+          MyLoadImage(
+            "https://img1.baidu.com/it/u=1656098746,3560654086&fm=253&fmt=auto&app=120&f=JPEG?w=800&h=800",
+            width: 65,
+            height: 65,
+            isCircle: true,
+          ).marginOnly(right: 17),
+
+        MyTextView(
+          "Wu Bing Bing",
+          fontSize: 17,
+          isFontBold: true,
+          textColor: context.appColors.textBlack,
+          maxLines: 2,
+        ).expanded(),
+        ],
+      ),
+    );
+  }
+}

+ 68 - 3
packages/cpt_profile/lib/modules/my_household/my_household_page.dart

@@ -1,8 +1,17 @@
+import 'package:cs_resources/generated/l10n.dart';
+import 'package:cs_resources/theme/app_colors_theme.dart';
 import 'package:flutter/material.dart';
 import 'package:auto_route/auto_route.dart';
+import 'package:flutter_hooks/flutter_hooks.dart';
 import 'package:hooks_riverpod/hooks_riverpod.dart';
 import 'package:router/ext/auto_router_extensions.dart';
+import 'package:widgets/ext/ex_widget.dart';
+import 'package:widgets/load_state_layout.dart';
+import 'package:widgets/my_appbar.dart';
+import 'package:widgets/my_text_view.dart';
+import 'package:widgets/widget_export.dart';
 import '../../router/page/profile_page_router.dart';
+import 'item_household.dart';
 import 'my_household_view_model.dart';
 
 @RoutePage()
@@ -21,11 +30,67 @@ class MyHouseholdPage extends HookConsumerWidget {
   @override
   Widget build(BuildContext context, WidgetRef ref) {
     final viewModel = ref.watch(myHouseholdViewModelProvider.notifier);
+    final state = ref.watch(myHouseholdViewModelProvider);
+
+    useEffect(() {
+      // 组件挂载时执行 - 执行接口请求
+      Future.microtask(() => viewModel.fetchList());
+      return () {
+        // 组件卸载时执行
+      };
+    }, []);
 
     return Scaffold(
-      appBar: AppBar(title: Text("Profile Edit Page")),
-      body: Center(
-        child: Text("Profile Edit Page"),
+      appBar: MyAppBar.appBar(
+        context,
+        S.current.household_members,
+        backgroundColor: context.appColors.whiteBG,
+      ),
+      backgroundColor: context.appColors.backgroundDark,
+      body: SizedBox(
+        width: double.infinity,
+        height: double.infinity,
+        child: EasyRefresh(
+          controller: viewModel.refreshController,
+          onRefresh: viewModel.onRefresh,
+          onLoad: viewModel.loadMore,
+          child: LoadStateLayout(
+            state: state.loadingState,
+            errorMessage: state.errorMessage,
+            errorRetry: () {
+              viewModel.retryRequest();
+            },
+            successSliverWidget: [
+              //顶部的房产显示
+              _buildEstateWidget(context),
+
+              //房产内成员的列表
+              SliverList(
+                  delegate: SliverChildBuilderDelegate(
+                (context, index) {
+                  return HouseholdItem(index: index, item: state.datas[index]);
+                },
+                childCount: state.datas.length,
+              ))
+            ],
+          ),
+        ),
+      ),
+    );
+  }
+
+  //顶部的房产布局
+  Widget _buildEstateWidget(BuildContext context) {
+    return SliverToBoxAdapter(
+      child: MyTextView(
+        "Owner 35 #08-29",
+        fontSize: 20,
+        paddingLeft: 15,
+        paddingRight: 15,
+        paddingTop: 19,
+        paddingBottom: 19,
+        isFontMedium: true,
+        textColor: context.appColors.textBlack,
       ),
     );
   }

+ 29 - 0
packages/cpt_profile/lib/modules/my_household/my_household_state.dart

@@ -1,3 +1,32 @@
+import 'package:widgets/load_state_layout.dart';
+
 class MyHouseholdState{
 
+  //页面 LoadView 状态的展示
+  LoadState loadingState;
+  String? errorMessage;
+
+  List<String> datas; //页面列表数据
+
+  // ===================================  Begin  ↓  ===================================
+
+  MyHouseholdState({
+    this.loadingState = LoadState.State_Loading,
+    this.errorMessage,
+    required this.datas,
+  });
+
+  MyHouseholdState copyWith({
+    LoadState? loadingState,
+    String? errorMessage,
+    bool? needShowPlaceholder,
+    List<String>? datas,
+  }) {
+    return MyHouseholdState(
+      errorMessage: errorMessage ?? this.errorMessage,
+      loadingState: loadingState ?? this.loadingState,
+      datas: datas ?? this.datas,
+    );
+  }
+
 }

+ 118 - 1
packages/cpt_profile/lib/modules/my_household/my_household_view_model.dart

@@ -1,4 +1,6 @@
 import 'package:riverpod_annotation/riverpod_annotation.dart';
+import 'package:widgets/load_state_layout.dart';
+import 'package:widgets/widget_export.dart';
 
 import 'my_household_state.dart';
 
@@ -8,6 +10,121 @@ part 'my_household_view_model.g.dart';
 class MyHouseholdViewModel extends _$MyHouseholdViewModel {
   @override
   MyHouseholdState build() {
-    return MyHouseholdState();
+    return MyHouseholdState(datas: []);
   }
+
+  var _curPage = 1; //请求参数当前的页面
+  var _needShowPlaceholder = true; //是否展示LoadingView
+
+  // Refresh 控制器
+  final EasyRefreshController refreshController = EasyRefreshController(
+    controlFinishRefresh: true,  //允许刷新
+    controlFinishLoad: true,   //允许加载
+  );
+
+  //刷新页面状态
+  void changeLoadingState(LoadState loadState, String? errorMsg) {
+    state = state.copyWith(loadingState: loadState, errorMessage: errorMsg);
+  }
+
+  // Refresh 刷新事件
+  Future onRefresh() async {
+    _curPage = 1;
+    fetchList();
+  }
+
+  // Refresh 加载事件
+  Future loadMore() async {
+    _curPage++;
+    fetchList();
+  }
+
+  // 重试请求
+  Future retryRequest() async {
+    _curPage = 1;
+    _needShowPlaceholder = true;
+    fetchList();
+  }
+
+  /// 获取服务器数据
+  Future fetchList() async {
+    if (_needShowPlaceholder) {
+      changeLoadingState(LoadState.State_Loading, null);
+    }
+
+    // 获取 Applied 列表
+    // var listResult = await _jobRepository.fetchJobAppliedList(
+    //   state.jobId,
+    //   state.selectedStatusId,
+    //   state.keyword,
+    //   curPage: _curPage,
+    //   cancelToken: cancelToken,
+    // );
+    //
+    // // 处理数据
+    // if (listResult.isSuccess) {
+    //   handleList(listResult.data?.rows);
+    // } else {
+    //   errorMessage = listResult.errorMsg;
+    //   changeLoadingState(LoadState.State_Error);
+    // }
+
+
+    await Future.delayed(const Duration(milliseconds: 1500));
+
+    final List<String> list = ["1", "2", "3", "4", "5", "6", "7", "8", "9", "10"];
+
+    if (_curPage == 1) {
+      //刷新的方式
+      state = state.copyWith(datas: list);
+      refreshController.finishRefresh();
+
+      //更新展示的状态
+      changeLoadingState(LoadState.State_Success, null);
+    } else {
+      //加载更多
+      final allList = state.datas;
+      allList.addAll(list);
+      state.datas.addAll(list);
+
+      refreshController.finishLoad();
+
+      state = state.copyWith(datas: allList);
+    }
+
+    // 最后赋值
+    _needShowPlaceholder = false;
+  }
+
+// 处理数据与展示的逻辑
+// void handleList(List<JobAppliedListSGRows>? list) {
+//   if (list != null && list.isNotEmpty) {
+//     //有数据,判断是刷新还是加载更多的数据
+//     if (_curPage == 1) {
+//       //刷新的方式
+//       state.datas.clear();
+//       state.datas.addAll(list);
+//       refreshController.finishRefresh();
+//
+//       //更新展示的状态
+//       changeLoadingState(LoadState.State_Success);
+//     } else {
+//       //加载更多
+//       state.datas.addAll(list);
+//       refreshController.finishLoad();
+//       update();
+//     }
+//   } else {
+//     if (_curPage == 1) {
+//       //展示无数据的布局
+//       state.datas.clear();
+//       changeLoadingState(LoadState.State_Empty);
+//       refreshController.finishRefresh();
+//     } else {
+//       //展示加载完成,没有更多数据了
+//       refreshController.finishLoad(IndicatorResult.noMore);
+//     }
+//   }
+// }
+
 }

+ 0 - 1
packages/cpt_profile/lib/modules/profile_edit/dialog/avatar_edit_dialog.dart

@@ -2,7 +2,6 @@ import 'package:cs_resources/generated/assets.dart';
 import 'package:cs_resources/generated/l10n.dart';
 import 'package:cs_resources/theme/app_colors_theme.dart';
 import 'package:flutter/material.dart';
-import 'package:plugin_platform/engine/toast/toast_engine.dart';
 import 'package:widgets/ext/ex_widget.dart';
 import 'package:widgets/my_load_image.dart';
 import 'package:widgets/my_text_view.dart';

+ 3 - 0
packages/cs_resources/lib/generated/intl/messages_en.dart

@@ -97,7 +97,10 @@ class MessageLookup extends MessageLookupByLibrary {
         "history": MessageLookupByLibrary.simpleMessage("History"),
         "home": MessageLookupByLibrary.simpleMessage("Home"),
         "household": MessageLookupByLibrary.simpleMessage("Household"),
+        "household_members":
+            MessageLookupByLibrary.simpleMessage("Household Members"),
         "in_progress": MessageLookupByLibrary.simpleMessage("In Progress"),
+        "inactive": MessageLookupByLibrary.simpleMessage("INACTIVE"),
         "info": MessageLookupByLibrary.simpleMessage("Info"),
         "internal": MessageLookupByLibrary.simpleMessage("Internal"),
         "introduction_to_info_pack":

+ 2 - 0
packages/cs_resources/lib/generated/intl/messages_zh_CN.dart

@@ -82,7 +82,9 @@ class MessageLookup extends MessageLookupByLibrary {
         "history": MessageLookupByLibrary.simpleMessage("历史记录"),
         "home": MessageLookupByLibrary.simpleMessage("首页"),
         "household": MessageLookupByLibrary.simpleMessage("家庭"),
+        "household_members": MessageLookupByLibrary.simpleMessage("家庭成员"),
         "in_progress": MessageLookupByLibrary.simpleMessage("处理中"),
+        "inactive": MessageLookupByLibrary.simpleMessage("不可用"),
         "info": MessageLookupByLibrary.simpleMessage("咨询"),
         "internal": MessageLookupByLibrary.simpleMessage("内部"),
         "introduction_to_info_pack":

+ 2 - 0
packages/cs_resources/lib/generated/intl/messages_zh_HK.dart

@@ -82,7 +82,9 @@ class MessageLookup extends MessageLookupByLibrary {
         "history": MessageLookupByLibrary.simpleMessage("历史记录"),
         "home": MessageLookupByLibrary.simpleMessage("首页"),
         "household": MessageLookupByLibrary.simpleMessage("家庭"),
+        "household_members": MessageLookupByLibrary.simpleMessage("家庭成员"),
         "in_progress": MessageLookupByLibrary.simpleMessage("处理中"),
+        "inactive": MessageLookupByLibrary.simpleMessage("不可用"),
         "info": MessageLookupByLibrary.simpleMessage("咨询"),
         "internal": MessageLookupByLibrary.simpleMessage("内部"),
         "introduction_to_info_pack":

+ 20 - 0
packages/cs_resources/lib/generated/l10n.dart

@@ -1430,6 +1430,16 @@ class S {
     );
   }
 
+  /// `INACTIVE`
+  String get inactive {
+    return Intl.message(
+      'INACTIVE',
+      name: 'inactive',
+      desc: '',
+      args: [],
+    );
+  }
+
   /// `Remove`
   String get remove {
     return Intl.message(
@@ -1450,6 +1460,16 @@ class S {
     );
   }
 
+  /// `Household Members`
+  String get household_members {
+    return Intl.message(
+      'Household Members',
+      name: 'household_members',
+      desc: '',
+      args: [],
+    );
+  }
+
   /// `Other`
   String get other {
     return Intl.message(

+ 2 - 0
packages/cs_resources/lib/l10n/intl_en.arb

@@ -137,7 +137,9 @@
   "or": "or",
   "edit_profile": "Edit Profile",
   "active": "ACTIVE",
+  "inactive": "INACTIVE",
   "remove": "Remove",
   "add": "Add",
+  "household_members": "Household Members",
   "other": "Other"
 }

+ 2 - 0
packages/cs_resources/lib/l10n/intl_zh_CN.arb

@@ -137,7 +137,9 @@
   "or": "或者",
   "edit_profile": "编辑个人信息",
   "active": "可用",
+  "inactive": "不可用",
   "remove": "移除",
   "add": "添加",
+  "household_members": "家庭成员",
   "other": "其他"
 }

+ 2 - 0
packages/cs_resources/lib/l10n/intl_zh_HK.arb

@@ -123,7 +123,9 @@
   "or": "或者",
   "edit_profile": "编辑个人信息",
   "active": "可用",
+  "inactive": "不可用",
   "remove": "移除",
   "add": "添加",
+  "household_members": "家庭成员",
   "other": "其他"
 }

+ 6 - 0
packages/cs_resources/lib/theme/app_colors_theme.dart

@@ -30,6 +30,7 @@ class AppColorsTheme extends ThemeExtension<AppColorsTheme> {
   static const _color1B61CA = Color(0X4D1B61CA);
   static const _color8B96BA = Color(0xFF8B96BA);
   static const _colorB4C5FF = Color(0xFFB4C5FF);
+  static const _colorFE4066 = Color(0xFFFE4066);
 
   //暗色主题的一些自定义颜色值
   static const _darkBlackBg = Color(0xFF0F0F0F);
@@ -68,6 +69,7 @@ class AppColorsTheme extends ThemeExtension<AppColorsTheme> {
   final Color tabLightBlueShadow; //Tab的淡蓝色阴影
   final Color textLightPurple; //文本淡紫色
   final Color avatarBg; //头像框的淡蓝色
+  final Color deleteRed; //删除的红色
 
   // 私有的构造函数
   const AppColorsTheme._internal({
@@ -99,6 +101,7 @@ class AppColorsTheme extends ThemeExtension<AppColorsTheme> {
     required this.tabTextUnSelectedDefault,
     required this.textLightPurple,
     required this.avatarBg,
+    required this.deleteRed,
   });
 
   // 浅色主题工厂方法
@@ -132,6 +135,7 @@ class AppColorsTheme extends ThemeExtension<AppColorsTheme> {
       tabTextUnSelectedDefault: Colors.black,
       textLightPurple: _color8B96BA,
       avatarBg: _colorB4C5FF,
+      deleteRed: _colorFE4066,
     );
   }
 
@@ -166,6 +170,7 @@ class AppColorsTheme extends ThemeExtension<AppColorsTheme> {
       tabTextUnSelectedDefault: _darkBlackItemLightMost,
       textLightPurple: Colors.white,
       avatarBg: _darkBlackItemLight,
+      deleteRed: Colors.white,
     );
   }
 
@@ -209,6 +214,7 @@ class AppColorsTheme extends ThemeExtension<AppColorsTheme> {
       tabTextUnSelectedDefault: Color.lerp(tabTextUnSelectedDefault, other.tabTextUnSelectedDefault, t)!,
       textLightPurple: Color.lerp(textLightPurple, other.textLightPurple, t)!,
       avatarBg: Color.lerp(avatarBg, other.avatarBg, t)!,
+      deleteRed: Color.lerp(deleteRed, other.deleteRed, t)!,
     );
   }
 }