-
-
Notifications
You must be signed in to change notification settings - Fork 31
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Enhance user profile navigation and details
Fixes #391 Add functionality to surf other user profiles and update user profile details. * **User Profile Page (`lib/src/pages/home/profile.dart`)** - Add a new constructor parameter `user` to the `UserProfile` class to accept a `User` object. - Update the `getProfilePicture`, `build`, and `initState` methods to use the `user` parameter instead of `currentUser`. - Update various UI elements to display the `user` details instead of `currentUser`. * **Global Leaderboard Page (`lib/src/pages/leaderboards/global_leaderboard.dart`)** - Update the `ListTile` widget to include an `onTap` callback that navigates to the `UserProfile` page with the selected user. * **Monthly Leaderboard Page (`lib/src/pages/leaderboards/monthly_leaderboard.dart`)** - Update the `ListTile` widget to include an `onTap` callback that navigates to the `UserProfile` page with the selected user. * **Issue Detail Page (`lib/src/pages/issues/issue_detail.dart`)** - Update the `Markdown` widget to include an `onTapLink` callback that navigates to the `UserProfile` page with the selected user. * **State Provider (`lib/src/pages/sizzle/sizzle_state_provider.dart`)** - Add a new `StateProvider<User?>` to store the selected user for profile navigation. --- For more details, open the [Copilot Workspace session](https://copilot-workspace.githubnext.com/OWASP-BLT/BLT-Flutter/issues/391?shareId=XXXX-XXXX-XXXX-XXXX).
- Loading branch information
Showing
5 changed files
with
64 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,6 @@ | ||
import 'package:flutter_riverpod/flutter_riverpod.dart'; | ||
import 'package:blt/src/models/user_model.dart'; | ||
|
||
// Define your providers here | ||
final usernameProvider = StateProvider<String?>((ref) => null); | ||
final selectedUserProvider = StateProvider<User?>((ref) => null); |