Skip to content

Commit

Permalink
Minor UI change
Browse files Browse the repository at this point in the history
  • Loading branch information
iambashar committed Nov 12, 2021
1 parent 9c4cf52 commit 88c071d
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 18 deletions.
4 changes: 2 additions & 2 deletions lib/views/chat.dart
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ class _ChatState extends State<Chat> {

Widget chatMessages(){
return Container(
alignment: FractionalOffset.center,
alignment: Alignment.bottomCenter,
margin: EdgeInsets.only(bottom: 70),
child: StreamBuilder(
stream: chats,
Expand Down Expand Up @@ -83,7 +83,7 @@ class _ChatState extends State<Chat> {
body: Container(
child: Stack(
fit: StackFit.loose,
alignment: AlignmentDirectional.bottomStart,
alignment: Alignment.bottomCenter,
children: [
chatMessages(),
Container(alignment: Alignment.bottomCenter,
Expand Down
34 changes: 18 additions & 16 deletions lib/views/chatrooms.dart
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ class _ChatRoomsTileState extends State<ChatRoomsTile> {
getUid();
}

getUid() async{
getUid() async {
String uid = widget.userName;
QuerySnapshot snapshot = await FirebaseFirestore.instance
.collection("users")
Expand All @@ -134,10 +134,8 @@ class _ChatRoomsTileState extends State<ChatRoomsTile> {
Navigator.push(
context,
MaterialPageRoute(
builder: (context) => Chat(
chatRoomId: widget.chatRoomId,
receiver: name
)));
builder: (context) =>
Chat(chatRoomId: widget.chatRoomId, receiver: name)));
},
child: Container(
padding: EdgeInsets.symmetric(horizontal: 12, vertical: 5),
Expand All @@ -155,22 +153,26 @@ class _ChatRoomsTileState extends State<ChatRoomsTile> {
color: CustomTheme.colorAccent,
borderRadius: BorderRadius.circular(20)),
child: Center(
child: Text(name.substring(0, 1),
style: TextStyle(
color: Colors.white,
fontSize: 20,
fontWeight: FontWeight.w500)),
child: Text(
name.substring(0, 1),
style: TextStyle(
color: Colors.white,
fontSize: 20,
fontWeight: FontWeight.w500),
),
),
),
SizedBox(
width: 12,
),
Text(name,
textAlign: TextAlign.start,
style: TextStyle(
color: Colors.white,
fontSize: 20,
fontWeight: FontWeight.w300))
Text(
name,
textAlign: TextAlign.start,
style: TextStyle(
color: Colors.white,
fontSize: 20,
fontWeight: FontWeight.w300),
)
],
),
));
Expand Down

0 comments on commit 88c071d

Please sign in to comment.