From ab899e75016a61f683531edae8d7313a41559457 Mon Sep 17 00:00:00 2001 From: ryleedavis Date: Fri, 19 May 2023 09:47:50 -0600 Subject: [PATCH] WIP: working on avatar and username --- .../widgets/user_info_widget.dart | 30 +++++++++---------- 1 file changed, 14 insertions(+), 16 deletions(-) diff --git a/lib/pages/profile_screen/widgets/user_info_widget.dart b/lib/pages/profile_screen/widgets/user_info_widget.dart index 53c47f4..1a0c6c8 100644 --- a/lib/pages/profile_screen/widgets/user_info_widget.dart +++ b/lib/pages/profile_screen/widgets/user_info_widget.dart @@ -1,4 +1,3 @@ -import 'package:drifter/theme/app_colors.dart'; import 'package:flutter/material.dart'; class UserInfo extends StatelessWidget { @@ -8,7 +7,7 @@ class UserInfo extends StatelessWidget { Widget build(BuildContext context) { return Container( child: Column( - children: [ + children: const [ AvatarWidget(), SizedBox( height: 10, @@ -25,13 +24,19 @@ class AvatarWidget extends StatelessWidget { @override Widget build(BuildContext context) { - return Container( - decoration: BoxDecoration( - border: Border.all(color: Colors.black), - borderRadius: BorderRadius.all(Radius.circular(75))), - width: 150, - height: 150, + // todo: create a slide up to choose avatar + return CircleAvatar( + backgroundImage: NetworkImage('https://via.placeholder.com/150'), + // backgroundColor: AppColors.mainAccent, + radius: 40, ); + // return Container( + // decoration: BoxDecoration( + // border: Border.all(color: Colors.black), + // borderRadius: BorderRadius.all(Radius.circular(75))), + // width: 150, + // height: 150, + // ); } } @@ -75,20 +80,13 @@ class _UserNameWidgetState extends State { child: TextField( controller: messageController, focusNode: messageFocusNode, + textAlign: TextAlign.center, style: const TextStyle( fontSize: 14, ), decoration: InputDecoration( hintText: 'Username', hintStyle: const TextStyle(fontSize: 14), - suffixIcon: IconButton( - icon: const Icon( - Icons.send, - color: AppColors.mainDarkBlue, - size: 30, - ), - onPressed: () {}, - ), ), ), ),