Last active
April 25, 2020 11:01
-
-
Save itskgore/b7cb821878464b72681e1f1adb7dd347 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
TabController tabController; | |
@override | |
void initState() { | |
// TODO: implement initState | |
super.initState(); | |
tabController = TabController(vsync: this, length: 2); | |
} | |
AppBar( | |
title: loader | |
? Shimmer.fromColors( | |
child: Row( | |
crossAxisAlignment: CrossAxisAlignment.center, | |
mainAxisAlignment: MainAxisAlignment.center, | |
children: <Widget>[ | |
CircleAvatar( | |
// backgroundImage: | |
// NetworkImage(auth.userdata[0].userimage), | |
), | |
SizedBox( | |
width: 10, | |
), | |
Text( | |
'Username', | |
style: TextStyle( | |
color: Colors.white, | |
fontSize: 22.0, | |
fontWeight: FontWeight.w600), | |
) | |
], | |
), | |
baseColor: Colors.grey, | |
highlightColor: Colors.black) | |
: Consumer<Auth>( | |
builder: (ctx, auth, _) => GestureDetector( | |
onTap: () { | |
showDialog( | |
context: context, | |
builder: (BuildContext context) => CustomDialog( | |
username: auth.userdata[0].username, | |
), | |
); | |
}, | |
child: Container( | |
// color: Colors.red, | |
alignment: Alignment.center, | |
child: Row( | |
crossAxisAlignment: CrossAxisAlignment.center, | |
mainAxisAlignment: MainAxisAlignment.center, | |
children: <Widget>[ | |
CircleAvatar( | |
backgroundImage: | |
NetworkImage(auth.userdata[0].userimage), | |
), | |
SizedBox( | |
width: 10, | |
), | |
Text( | |
auth.userdata[0].username, | |
style: TextStyle( | |
color: Colors.white, | |
fontSize: 22.0, | |
fontWeight: FontWeight.w600), | |
) | |
], | |
)), | |
), | |
), | |
bottom: TabBar( | |
tabs: [ | |
Tab( | |
child: Text("Following"), | |
), | |
Tab( | |
child: Text("Followers"), | |
), | |
], | |
indicatorColor: Colors.white, | |
controller: tabController, | |
), | |
backgroundColor: Colors.black, | |
), |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment