following_vm.dart 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110
  1. import 'package:cs_resources/generated/assets.dart';
  2. import 'package:flutter/cupertino.dart';
  3. import 'package:plugin_platform/engine/toast/toast_engine.dart';
  4. import 'package:riverpod_annotation/riverpod_annotation.dart';
  5. import 'package:shared/utils/log_utils.dart';
  6. import 'following_state.dart';
  7. part 'following_vm.g.dart';
  8. @riverpod
  9. class FollowingVm extends _$FollowingVm {
  10. FollowingState initState() {
  11. return FollowingState(
  12. list: [
  13. {
  14. 'id':1,
  15. 'avator': Assets.communityCamera,
  16. 'title': 'William Jefferson',
  17. 'isFollow': false,
  18. 'content': 'She said YES and our lives changed.Thank you all for coming to my propose today.We hope everyone can ……[More]',
  19. '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'],
  20. 'time': 'June 17,2016 at 7:23 p.m.',
  21. 'isLike': true,
  22. 'likeno': 12
  23. },
  24. {
  25. 'id':2,
  26. 'avator': Assets.communityCamera,
  27. 'title': 'William fdsaf的飞洒发生的',
  28. 'isFollow': true,
  29. 'content': 'She said YES and our lives changed.Thank you all for coming to my propose today.We hope everyone can ……[More]',
  30. 'imageUrls': [],
  31. 'time': 'June 17,2016 at 7:23 p.m.',
  32. 'isLike': true,
  33. 'likeno': 12
  34. },
  35. {
  36. 'id':3,
  37. 'avator': Assets.communityCamera,
  38. 'title': 'Fsjfkds dfsk',
  39. 'isFollow': false,
  40. 'content': 'She said YES and our lives changed.Thank you all for coming to my propose today.We hope everyone can ……[More]',
  41. 'imageUrls': [],
  42. 'time': 'June 17,2016 at 7:23 p.m.',
  43. 'isLike': false,
  44. 'likeno': 12
  45. },
  46. {
  47. 'id':4,
  48. 'avator': Assets.communityCamera,
  49. 'title': 'Fsjfkds dfsk',
  50. 'isFollow': false,
  51. 'content': 'She said YES and our lives changed.Thank you all for coming to my propose today.We hope everyone can ……[More]',
  52. 'imageUrls': [],
  53. 'time': 'June 17,2016 at 7:23 p.m.',
  54. 'isLike': false,
  55. 'likeno': 12
  56. },
  57. {
  58. 'id':5,
  59. 'avator': Assets.communityCamera,
  60. 'title': 'Fsjfkds dfsk',
  61. 'isFollow': false,
  62. 'content': 'She said YES and our lives changed.Thank you all for coming to my propose today.We hope everyone can ……[More]',
  63. 'imageUrls': [],
  64. 'time': 'June 17,2016 at 7:23 p.m.',
  65. 'isLike': false,
  66. 'likeno': 12
  67. },
  68. {
  69. 'id':6,
  70. 'avator': Assets.communityCamera,
  71. 'title': 'Fsjfkds dfsk',
  72. 'isFollow': false,
  73. 'content': 'She said YES and our lives changed.Thank you all for coming to my propose today.We hope everyone can ……[More]',
  74. 'imageUrls': [],
  75. 'time': 'June 17,2016 at 7:23 p.m.',
  76. 'isLike': false,
  77. 'likeno': 12
  78. },
  79. {
  80. 'id':7,
  81. 'avator': Assets.communityCamera,
  82. 'title': '放大发大水',
  83. 'isFollow': false,
  84. 'content': 'She said YES and our lives changed.Thank you all for coming to my propose today.We hope everyone can ……[More]',
  85. 'imageUrls': [],
  86. 'time': 'June 17,2016 at 7:23 p.m.',
  87. 'isLike': false,
  88. 'likeno': 12
  89. },
  90. ]
  91. );
  92. }
  93. @override
  94. FollowingState build(){
  95. final state = initState();
  96. Log.d("--------------------------build---------------------");
  97. return state;
  98. }
  99. // 设置当前的 tabsRouter 和 pageController
  100. Future setTabsRouterAndPageController(dynamic tabsRouter, dynamic pageController) async{
  101. Log.d("setTabsRouterAndPageController---:$tabsRouter");
  102. }
  103. }