Skip to content

Commit

Permalink
Adding documentation for the LoadingPageWidget class
Browse files Browse the repository at this point in the history
  • Loading branch information
shah-esha committed Feb 16, 2025
1 parent 9d566bb commit 85e5ff9
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
1 change: 0 additions & 1 deletion game/lib/journeys/search_bar.dart

This file was deleted.

15 changes: 15 additions & 0 deletions game/lib/loading_page/loading_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,21 @@ import 'package:flutter/material.dart';
import 'package:game/navigation_page/bottom_navbar.dart';
import 'package:game/splash_page/splash_page.dart';

/**
* `LoadingPageWidget` - Displays a loading screen while awaiting the result of a re-login attempt
* and redirects the user based on the result.
*
* @remarks
* This widget is used to show a loading indicator while the app awaits the result of a re-login attempt.
* Once the result is available, it navigates to the appropriate screen:
* - If the re-login is successful, the user is redirected to the main app page.
* - If the re-login fails, the user is redirected to the splash screen.
* The widget ensures that any necessary updates, such as notifying listeners, are completed before navigating.
*
* @param relogResult - The [Future<bool>] representing the result of the re-login operation.
* - `true`: If the re-login attempt is successful, the user is redirected to the main page.
* - `false`: If the re-login attempt fails, the user is redirected to the splash screen.
*/
class LoadingPageWidget extends StatelessWidget {
final Future<bool> relogResult;
LoadingPageWidget(this.relogResult, {Key? key}) : super(key: key);
Expand Down

0 comments on commit 85e5ff9

Please sign in to comment.