Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add user profile view #36

Merged
merged 18 commits into from
Feb 15, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1,327 changes: 1,327 additions & 0 deletions sabitou_clients/coverage/lcov.info

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions sabitou_clients/lib/main.dart
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import 'package:flutter/material.dart';
import 'package:flutter_localizations/flutter_localizations.dart';
import 'package:flutter_web_plugins/flutter_web_plugins.dart';
/*import 'package:flutter_web_plugins/flutter_web_plugins.dart';*/
import 'package:get/get.dart';
import 'package:get_storage/get_storage.dart';

Expand Down Expand Up @@ -50,7 +50,7 @@ class MyApp extends StatelessWidget {
}

Future<void> _initServices() async {
setUrlStrategy(PathUrlStrategy());
/*setUrlStrategy(PathUrlStrategy());*/

/// Initialize the get storage service.
await GetStorage.init();
Expand Down
10 changes: 10 additions & 0 deletions sabitou_clients/lib/routes/app_routes.dart
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import '../providers/sign_up/sign_up.dart';
import '../providers/sing_in/sign_in.dart';
import '../screens/dashboard/dashboard_view.dart';
import '../screens/middleware_page.dart';
import '../screens/profile/profile_view.dart';
import '../screens/sign_in/sign_view.dart';
import '../screens/sign_up/sign_up_view.dart';
import '../screens/stores/stores_view.dart';
Expand Down Expand Up @@ -48,6 +49,15 @@ final class AppRouter {
child: SignUpView(),
),
),
GetPage(
name: PagesRoutes.profile.pattern,
transition: Transition.noTransition,
page: () {
return const MiddlewarePage(
child: ProfileView(),
);
},
),
];

/// Gets the current route name.
Expand Down
11 changes: 11 additions & 0 deletions sabitou_clients/lib/routes/pages_routes.dart
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@ abstract class PagesRoutes {

/// The sign up route, for example, http:localhost:8080/signup.
static final signUp = _SignUpRoute();

/// The profile route, for example, http:localhost:8080/profile.
static final profile = _ProfileRoute();
}

class _SignInRoute extends PagesRoutesWithNoParams {
Expand Down Expand Up @@ -59,6 +62,11 @@ class _DashboardRoute extends PagesRoutesWithNoParams {
String get pattern => '/dashboard';
}

class _ProfileRoute extends PagesRoutesWithNoParams {
@override
String get pattern => '/profile';
}

/// The dashboard parameters.
class DashboardParameters {
/// The key of the item.
Expand All @@ -81,4 +89,7 @@ enum DashboardLabelPage {

/// The dashboard settings.
settings,

/// The user profile.
profile,
}
Loading
Loading