profile tabs fixed

This commit is contained in:
amirrezaghabeli
2026-04-19 12:37:39 +03:30
parent c6cb3221ab
commit eb75952b8e
8 changed files with 492 additions and 252 deletions
@@ -0,0 +1,123 @@
import 'package:flutter/material.dart';
import 'package:flutter_svg/svg.dart';
import 'package:tm_app/core/utils/size_config.dart';
import 'package:tm_app/views/login/widgets/widgets.dart';
import '../../../core/constants/assets.dart';
import '../../../core/theme/colors.dart';
class EditKeyWordBottomSheet extends StatelessWidget {
const EditKeyWordBottomSheet({super.key});
@override
Widget build(BuildContext context) {
return Wrap(
children: [
Container(
width: double.infinity,
padding: EdgeInsets.symmetric(
horizontal: 24.0.w(),
vertical: 24.0.h(),
),
decoration: BoxDecoration(
color: AppColors.backgroundColor,
borderRadius: const BorderRadius.vertical(top: Radius.circular(24)),
),
child: Column(
children: [
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Text(
'Edit Key Word',
style: TextStyle(
fontSize: 20.0.sp(),
fontWeight: FontWeight.w600,
),
),
SvgPicture.asset(
AssetsManager.closeCircle,
width: 20.0.w(),
height: 20.0.w(),
fit: BoxFit.cover,
colorFilter: ColorFilter.mode(
AppColors.grey60,
BlendMode.srcIn,
),
),
],
),
SizedBox(height: 16.0.h()),
Divider(color: AppColors.grey20),
SizedBox(height: 24.0.h()),
TextField(
decoration: InputDecoration(
hintText: 'Key Word',
hintStyle: TextStyle(
fontSize: 16.0.sp(),
fontWeight: FontWeight.w400,
color: AppColors.grey60,
),
border: OutlineInputBorder(
borderSide: BorderSide(color: AppColors.grey40),
borderRadius: const BorderRadius.all(Radius.circular(12)),
),
enabledBorder: OutlineInputBorder(
borderSide: BorderSide(color: AppColors.grey40),
borderRadius: const BorderRadius.all(Radius.circular(12)),
),
focusedBorder: OutlineInputBorder(
borderSide: BorderSide(color: AppColors.grey40),
borderRadius: const BorderRadius.all(Radius.circular(12)),
),
errorBorder: const OutlineInputBorder(
borderSide: BorderSide(color: AppColors.errorColor),
borderRadius: BorderRadius.all(Radius.circular(12)),
),
),
),
SizedBox(height: 16.0.h()),
Wrap(
spacing: 8,
runSpacing: 16.0.h(),
children: [
_chip(label: 'UIUX', backgroundColor: Colors.green[200]!),
_chip(
label: 'Lorem ipsum',
backgroundColor: Colors.orange[100]!,
),
_chip(label: 'sample', backgroundColor: Colors.grey[300]!),
_chip(label: 'Unknown', backgroundColor: Colors.red[200]!),
_chip(
label: 'Lorem ipsum 02',
backgroundColor: Colors.blue[100]!,
),
],
),
SizedBox(height: 32.0.h()),
BaseButton(
isEnabled: true,
text: 'Submit Request',
backgroundColor: AppColors.primary20,
textColor: AppColors.mainBlue,
onPressed: () {},
),
],
),
),
],
);
}
Widget _chip({required String label, required Color backgroundColor}) {
return InputChip(
label: Text(label),
backgroundColor: backgroundColor,
onDeleted: () {},
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(8),
side: const BorderSide(color: Colors.transparent),
),
);
}
}
+116
View File
@@ -0,0 +1,116 @@
import 'package:flutter/material.dart';
import 'package:tm_app/core/theme/colors.dart';
import 'package:tm_app/core/utils/size_config.dart';
class MembersTab extends StatelessWidget {
const MembersTab({super.key});
@override
Widget build(BuildContext context) {
return Column(
children: [
SizedBox(height: 36.0.h()),
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
_columnName('Full Name'),
_columnName('Position'),
_columnName('Access level'),
],
),
SizedBox(height: 24.0.h()),
Divider(color: AppColors.grey50),
SizedBox(height: 24.0.h()),
Expanded(
child: ListView.separated(
scrollDirection: Axis.vertical,
itemBuilder: (context, index) {
final member = _members[index];
return _member(
fullName: member.fullName,
position: member.position,
accessLevel: member.accessLevel,
);
},
separatorBuilder:
(context, index) =>
Divider(color: AppColors.grey50.withValues(alpha: 0.2)),
itemCount: _members.length,
),
),
],
);
}
Widget _columnName(String text) {
return SizedBox(
width: 100.0.w(),
child: Text(
text,
style: TextStyle(
fontSize: 16.0.sp(),
fontWeight: FontWeight.w400,
color: AppColors.grey70,
),
),
);
}
Widget _member({
required String fullName,
required String position,
required String accessLevel,
}) {
return SizedBox(
height: 43.0.h(),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
_memberDetail(title: fullName),
// SizedBox(width: 40.0.w()),
_memberDetail(title: position),
// SizedBox(width: 40.0.w()),
_memberDetail(title: accessLevel),
],
),
);
}
Widget _memberDetail({required String title}) {
return SizedBox(
width: 100.0.w(),
child: Align(
alignment: Alignment.centerLeft,
child: Text(
title,
maxLines: 1,
overflow: TextOverflow.ellipsis,
style: TextStyle(
fontSize: 16.0.sp(),
fontWeight: FontWeight.w400,
color: AppColors.grey80,
),
),
),
);
}
}
class Member {
final String fullName;
final String position;
final String accessLevel;
Member({
required this.fullName,
required this.position,
required this.accessLevel,
});
}
final List<Member> _members = [
Member(fullName: 'Rick Novak', position: 'Director', accessLevel: 'Level 01'),
Member(fullName: 'Sara Novak', position: 'Director', accessLevel: 'Level 01'),
Member(fullName: 'Sarah Connor', position: 'Chief', accessLevel: 'Level 02'),
];
+177
View File
@@ -0,0 +1,177 @@
import 'package:flutter/material.dart';
import 'package:flutter_svg/flutter_svg.dart';
import 'package:tm_app/core/constants/assets.dart';
import 'package:tm_app/core/theme/colors.dart';
import 'package:tm_app/core/utils/size_config.dart';
import 'edit_key_word_bottom_sheet.dart';
class SubjectTab extends StatelessWidget {
const SubjectTab({super.key});
@override
Widget build(BuildContext context) {
return Column(
children: [
SizedBox(height: 36.0.h()),
_companyActivity(companyActivity: 'IT'),
SizedBox(height: 24.0.h()),
_budget(budget: 'Telecom Solutions GmbH'),
SizedBox(height: 24.0.h()),
_keyWord(
onEditPressed: () {
showModalBottomSheet(
context: context,
isScrollControlled: true,
builder: (_) {
return const EditKeyWordBottomSheet();
},
);
},
),
SizedBox(height: 16.0.h()),
Wrap(
spacing: 8,
runSpacing: 16.0.h(),
children: [
_chip(label: 'UIUX', backgroundColor: Colors.green[200]!),
_chip(label: 'Lorem ipsum', backgroundColor: Colors.orange[100]!),
_chip(label: 'sample', backgroundColor: Colors.grey[300]!),
_chip(label: 'Unknown', backgroundColor: Colors.red[200]!),
_chip(label: 'Lorem ipsum 02', backgroundColor: Colors.blue[100]!),
],
),
SizedBox(height: 24.0.h()),
Divider(color: AppColors.grey20),
_location(onEditePressed: () {}),
],
);
}
Widget _companyActivity({required String companyActivity}) {
return Padding(
padding: EdgeInsets.symmetric(horizontal: 8.0.w()),
child: SizedBox(
height: 43.0.h(),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
'Company Activity ',
style: TextStyle(
fontSize: 16.0.sp(),
fontWeight: FontWeight.w400,
color: AppColors.grey60,
),
),
Text(
companyActivity,
style: TextStyle(
fontSize: 16.0.sp(),
fontWeight: FontWeight.w400,
color: AppColors.grey80,
),
),
],
),
),
);
}
Widget _budget({required String budget}) {
return Padding(
padding: EdgeInsets.symmetric(horizontal: 8.0.w()),
child: SizedBox(
height: 43.0.h(),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
'Budget',
style: TextStyle(
fontSize: 16.0.sp(),
fontWeight: FontWeight.w400,
color: AppColors.grey60,
),
),
Text(
budget,
style: TextStyle(
fontSize: 16.0.sp(),
fontWeight: FontWeight.w400,
color: AppColors.grey80,
),
),
],
),
),
);
}
Widget _keyWord({required VoidCallback onEditPressed}) {
return Padding(
padding: EdgeInsets.symmetric(horizontal: 8.0.w()),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Text(
'Budget',
style: TextStyle(
fontSize: 16.0.sp(),
fontWeight: FontWeight.w400,
color: AppColors.grey60,
),
),
IconButton(
onPressed: onEditPressed,
icon: SvgPicture.asset(
AssetsManager.editting,
colorFilter: ColorFilter.mode(AppColors.grey70, BlendMode.srcIn),
),
),
],
),
);
}
Widget _chip({required String label, required Color backgroundColor}) {
return Chip(
label: Text(label),
backgroundColor: backgroundColor,
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(8),
side: const BorderSide(color: Colors.transparent),
),
);
}
Widget _location({required VoidCallback onEditePressed}) {
return Padding(
padding: EdgeInsets.symmetric(horizontal: 8.0.w()),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Text(
'Location',
style: TextStyle(
fontSize: 16.0.sp(),
fontWeight: FontWeight.w400,
color: AppColors.grey60,
),
),
IconButton(
onPressed: onEditePressed,
icon: SvgPicture.asset(
AssetsManager.editting,
colorFilter: ColorFilter.mode(AppColors.grey70, BlendMode.srcIn),
),
),
],
),
);
}
}