glglove 1 тиждень тому
батько
коміт
77c62285f2
18 змінених файлів з 550 додано та 209 видалено
  1. 1 1
      packages/cpt_community/lib/components/newfeed_card_header.dart
  2. 63 39
      packages/cpt_community/lib/components/newsfeed_card_footer.dart
  3. 7 4
      packages/cpt_community/lib/modules/garagesale/garagesale_page.dart
  4. 25 19
      packages/cpt_community/lib/modules/garagesale/garagesale_post/garagesale_post_page.dart
  5. 14 7
      packages/cpt_community/lib/modules/garagesale/garagesale_post/garagesale_post_state.dart
  6. 30 16
      packages/cpt_community/lib/modules/garagesale/garagesale_post/garagesale_post_vm.dart
  7. 1 1
      packages/cpt_community/lib/modules/garagesale/garagesale_post/garagesale_post_vm.g.dart
  8. 103 8
      packages/cpt_community/lib/modules/newsfeed/newsfeed_detail/newsfeed_detail_page.dart
  9. 27 0
      packages/cpt_community/lib/modules/newsfeed/newsfeed_detail/newsfeed_detail_state.dart
  10. 61 0
      packages/cpt_community/lib/modules/newsfeed/newsfeed_detail/newsfeed_detail_vm.dart
  11. 26 0
      packages/cpt_community/lib/modules/newsfeed/newsfeed_detail/newsfeed_detail_vm.g.dart
  12. 81 61
      packages/cpt_community/lib/modules/newsfeed/newsfeed_page.dart
  13. 29 31
      packages/cpt_community/lib/modules/newsfeed/newsfeed_post/newsfeed_post_page.dart
  14. 4 3
      packages/cpt_community/lib/modules/newsfeed/newsfeed_post/newsfeed_post_vm.dart
  15. 1 1
      packages/cpt_community/lib/modules/newsfeed/newsfeed_post/newsfeed_post_vm.g.dart
  16. 42 12
      packages/cpt_community/lib/modules/newsfeed/newsfeed_vm.dart
  17. 1 1
      packages/cpt_community/lib/modules/newsfeed/newsfeed_vm.g.dart
  18. 34 5
      packages/cpt_community/lib/router/page/community_page_router.gr.dart

+ 1 - 1
packages/cpt_community/lib/components/newfeed_card_header.dart

