You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
77 lines
2.5 KiB
77 lines
2.5 KiB
import 'package:flutter/material.dart';
|
|
import 'package:teso/util/consts.dart';
|
|
import 'package:teso/Classes/TesoUser.dart';
|
|
|
|
buildGiftRecipient(
|
|
{BuildContext context,
|
|
TextEditingController searchkey,
|
|
TesoUser friend,
|
|
Function loadFriend}) {
|
|
return Container(
|
|
height: 60.0,
|
|
padding: EdgeInsets.all(10.0),
|
|
child: Material(
|
|
color: Colors.grey[300],
|
|
elevation: 4.0,
|
|
borderRadius: BorderRadius.circular(12.0),
|
|
shadowColor: Theme.of(context).backgroundColor,
|
|
child: Row(
|
|
crossAxisAlignment: CrossAxisAlignment.stretch,
|
|
children: [
|
|
Container(
|
|
margin: EdgeInsets.symmetric(horizontal: 5),
|
|
height: 40.0,
|
|
width: 40.0,
|
|
decoration: new BoxDecoration(
|
|
shape: BoxShape.circle,
|
|
color: Colors.grey[300],
|
|
),
|
|
child: ClipRRect(
|
|
borderRadius: BorderRadius.circular(35.0),
|
|
child: friend == null || friend.username == null
|
|
? Image(
|
|
image: AssetImage("assets/images/tesoDP/dp1.png"),
|
|
)
|
|
: friend.thumbnail_dp == null
|
|
? Center(
|
|
child: Text(
|
|
friend.username.characters
|
|
.characterAt(0)
|
|
.toString()
|
|
.toUpperCase(),
|
|
),
|
|
)
|
|
: FadeInImage(
|
|
height: 45,
|
|
width: 45,
|
|
fit: BoxFit.fill,
|
|
image: NetworkImage(userdpURL + friend.thumbnail_dp),
|
|
placeholder:
|
|
AssetImage("assets/images/tesoDP/dp1.png"),
|
|
),
|
|
),
|
|
),
|
|
new Expanded(
|
|
child: InkWell(
|
|
onTap: loadFriend,
|
|
child: TextField(
|
|
autofocus: false,
|
|
enabled: false,
|
|
textAlign: TextAlign.start,
|
|
controller: searchkey,
|
|
style: TextStyle(
|
|
color: Colors.black,
|
|
),
|
|
decoration: InputDecoration(
|
|
border: InputBorder.none,
|
|
hintText: "Enter Recipient",
|
|
hintStyle: TextStyle(color: Colors.grey),
|
|
),
|
|
),
|
|
),
|
|
),
|
|
],
|
|
),
|
|
),
|
|
);
|
|
}
|
|
|