together_mobile/lib/screens/friend_profile/friend_profile_screen.dart

125 lines
3.6 KiB
Dart

import 'package:flutter/material.dart';
import 'package:together_mobile/common/constants.dart';
import 'package:together_mobile/screens/friend_profile/components/row_floating_buttons.dart';
import 'components/friend_profile_card.dart';
class FriendProfileScreen extends StatelessWidget {
const FriendProfileScreen({
super.key,
});
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
centerTitle: true,
title: const Text('好友名字'),
actions: [
TextButton(
onPressed: () {},
style: TextButton.styleFrom(
foregroundColor: kContentColorDark,
),
child: const Text('设置'),
),
],
),
body: GridView.count(
padding: const EdgeInsets.all(10.0),
childAspectRatio: 0.9,
crossAxisCount: 2,
mainAxisSpacing: 10.0,
crossAxisSpacing: 10.0,
children: [
FriendProfileCard(
child: Column(
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
children: [
Image.asset(
'assets/images/user.png',
height: 110,
width: 110,
),
const Chip(
label: Text('状态'),
visualDensity: VisualDensity.compact,
),
],
),
),
const FriendProfileCard(
tag: '基本信息',
child: Expanded(
child: Column(
crossAxisAlignment: CrossAxisAlignment.center,
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
children: [
Text(
'灵魂总是要贪片刻灿烂',
overflow: TextOverflow.ellipsis,
style: TextStyle(fontSize: 16),
),
Text(
'广西-百色-乐业',
style: TextStyle(fontSize: 16),
),
Text(
'1996-12-31',
style: TextStyle(fontSize: 16),
),
Text(
'',
style: TextStyle(
fontSize: 16,
),
),
],
),
),
),
const FriendProfileCard(
tag: '签名',
child: Expanded(
child: Text(
'或许去趟沙滩,或许去看看夕阳,或许去一个可以想心事的地方',
style: TextStyle(
fontSize: 16,
),
),
),
),
const FriendProfileCard(
tag: '账号信息',
child: Expanded(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
'ghsaiojawlas',
style: TextStyle(
fontSize: 16,
),
),
SizedBox(
height: 20,
),
Text(
'hty_brand@outlook.com',
style: TextStyle(
fontSize: 16,
),
),
],
),
),
),
],
),
floatingActionButton: const RowFloatingButtons(),
floatingActionButtonLocation: FloatingActionButtonLocation.centerFloat,
);
}
}