This commit is contained in:
mohammad
2024-11-14 10:14:28 +03:00
parent 44965d8928
commit 6920d9129e
4 changed files with 57 additions and 24 deletions
@@ -80,7 +80,7 @@ class SosProfilePage extends StatelessWidget {
child: TextFormField(
maxLength: 30,
style: const TextStyle(
color: Colors.black,
color: ColorsManager.textPrimaryColor,
),
textAlign: TextAlign.center,
focusNode: sensor.focusNode,
@@ -99,17 +99,21 @@ class SosProfilePage extends StatelessWidget {
),
),
const SizedBox(width: 5),
//editNameSosIcon
InkWell(
onTap: () {
sensor
.add(const ChangeNameEvent(value: true));
},
child: const Padding(
padding: EdgeInsets.symmetric(horizontal: 10),
child: Icon(
Icons.edit_outlined,
size: 20,
color: ColorsManager.textPrimaryColor,
child: Padding(
padding:
const EdgeInsets.symmetric(horizontal: 5),
child: SvgPicture.asset(
height: 18,
width: 18,
Assets.editNameSosIcon,
fit: BoxFit.contain,
color: ColorsManager.grayButtonColors,
),
),
),
@@ -1,3 +1,4 @@
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter_bloc/flutter_bloc.dart';
import 'package:flutter_svg/flutter_svg.dart';
@@ -100,7 +101,10 @@ class SosSettings extends StatelessWidget {
text: "Room: Syncrow"),
],
),
Icon(Icons.edit_sharp)
Icon(
Icons.edit_outlined,
color: ColorsManager.grayColor,
),
],
),
),
@@ -157,10 +161,16 @@ class SosSettings extends StatelessWidget {
fontColor: ColorsManager.grayColor,
),
DefaultContainer(
child: SettingWidget(
onTap: () {},
text: 'Offline Notification',
icon: Assets.notificationIcon,
child: Column(
children: [
SettingWidget(
onChanged: (p0) {},
isNotification: true,
onTap: () {},
text: 'Offline Notification',
icon: Assets.notificationIcon,
),
],
),
),
const SizedBox(height: 20),
@@ -390,15 +400,19 @@ class SosSettings extends StatelessWidget {
class SettingWidget extends StatelessWidget {
final String? text;
final bool? isUpdate;
final bool? isNotification;
final String? icon;
final Function()? onTap;
final Function()? onTapUpdate;
final Function(bool)? onChanged;
const SettingWidget(
{super.key,
this.text,
this.icon,
this.onTap,
this.isUpdate,
this.onChanged,
this.isNotification = false,
this.onTapUpdate});
@override
@@ -412,23 +426,24 @@ class SettingWidget extends StatelessWidget {
child: Row(
children: [
Expanded(
flex: 2,
child: Container(
padding: EdgeInsets.all(10),
padding: EdgeInsets.all(8),
decoration: const BoxDecoration(
color: ColorsManager.primaryColor,
borderRadius: BorderRadius.all(Radius.circular(50))),
borderRadius: BorderRadius.all(Radius.circular(20))),
child: SvgPicture.asset(
icon!,
fit: BoxFit.fill,
height: 25,
fit: BoxFit.none,
height: 30,
),
),
),
const SizedBox(
width: 10,
width: 8,
),
Expanded(
flex: isUpdate == true ? 3 : 6,
flex: isUpdate == true ? 5 : 10,
child: BodyMedium(
text: text!,
fontSize: 15,
@@ -447,12 +462,21 @@ class SettingWidget extends StatelessWidget {
fontColor: ColorsManager.blueColor,
),
)
: const SizedBox(),
const Icon(
Icons.arrow_forward_ios,
color: ColorsManager.graysColor,
size: 20,
)
: SizedBox(),
isNotification == false
? const Icon(
Icons.arrow_forward_ios,
color: ColorsManager.graysColor,
size: 20,
)
: Transform.scale(
scale: .8,
child: CupertinoSwitch(
value: true,
onChanged: onChanged,
applyTheme: true,
),
),
],
),
);