Skip to content

Commit

Permalink
small fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
antonio-pedro99 committed Dec 4, 2023
1 parent b9f18be commit 1d2598a
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 27 deletions.
16 changes: 7 additions & 9 deletions lib/app/views/screens/chat/chat_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import 'package:iiitd_mentorship/app/views/widgets/custom_textbox.dart';
import 'package:iiitd_mentorship/app/views/widgets/message_tile.dart';
import 'package:intl/intl.dart';


class ChatPage extends StatefulWidget {
const ChatPage(
{super.key, this.chatConversation, this.receiverUser, this.receiverId});
Expand Down Expand Up @@ -270,7 +269,7 @@ class _ChatPageState extends State<ChatPage> {
var isMe = message.senderId == currentUser!.uid;

return InkWell(
onLongPress: (){
onLongPress: () {
Clipboard.setData(ClipboardData(text: message.message));
},
child: MessageTile(
Expand Down Expand Up @@ -301,13 +300,12 @@ class _ChatPageState extends State<ChatPage> {

// send Icon button
IconButton(
icon: const Icon(Icons.send),
onPressed: (){
if (_messageController.text.isNotEmpty) {
sendMessage();
}
}
),
icon: const Icon(Icons.send),
onPressed: () {
if (_messageController.text.isNotEmpty) {
sendMessage();
}
}),
],
),
),
Expand Down
3 changes: 2 additions & 1 deletion lib/app/views/screens/home/home.dart
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,8 @@ class _MyHomePageState extends State<MyHomePage> {
})
.toList()
.where((element) {
return element.uid != currentUser!.uid && element.adminApproval!;
return element.uid != currentUser!.uid &&
element.adminApproval!;
})
.toList();

Expand Down
32 changes: 15 additions & 17 deletions lib/app/views/screens/profile/user_profile.dart
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,12 @@ class _UserProfileScreenState extends State<UserProfileScreen> {
SliverAppBar(
expandedHeight: 200,
flexibleSpace: FlexibleSpaceBar(
title: Text(
widget.user.name!,
style: const TextStyle(
fontWeight: FontWeight.bold,

title: Text(
widget.user.name!,
style: const TextStyle(
fontWeight: FontWeight.bold,
),
),
),
background: Image.network(
(widget.user.photoUrl == null || widget.user.photoUrl!.isEmpty)
? 'https://images.unsplash.com/photo-1531384441138-2736e62e0919?auto=format&fit=crop&q=80&w=1587&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D'
Expand All @@ -37,7 +36,6 @@ class _UserProfileScreenState extends State<UserProfileScreen> {
),
floating: true,
pinned: true,

actions: [
IconButton(
onPressed: () {
Expand Down Expand Up @@ -207,16 +205,16 @@ class _UserProfileScreenState extends State<UserProfileScreen> {
Wrap(
spacing: 8,
runSpacing: 8,
children:
(widget.user.topics != null || widget.user.topics!.isNotEmpty)?
widget.user.topics!
.map(
(interest) => Chip(
label: Text(interest),
),
)
.toList() : [const Text("No topics selected")],

children: (widget.user.topics != null ||
widget.user.topics!.isNotEmpty)
? widget.user.topics!
.map(
(interest) => Chip(
label: Text(interest),
),
)
.toList()
: [const Text("No topics selected")],
),
],
),
Expand Down

0 comments on commit 1d2598a

Please sign in to comment.