|
|
@@ -5,7 +5,6 @@ import '../../providers/auth_provider.dart';
|
|
5
|
5
|
import '../../providers/user_provider.dart';
|
|
6
|
6
|
import '../../navigation/bottom_nav_bar.dart';
|
|
7
|
7
|
import 'profile_detail_screen.dart';
|
|
8
|
|
-import '../../widgets/custom/protected_widget.dart';
|
|
9
|
8
|
|
|
10
|
9
|
class ProfileScreen extends StatelessWidget {
|
|
11
|
10
|
const ProfileScreen({super.key});
|
|
|
@@ -23,19 +22,18 @@ class _ProfileContent extends StatefulWidget {
|
|
23
|
22
|
}
|
|
24
|
23
|
|
|
25
|
24
|
class _ProfileContentState extends State<_ProfileContent> {
|
|
26
|
|
- @override
|
|
27
|
|
- void initState() {
|
|
28
|
|
- super.initState();
|
|
29
|
|
- WidgetsBinding.instance.addPostFrameCallback((_) {
|
|
30
|
|
- final userProvider = Provider.of<UserProvider>(context, listen: false);
|
|
31
|
|
- userProvider.loadUserProfile();
|
|
32
|
|
- });
|
|
33
|
|
- }
|
|
|
25
|
+ // @override
|
|
|
26
|
+ // void initState() {
|
|
|
27
|
+ // super.initState();
|
|
|
28
|
+ // WidgetsBinding.instance.addPostFrameCallback((_) {
|
|
|
29
|
+ // final userProvider = Provider.of<UserProvider>(context, listen: false);
|
|
|
30
|
+ // userProvider.loadUserProfile();
|
|
|
31
|
+ // });
|
|
|
32
|
+ // }
|
|
34
|
33
|
|
|
35
|
34
|
@override
|
|
36
|
35
|
Widget build(BuildContext context) {
|
|
37
|
36
|
final authProvider = Provider.of<AuthProvider>(context);
|
|
38
|
|
- // final userProvider = Provider.of<UserProvider>(context);
|
|
39
|
37
|
|
|
40
|
38
|
return Scaffold(
|
|
41
|
39
|
appBar: AppBar(
|
|
|
@@ -96,11 +94,11 @@ class _ProfileContentState extends State<_ProfileContent> {
|
|
96
|
94
|
width: 2,
|
|
97
|
95
|
),
|
|
98
|
96
|
),
|
|
99
|
|
- child: const Icon(
|
|
100
|
|
- Icons.edit,
|
|
101
|
|
- size: 16,
|
|
102
|
|
- color: Colors.white,
|
|
103
|
|
- ),
|
|
|
97
|
+ // child: const Icon(
|
|
|
98
|
+ // Icons.edit,
|
|
|
99
|
+ // size: 16,
|
|
|
100
|
+ // color: Colors.white,
|
|
|
101
|
+ // ),
|
|
104
|
102
|
),
|
|
105
|
103
|
),
|
|
106
|
104
|
],
|
|
|
@@ -137,11 +135,11 @@ class _ProfileContentState extends State<_ProfileContent> {
|
|
137
|
135
|
Row(
|
|
138
|
136
|
mainAxisAlignment: MainAxisAlignment.center,
|
|
139
|
137
|
children: [
|
|
140
|
|
- _buildStatItem('关注', '128'),
|
|
|
138
|
+ _buildStatItem('关注', '0'),
|
|
141
|
139
|
_buildVerticalDivider(),
|
|
142
|
|
- _buildStatItem('粉丝', '256'),
|
|
|
140
|
+ _buildStatItem('粉丝', '0'),
|
|
143
|
141
|
_buildVerticalDivider(),
|
|
144
|
|
- _buildStatItem('积分', '1024'),
|
|
|
142
|
+ _buildStatItem('积分', '0'),
|
|
145
|
143
|
],
|
|
146
|
144
|
),
|
|
147
|
145
|
],
|