mirror of
https://github.com/SyncrowIOT/syncrow-app.git
synced 2025-11-27 02:44:55 +00:00
sos
This commit is contained in:
4
assets/icons/edit_name_sos_icon.svg
Normal file
4
assets/icons/edit_name_sos_icon.svg
Normal 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 |
@ -80,7 +80,7 @@ class SosProfilePage extends StatelessWidget {
|
|||||||
child: TextFormField(
|
child: TextFormField(
|
||||||
maxLength: 30,
|
maxLength: 30,
|
||||||
style: const TextStyle(
|
style: const TextStyle(
|
||||||
color: Colors.black,
|
color: ColorsManager.textPrimaryColor,
|
||||||
),
|
),
|
||||||
textAlign: TextAlign.center,
|
textAlign: TextAlign.center,
|
||||||
focusNode: sensor.focusNode,
|
focusNode: sensor.focusNode,
|
||||||
@ -99,17 +99,21 @@ class SosProfilePage extends StatelessWidget {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
const SizedBox(width: 5),
|
const SizedBox(width: 5),
|
||||||
|
//editNameSosIcon
|
||||||
InkWell(
|
InkWell(
|
||||||
onTap: () {
|
onTap: () {
|
||||||
sensor
|
sensor
|
||||||
.add(const ChangeNameEvent(value: true));
|
.add(const ChangeNameEvent(value: true));
|
||||||
},
|
},
|
||||||
child: const Padding(
|
child: Padding(
|
||||||
padding: EdgeInsets.symmetric(horizontal: 10),
|
padding:
|
||||||
child: Icon(
|
const EdgeInsets.symmetric(horizontal: 5),
|
||||||
Icons.edit_outlined,
|
child: SvgPicture.asset(
|
||||||
size: 20,
|
height: 18,
|
||||||
color: ColorsManager.textPrimaryColor,
|
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/material.dart';
|
||||||
import 'package:flutter_bloc/flutter_bloc.dart';
|
import 'package:flutter_bloc/flutter_bloc.dart';
|
||||||
import 'package:flutter_svg/flutter_svg.dart';
|
import 'package:flutter_svg/flutter_svg.dart';
|
||||||
@ -100,7 +101,10 @@ class SosSettings extends StatelessWidget {
|
|||||||
text: "Room: Syncrow"),
|
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,
|
fontColor: ColorsManager.grayColor,
|
||||||
),
|
),
|
||||||
DefaultContainer(
|
DefaultContainer(
|
||||||
child: SettingWidget(
|
child: Column(
|
||||||
|
children: [
|
||||||
|
SettingWidget(
|
||||||
|
onChanged: (p0) {},
|
||||||
|
isNotification: true,
|
||||||
onTap: () {},
|
onTap: () {},
|
||||||
text: 'Offline Notification',
|
text: 'Offline Notification',
|
||||||
icon: Assets.notificationIcon,
|
icon: Assets.notificationIcon,
|
||||||
),
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
),
|
),
|
||||||
const SizedBox(height: 20),
|
const SizedBox(height: 20),
|
||||||
const BodyMedium(
|
const BodyMedium(
|
||||||
@ -390,15 +400,19 @@ class SosSettings extends StatelessWidget {
|
|||||||
class SettingWidget extends StatelessWidget {
|
class SettingWidget extends StatelessWidget {
|
||||||
final String? text;
|
final String? text;
|
||||||
final bool? isUpdate;
|
final bool? isUpdate;
|
||||||
|
final bool? isNotification;
|
||||||
final String? icon;
|
final String? icon;
|
||||||
final Function()? onTap;
|
final Function()? onTap;
|
||||||
final Function()? onTapUpdate;
|
final Function()? onTapUpdate;
|
||||||
|
final Function(bool)? onChanged;
|
||||||
const SettingWidget(
|
const SettingWidget(
|
||||||
{super.key,
|
{super.key,
|
||||||
this.text,
|
this.text,
|
||||||
this.icon,
|
this.icon,
|
||||||
this.onTap,
|
this.onTap,
|
||||||
this.isUpdate,
|
this.isUpdate,
|
||||||
|
this.onChanged,
|
||||||
|
this.isNotification = false,
|
||||||
this.onTapUpdate});
|
this.onTapUpdate});
|
||||||
|
|
||||||
@override
|
@override
|
||||||
@ -412,23 +426,24 @@ class SettingWidget extends StatelessWidget {
|
|||||||
child: Row(
|
child: Row(
|
||||||
children: [
|
children: [
|
||||||
Expanded(
|
Expanded(
|
||||||
|
flex: 2,
|
||||||
child: Container(
|
child: Container(
|
||||||
padding: EdgeInsets.all(10),
|
padding: EdgeInsets.all(8),
|
||||||
decoration: const BoxDecoration(
|
decoration: const BoxDecoration(
|
||||||
color: ColorsManager.primaryColor,
|
color: ColorsManager.primaryColor,
|
||||||
borderRadius: BorderRadius.all(Radius.circular(50))),
|
borderRadius: BorderRadius.all(Radius.circular(20))),
|
||||||
child: SvgPicture.asset(
|
child: SvgPicture.asset(
|
||||||
icon!,
|
icon!,
|
||||||
fit: BoxFit.fill,
|
fit: BoxFit.none,
|
||||||
height: 25,
|
height: 30,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
const SizedBox(
|
const SizedBox(
|
||||||
width: 10,
|
width: 8,
|
||||||
),
|
),
|
||||||
Expanded(
|
Expanded(
|
||||||
flex: isUpdate == true ? 3 : 6,
|
flex: isUpdate == true ? 5 : 10,
|
||||||
child: BodyMedium(
|
child: BodyMedium(
|
||||||
text: text!,
|
text: text!,
|
||||||
fontSize: 15,
|
fontSize: 15,
|
||||||
@ -447,12 +462,21 @@ class SettingWidget extends StatelessWidget {
|
|||||||
fontColor: ColorsManager.blueColor,
|
fontColor: ColorsManager.blueColor,
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
: const SizedBox(),
|
: SizedBox(),
|
||||||
const Icon(
|
isNotification == false
|
||||||
|
? const Icon(
|
||||||
Icons.arrow_forward_ios,
|
Icons.arrow_forward_ios,
|
||||||
color: ColorsManager.graysColor,
|
color: ColorsManager.graysColor,
|
||||||
size: 20,
|
size: 20,
|
||||||
)
|
)
|
||||||
|
: Transform.scale(
|
||||||
|
scale: .8,
|
||||||
|
child: CupertinoSwitch(
|
||||||
|
value: true,
|
||||||
|
onChanged: onChanged,
|
||||||
|
applyTheme: true,
|
||||||
|
),
|
||||||
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
|||||||
@ -1107,6 +1107,7 @@ class Assets {
|
|||||||
static const String emptyUpdateIcon = "assets/icons/empty_update_icon.svg";
|
static const String emptyUpdateIcon = "assets/icons/empty_update_icon.svg";
|
||||||
static const String checkUpdateIcon = "assets/icons/check_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 sosDevice = "assets/icons/sos_device.svg";
|
||||||
|
static const String editNameSosIcon = "assets/icons/edit_name_sos_icon.svg";
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user