@@ -33,7 +33,7 @@ class NewsFeedCardHeader extends StatelessWidget {
   @override
   Widget build(BuildContext context) {
     return Container(
-      padding: const EdgeInsets.symmetric(horizontal: 16),
+      padding: const EdgeInsets.only(left: 16,right: 60),
       child: Row(
         mainAxisAlignment: MainAxisAlignment.start,
         crossAxisAlignment: CrossAxisAlignment.start,

+ 63 - 39
packages/cpt_community/lib/components/newsfeed_card_footer.dart

@@ -1,7 +1,10 @@
+import 'package:cpt_community/components/newfeed_card_header.dart';
 import 'package:cs_resources/generated/assets.dart';
 import 'package:flutter/material.dart';
 import 'package:flutter/widgets.dart';
 import 'package:shared/utils/color_utils.dart';
+import 'package:shared/utils/log_utils.dart';
+import 'package:widgets/ext/ex_widget.dart';
 import 'package:widgets/my_load_image.dart';
 import 'package:widgets/my_text_view.dart';
 
@@ -40,45 +43,66 @@ class NewsFeedCardFooter extends StatelessWidget {
         child:  Row(
           mainAxisAlignment: MainAxisAlignment.spaceBetween,
           children: [
-            Row(
-              children: [
-                const MyAssetImage(Assets.communityLike, width: 16,height: 16,),
-                MyTextView(
-                  'Like',
-                  textColor: ColorUtils.string2Color('#767676'),
-                  fontSize: 14,
-                  isFontRegular: true,
-                  textAlign: TextAlign.left,
-                  marginLeft: 8,
-                ),
-              ],
-            ),
-            Row(
-              children: [
-                const MyAssetImage(Assets.communityComments, width: 16,height: 16,),
-                MyTextView(
-                  'Comments',
-                  textColor: ColorUtils.string2Color('#767676'),
-                  fontSize: 14,
-                  isFontRegular: true,
-                  textAlign: TextAlign.left,
-                  marginLeft: 8,
-                ),
-              ],
-            ),
-            Row(
-              children: [
-                const MyAssetImage(Assets.communityShare, width: 16,height: 16,),
-                MyTextView(
-                  'Share',
-                  textColor: ColorUtils.string2Color('#767676'),
-                  fontSize: 14,
-                  isFontRegular: true,
-                  textAlign: TextAlign.left,
-                  marginLeft: 8,
-                ),
-              ],
-            ),
+            Container(
+              height: 40,
+              padding: const EdgeInsets.all(8),
+              child: Row(
+                children: [
+                  const MyAssetImage(Assets.communityLike, width: 16,height: 16,),
+                  MyTextView(
+                    'Like',
+                    textColor: ColorUtils.string2Color('#767676'),
+                    fontSize: 14,
+                    isFontRegular: true,
+                    textAlign: TextAlign.left,
+                    marginLeft: 8,
+                  ),
+                ],
+              ),
+            ).onTap((){
+              Log.d("点击了like");
+              onLike?.call();
+            }),
+            Container(
+              height: 40,
+              padding: const EdgeInsets.all(8),
+              child: Row(
+                children: [
+                  const MyAssetImage(Assets.communityComments, width: 16,height: 16,),
+                  MyTextView(
+                    'Comments',
+                    textColor: ColorUtils.string2Color('#767676'),
+                    fontSize: 14,
+                    isFontRegular: true,
+                    textAlign: TextAlign.left,
+                    marginLeft: 8,
+                  ),
+                ],
+              ),
+            ).onTap((){
+              Log.d("点击了comments");
+              onComment?.call();
+            }),
+            Container(
+              height: 40,
+              padding: const EdgeInsets.all(8),
+              child: Row(
+                children: [
+                  const MyAssetImage(Assets.communityShare, width: 16,height: 16,),
+                  MyTextView(
+                    'Share',
+                    textColor: ColorUtils.string2Color('#767676'),
+                    fontSize: 14,
+                    isFontRegular: true,
+                    textAlign: TextAlign.left,
+                    marginLeft: 8,
+                  ),
+                ],
+              ),
+            ).onTap((){
+              Log.d("点击了share");
+              onShare?.call();
+            }),
           ]
         ),
       )

+ 7 - 4
packages/cpt_community/lib/modules/garagesale/garagesale_page.dart

@@ -40,6 +40,7 @@ class GaragesalePage extends HookConsumerWidget {
       width: double.infinity,
       padding: const EdgeInsets.only(left: 15, right: 15,top: 14,bottom: 14),
       child: GaragesaleTabs(
+        key: ValueKey(vm.state.activeIndex),
         tabsList: vm.state.tabsList,
       ),
     );
@@ -105,6 +106,7 @@ class GaragesalePage extends HookConsumerWidget {
               children: [
                 // 卡片头部(头像 标题 时间)
                 NewsFeedCardHeader(
+                  key: UniqueKey(),
                   title: item['title'],
                   avator: item['avator'],
                   time: item['time'],
@@ -113,6 +115,7 @@ class GaragesalePage extends HookConsumerWidget {
                 // 卡片中间 (文字和图片)
                 Expanded(
                   child: NewsFeedCardContent(
+                    key: UniqueKey(),
                     content: item['content'],
                     imageUrls: item['imageUrls'],
                   ),
@@ -120,6 +123,7 @@ class GaragesalePage extends HookConsumerWidget {
                 const SizedBox(height: 26),
                 // // 卡片底部 (点赞 评论 分享)
                 NewsFeedCardFooter(
+                  key: UniqueKey(),
                   isLike: item['isLike'],
                 ),
               ]
@@ -129,16 +133,13 @@ class GaragesalePage extends HookConsumerWidget {
   }
 
   Widget _buildNesFeedList(BuildContext context, WidgetRef ref, vm){
-    // return Container(
-    //   height: 100,
-    //   color: Colors.blue,
-    // );
     final itemList = vm.state.list?? [];
     if(itemList.isEmpty){
       return const Center(child: Text('No Data'));
     }else {
       List itemsList = vm.state.list.toList();
       return ListView.builder(
+        key: UniqueKey(),
         itemCount: itemsList.length,
         itemBuilder: (context, index) {
           return _buildNewsItem(context, ref, itemsList[index], vm);
@@ -156,8 +157,10 @@ class GaragesalePage extends HookConsumerWidget {
       backgroundColor: ColorUtils.string2Color("#F2F3F6"),
       body: Column(
         children: [
+          //  tab 分类 (For sale  For Rent)
           _buildTabsSection(context, ref, vm),
 
+          // 发布组件
           _buildPostSection(context, ref, vm),
 
           NotificationListener<ScrollNotification>(

+ 25 - 19
packages/cpt_community/lib/modules/garagesale/garagesale_post/garagesale_post_page.dart

@@ -34,12 +34,14 @@ class GaragesalePostPage extends HookConsumerWidget {
 
   @override
   Widget build(BuildContext context, WidgetRef ref) {
-    final vm = ref.read(garagesalePostVmProvider.notifier);
+    final vm = ref.watch(garagesalePostVmProvider.notifier);
+    final state = ref.watch(garagesalePostVmProvider);
+    // print("9999999999999999999 ${state.titleErrorText}");
 
     return Scaffold(
       appBar: MyAppBar.appBar(
         context,
-        "Garagesale Post",
+        "Post New Item",
         backgroundColor: context.appColors.whiteBG,
       ),
       backgroundColor: Colors.white,
@@ -64,7 +66,7 @@ class GaragesalePostPage extends HookConsumerWidget {
                           ),
                           // title
                           Container(
-                            margin: const EdgeInsets.only(left:15, right:15, top: 20),
+                            margin: const EdgeInsets.only(left:15, right:15, top: 15),
                             child: Column(
                               crossAxisAlignment: CrossAxisAlignment.start,
                               children: [
@@ -73,13 +75,26 @@ class GaragesalePostPage extends HookConsumerWidget {
                                   textColor: context.appColors.textBlack,
                                   fontSize: 17,
                                 ).marginOnly(bottom: 14.5),
-                                _buildInputLayout(context, ref, 'title'),
+                                _buildInputLayout(
+                                  context,
+                                  ref,
+                                  state,
+                                  'title',
+                                  marginTop: 16,
+                                  textInputType: TextInputType.text,
+                                  textInputAction: TextInputAction.next,
+                                  errorText: state.titleErrorText,
+                                  onSubmit: (formKey, value) {
+                                    state!.formData[formKey]!['focusNode'].unfocus();
+                                    FocusScope.of(context).requestFocus(state.formData['description']!['focusNode']);
+                                  },
+                                ),
                               ]
                             )
                           ),
                           // description
                           Container(
-                            margin: const EdgeInsets.only(left:15, right:15,top: 20),
+                            margin: const EdgeInsets.only(left:15, right:15,top: 15),
                             child: Column(
                                 crossAxisAlignment: CrossAxisAlignment.start,
                                 children: [
@@ -88,7 +103,7 @@ class GaragesalePostPage extends HookConsumerWidget {
                                     textColor: context.appColors.textBlack,
                                     fontSize: 17,
                                   ).marginOnly(bottom: 14.5),
-                                  _buildTextArea(context, ref, 'description'),
+                                  _buildTextArea(context, ref, 'description',),
                                 ]
                             )
 
@@ -97,7 +112,7 @@ class GaragesalePostPage extends HookConsumerWidget {
                             width: double.infinity,
                             height: 200,
                             color: Colors.white,
-                            margin: const EdgeInsets.only(left:15, right:15, top: 10, bottom: 20),
+                            margin: const EdgeInsets.only(left:15, right:15, top: 15, bottom: 20),
                             // 选择图片上传 控件
                             child: _buildImageSelectCmp(context, ref,vm),
                           ),
@@ -144,14 +159,6 @@ class GaragesalePostPage extends HookConsumerWidget {
       decoration: BoxDecoration(
         color: context.appColors.authFiledBG,
         borderRadius: BorderRadius.circular(5),
-        // boxShadow: [
-        //   BoxShadow(
-        //     color: Colors.grey.withOpacity(0.5),
-        //     spreadRadius: 1,
-        //     blurRadius: 1,
-        //     offset: const Offset(0, 3), // changes position of shadow
-        //   ),
-        // ]
       ),
       child: _buildTextAreaLayout(
         context,
@@ -260,20 +267,20 @@ class GaragesalePostPage extends HookConsumerWidget {
   Widget _buildInputLayout(
       BuildContext context,
       WidgetRef ref,
+      state,
       String key,
       {
-        double height = 48,
-        double maxLines = 1,
         double marginTop = 0,
         bool? showRightIcon = false, //是否展示右侧的布局
         Widget? rightWidget, //右侧的布局
         TextInputType textInputType = TextInputType.text,
         String? errorText,
         bool obscureText = false,
+        bool enable = true,
         TextInputAction textInputAction = TextInputAction.done,
         Function? onSubmit,
       }) {
-    final state = ref.watch(garagesalePostVmProvider);
+    // final state = ref.watch(garagesalePostVmProvider);
     return IgnoreKeyboardDismiss(
       child: MyTextField(
         key,
@@ -290,7 +297,6 @@ class GaragesalePostPage extends HookConsumerWidget {
         margin: EdgeInsets.only(top: marginTop),
         padding: const EdgeInsets.symmetric(horizontal: 12, vertical: 3),
         showDivider: false,
-        height: height,
         style: TextStyle(
           color: context.appColors.authFiledText,
           fontSize: 16.0,

+ 14 - 7
packages/cpt_community/lib/modules/garagesale/garagesale_post/garagesale_post_state.dart

@@ -1,8 +1,12 @@
 import 'package:flutter/cupertino.dart';
 
 class GaragesalePostPageState {
-  //表单的错误信息展示
-  String? fieldErrorText;
+  //title 字段的错误信息展示
+  String? titleErrorText;
+
+  //title 字段的错误信息展示
+  String? descriptionErrorText;
+
   //表单的校验与数据
   final Map<String, Map<String, dynamic>> formData;
 
@@ -12,11 +16,11 @@ class GaragesalePostPageState {
   final String? description;
 
   //sale 类型选项
-  final List<String> saleOptionsList = ["SALE1", "SALE2", "SALE3", "SALE4"];
+  final List<String> saleOptionsList = ["For Sale", "For Rent",];
   String? saleSelectedOption;
 
   //category 类型选项
-  final List<String> categoryOptionsList = ["Category1", "Category2", "Category3", "Category4"];
+  final List<String> categoryOptionsList = ["Kids", "Homeware", "Fashion", "Electronics","Sports","Furniture","Others"];
   String? categorySelectedOption;
 
   // 选择的图片
@@ -25,7 +29,8 @@ class GaragesalePostPageState {
   GaragesalePostPageState({
     formData,
     required this.imgList,
-    this.fieldErrorText,
+    this.titleErrorText,
+    this.descriptionErrorText,
     this.title,
     this.description,
     this.saleSelectedOption,
@@ -64,7 +69,8 @@ class GaragesalePostPageState {
   GaragesalePostPageState copyWith({
     Map<String, Map<String, dynamic>>? formData,
     List<String>? imgList,
-    String? fieldErrorText,
+    String? titleErrorText,
+    String? descriptionErrorText,
     String? saleSelectedOption,
     String? categorySelectedOption,
     String? title,
@@ -77,7 +83,8 @@ class GaragesalePostPageState {
       imgList: imgList ?? this.imgList,
       saleSelectedOption: saleSelectedOption ?? this.saleSelectedOption,
       categorySelectedOption: categorySelectedOption ?? this.categorySelectedOption,
-      fieldErrorText: fieldErrorText ?? this.fieldErrorText,
+      titleErrorText: titleErrorText ,
+      descriptionErrorText: descriptionErrorText,
     );
   }
 

+ 30 - 16
packages/cpt_community/lib/modules/garagesale/garagesale_post/garagesale_post_vm.dart

@@ -16,12 +16,13 @@ import 'garagesale_post_state.dart';
 
 part 'garagesale_post_vm.g.dart';
 
+
 @riverpod
 class GaragesalePostVm extends _$GaragesalePostVm {
-
   GaragesalePostPageState initState() {
     return GaragesalePostPageState(
-      fieldErrorText: '',
+      titleErrorText: null,
+      descriptionErrorText: '',
       formData: {
         'sale': {
           'value': '',
@@ -56,6 +57,7 @@ class GaragesalePostVm extends _$GaragesalePostVm {
     );
   }
 
+
   @override
   GaragesalePostPageState build() {
     // 初始化状态
@@ -63,7 +65,6 @@ class GaragesalePostVm extends _$GaragesalePostVm {
 
     // 当前渲染完成后执行一次
     WidgetsBinding.instance!.addPostFrameCallback((_) {
-      // 获取焦点
       initListener(state);
       ref.onDispose(() {
         onDispose(state);
@@ -126,32 +127,34 @@ class GaragesalePostVm extends _$GaragesalePostVm {
   // 获取表单的值
   dynamic _getFormFieldValue({List<String>? keys, String? keyStr}) {
     if(keyStr!.isEmpty){
+      Log.d("获取指定集合的表单值");
       if(keys!.isNotEmpty){
         // 遍历keys获取指定多个 keys 的表单value
         Map<String, dynamic> resultValueMap = {};
         for (String itemStr in keys!) {
           TextEditingController sigleItemController = state.formData[itemStr]!['controller'];
-          resultValueMap[itemStr] = sigleItemController.text;
+          resultValueMap[itemStr] = sigleItemController!.text;
         }
         return resultValueMap;
       }
     }else if(keyStr!.isNotEmpty){
+      Log.d("获取单个表单值  ${keyStr}");
       // 获取单个表单的value
       final TextEditingController sigleItemController = state.formData[keyStr]!['controller'];
-      return sigleItemController.text;
+      return sigleItemController!.text;
     }
   }
 
   ///提交反馈
   void submitGaragesalePost() {
     Log.d("GaragesalePostPageState 提交表单");
-    state = state.copyWith(fieldErrorText: null);
-
-    _dismissKeyboard();
+    state = state.copyWith(titleErrorText: null, descriptionErrorText: null);
+    _dismissKeyboard(keyStr: "");
 
     // 获取表单的值
-    String  saleValue= _getFormFieldValue(keyStr: 'sale');
-    String  categoryValue= _getFormFieldValue(keyStr: 'category');
+    String  saleValue= state.saleSelectedOption ?? "";
+    String  categoryValue= state.categorySelectedOption ?? "";
+
     String  titleValue= _getFormFieldValue(keyStr: 'title');
     String  descriptionValue= _getFormFieldValue(keyStr: 'description');
 
@@ -159,15 +162,26 @@ class GaragesalePostVm extends _$GaragesalePostVm {
 
 
     if (Utils.isEmpty(saleValue)) {
-      state = state.copyWith(fieldErrorText: "Title cannot be empty!");
+      ToastEngine.show('Sale is empty');
       return;
     }
 
-    if (Utils.isEmpty(categoryValue)) {
-      state = state.copyWith(fieldErrorText: "category cannot be empty!");
+    if (Utils.isEmpty(titleValue)) {
+      state = state.copyWith(titleErrorText: 'Title is empty',);
       return;
+    }else {
+      state.titleErrorText = null;
+      state = state.copyWith(titleErrorText: null);
     }
 
+    if (Utils.isEmpty(descriptionValue)) {
+      state = state.copyWith(descriptionErrorText: 'Description is empty');
+      return;
+    }else {
+      state = state.copyWith(descriptionErrorText: null);
+    }
+
+
     //去成功页面
     // FeedbackCreateSuccessPage.startInstance();
     // 返回上一页
@@ -182,12 +196,12 @@ class GaragesalePostVm extends _$GaragesalePostVm {
   void initListener(GaragesalePostPageState initState) {
 
     // 获取表单的焦点节点
-    final FocusNode focusNode = getFocusNode(state.formData, 'mind');
+    final FocusNode focusNode = getFocusNode(state.formData, 'title');
 
     focusNode.addListener(() {
       // 获取焦点的时候清空错误文本
       if (focusNode.hasFocus) {
-        state = state.copyWith(fieldErrorText: null);
+        state = state.copyWith(titleErrorText: null, descriptionErrorText: null);
       }
     });
   }
@@ -195,7 +209,7 @@ class GaragesalePostVm extends _$GaragesalePostVm {
   //销毁资源
   void onDispose(GaragesalePostPageState initState) {
     // 获取表单的焦点节点
-    final FocusNode focusNode = getFocusNode(state.formData, 'mind');
+    final FocusNode focusNode = getFocusNode(state.formData, 'title');
     focusNode.dispose();
 
     Log.d("GaragesalePostPageState 销毁 onDispose");

+ 1 - 1
packages/cpt_community/lib/modules/garagesale/garagesale_post/garagesale_post_vm.g.dart

@@ -6,7 +6,7 @@ part of 'garagesale_post_vm.dart';
 // RiverpodGenerator
 // **************************************************************************
 
-String _$garagesalePostVmHash() => r'71539a609fdc9da73ac1d354ea881f0ad43eea22';
+String _$garagesalePostVmHash() => r'263c880d5ef88c9a3808b91d6448cbee51b8ff8e';
 
 /// See also [GaragesalePostVm].
 @ProviderFor(GaragesalePostVm)

+ 103 - 8
packages/cpt_community/lib/modules/newsfeed/newsfeed_detail/newsfeed_detail_page.dart

@@ -1,27 +1,47 @@
+import 'package:cpt_community/modules/newsfeed/newsfeed_detail/newsfeed_detail_vm.dart';
 import 'package:cpt_community/router/page/community_page_router.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:shared/utils/color_utils.dart';
 import 'package:widgets/my_appbar.dart';
+import 'package:widgets/my_button.dart';
+
+import '../../../components/newfeed_card_header.dart';
+import '../../../components/newsfeed_card_content.dart';
+import '../../../components/newsfeed_card_footer.dart';
 
 @RoutePage()
 class NewsfeedDetailPage extends HookConsumerWidget {
-  const NewsfeedDetailPage({Key? key}) : super(key: key);
+  final int? id;
 
-  //启动当前页面
-  static void startInstance({BuildContext? context}) {
+  const NewsfeedDetailPage({Key? key, required this.id}) : super(key: key);
+  // 启动当前页面
+  static void startInstance({BuildContext? context, int? id}) {
     if (context != null) {
-      context.router.push(const NewsfeedDetailPageRoute());
+      context.router.push(NewsfeedDetailPageRoute(id: id));
     } else {
-      appRouter.push(const NewsfeedDetailPageRoute());
+      appRouter.push(NewsfeedDetailPageRoute(id: id));
     }
   }
 
+
   @override
   Widget build(BuildContext context, WidgetRef ref) {
-    // final viewModel = ref.watch(newsfeedPostVmProvider.notifier);
+
+    final vm = ref.watch(newsfeedDetailVmProvider);
+
+    useEffect((){
+      // 组件挂载时执行 - 执行接口请求
+      // Future.microtask(() => vm.fetchList());
+      return () {
+        // 组件卸载时执行
+      };
+    }, []);
+
 
     return Scaffold(
       appBar: MyAppBar.appBar(
@@ -30,9 +50,84 @@ class NewsfeedDetailPage extends HookConsumerWidget {
         backgroundColor: context.appColors.whiteBG,
       ),
       backgroundColor: context.appColors.backgroundDefault,
-      body: Center(
-        child: Text("NewsfeedDetail"),
+      body: Column(
+        children: [
+          _buildTopCard(context, ref),
+        ],
       ),
     );
   }
+
+  Widget _buildTopCard(BuildContext context, WidgetRef ref){
+    final vm = ref.read(newsfeedDetailVmProvider.notifier);
+    final state = ref.watch(newsfeedDetailVmProvider);
+    return Container(
+      width: double.infinity,
+      //   color: Colors.yellow,
+      child: Stack(
+        children: [
+          Container(
+            margin: const EdgeInsets.only(left: 15, right: 15,top: 14,bottom: 14),
+            color: Colors.white,
+            padding: const EdgeInsets.only(left: 15, right: 15,top: 17,bottom: 17),
+            height: 280,
+            child: Column(
+                mainAxisAlignment: MainAxisAlignment.center,
+                crossAxisAlignment: CrossAxisAlignment.start,
+                children: [
+                  // 卡片头部(头像 标题 时间)
+                  NewsFeedCardHeader(
+                    key: UniqueKey(),
+                    title: state?.detailInfo!['title'],
+                    avator: state.detailInfo['avator'],
+                    time: state.detailInfo['time'],
+                  ),
+                  const SizedBox(height: 15),
+                  // 卡片中间 (文字和图片)
+                  Expanded(
+                    child: NewsFeedCardContent(
+                      key: UniqueKey(),
+                      content: state.detailInfo['content'],
+                      imageUrls: state.detailInfo['imageUrls'],
+                    ),
+                  ),
+                  const SizedBox(height: 26),
+                ]
+            ),
+          ),
+          // 右上角 关注/取消关注 按钮
+          Visibility(
+            visible: !state.detailInfo['isFollow'],
+            child: Positioned(
+                right: 40,
+                top: 35,
+                child: Container(
+                  width: 83.5,
+                  height: 45.5,
+                  alignment: Alignment.center,
+                  // decoration: BoxDecoration(
+                  //   color:  ColorUtils.string2Color('#4161D0'),
+                  //   borderRadius: BorderRadius.circular(5),
+                  // ),
+                  child: MyButton(
+                    text: '+Follow',
+                    textColor: Colors.white,
+                    backgroundColor: ColorUtils.string2Color('#4161D0'),
+                    radius: 8,
+                    minHeight: 27.5,
+                    padding: const EdgeInsets.only(left: 5, right: 5,top:9,bottom:9),
+                    fontWeight: FontWeight.w400,
+                    fontSize: 14,
+                    onPressed: (){
+                      // Navigator.pop(context);
+                    },
+                  ),
+                )
+            ),
+          )
+        ],
+      ),
+    );
+  }
+
 }

+ 27 - 0
packages/cpt_community/lib/modules/newsfeed/newsfeed_detail/newsfeed_detail_state.dart

@@ -0,0 +1,27 @@
+class NewsfeedDetailState {
+  int? curPage;
+  int? pageSize;
+  int? filterCount;
+  Map<String, dynamic> detailInfo;
+
+  NewsfeedDetailState({
+    this.curPage,
+    this.pageSize,
+    this.filterCount,
+    required this.detailInfo,
+  });
+
+  NewsfeedDetailState copyWith({
+    int? curPage,
+    int? pageSize,
+    int? filterCount,
+    Map<String, dynamic>? detailInfo,
+  }) {
+    return NewsfeedDetailState(
+      curPage: curPage ?? this.curPage,
+      pageSize: pageSize ?? this.pageSize,
+      filterCount: filterCount ?? this.filterCount,
+      detailInfo: detailInfo ?? this.detailInfo,
+    );
+  }
+}

+ 61 - 0
packages/cpt_community/lib/modules/newsfeed/newsfeed_detail/newsfeed_detail_vm.dart

@@ -0,0 +1,61 @@
+
+import 'package:cs_resources/generated/assets.dart';
+import 'package:flutter/cupertino.dart';
+import 'package:plugin_platform/engine/toast/toast_engine.dart';
+import 'package:riverpod_annotation/riverpod_annotation.dart';
+import 'package:shared/utils/log_utils.dart';
+
+import 'newsfeed_detail_state.dart';
+import 'newsfeed_detail_page.dart';
+
+part 'newsfeed_detail_vm.g.dart';
+
+@riverpod
+class NewsfeedDetailVm extends _$NewsfeedDetailVm {
+
+  NewsfeedDetailState initState() {
+    return NewsfeedDetailState(
+      curPage: 1,
+      pageSize: 10,
+      filterCount: 0,
+      detailInfo: {
+        'id':1,
+        'avator': Assets.communityCamera,
+        'title': 'William Jefferson',
+        'content': 'She said YES and our lives changed.Thank you all for coming to my propose today.We hope everyone can ……[More]',
+        'imageUrls': ['https://img.alicdn.com/tfs/TB1h.o9O4MPMeJjy1XaXXcSsFXa-640-360.jpg','https://img.alicdn.com/tfs/TB1h.o9O4MPMeJjy1XaXXcSsFXa-640-360.jpg','https://img.alicdn.com/tfs/TB1h.o9O4MPMeJjy1XaXXcSsFXa-640-360.jpg'],
+        'time': 'June 17,2016 at 7:23 p.m.',
+        'isLike': true,
+        'isFollow': false,
+        'likeno': 12,
+        'commentsInfo': {
+          'total': 12,
+          'list': [
+            {
+                'userId': 1,
+                'userName': 'William Jefferson',
+                'avator': Assets.communityCamera,
+                'time': 'June 17,2016 at 7:23 p.m.',
+                'content': 'She said YES and our lives changed.Thank you all for coming to my propose today.We hope everyone can ……[More]'
+            },
+          ]
+        }
+      },
+    );
+  }
+
+
+  @override
+  NewsfeedDetailState build(){
+    NewsfeedDetailState state = initState();
+
+    // 第一次挂载后
+    // WidgetsBinding.instance!.addPostFrameCallback((_) {
+    // }
+
+    Log.d("---------444-----------------build---------------------");
+    return state;
+  }
+
+}
+

+ 26 - 0
packages/cpt_community/lib/modules/newsfeed/newsfeed_detail/newsfeed_detail_vm.g.dart

@@ -0,0 +1,26 @@
+// GENERATED CODE - DO NOT MODIFY BY HAND
+
+part of 'newsfeed_detail_vm.dart';
+
+// **************************************************************************
+// RiverpodGenerator
+// **************************************************************************
+
+String _$newsfeedDetailVmHash() => r'bcb5aa349bfb1eca295f6c9ba8f4078bf46235ff';
+
+/// See also [NewsfeedDetailVm].
+@ProviderFor(NewsfeedDetailVm)
+final newsfeedDetailVmProvider =
+    AutoDisposeNotifierProvider<NewsfeedDetailVm, Object?>.internal(
+  NewsfeedDetailVm.new,
+  name: r'newsfeedDetailVmProvider',
+  debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product')
+      ? null
+      : _$newsfeedDetailVmHash,
+  dependencies: null,
+  allTransitiveDependencies: null,
+);
+
+typedef _$NewsfeedDetailVm = AutoDisposeNotifier<Object?>;
+// ignore_for_file: type=lint
+// ignore_for_file: subtype_of_sealed_class, invalid_use_of_internal_member, invalid_use_of_visible_for_testing_member, deprecated_member_use_from_same_package

+ 81 - 61
packages/cpt_community/lib/modules/newsfeed/newsfeed_page.dart

@@ -39,6 +39,7 @@ class NewsfeedPage extends HookConsumerWidget {
       width: double.infinity,
       padding: const EdgeInsets.only(left: 15, right: 15,top: 14,bottom: 14),
       child: NewsfeedTabs(
+        key: UniqueKey(),
         tabsList: vm.state.tabsList,
       ),
     );
@@ -105,6 +106,7 @@ class NewsfeedPage extends HookConsumerWidget {
                 children: [
                   // 卡片头部(头像 标题 时间)
                   NewsFeedCardHeader(
+                    key: UniqueKey(),
                     title: item['title'],
                     avator: item['avator'],
                     time: item['time'],
@@ -113,6 +115,7 @@ class NewsfeedPage extends HookConsumerWidget {
                   // 卡片中间 (文字和图片)
                   Expanded(
                     child: NewsFeedCardContent(
+                      key: UniqueKey(),
                       content: item['content'],
                       imageUrls: item['imageUrls'],
                     ),
@@ -120,35 +123,50 @@ class NewsfeedPage extends HookConsumerWidget {
                   const SizedBox(height: 26),
                   // // 卡片底部 (点赞 评论 分享)
                   NewsFeedCardFooter(
-                    isLike: item['isLike'],
+                      key: UniqueKey(),
+                      isLike: item['isLike'],
+                      onLike: (){
+                        vm.handlerClickActionBtn('like', item);
+                      },
+                      onComment: (){
+                        vm.handlerClickActionBtn('comments', item);
+                      },
+                      onShare: (){
+                        vm.handlerClickActionBtn('share', item);
+                      },
                   ),
                 ]
             ),
           ),
           // 右上角 关注/取消关注 按钮
-          Positioned(
-            right: 20,
-            top: 20,
-            child: Container(
-              width: 100,
-              alignment: Alignment.center,
-              decoration: BoxDecoration(
-                color: item['isFollow'] ? ColorUtils.string2Color('#FFEBEE') : ColorUtils.string2Color('#F2F3F6'),
-                borderRadius: BorderRadius.circular(15),
-              ),
-              child: MyButton(
-                text: item['isFollow'] ? 'Following' : 'Follow',
-                textColor: item['isFollow'] ? ColorUtils.string2Color('#FF0000') : ColorUtils.string2Color('#000000'),
-                backgroundColor: item['isFollow'] ? ColorUtils.string2Color('#F2F3F6') : ColorUtils.string2Color('#FFEBEE'),
-                radius: 0,
-                minHeight: 50,
-                fontWeight: FontWeight.w500,
-                fontSize: 14,
-                onPressed: (){
-                  // Navigator.pop(context);
-                },
-              ),
-            )
+          Visibility(
+            visible: !item['isFollow'],
+            child: Positioned(
+              right: 40,
+              top: 35,
+              child: Container(
+                width: 83.5,
+                height: 45.5,
+                alignment: Alignment.center,
+                // decoration: BoxDecoration(
+                //   color:  ColorUtils.string2Color('#4161D0'),
+                //   borderRadius: BorderRadius.circular(5),
+                // ),
+                child: MyButton(
+                  text: '+Follow',
+                  textColor: Colors.white,
+                  backgroundColor: ColorUtils.string2Color('#4161D0'),
+                  radius: 8,
+                  minHeight: 27.5,
+                  padding: const EdgeInsets.only(left: 5, right: 5,top:9,bottom:9),
+                  fontWeight: FontWeight.w400,
+                  fontSize: 14,
+                  onPressed: (){
+                    // Navigator.pop(context);
+                  },
+                ),
+              )
+            ),
           )
         ],
       ),
@@ -162,6 +180,7 @@ class NewsfeedPage extends HookConsumerWidget {
     }else {
       List itemsList = vm.state.list.toList();
       return ListView.builder(
+        key: UniqueKey(),
         itemCount: itemsList.length,
         itemBuilder: (context, index) {
           return _buildNewsItem(context, ref, itemsList[index], vm);
@@ -179,8 +198,9 @@ class NewsfeedPage extends HookConsumerWidget {
       backgroundColor: ColorUtils.string2Color("#F2F3F6"),
       body: Column(
           children: [
+            // 顶部的 tab
             _buildTabsSection(context, ref, vm),
-
+            // post 组件
             _buildPostSection(context, ref, vm),
 
             // Expanded(
@@ -200,42 +220,42 @@ class NewsfeedPage extends HookConsumerWidget {
             // )
             NotificationListener <ScrollNotification>(
               onNotification: (ScrollNotification notification) {
-                // 检查当前页面是否是可见的
-                bool isDownOrUp = notification.metrics.axis == Axis.vertical;
-                if (notification is UserScrollNotification) {
-                  // 检查滚动方向
-                  switch (notification.direction) {
-                    case ScrollDirection.forward:
-                      print('Scrolling down');
-                      break;
-                    case ScrollDirection.reverse:
-                      print('Scrolling up');
-                      break;
-                    case ScrollDirection.idle:
-                      print('Scrolling stopped');
-                      break;
-                  }
-                } else if (notification is ScrollUpdateNotification) {
-                  // 检查滚动位置变化
-                  double currentScrollPosition = notification.metrics.pixels;
-                  double maxScrollExtent = notification.metrics.maxScrollExtent;
-
-                  // 判断是否满足某个条件
-                  if (currentScrollPosition > 0 && currentScrollPosition < maxScrollExtent) {
-                    print('Current scroll position: $currentScrollPosition');
-                    // 在这里添加你的条件判断逻辑
-                  }
-
-                  // 只有当上下滚动时才拦截通知
-                  if (notification.metrics.axis == Axis.vertical) {
-                    final tabsRouter = ref.watch(communityVmProvider).tabsRouter;
-                    final curUseTag = ref.watch(communityVmProvider).useTag;
-                    if(curUseTag != 0 ){
-                      // 非当前 页面都阻止滚动
-                      return true; // 返回 true 表示已处理通知
-                    }
-                  }
-                }
+                // // 检查当前页面是否是可见的
+                // bool isDownOrUp = notification.metrics.axis == Axis.vertical;
+                // if (notification is UserScrollNotification) {
+                //   // 检查滚动方向
+                //   switch (notification.direction) {
+                //     case ScrollDirection.forward:
+                //       print('Scrolling down');
+                //       break;
+                //     case ScrollDirection.reverse:
+                //       print('Scrolling up');
+                //       break;
+                //     case ScrollDirection.idle:
+                //       print('Scrolling stopped');
+                //       break;
+                //   }
+                // } else if (notification is ScrollUpdateNotification) {
+                //   // 检查滚动位置变化
+                //   double currentScrollPosition = notification.metrics.pixels;
+                //   double maxScrollExtent = notification.metrics.maxScrollExtent;
+                //
+                //   // 判断是否满足某个条件
+                //   if (currentScrollPosition > 0 && currentScrollPosition < maxScrollExtent) {
+                //     print('Current scroll position: $currentScrollPosition');
+                //     // 在这里添加你的条件判断逻辑
+                //   }
+                //
+                //   // 只有当上下滚动时才拦截通知
+                //   if (notification.metrics.axis == Axis.vertical) {
+                //     final tabsRouter = ref.watch(communityVmProvider).tabsRouter;
+                //     final curUseTag = ref.watch(communityVmProvider).useTag;
+                //     if(curUseTag != 0 ){
+                //       // 非当前 页面都阻止滚动
+                //       return true; // 返回 true 表示已处理通知
+                //     }
+                //   }
+                // }
                 return false; // 返回 false 表示不拦截通知
               },
               child: Expanded(

+ 29 - 31
packages/cpt_community/lib/modules/newsfeed/newsfeed_post/newsfeed_post_page.dart

@@ -52,14 +52,40 @@ class NewsfeedPostPage extends HookConsumerWidget {
                           // mind textearea
                           Container(
                             margin: const EdgeInsets.only(left:15, right:15,top: 20),
-                            child: _buildTextArea(context, ref),
+                            width: double.infinity,
+                            height: 200,
+                            padding: const EdgeInsets.all(15),
+                            decoration: BoxDecoration(
+                                color: Colors.white,
+                                borderRadius: BorderRadius.circular(5),
+                                boxShadow: [
+                                  BoxShadow(
+                                    color: Colors.grey.withOpacity(0.2),
+                                    spreadRadius:1,
+                                    blurRadius: 2,
+                                    offset: const Offset(0.5, 0.5), // changes position of shadow
+                                  ),
+                                ]
+                            ),
+                            child: _buildTextAreaLayout(context,ref,'mind',),
                           ),
                           Container(
                             width: double.infinity,
                             height: 200,
-                            color: Colors.white,
                             margin: const EdgeInsets.only(left:15, right:15, top: 20, bottom: 20),
                             padding: const EdgeInsets.all(15),
+                            decoration: BoxDecoration(
+                                color: Colors.white,
+                                borderRadius: BorderRadius.circular(5),
+                                boxShadow: [
+                                  BoxShadow(
+                                    color: Colors.grey.withOpacity(0.2),
+                                    spreadRadius:1,
+                                    blurRadius: 2,
+                                    offset: const Offset(0.5, 0.5), // changes position of shadow
+                                  ),
+                                ]
+                            ),
                             // 选择图片上传 控件
                             child: _buildImageSelectCmp(context, ref,vm),
                           ),
@@ -82,6 +108,7 @@ class NewsfeedPostPage extends HookConsumerWidget {
                         fontSize: 16,
                         onPressed: (){
                           // Navigator.pop(context);
+                          vm.submitNewsfeedPost();
                         },
                       ),
                     ),
@@ -93,35 +120,6 @@ class NewsfeedPostPage extends HookConsumerWidget {
     );
   }
 
-  /// textarea
-  Widget _buildTextArea(BuildContext context, WidgetRef ref){
-
-    final state = ref.watch(newsfeedPostVmProvider);
-    final vm = ref.read(newsfeedPostVmProvider.notifier);
-
-    return Container(
-      width: double.infinity,
-      height: 200,
-      padding: const EdgeInsets.all(15),
-      decoration: BoxDecoration(
-          color: Colors.white,
-          borderRadius: BorderRadius.circular(5),
-          // boxShadow: [
-          //   BoxShadow(
-          //     color: Colors.grey.withOpacity(0.5),
-          //     spreadRadius: 1,
-          //     blurRadius: 1,
-          //     offset: const Offset(0, 3), // changes position of shadow
-          //   ),
-          // ]
-      ),
-      child: _buildTextAreaLayout(
-          context,
-          ref,
-          'mind',
-      ),
-    );
-  }
   /// 选择图片上传组件
   Widget _buildImageSelectCmp(BuildContext context, WidgetRef ref,vm,){
     final state = ref.watch(newsfeedPostVmProvider);

+ 4 - 3
packages/cpt_community/lib/modules/newsfeed/newsfeed_post/newsfeed_post_vm.dart

@@ -19,7 +19,7 @@ class NewsfeedPostVm extends _$NewsfeedPostVm {
 
   NewsfeedPostPageState initState() {
     return NewsfeedPostPageState(
-        mindFieldErrorText: '',
+        mindFieldErrorText: null,
         formData: {
           'mind': {
             'value': '',
@@ -108,7 +108,7 @@ class NewsfeedPostVm extends _$NewsfeedPostVm {
   void submitNewsfeedPost() {
     state = state.copyWith(mindFieldErrorText: null);
 
-    _dismissKeyboard();
+    _dismissKeyboard(keyStr: 'mind');
 
     // 获取表单的值
     String mindValue = _getFormFieldValue(keyStr: 'mind');
@@ -117,7 +117,8 @@ class NewsfeedPostVm extends _$NewsfeedPostVm {
 
 
     if (Utils.isEmpty(mindValue)) {
-      state = state.copyWith(mindFieldErrorText: "Title cannot be empty!");
+      state = state.copyWith(mindFieldErrorText: "Mind cannot be empty!");
+      ToastEngine.show("${state.mindFieldErrorText}");
       return;
     }
 

+ 1 - 1
packages/cpt_community/lib/modules/newsfeed/newsfeed_post/newsfeed_post_vm.g.dart

@@ -6,7 +6,7 @@ part of 'newsfeed_post_vm.dart';
 // RiverpodGenerator
 // **************************************************************************
 
-String _$newsfeedPostVmHash() => r'cf718a80d333c12dc21a3fed0516d82bf44b7ad1';
+String _$newsfeedPostVmHash() => r'fe82190c049d9a9e370a5c4f0b6aba182b73b27f';
 
 /// See also [NewsfeedPostVm].
 @ProviderFor(NewsfeedPostVm)

+ 42 - 12
packages/cpt_community/lib/modules/newsfeed/newsfeed_vm.dart

@@ -5,11 +5,14 @@ import 'package:flutter/material.dart';
 import 'package:plugin_platform/engine/toast/toast_engine.dart';
 import 'package:riverpod_annotation/riverpod_annotation.dart';
 import 'package:router/componentRouter/component_service_manager.dart';
+import 'package:router/ext/auto_router_extensions.dart';
 import 'package:router/path/router_path.dart';
 import 'package:shared/utils/color_utils.dart';
 import 'package:shared/utils/log_utils.dart';
 import 'package:auto_route/auto_route.dart';
 
+import '../../router/page/community_page_router.dart';
+import 'newsfeed_detail/newsfeed_detail_page.dart';
 import 'newsfeed_state.dart';
 import 'newsfeed_repository.dart';
 
@@ -20,8 +23,8 @@ class NewsfeedVm extends _$NewsfeedVm {
   late NewsfeedRepository newsfeedRepository;
   NewsfeedState initState() {
     return NewsfeedState(
-      useTag: 0,
-      activeIndex: 0,
+      useTag: 0,  // 当前 大类目的 标签  (News Feed / Garage Sale)
+      activeIndex: 0,  // 当前tab 索引
       tabsList: [
         {
           'title': 'News',
@@ -49,15 +52,15 @@ class NewsfeedVm extends _$NewsfeedVm {
       ],
       list: [
           {
-          'id':1,
-          'avator': Assets.communityCamera,
-          'title': 'William Jefferson',
-          'isFollow': false,
-          'content': 'She said YES and our lives changed.Thank you all for coming to my propose today.We hope everyone can ……[More]',
-          'imageUrls': ['https://img.alicdn.com/tfs/TB1h.o9O4MPMeJjy1XaXXcSsFXa-640-360.jpg','https://img.alicdn.com/tfs/TB1h.o9O4MPMeJjy1XaXXcSsFXa-640-360.jpg','https://img.alicdn.com/tfs/TB1h.o9O4MPMeJjy1XaXXcSsFXa-640-360.jpg'],
-          'time': 'June 17,2016 at 7:23 p.m.',
-            'isLike': true,
-          'likeno': 12
+            'id':1,
+            'avator': Assets.communityCamera,
+            'title': 'William Jefferson',
+            'isFollow': false,
+            'content': 'She said YES and our lives changed.Thank you all for coming to my propose today.We hope everyone can ……[More]',
+            'imageUrls': ['https://img.alicdn.com/tfs/TB1h.o9O4MPMeJjy1XaXXcSsFXa-640-360.jpg','https://img.alicdn.com/tfs/TB1h.o9O4MPMeJjy1XaXXcSsFXa-640-360.jpg','https://img.alicdn.com/tfs/TB1h.o9O4MPMeJjy1XaXXcSsFXa-640-360.jpg'],
+            'time': 'June 17,2016 at 7:23 p.m.',
+              'isLike': true,
+            'likeno': 12
           },
           {
             'id':2,
@@ -201,11 +204,38 @@ class NewsfeedVm extends _$NewsfeedVm {
     NewsfeedPostPage.startInstance();
   }
 
-  // 点击tab
+  // 点击tab (news 、 following 、 for you)
   void handlerClickTab(int index, item){
+    // 修改当前tab 的索引
     state = state.copyWith(activeIndex: index);
     print("切换后新的 sate, ${state.tabsList}");
 
     // ref.invalidate(customTabsVmProvider);
   }
+
+  // 点击 like comments  share
+  void handlerClickActionBtn(String? actionStr, item){
+    final id = item['id'];
+    switch (actionStr) {
+      case 'like':
+        Log.d("点击了 点赞");
+        handlerGotoDetail(id);
+        break;
+      case 'comments':
+        Log.d("点击了 评论");
+        handlerGotoDetail(id);
+        break;
+      case 'share':
+        Log.d("点击了 分享");
+        handlerGotoDetail(id);
+        break;
+      default:
+        break;
+    }
+  }
+  // 去详情页面
+  void handlerGotoDetail(id){
+    Log.d("去详情页面");
+    appRouter.push(NewsfeedDetailPageRoute(id: id));
+  }
 }

+ 1 - 1
packages/cpt_community/lib/modules/newsfeed/newsfeed_vm.g.dart

@@ -6,7 +6,7 @@ part of 'newsfeed_vm.dart';
 // RiverpodGenerator
 // **************************************************************************
 
-String _$newsfeedVmHash() => r'dad5087f675a931b393ca884835482454cfd2700';
+String _$newsfeedVmHash() => r'dbb005d81ceec888822144d16f911262a5d5587e';
 
 /// See also [NewsfeedVm].
 @ProviderFor(NewsfeedVm)

+ 34 - 5
packages/cpt_community/lib/router/page/community_page_router.gr.dart

@@ -46,9 +46,13 @@ abstract class _$CommunityPageRouter extends RootStackRouter {
       );
     },
     NewsfeedDetailPageRoute.name: (routeData) {
+      final args = routeData.argsAs<NewsfeedDetailPageRouteArgs>();
       return AutoRoutePage<dynamic>(
         routeData: routeData,
-        child: const NewsfeedDetailPage(),
+        child: NewsfeedDetailPage(
+          key: args.key,
+          id: args.id,
+        ),
       );
     },
     NewsfeedMypostsPageRoute.name: (routeData) {
@@ -144,16 +148,41 @@ class GaragesalePostPageRoute extends PageRouteInfo<void> {
 
 /// generated route for
 /// [NewsfeedDetailPage]
-class NewsfeedDetailPageRoute extends PageRouteInfo<void> {
-  const NewsfeedDetailPageRoute({List<PageRouteInfo>? children})
-      : super(
+class NewsfeedDetailPageRoute
+    extends PageRouteInfo<NewsfeedDetailPageRouteArgs> {
+  NewsfeedDetailPageRoute({
+    Key? key,
+    required int? id,
+    List<PageRouteInfo>? children,
+  }) : super(
           NewsfeedDetailPageRoute.name,
+          args: NewsfeedDetailPageRouteArgs(
+            key: key,
+            id: id,
+          ),
           initialChildren: children,
         );
 
   static const String name = 'NewsfeedDetailPageRoute';
 
-  static const PageInfo<void> page = PageInfo<void>(name);
+  static const PageInfo<NewsfeedDetailPageRouteArgs> page =
+      PageInfo<NewsfeedDetailPageRouteArgs>(name);
+}
+
+class NewsfeedDetailPageRouteArgs {
+  const NewsfeedDetailPageRouteArgs({
+    this.key,
+    required this.id,
+  });
+
+  final Key? key;
+
+  final int? id;
+
+  @override
+  String toString() {
+    return 'NewsfeedDetailPageRouteArgs{key: $key, id: $id}';
+  }
 }
 
 /// generated route for