6177214e-ce7c-49e3-99de-ff9721b26f63 — Commit d68197f2
Changed files
.../xcshareddata/xcschemes/releasetest.xcscheme | 13 ++++++- .../lib/components/comwell_app_bar.dart | 24 +++++++----- .../components/comwell_text_field.dart | 24 ++++++++++++ .../profile_settings/profile_settings_page.dart | 44 ++++++++++++++++++++++ comwell_key_app/lib/routing/app_router.dart | 8 +++- comwell_key_app/lib/routing/app_routes.dart | 2 +- 6 files changed, 102 insertions(+), 13 deletions(-)
Diff
diff --git a/comwell_key_app/ios/Runner.xcodeproj/xcshareddata/xcschemes/releasetest.xcscheme b/comwell_key_app/ios/Runner.xcodeproj/xcshareddata/xcschemes/releasetest.xcscheme
index d6039874..d4082783 100644
--- a/comwell_key_app/ios/Runner.xcodeproj/xcshareddata/xcschemes/releasetest.xcscheme
+++ b/comwell_key_app/ios/Runner.xcodeproj/xcshareddata/xcschemes/releasetest.xcscheme
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1540"
- version = "1.7">
+ version = "2.2">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES"
@@ -21,6 +21,15 @@
ReferencedContainer = "container:Runner.xcodeproj">
</BuildableReference>
</BuildActionEntry>
+ <BuildActionEntry
+ buildForTesting = "YES"
+ buildForRunning = "YES"
+ buildForProfiling = "YES"
+ buildForArchiving = "YES"
+ buildForAnalyzing = "YES">
+ <AutocreatedTestPlanReference>
+ </AutocreatedTestPlanReference>
+ </BuildActionEntry>
</BuildActionEntries>
</BuildAction>
<TestAction
@@ -72,7 +81,7 @@
buildConfiguration = "Debug">
</AnalyzeAction>
<ArchiveAction
- buildConfiguration = "Release-TestRelease"
+ buildConfiguration = "Release-releasetest"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>
diff --git a/comwell_key_app/lib/components/comwell_app_bar.dart b/comwell_key_app/lib/components/comwell_app_bar.dart
index fb4d2f86..ea428ac9 100644
--- a/comwell_key_app/lib/components/comwell_app_bar.dart
+++ b/comwell_key_app/lib/components/comwell_app_bar.dart
@@ -6,8 +6,14 @@ import 'package:go_router/go_router.dart';
class ComwellAppBar extends StatelessWidget implements PreferredSizeWidget {
final bool shouldShowAppBar;
+ final bool shouldShowBackButton;
+ final bool shouldShowProfileButton;
- const ComwellAppBar({super.key, this.shouldShowAppBar = true});
+ const ComwellAppBar({super.key,
+ this.shouldShowAppBar = true,
+ this.shouldShowBackButton = true,
+ this.shouldShowProfileButton = true,
+ });
@override
Widget build(BuildContext context) {
@@ -24,18 +30,18 @@ class ComwellAppBar extends StatelessWidget implements PreferredSizeWidget {
padding: const EdgeInsets.only(bottom: 10),
child:Row(
-
mainAxisAlignment: MainAxisAlignment.spaceBetween,
crossAxisAlignment: CrossAxisAlignment.end,
children: [
- RoundIconButton(icon: "assets/icons/arrow-right.svg", onPressed: () {
- Navigator.of(context).pop();
- }),
- RoundIconButton(icon: "assets/icons/user-open.svg", onPressed: () {
- context.goNamed(AppRoutes.profile.name);
- //profile
- }),
+ if (shouldShowBackButton)
+ RoundIconButton(icon: "assets/icons/arrow-right.svg", onPressed: () {
+ Navigator.of(context).pop();
+ }),
+ if (shouldShowProfileButton)
+ RoundIconButton(icon: "assets/icons/user-open.svg", onPressed: () {
+ context.goNamed(AppRoutes.profile.name);
+ }),
],
),
),);
diff --git a/comwell_key_app/lib/profile_settings/components/comwell_text_field.dart b/comwell_key_app/lib/profile_settings/components/comwell_text_field.dart
new file mode 100644
index 00000000..1dc4ff15
--- /dev/null
+++ b/comwell_key_app/lib/profile_settings/components/comwell_text_field.dart
@@ -0,0 +1,24 @@
+import 'package:comwell_key_app/themes/light_theme.dart';
+import 'package:flutter/material.dart';
+
+class ComwellTextField extends StatelessWidget {
+ final String fieldName;
+
+ const ComwellTextField({super.key, required this.fieldName});
+
+ @override
+ Widget build(BuildContext context) {
+ return TextField(
+
+ decoration: InputDecoration(
+ labelText: fieldName,
+ floatingLabelBehavior: FloatingLabelBehavior.always,
+ border: const OutlineInputBorder(
+ borderSide: BorderSide(
+ color: colorDivider,
+ ),
+ ),
+ ),
+ );
+ }
+}
\ No newline at end of file
diff --git a/comwell_key_app/lib/profile_settings/profile_settings_page.dart b/comwell_key_app/lib/profile_settings/profile_settings_page.dart
new file mode 100644
index 00000000..28b3648f
--- /dev/null
+++ b/comwell_key_app/lib/profile_settings/profile_settings_page.dart
@@ -0,0 +1,44 @@
+import 'package:comwell_key_app/components/comwell_app_bar.dart';
+import 'package:comwell_key_app/profile_settings/components/comwell_text_field.dart';
+import 'package:easy_localization/easy_localization.dart';
+import 'package:flutter/material.dart';
+
+class ProfileSettingsPage extends StatelessWidget {
+
+ const ProfileSettingsPage({super.key});
+
+ @override
+ Widget build(BuildContext context) {
+ final theme = Theme.of(context);
+ return Scaffold(
+ backgroundColor: Colors.white,
+ appBar: const ComwellAppBar(
+ shouldShowProfileButton: false,
+ ),
+ body: Container(margin: const EdgeInsets.symmetric(horizontal: 16), child: SafeArea( child:
+ Column(
+
+ children: [
+ const Spacer(),
+ Text("profile_settings".tr(), style: theme.textTheme.headlineLarge, textAlign: TextAlign.start),
+ const Spacer(),
+ const ComwellTextField(fieldName: "Fornavn"),
+ const SizedBox(height: 8),
+ const ComwellTextField(fieldName: "Efternavn"),
+ const SizedBox(height: 8),
+ const ComwellTextField(fieldName: "Email"),
+ const SizedBox(height: 8),
+ const ComwellTextField(fieldName: "Telefonnummer"),
+ const SizedBox(height: 8),
+ const ComwellTextField(fieldName: "Adresse"),
+ const SizedBox(height: 8),
+ const ComwellTextField(fieldName: "Fødselsdag"),
+ const SizedBox(height: 8),
+ const ComwellTextField(fieldName: 'password'),
+ const SizedBox(height: 100),
+ ],
+ ),
+ ),
+ ),);
+ }
+}
\ No newline at end of file
diff --git a/comwell_key_app/lib/routing/app_router.dart b/comwell_key_app/lib/routing/app_router.dart
index 61664ad3..c5f7399f 100644
--- a/comwell_key_app/lib/routing/app_router.dart
+++ b/comwell_key_app/lib/routing/app_router.dart
@@ -5,6 +5,7 @@ import 'package:comwell_key_app/key/key_page.dart';
import 'package:comwell_key_app/login/login_page.dart';
import 'package:comwell_key_app/overview/overview_page.dart';
import 'package:comwell_key_app/profile/profile_page.dart';
+import 'package:comwell_key_app/profile_settings/profile_settings_page.dart';
import 'package:comwell_key_app/redeem_debug/redeem_page.dart';
import 'package:comwell_key_app/routing/app_routes.dart';
import 'package:comwell_key_app/utils/stream_to_listenable.dart';
@@ -16,7 +17,7 @@ final _rootNavigatorKey = GlobalKey<NavigatorState>();
GoRouter goRouter(AuthenticationBloc authBloc) {
return GoRouter(
- initialLocation: '/login',
+ initialLocation: '/profilesettings',
navigatorKey: _rootNavigatorKey,
debugLogDiagnostics: true,
refreshListenable:
@@ -46,6 +47,11 @@ GoRouter goRouter(AuthenticationBloc authBloc) {
return null;
},
routes: <RouteBase>[
+ GoRoute(
+ path: "/profilesettings",
+ name: AppRoutes.profileSettings.name,
+ builder: (context, state) => const ProfileSettingsPage(),
+ ),
GoRoute(
path: "/",
name: AppRoutes.welcome.name,
diff --git a/comwell_key_app/lib/routing/app_routes.dart b/comwell_key_app/lib/routing/app_routes.dart
index 94be1399..59f3ec63 100644
--- a/comwell_key_app/lib/routing/app_routes.dart
+++ b/comwell_key_app/lib/routing/app_routes.dart
@@ -16,5 +16,5 @@ enum AppRoutes {
login,
sheet,
profile,
- overview,
+ overview, profileSettings,
}
\ No newline at end of file