Skip to content

Commit

Permalink
Add profile page documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
3TTemi committed Mar 1, 2025
1 parent 48feb9b commit 4784918
Showing 1 changed file with 33 additions and 1 deletion.
34 changes: 33 additions & 1 deletion game/lib/profile/profile_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,24 @@ import 'package:game/profile/completed_feed.dart';
import 'package:velocity_x/velocity_x.dart';

/**
* The profile page of the app that is rendered for the user's profile
* `ProfilePage` Component - Displays the user's profile information and achievements.
*
* @remarks
* This component serves as the main profile screen in the CornellGO app, presenting
* the user's personal information, completed events, and achievements. It features
* a custom curved header with the user's avatar and score, followed by sections for
* completed events and achievements.
*
* The layout is responsive, with dimensions calculated as percentages of screen size
* to ensure consistent appearance across different devices. It consumes data from
* multiple providers including UserModel, EventModel, TrackerModel, ChallengeModel,
* and AchievementModel.
*
* @param key - Optional Flutter widget key for identification and testing.
*
* @returns A StatefulWidget that displays the user profile interface.
*/

class ProfilePage extends StatefulWidget {
const ProfilePage({Key? key}) : super(key: key);

Expand Down Expand Up @@ -384,6 +400,22 @@ class _ProfilePageState extends State<ProfilePage> {
}
}

/**
* `CustomCurveClipper` - Creates a custom curved shape for the profile header.
*
* @remarks
* This clipper generates a path with a subtle curve at the bottom edge of the
* profile header, creating a visually appealing transition between the header
* and the content below. The curve is designed to be gentle, resembling the
* bottom of an oval, with the lowest point at the center of the width.
*
* @param size - The size of the area to be clipped, containing width and height.
*
* @returns A Path object defining the custom curved shape for clipping.
*
* @shouldReclip - Returns false as the clip shape doesn't change dynamically.
*/

class CustomCurveClipper extends CustomClipper<Path> {
@override
Path getClip(Size size) {
Expand Down

0 comments on commit 4784918

Please sign in to comment.