import 'package:fcs/domain/entities/user.dart'; import 'package:fcs/helpers/theme.dart'; import 'package:fcs/pages/user_search/user_search.dart'; import 'package:flutter/material.dart'; class UserListRow extends StatelessWidget { final OnUserRowSelect? onUserRowSelect; final User user; const UserListRow({required this.user, this.onUserRowSelect}); 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: () { if (onUserRowSelect != null) onUserRowSelect!(user); }, child: Padding( padding: const EdgeInsets.only(left: 15, right: 15), child: Row( children: [ Expanded( child: new Padding( padding: const EdgeInsets.symmetric(vertical: 13.0), child: new Row( children: [ Icon( Icons.perm_identity, color: primaryColor, size: 30, ), new Expanded( child: Padding( padding: const EdgeInsets.only(left: 15), child: new Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ new Text( user.name ?? "", style: new TextStyle( fontSize: 15.0, color: Colors.black), ), new Text( user.fcsID ?? "", style: new TextStyle( fontSize: 14.0, color: Colors.grey), ), new Text( user.phoneNumber ?? "", style: new TextStyle( fontSize: 14.0, color: Colors.grey), ), ], ), ), ), ], ), ), ), ], ), ), ), ), ); } }