chatmyfriendsNotes method
Implementation
Widget chatmyfriendsNotes(User user) {
var haveSong = false;
var havetext = false;
var isMe = false;
if (user.userID == currentUserAccounts.value.user.value.userID) {
isMe = true;
havetext = false;
haveSong = false;
} else {
havetext = true;
haveSong = false;
}
var haveSomething = haveSong || havetext;
return GestureDetector(
onTap: () {
isMe ? notecreate() : null;
},
child: Container(
width: 100,
padding: const EdgeInsets.all(8.0),
child: Stack(
children: [
Column(
children: [
Padding(
padding: const EdgeInsets.only(top: 60.0),
child: CircleAvatar(
radius: 32,
backgroundColor: Colors.transparent,
foregroundImage: CachedNetworkImageProvider(
user.avatar!.mediaURL.minURL.value,
),
),
),
Padding(
padding: const EdgeInsets.symmetric(
vertical: 3.0,
),
child: SizedBox(
child: Text(
isMe ? ChatKeys.chatyournote.tr : user.displayName!.value,
maxLines: 1,
style: TextStyle(
fontSize: 12,
overflow: TextOverflow.ellipsis,
color: Get.theme.primaryColor
.withValues(alpha: isMe ? 0.8 : 1),
),
),
),
),
],
),
Container(
decoration: BoxDecoration(
color: Get.theme.cardColor,
borderRadius: BorderRadius.circular(15),
),
child: !haveSomething && !isMe
? Container()
: Padding(
padding: const EdgeInsets.all(6.0),
child: Stack(
clipBehavior: Clip.none,
children: [
Column(
children: [
!haveSong
? Container()
: Row(
children: [
const Padding(
padding: EdgeInsets.symmetric(
horizontal: 2.0,
),
child: Icon(
Icons.music_note,
size: 10,
),
),
Expanded(
child: SizedBox(
height: 15,
child: Marquee(
text: "Sevecek Sandım",
velocity: 20.0,
blankSpace: 10,
style: const TextStyle(
fontSize: 10,
fontWeight: FontWeight.bold,
),
),
),
),
],
),
!haveSong
? Container()
: Text(
"Semicenk",
style: TextStyle(
fontSize: 10,
fontWeight: FontWeight.bold,
color: Get.theme.primaryColor
.withValues(alpha: 0.5),
),
),
!havetext
? !isMe
? Container()
: Text(
ChatKeys.chatshareasong.tr,
maxLines: 2,
textAlign: TextAlign.center,
style: TextStyle(
fontSize: 11,
color: Get.theme.primaryColor
.withValues(alpha: 0.8),
),
)
: Text(
"Bozuk sütler midenizi, sütü bozuklar dengenizi bozar Hayırlı Cumalar",
maxLines: !haveSong ? 4 : 2,
textAlign: TextAlign.center,
style: const TextStyle(
fontSize: 11,
overflow: TextOverflow.ellipsis,
),
),
],
),
Positioned(
bottom: -10,
left: 6,
child: Container(
height: 9,
width: 10,
decoration: BoxDecoration(
color: Get.theme.cardColor,
borderRadius: BorderRadius.circular(50),
),
),
),
Positioned(
bottom: -20,
left: 12,
child: Container(
height: 8,
width: 8,
decoration: BoxDecoration(
color: Get.theme.cardColor,
borderRadius: BorderRadius.circular(10),
),
),
),
],
),
),
),
],
),
),
);
}