WIP: working on avatar and username

This commit is contained in:
Rylee Davis 2023-05-19 09:47:50 -06:00
parent 5bda858a02
commit ab899e7501

View File

@ -1,4 +1,3 @@
import 'package:drifter/theme/app_colors.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
class UserInfo extends StatelessWidget { class UserInfo extends StatelessWidget {
@ -8,7 +7,7 @@ class UserInfo extends StatelessWidget {
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Container( return Container(
child: Column( child: Column(
children: [ children: const [
AvatarWidget(), AvatarWidget(),
SizedBox( SizedBox(
height: 10, height: 10,
@ -25,13 +24,19 @@ class AvatarWidget extends StatelessWidget {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Container( // todo: create a slide up to choose avatar
decoration: BoxDecoration( return CircleAvatar(
border: Border.all(color: Colors.black), backgroundImage: NetworkImage('https://via.placeholder.com/150'),
borderRadius: BorderRadius.all(Radius.circular(75))), // backgroundColor: AppColors.mainAccent,
width: 150, radius: 40,
height: 150,
); );
// 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<UserNameWidget> {
child: TextField( child: TextField(
controller: messageController, controller: messageController,
focusNode: messageFocusNode, focusNode: messageFocusNode,
textAlign: TextAlign.center,
style: const TextStyle( style: const TextStyle(
fontSize: 14, fontSize: 14,
), ),
decoration: InputDecoration( decoration: InputDecoration(
hintText: 'Username', hintText: 'Username',
hintStyle: const TextStyle(fontSize: 14), hintStyle: const TextStyle(fontSize: 14),
suffixIcon: IconButton(
icon: const Icon(
Icons.send,
color: AppColors.mainDarkBlue,
size: 30,
),
onPressed: () {},
),
), ),
), ),
), ),