1
- import 'package:flutter/gestures.dart' ;
2
1
import 'package:flutter/material.dart' ;
3
2
import 'package:flutter_twitter_clone/helper/constant.dart' ;
4
3
import 'package:flutter_twitter_clone/helper/enum.dart' ;
@@ -54,8 +53,9 @@ class _ProfilePageState extends State<ProfilePage>
54
53
var authstate = Provider .of <AuthState >(context);
55
54
return SliverAppBar (
56
55
forceElevated: false ,
57
- expandedHeight: 180 ,
56
+ expandedHeight: 200 ,
58
57
elevation: 0 ,
58
+ stretch: true ,
59
59
iconTheme: IconThemeData (color: Colors .white),
60
60
backgroundColor: Colors .transparent,
61
61
actions: < Widget > [
@@ -74,9 +74,11 @@ class _ProfilePageState extends State<ProfilePage>
74
74
),
75
75
],
76
76
flexibleSpace: FlexibleSpaceBar (
77
+ stretchModes: < StretchMode > [StretchMode .zoomBackground, StretchMode .blurBackground],
77
78
background: authstate.isbusy
78
79
? SizedBox .shrink ()
79
80
: Stack (
81
+ alignment: Alignment .topCenter,
80
82
children: < Widget > [
81
83
SizedBox .expand (
82
84
child: Container (
@@ -85,21 +87,24 @@ class _ProfilePageState extends State<ProfilePage>
85
87
color: Colors .white,
86
88
),
87
89
),
88
- Container (height: 50 , color: Colors .black),
90
+ // Container(height: 50, color: Colors.black),
89
91
90
92
/// Banner image
91
- Padding (
92
- padding: EdgeInsets .only (top: 30 ),
93
+ Container (
94
+ height: 180 ,
95
+ padding: EdgeInsets .only (top: 28 ),
93
96
child: customNetworkImage (
94
- 'https://pbs.twimg.com/profile_banners/457684585/1510495215/1500x500' ,
95
- fit: BoxFit .fill),
97
+ 'https://pbs.twimg.com/profile_banners/457684585/1510495215/1500x500' ,
98
+ fit: BoxFit .fill,
99
+ ),
96
100
),
97
101
98
102
/// User avatar, message icon, profile edit and follow/following button
99
103
Container (
100
104
alignment: Alignment .bottomLeft,
101
105
child: Row (
102
106
mainAxisAlignment: MainAxisAlignment .spaceBetween,
107
+ crossAxisAlignment: CrossAxisAlignment .end,
103
108
children: < Widget > [
104
109
AnimatedContainer (
105
110
duration: Duration (milliseconds: 500 ),
@@ -120,7 +125,7 @@ class _ProfilePageState extends State<ProfilePage>
120
125
),
121
126
),
122
127
Container (
123
- margin: EdgeInsets .only (top: 60 , right: 30 ),
128
+ margin: EdgeInsets .only (top: 90 , right: 30 ),
124
129
child: Row (
125
130
children: < Widget > [
126
131
isMyProfile
@@ -134,7 +139,8 @@ class _ProfilePageState extends State<ProfilePage>
134
139
onPressed: () {
135
140
if (! isMyProfile) {
136
141
final chatState =
137
- Provider .of <ChatState >(context,
142
+ Provider .of <ChatState >(
143
+ context,
138
144
listen: false );
139
145
chatState.setChatUser =
140
146
authstate.profileUserModel;
@@ -213,7 +219,7 @@ class _ProfilePageState extends State<ProfilePage>
213
219
: isFollower ()
214
220
? TwitterColor .white
215
221
: Colors .blue,
216
- fontSize: 17 ,
222
+ fontSize: 17 ,
217
223
fontWeight: FontWeight .bold,
218
224
),
219
225
),
@@ -508,6 +514,7 @@ class UserNameRowWidget extends StatelessWidget {
508
514
Padding (
509
515
padding: EdgeInsets .symmetric (horizontal: 10 , vertical: 5 ),
510
516
child: Row (
517
+ crossAxisAlignment: CrossAxisAlignment .start,
511
518
children: < Widget > [
512
519
customIcon (context,
513
520
icon: AppIcon .locationPin,
@@ -516,10 +523,12 @@ class UserNameRowWidget extends StatelessWidget {
516
523
paddingIcon: 5 ,
517
524
iconColor: AppColor .darkGrey),
518
525
SizedBox (width: 10 ),
519
- customText (
526
+ Expanded (
527
+ child: customText (
520
528
user.location,
521
529
style: TextStyle (color: AppColor .darkGrey),
522
530
),
531
+ )
523
532
],
524
533
),
525
534
),
0 commit comments