6177214e-ce7c-49e3-99de-ff9721b26f63 — Commit 71394e96
Changed files
.../components/Text_field_trailing_icon.dart | 65 ---------------------- .../components/text_field_with_trailing_icon.dart | 65 ++++++++++++++++++++++ .../profile_settings/profile_settings_page.dart | 2 +- 3 files changed, 66 insertions(+), 66 deletions(-)
Diff
diff --git a/comwell_key_app/lib/profile_settings/components/Text_field_trailing_icon.dart b/comwell_key_app/lib/profile_settings/components/Text_field_trailing_icon.dart
deleted file mode 100644
index deb9bb4d..00000000
--- a/comwell_key_app/lib/profile_settings/components/Text_field_trailing_icon.dart
+++ /dev/null
@@ -1,65 +0,0 @@
-import 'package:comwell_key_app/themes/light_theme.dart';
-import 'package:flutter/material.dart';
-import 'package:flutter_svg/svg.dart';
-
-class TextFieldWithTrailingIcon extends StatelessWidget {
- final String title;
- final String text;
- final String trailingIcon;
- final VoidCallback onTap;
- final bool showTitle;
-
- const TextFieldWithTrailingIcon({
- super.key,
- required this.title,
- required this.text,
- required this.trailingIcon,
- required this.onTap,
- required this.showTitle,
- });
-
- @override
- Widget build(BuildContext context) {
- final theme = Theme.of(context);
- return GestureDetector(
- onTap: onTap,
- child: Container(
- height: 62,
- padding: const EdgeInsets.symmetric(horizontal: 12.0, vertical: 10.0),
- decoration: BoxDecoration(
- border: Border.all(color: colorDivider),
- borderRadius: BorderRadius.circular(8.0),
- ),
- child: Row(
- mainAxisAlignment: MainAxisAlignment.spaceBetween,
- children: [
- Column(
- crossAxisAlignment: CrossAxisAlignment.start,
- mainAxisAlignment: MainAxisAlignment.center,
- children: [
- if (showTitle)
- Text(
- title,
- textAlign: TextAlign.start,
- style: theme.textTheme.bodySmall?.copyWith(
- color: Colors.black.withOpacity(
- 0.65,
- ),
- ),
- ),
- const SizedBox(height: 0.0),
- SizedBox(width: 250, child:Text(
- overflow: TextOverflow.ellipsis,
- text, style: theme.textTheme.headlineSmall),
- )],
- ),
- SvgPicture.asset(
- trailingIcon,
- height: 24.0,
- ),
- ],
- ),
- ),
- );
- }
-}
diff --git a/comwell_key_app/lib/profile_settings/components/text_field_with_trailing_icon.dart b/comwell_key_app/lib/profile_settings/components/text_field_with_trailing_icon.dart
new file mode 100644
index 00000000..deb9bb4d
--- /dev/null
+++ b/comwell_key_app/lib/profile_settings/components/text_field_with_trailing_icon.dart
@@ -0,0 +1,65 @@
+import 'package:comwell_key_app/themes/light_theme.dart';
+import 'package:flutter/material.dart';
+import 'package:flutter_svg/svg.dart';
+
+class TextFieldWithTrailingIcon extends StatelessWidget {
+ final String title;
+ final String text;
+ final String trailingIcon;
+ final VoidCallback onTap;
+ final bool showTitle;
+
+ const TextFieldWithTrailingIcon({
+ super.key,
+ required this.title,
+ required this.text,
+ required this.trailingIcon,
+ required this.onTap,
+ required this.showTitle,
+ });
+
+ @override
+ Widget build(BuildContext context) {
+ final theme = Theme.of(context);
+ return GestureDetector(
+ onTap: onTap,
+ child: Container(
+ height: 62,
+ padding: const EdgeInsets.symmetric(horizontal: 12.0, vertical: 10.0),
+ decoration: BoxDecoration(
+ border: Border.all(color: colorDivider),
+ borderRadius: BorderRadius.circular(8.0),
+ ),
+ child: Row(
+ mainAxisAlignment: MainAxisAlignment.spaceBetween,
+ children: [
+ Column(
+ crossAxisAlignment: CrossAxisAlignment.start,
+ mainAxisAlignment: MainAxisAlignment.center,
+ children: [
+ if (showTitle)
+ Text(
+ title,
+ textAlign: TextAlign.start,
+ style: theme.textTheme.bodySmall?.copyWith(
+ color: Colors.black.withOpacity(
+ 0.65,
+ ),
+ ),
+ ),
+ const SizedBox(height: 0.0),
+ SizedBox(width: 250, child:Text(
+ overflow: TextOverflow.ellipsis,
+ text, style: theme.textTheme.headlineSmall),
+ )],
+ ),
+ SvgPicture.asset(
+ trailingIcon,
+ height: 24.0,
+ ),
+ ],
+ ),
+ ),
+ );
+ }
+}
diff --git a/comwell_key_app/lib/profile_settings/profile_settings_page.dart b/comwell_key_app/lib/profile_settings/profile_settings_page.dart
index 41d9db2f..a6ce04cc 100644
--- a/comwell_key_app/lib/profile_settings/profile_settings_page.dart
+++ b/comwell_key_app/lib/profile_settings/profile_settings_page.dart
@@ -5,7 +5,7 @@ import 'package:comwell_key_app/profile_settings/components/address_bottom_sheet
import 'package:comwell_key_app/profile_settings/components/comwell_text_field.dart';
import 'package:comwell_key_app/profile_settings/components/date_time_picker.dart';
import 'package:comwell_key_app/profile_settings/components/intl_phone_field.dart';
-import 'package:comwell_key_app/profile_settings/components/text_field_trailing_icon.dart';
+import 'package:comwell_key_app/profile_settings/components/text_field_with_trailing_icon.dart';
import 'package:comwell_key_app/profile_settings/cubit/profile_settings_cubit.dart';
import 'package:comwell_key_app/profile_settings/model/address.dart';
import 'package:comwell_key_app/themes/light_theme.dart';