From 2228c991d27d76e7776626a2789928b69c3a0eed Mon Sep 17 00:00:00 2001 From: sidhdhi canopas Date: Tue, 23 Jan 2024 15:51:57 +0530 Subject: [PATCH] Temp commit --- data/lib/service/user/user_service.dart | 4 +-- khelo/lib/ui/app.dart | 2 +- khelo/lib/ui/flow/profile/profile_screen.dart | 22 ++++++++++------ .../settings/profile/edit_profile_screen.dart | 26 ++++++++++++++++++- 4 files changed, 41 insertions(+), 13 deletions(-) diff --git a/data/lib/service/user/user_service.dart b/data/lib/service/user/user_service.dart index c3378353..41fef06e 100644 --- a/data/lib/service/user/user_service.dart +++ b/data/lib/service/user/user_service.dart @@ -11,14 +11,12 @@ final userServiceProvider = Provider((ref) { class UserService { User? currentUser; -// caller function here /* -like +// caller function here func callerFunctionCalledFromNotifier(){ var response = await funcThatInternallyDoTheseStuff(); parse the response return the response } */ - } \ No newline at end of file diff --git a/khelo/lib/ui/app.dart b/khelo/lib/ui/app.dart index 4c4de1eb..1d162cf6 100644 --- a/khelo/lib/ui/app.dart +++ b/khelo/lib/ui/app.dart @@ -26,7 +26,7 @@ class _AppState extends ConsumerState { super.initState(); final AppRoute initialRoute; - initialRoute = AppRoute.intro; + initialRoute = AppRoute.main; // if (ref.read(hasUserSession)) { // initialRoute = AppRoute.main; // } else { diff --git a/khelo/lib/ui/flow/profile/profile_screen.dart b/khelo/lib/ui/flow/profile/profile_screen.dart index 233fbea5..a612997d 100644 --- a/khelo/lib/ui/flow/profile/profile_screen.dart +++ b/khelo/lib/ui/flow/profile/profile_screen.dart @@ -1,6 +1,7 @@ -import 'package:flutter/cupertino.dart'; -import 'package:style/extensions/context_extensions.dart'; -import 'package:style/text/app_text_style.dart'; +import 'package:flutter/material.dart'; +import 'package:khelo/components/app_page.dart'; +import 'package:khelo/domain/extensions/context_extensions.dart'; +import 'package:khelo/ui/app_route.dart'; class ProfileScreen extends StatefulWidget { const ProfileScreen({super.key}); @@ -12,11 +13,16 @@ class ProfileScreen extends StatefulWidget { class _ProfileScreenState extends State { @override Widget build(BuildContext context) { - return Center( - child: Text( - "Profile", - style: - AppTextStyle.header4.copyWith(color: context.colorScheme.primary), + return AppPage( + title: context.l10n.tab_profile_title, + body: Builder( + builder: (context) { + return Center( + child: TextButton(onPressed: () { + AppRoute.editProfile.push(context); + }, child: const Text("go to profile >>")), + ); + }, ), ); } diff --git a/khelo/lib/ui/flow/settings/profile/edit_profile_screen.dart b/khelo/lib/ui/flow/settings/profile/edit_profile_screen.dart index be4c4fce..529d4643 100644 --- a/khelo/lib/ui/flow/settings/profile/edit_profile_screen.dart +++ b/khelo/lib/ui/flow/settings/profile/edit_profile_screen.dart @@ -1,7 +1,9 @@ import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; import 'package:flutter_riverpod/flutter_riverpod.dart'; import 'package:khelo/components/app_page.dart'; import 'package:khelo/domain/extensions/context_extensions.dart'; +import 'package:style/extensions/context_extensions.dart'; class EditProfileScreen extends ConsumerWidget { const EditProfileScreen({super.key}); @@ -12,7 +14,29 @@ class EditProfileScreen extends ConsumerWidget { title: context.l10n.edit_profile_screen_title, body: Builder( builder: (context) { - return const Center(child: Text("Edit Profile Screen"),); + return ListView( + padding: context.mediaQueryPadding + + const EdgeInsets.symmetric(vertical: 8.0, horizontal: 16.0), + + children: const [ + // center pick profile image from camera or gallery + CupertinoTextField( + placeholder: "name", + ), + SizedBox(height: 16,), + CupertinoTextField( + placeholder: "email", + ), + SizedBox(height: 16,), + SizedBox(height: 16,), + CupertinoTextField( + placeholder: "location", + ), + CupertinoTextField( + placeholder: "dob", + ), + ], + ); }, ), );