[FIXED] Align children to top of row in Flutter?

Issue

after I write my posts in my application, my photo and date center the text. I need to pin the photo and date to the beginning. What should I do for this?
……………………………………………………………………………………………………………………………………………………………………..
enter image description here

child: Row( children: [
                                Padding(
                                  padding: EdgeInsets.only(top: 15),
                                  child: CircleAvatar(
                                    radius: 20,
                                    backgroundImage: NetworkImage(
                                      userData['photoUrl'],
                                    ),
                                  ),
                                ),
                                Expanded(
                                  child: Padding(
                                    padding:
                                        EdgeInsets.only(left: 8, top: 20),
                                    child: Container(
                                      child: Column(
                                        mainAxisSize: MainAxisSize.min,
                                        crossAxisAlignment:
                                            CrossAxisAlignment.start,
                                        children: [
                                          Text(
                                            userData['username'],
                                            style: TextStyle(
                                                fontWeight:
                                                    FontWeight.bold),
                                          ),
                                          Container(
                                            width: double.infinity,
                                            padding: const EdgeInsets.only(
                                              top: 8,
                                            ),
                                            child: RichText(
                                              text: TextSpan(
                                                style: const TextStyle(
                                                    color: primaryColor),
                                                children: [
                                                  
                                                  TextSpan(
                                                    text:
                                                        ' ${(snap.data()! as dynamic)['description']}',
                                                  ),
                                                ],
                                              ),
                                            ),
                                          ),
                                        ],
                                      ),
                                    ),
                                  ),
                                ),
                                Container(
                                  padding:
                                      EdgeInsets.symmetric(vertical: 4),
                                  child: Text(
                                    DateFormat.yMd().format(
                                      (snap.data()!
                                              as dynamic)['datePublished']
                                          .toDate(),
                                    ),
                                    style: const TextStyle(
                                      fontSize: 15,
                                      color: secondaryColor,
                                    ),
                                  ),
                                ),

Solution

child: Row( 
  crossAxisAlignment: CrossAxisAlignment.start,
  children: [

Answered By – pmatatias

Answer Checked By – Willingham (Easybugfix Volunteer)

Leave a Reply

(*) Required, Your email will not be published