刘清 1 месяц назад
Родитель
Сommit
289372734d
2 измененных файлов: 46 добавлений и 43 удалений
  1. 0
    2
      lib/presentation/navigation/bottom_nav_bar.dart
  2. 46
    41
      lib/presentation/screens/news/news_screen.dart

+ 0
- 2
lib/presentation/navigation/bottom_nav_bar.dart Просмотреть файл

1
 import 'package:flutter/material.dart';
1
 import 'package:flutter/material.dart';
2
-import 'package:provider/provider.dart';
3
 import '../../core/constants/route_constants.dart';
2
 import '../../core/constants/route_constants.dart';
4
-import '../../presentation/providers/auth_provider.dart';
5
 
3
 
6
 class BottomNavBar extends StatefulWidget {
4
 class BottomNavBar extends StatefulWidget {
7
   final int initialIndex;
5
   final int initialIndex;

+ 46
- 41
lib/presentation/screens/news/news_screen.dart Просмотреть файл

31
                 // print('清除搜索');
31
                 // print('清除搜索');
32
               },
32
               },
33
             ),
33
             ),
34
-            const SizedBox(height: 30),
34
+            const SizedBox(height: 24),
35
 
35
 
36
             // 推荐列表
36
             // 推荐列表
37
             ListView.builder(
37
             ListView.builder(
38
-              // padding: const EdgeInsets.all(16),
39
               shrinkWrap: true,
38
               shrinkWrap: true,
40
               physics: const NeverScrollableScrollPhysics(),
39
               physics: const NeverScrollableScrollPhysics(),
41
               itemCount: 10,
40
               itemCount: 10,
52
   
51
   
53
   Widget _buildNewsCard(int index) {
52
   Widget _buildNewsCard(int index) {
54
     final titles = [
53
     final titles = [
55
-      'Flutter 3.0 新特性详解',
56
-      'Dart 语言最新更新',
57
-      '移动开发趋势分析',
58
-      '前端框架对比',
59
-      '用户体验设计原则',
60
-      '后端架构最佳实践',
61
-      '数据库性能优化',
62
-      '云原生技术解析',
63
-      '人工智能在移动端的应用',
64
-      '跨平台开发方案比较',
54
+      '体彩 大乐透 20260001期',
55
+      '福彩 双色球 20260002期',
56
+      '福彩 双色球 20260003期',
57
+      '体彩 大乐透 20260004期',
58
+      '福彩 双色球 20260005期',
59
+      '福彩 双色球 20260007期',
60
+      '体彩 大乐透 20260006期',
61
+      '福彩 双色球 20260008期',
62
+      '福彩 双色球 20260009期',
63
+      '福彩 快乐八 20260010期',
65
     ];
64
     ];
66
     
65
     
67
     final subtitles = [
66
     final subtitles = [
68
-      '深入了解Flutter最新版本的重要更新和改进',
69
-      'Dart语言的最新特性和优化方向',
70
-      '2024年移动开发的重要趋势和技术方向',
71
-      '主流前端框架的优缺点对比分析',
72
-      '提升应用用户体验的关键设计原则',
73
-      '构建高性能后端服务的最佳实践',
74
-      '数据库查询优化和性能调优技巧',
75
-      '云原生技术在微服务中的应用',
76
-      'AI技术在移动应用中的创新应用',
77
-      '各种跨平台开发方案的对比和选择',
67
+      '预测号码:4 5 8 6 25 8 9 6',
68
+      '预测号码:4 5 8 6 25 8 9 6',
69
+      '预测号码:4 5 8 6 25 8 9 6',
70
+      '预测号码:4 5 8 6 25 8 9 6',
71
+      '预测号码:4 5 8 6 25 8 9 6',
72
+      '预测号码:4 5 8 6 25 8 9 6',
73
+      '预测号码:4 5 8 6 25 8 9 6',
74
+      '预测号码:4 5 8 6 25 8 9 6',
75
+      '预测号码:4 5 8 6 25 8 9 6',
76
+      '预测号码:4 5 8 6 25 8 9 6',
78
     ];
77
     ];
79
     
78
     
80
     final times = [
79
     final times = [
81
-      '2小时前',
82
-      '5小时前',
83
-      '昨天',
84
-      '2天前',
85
-      '3天前',
86
-      '1周前',
87
-      '1周前',
88
-      '2周前',
89
-      '2周前',
90
-      '1个月前',
80
+      '2小时前 :aaa',
81
+      '5小时前 :aaa',
82
+      '昨天 :aaa',
83
+      '2天前 :aaa',
84
+      '3天前 :aaa',
85
+      '1周前 :aaa',
86
+      '1周前 :aaa',
87
+      '2周前 :aaa',
88
+      '2周前 :aaa',
89
+      '1个月前 :aaa',
91
     ];
90
     ];
92
     
91
     
93
     return Card(
92
     return Card(
96
         borderRadius: BorderRadius.circular(12),
95
         borderRadius: BorderRadius.circular(12),
97
       ),
96
       ),
98
       child: InkWell(
97
       child: InkWell(
99
-        onTap: () {},
98
+        onTap: () {
99
+          print(index);
100
+        },
100
         borderRadius: BorderRadius.circular(12),
101
         borderRadius: BorderRadius.circular(12),
101
         child: Padding(
102
         child: Padding(
102
           padding: const EdgeInsets.all(16),
103
           padding: const EdgeInsets.all(16),
114
                     ),
115
                     ),
115
                     child: Center(
116
                     child: Center(
116
                       child: Text(
117
                       child: Text(
117
-                        '新闻',
118
+                        '推号',
118
                         style: TextStyle(
119
                         style: TextStyle(
119
                           color: Colors.white,
120
                           color: Colors.white,
120
                           fontWeight: FontWeight.bold,
121
                           fontWeight: FontWeight.bold,
130
                         Text(
131
                         Text(
131
                           titles[index],
132
                           titles[index],
132
                           style: const TextStyle(
133
                           style: const TextStyle(
133
-                            fontSize: 16,
134
+                            fontSize: 18,
134
                             fontWeight: FontWeight.bold,
135
                             fontWeight: FontWeight.bold,
135
                           ),
136
                           ),
136
                           maxLines: 2,
137
                           maxLines: 2,
140
                         Text(
141
                         Text(
141
                           subtitles[index],
142
                           subtitles[index],
142
                           style: TextStyle(
143
                           style: TextStyle(
143
-                            fontSize: 14,
144
+                            fontSize: 16,
144
                             color: Colors.grey[600],
145
                             color: Colors.grey[600],
145
                           ),
146
                           ),
146
                           maxLines: 2,
147
                           maxLines: 2,
151
                   ),
152
                   ),
152
                 ],
153
                 ],
153
               ),
154
               ),
154
-              const SizedBox(height: 12),
155
+              const SizedBox(height: 4),
155
               Row(
156
               Row(
156
                 children: [
157
                 children: [
157
                   Icon(
158
                   Icon(
158
                     Icons.schedule,
159
                     Icons.schedule,
159
-                    size: 14,
160
+                    size: 16,
160
                     color: Colors.grey[500],
161
                     color: Colors.grey[500],
161
                   ),
162
                   ),
162
                   const SizedBox(width: 4),
163
                   const SizedBox(width: 4),
163
                   Text(
164
                   Text(
164
                     times[index],
165
                     times[index],
165
                     style: TextStyle(
166
                     style: TextStyle(
166
-                      fontSize: 12,
167
+                      fontSize: 14,
167
                       color: Colors.grey[500],
168
                       color: Colors.grey[500],
168
                     ),
169
                     ),
169
                   ),
170
                   ),
173
                       Icons.bookmark_border,
174
                       Icons.bookmark_border,
174
                       color: Colors.grey[500],
175
                       color: Colors.grey[500],
175
                     ),
176
                     ),
176
-                    onPressed: () {},
177
+                    onPressed: () {
178
+                      // 添加书签
179
+                    },
177
                     iconSize: 20,
180
                     iconSize: 20,
178
                   ),
181
                   ),
179
                   IconButton(
182
                   IconButton(
181
                       Icons.share,
184
                       Icons.share,
182
                       color: Colors.grey[500],
185
                       color: Colors.grey[500],
183
                     ),
186
                     ),
184
-                    onPressed: () {},
187
+                    onPressed: () {
188
+                      // 分享
189
+                    },
185
                     iconSize: 20,
190
                     iconSize: 20,
186
                   ),
191
                   ),
187
                 ],
192
                 ],