2020-10-07 02:33:06 +06:30
|
|
|
import 'package:fcs/domain/entities/user.dart';
|
|
|
|
|
import 'package:fcs/helpers/theme.dart';
|
2024-02-07 17:26:29 +06:30
|
|
|
import 'package:fcs/pages/user_search/user_search.dart';
|
2020-09-15 07:13:41 +06:30
|
|
|
import 'package:flutter/material.dart';
|
|
|
|
|
|
2021-09-10 16:33:52 +06:30
|
|
|
class UserListRow extends StatelessWidget {
|
|
|
|
|
final OnUserRowSelect? onUserRowSelect;
|
2020-09-15 07:13:41 +06:30
|
|
|
final User user;
|
2021-09-10 16:33:52 +06:30
|
|
|
const UserListRow({required this.user, this.onUserRowSelect});
|
2020-09-15 07:13:41 +06:30
|
|
|
|
|
|
|
|
final double dotSize = 15.0;
|
|
|
|
|
|
|
|
|
|
@override
|
|
|
|
|
Widget build(BuildContext context) {
|
|
|
|
|
return Container(
|
|
|
|
|
padding: EdgeInsets.only(left: 15, right: 15),
|
|
|
|
|
child: Card(
|
|
|
|
|
elevation: 10,
|
|
|
|
|
color: Colors.white,
|
|
|
|
|
child: InkWell(
|
|
|
|
|
onTap: () {
|
2021-09-10 16:33:52 +06:30
|
|
|
if (onUserRowSelect != null) onUserRowSelect!(user);
|
2020-09-15 07:13:41 +06:30
|
|
|
},
|
|
|
|
|
child: Row(
|
|
|
|
|
children: <Widget>[
|
|
|
|
|
Expanded(
|
|
|
|
|
child: new Padding(
|
|
|
|
|
padding: const EdgeInsets.symmetric(vertical: 16.0),
|
|
|
|
|
child: new Row(
|
|
|
|
|
children: <Widget>[
|
|
|
|
|
new Padding(
|
2020-10-07 02:33:06 +06:30
|
|
|
padding: new EdgeInsets.symmetric(
|
|
|
|
|
horizontal: 32.0 - dotSize / 2),
|
|
|
|
|
child: Icon(
|
|
|
|
|
Icons.perm_identity,
|
|
|
|
|
color: primaryColor,
|
|
|
|
|
size: 50,
|
|
|
|
|
)),
|
2020-09-15 07:13:41 +06:30
|
|
|
new Expanded(
|
|
|
|
|
child: new Column(
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
|
children: <Widget>[
|
|
|
|
|
new Text(
|
2021-09-10 16:33:52 +06:30
|
|
|
user.name ?? "",
|
2020-09-15 07:13:41 +06:30
|
|
|
style: new TextStyle(
|
|
|
|
|
fontSize: 15.0, color: Colors.black),
|
|
|
|
|
),
|
|
|
|
|
new Text(
|
2021-09-10 16:33:52 +06:30
|
|
|
user.fcsID ?? "",
|
2020-09-15 07:13:41 +06:30
|
|
|
style: new TextStyle(
|
|
|
|
|
fontSize: 13.0, color: Colors.grey),
|
|
|
|
|
),
|
|
|
|
|
new Text(
|
2021-09-10 16:33:52 +06:30
|
|
|
user.phoneNumber ?? "",
|
2020-09-15 07:13:41 +06:30
|
|
|
style: new TextStyle(
|
|
|
|
|
fontSize: 13.0, color: Colors.grey),
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
}
|