import 'package:cached_network_image/cached_network_image.dart'; import 'package:teso/Classes/TesoUser.dart'; import 'package:teso/Pages/Sub_Pages/userProfile3P.dart'; import 'package:teso/providers/pageAnimations.dart'; import 'package:teso/util/consts.dart'; import 'package:flutter/material.dart'; buildChatHead(BuildContext context, TesoUser user) { return Material( elevation: 10, child: Container( width: MediaQuery.of(context).size.width, margin: EdgeInsets.only(top: 15), padding: EdgeInsets.all(15), height: 70, child: Row( children: [ InkWell( child: Container( width: 25, height: 25, decoration: BoxDecoration( shape: BoxShape.circle, color: Theme.of(context).colorScheme.secondary, ), // padding: EdgeInsets.symmetric(horizontal: 20.0), child: Icon(Icons.arrow_back_ios, size: 20, color: Colors.white), ), onTap: () => Navigator.pop(context), ), InkWell( onTap: () => Navigator.push( context, PageTransition( child: UserProfileThirdPerson(user: user), type: PageTransitionType.fade), ), child: Container( width: 35, height: 35, margin: EdgeInsets.only(left: 20, right: 15), decoration: BoxDecoration( shape: BoxShape.circle, color: Colors.grey[400], ), child: ClipRRect( borderRadius: BorderRadius.only( topLeft: Radius.circular(40.0), topRight: Radius.circular(40.0), bottomLeft: Radius.circular(40), bottomRight: Radius.circular(40), ), child: user.thumbnail_dp == null ? Center( child: Text( user.firstname!.characters .characterAt(0) .toString() .toUpperCase(), ), ) : CachedNetworkImage( imageUrl: userdpURL + user.thumbnail_dp!, imageBuilder: (context, imageProvider) => FadeInImage( height: 90, width: 90, fit: BoxFit.fill, image: imageProvider, placeholder: AssetImage("assets/images/tesoDP/dp1.png"), ), ), ), ), ), InkWell( onTap: () => Navigator.push( context, PageTransition( child: UserProfileThirdPerson(user: user), type: PageTransitionType.fade), ), child: Container( margin: EdgeInsets.only(top: 05), child: Wrap( direction: Axis.vertical, children: [ Text( user.firstname! + " " + user.lastname!, style: TextStyle(fontSize: 15), textAlign: TextAlign.left, ), // Text( // "typing....", // style: TextStyle(fontSize: 11.5), // textAlign: TextAlign.left, // ), ], ), ), ), ], ), ), ); }