feat(avatar): task 394 placeholder empty avatar

This commit is contained in:
mso7nueh
2025-04-25 12:56:23 +03:00
parent a3d903b6b9
commit 27b1656690
10 changed files with 24 additions and 7 deletions

View File

@@ -104,8 +104,10 @@ class _BlogPostScreenState extends State<BlogPostScreen> {
height: 1.2,
),
decoration: InputDecoration(
isDense: false, // убираем true, чтобы padding учитывался корректно
contentPadding: const EdgeInsets.symmetric(horizontal: 16, vertical: 16), // вертикальный паддинг увеличен
isDense: false,
// убираем true, чтобы padding учитывался корректно
contentPadding: const EdgeInsets.symmetric(horizontal: 16, vertical: 16),
// вертикальный паддинг увеличен
hintText: 'Комментарий',
hintStyle: const TextStyle(
fontSize: 16,
@@ -209,7 +211,13 @@ class _BlogPostScreenState extends State<BlogPostScreen> {
crossAxisAlignment: CrossAxisAlignment.center,
mainAxisAlignment: MainAxisAlignment.start,
children: [
CircleAvatar(radius: 16, backgroundImage: NetworkImage(widget.blogPost.author.authorProfileIcon)),
CircleAvatar(
radius: 16,
foregroundImage: NetworkImage(
widget.blogPost.author.authorProfileIcon,
),
backgroundImage: const AssetImage('assets/images/no_avatar.png'),
),
const SizedBox(width: 8),
Column(
crossAxisAlignment: CrossAxisAlignment.start,

View File

@@ -81,7 +81,8 @@ class _BottomNavigationBarWidgetState extends State<BottomNavigationBarWidget> {
BottomNavigationBarItem(
label: '',
icon: CircleAvatar(
backgroundImage: NetworkImage(widget.profileModel.profilePhotoUrl),
foregroundImage: NetworkImage(widget.profileModel.profilePhotoUrl),
backgroundImage: const AssetImage('assets/images/no_avatar.png'),
radius: 16,
),
),

View File

@@ -128,6 +128,7 @@ class _ChatScreenState extends State<ChatScreen> {
CircleAvatar(
radius: 20,
foregroundImage: NetworkImage(state.chatRoom.users.receiver.profilePhotoUrl!),
backgroundImage: const AssetImage('assets/images/no_avatar.png'),
),
if (state.chatRoom.users.receiver.profilePhotoUrl == null)
Container(

View File

@@ -40,9 +40,10 @@ class _ChatEntryWidgetState extends State<ChatEntryWidget> {
children: [
CircleAvatar(
radius: 24,
backgroundImage: NetworkImage(
foregroundImage: NetworkImage(
widget.chatRoom.users.toChatUser.profilePhotoUrl,
),
backgroundImage: const AssetImage('assets/images/no_avatar.png'),
backgroundColor: Colors.white,
),
const SizedBox(width: 12),

View File

@@ -81,6 +81,7 @@ class _BlogPostWidgetState extends State<BlogPostWidget> {
foregroundImage: NetworkImage(
state.feedBlogPostList[widget.index].author.authorProfileIcon,
),
backgroundImage: const AssetImage('assets/images/no_avatar.png'),
),
const SizedBox(width: 8),
Column(

View File

@@ -61,6 +61,7 @@ class _CommentsWidgetState extends State<CommentsWidget> {
children: [
CircleAvatar(
foregroundImage: NetworkImage(comment.authorProfileIcon),
backgroundImage: const AssetImage('assets/images/no_avatar.png'),
radius: radius,
),
const SizedBox(width: 8),

View File

@@ -64,6 +64,7 @@ class ConsultantWidget extends StatelessWidget {
const SizedBox(width: 8),
CircleAvatar(
foregroundImage: NetworkImage(consultant.photo),
backgroundImage: const AssetImage('assets/images/no_avatar.png'),
),
const SizedBox(width: 8),
Column(

View File

@@ -799,9 +799,10 @@ class _ProfileScreenState extends State<ProfileScreen> {
widthFactor: 0.8,
child: CircleAvatar(
radius: 14,
backgroundImage: NetworkImage(
foregroundImage: NetworkImage(
urls[i],
),
backgroundImage: const AssetImage('assets/images/no_avatar.png'),
),
),
],

View File

@@ -68,6 +68,7 @@ class _ProfileBlogPostWidgetState extends State<ProfileBlogPostWidget> {
foregroundImage: NetworkImage(
state.blogPosts[widget.index].author.authorProfileIcon,
),
backgroundImage: const AssetImage('assets/images/no_avatar.png'),
),
const SizedBox(width: 8),
Column(

View File

@@ -35,7 +35,8 @@ class _SubWidgetState extends State<SubWidget> {
child: Row(
children: [
CircleAvatar(
backgroundImage: NetworkImage(widget.subModel.profilePhotoUrl),
foregroundImage: NetworkImage(widget.subModel.profilePhotoUrl),
backgroundImage: const AssetImage('assets/images/no_avatar.png'),
radius: 28,
),
const SizedBox(width: 12),