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

View File

@ -0,0 +1,4 @@
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M14.3258 4.08383C15.0587 3.35098 15.0585 2.16495 14.3258 1.43217L13.4419 0.548297C12.7108 -0.182766 11.5213 -0.182766 10.7902 0.548297L2.54069 8.79789C2.06572 9.27286 1.75181 9.90067 1.65681 10.5656L1.21484 13.6592L4.30847 13.2173C4.97341 13.1223 5.60122 12.8084 6.07619 12.3334L14.3258 4.08383ZM4.16112 8.9452L9.46444 3.64189L11.2322 5.40964L5.92891 10.713L4.16112 8.9452ZM2.688 12.1861L2.89425 10.7425C2.94141 10.4125 3.07863 10.0979 3.28581 9.83764L5.0365 11.5883C4.77628 11.7955 4.46172 11.9327 4.13172 11.9799L2.688 12.1861ZM13.4419 3.19992L12.1161 4.52577L10.3483 2.75802L11.6742 1.4322C11.9178 1.18852 12.3143 1.18852 12.558 1.4322L13.4419 2.31608C13.6862 2.56039 13.6861 2.95577 13.4419 3.19992Z" fill="#D5D5D5"/>
<path d="M0 14.749H16V15.999H0V14.749Z" fill="#D5D5D5"/>
</svg>

After

Width:  |  Height:  |  Size: 891 B

View File

@ -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,
),
),
),

View File

@ -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,11 +161,17 @@ class SosSettings extends StatelessWidget {
fontColor: ColorsManager.grayColor,
),
DefaultContainer(
child: SettingWidget(
child: Column(
children: [
SettingWidget(
onChanged: (p0) {},
isNotification: true,
onTap: () {},
text: 'Offline Notification',
icon: Assets.notificationIcon,
),
],
),
),
const SizedBox(height: 20),
const BodyMedium(
@ -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(
: 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,
),
),
],
),
);

View File

@ -1107,6 +1107,7 @@ class Assets {
static const String emptyUpdateIcon = "assets/icons/empty_update_icon.svg";
static const String checkUpdateIcon = "assets/icons/check_update_icon.svg";
static const String sosDevice = "assets/icons/sos_device.svg";
static const String editNameSosIcon = "assets/icons/edit_name_sos_icon.svg";
}