Skip to content

Commit

Permalink
final changes-name and roles
Browse files Browse the repository at this point in the history
  • Loading branch information
SAISURYAtalla committed Feb 4, 2024
1 parent 34aa8c0 commit cb49de1
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 31 deletions.
5 changes: 1 addition & 4 deletions frontend/lib/constants/dummy_entries.dart
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,7 @@ class DummyStudents {
branch: 'Computer Science',
graduationYear: 2023,
skills: [DummySkills.skills[1], DummySkills.skills[2]],
achievements: [
Dummyachievements.achievements[1],
Dummyachievements.achievements[2]
],
achievements: Dummyachievements.achievements.sublist(0, 5),
roles: ['Core Member', 'Coordinator'],
),
Student(
Expand Down
5 changes: 1 addition & 4 deletions frontend/lib/provider/student_provider.dart
Original file line number Diff line number Diff line change
Expand Up @@ -94,10 +94,7 @@ class StudentState {
branch: 'Computer Science',
graduationYear: 2023,
skills: [DummySkills.skills[1], DummySkills.skills[2]],
achievements: [
Dummyachievements.achievements[1],
Dummyachievements.achievements[2],
],
achievements: Dummyachievements.achievements.sublist(0, 5),
roles: ['Core Member', 'Coordinator'],
);
}
Expand Down
9 changes: 0 additions & 9 deletions frontend/lib/provider/user_providers.dart

This file was deleted.

7 changes: 0 additions & 7 deletions frontend/lib/screens/edit_profile.dart
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,6 @@ class EditProfileScreen extends ConsumerWidget {
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
const Text(
'Edit About',
style: TextStyle(
fontWeight: FontWeight.bold,
fontSize: 20,
),
),
AboutEditWidget(),
// UI for editing skills
SkillsEditWidget(
Expand Down
32 changes: 25 additions & 7 deletions frontend/lib/screens/user_profile.dart
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ class UserProfile extends ConsumerWidget {
@override
Widget build(BuildContext context, WidgetRef ref) {
final student = ref.read(studentProvider);
final Student? currentStudent = student.getStudentById('2');
final Student? currentStudent = student.getStudentById('1');

return Scaffold(
appBar: AppBar(
Expand Down Expand Up @@ -53,7 +53,17 @@ class UserProfile extends ConsumerWidget {
: null,
),

const SizedBox(height: 16),
const SizedBox(height: 8),

Text(
currentStudent?.name ?? '',
style: TextStyle(
fontWeight: FontWeight.bold,
fontSize: 18,
),
),

const SizedBox(height: 8),

// User Details Card
Card(
Expand Down Expand Up @@ -90,6 +100,18 @@ class UserProfile extends ConsumerWidget {

const SizedBox(height: 5),

const Text(
'Roles: ',
style: TextStyle(
fontWeight: FontWeight.bold,
),
),
Text(
'${currentStudent?.roles?.join(", ") ?? "No roles"}'),
// style: TextStyle(),)

const SizedBox(height: 16),

const Text(
'Skills:',
style: TextStyle(
Expand Down Expand Up @@ -165,7 +187,6 @@ class UserProfile extends ConsumerWidget {
),
),

// Make Achievements section scrollable
SingleChildScrollView(
scrollDirection: Axis.horizontal,
child: Row(
Expand All @@ -187,16 +208,13 @@ class UserProfile extends ConsumerWidget {
),
),
const SizedBox(height: 10),
// Add a vertical slider for achievements
Slider(
value: 10,
onChanged: (double value) {},
min: 0,
max: 100,
divisions:
5, // Adjust the number of divisions as needed
divisions: 5,
label: 'Achievement Slider',
// vertical: true, // Set to true for a vertical slider
),
],
),
Expand Down

0 comments on commit cb49de1

Please sign in to comment.