mirror of
https://github.com/SyncrowIOT/syncrow-app.git
synced 2026-10-23 10:37:56 +00:00
Added SmartLinkage page
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_svg/flutter_svg.dart';
|
||||
import 'package:syncrow_app/features/devices/view/widgets/smart_door/members_management_view.dart';
|
||||
import 'package:syncrow_app/features/devices/view/widgets/smart_door/smart_linkage_view.dart';
|
||||
import 'package:syncrow_app/features/devices/view/widgets/smart_door/unlocking_records_view.dart';
|
||||
import 'package:syncrow_app/features/shared_widgets/default_container.dart';
|
||||
import 'package:syncrow_app/features/shared_widgets/text_widgets/body_small.dart';
|
||||
@@ -84,6 +85,6 @@ List<Map<String, dynamic>> doorLockButtons = [
|
||||
{
|
||||
'title': 'Smart Linkage',
|
||||
'image': Assets.doorlockAssetsSmartLinkage,
|
||||
'page': null,
|
||||
'page': const SmartLinkgeView()
|
||||
},
|
||||
];
|
||||
|
||||
@@ -0,0 +1,97 @@
|
||||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/widgets.dart';
|
||||
import 'package:flutter_svg/flutter_svg.dart';
|
||||
import 'package:syncrow_app/features/shared_widgets/default_container.dart';
|
||||
import 'package:syncrow_app/features/shared_widgets/default_scaffold.dart';
|
||||
import 'package:syncrow_app/features/shared_widgets/text_widgets/body_large.dart';
|
||||
import 'package:syncrow_app/features/shared_widgets/text_widgets/body_small.dart';
|
||||
import 'package:syncrow_app/generated/assets.dart';
|
||||
|
||||
class SmartLinkgeView extends StatelessWidget {
|
||||
const SmartLinkgeView({super.key});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return DefaultScaffold(
|
||||
title: 'Scene',
|
||||
child: Column(
|
||||
children: [
|
||||
DefaultContainer(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 15, vertical: 20),
|
||||
child: Row(
|
||||
children: [
|
||||
SizedBox(
|
||||
width: 45,
|
||||
height: 40,
|
||||
child: SvgPicture.asset(Assets.linkageIconsFamilyHome),
|
||||
),
|
||||
const SizedBox(width: 15),
|
||||
const Expanded(
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
BodyLarge(
|
||||
text: 'Family go home',
|
||||
fontWeight: FontWeight.bold,
|
||||
),
|
||||
BodySmall(
|
||||
text: 'Trigger linkage when family member go home.',
|
||||
)
|
||||
],
|
||||
),
|
||||
),
|
||||
const SizedBox(width: 10),
|
||||
Transform.scale(
|
||||
scale: 1,
|
||||
child: CupertinoSwitch(
|
||||
value: false,
|
||||
onChanged: (value) {},
|
||||
applyTheme: true,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
const SizedBox(height: 10),
|
||||
DefaultContainer(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 15, vertical: 20),
|
||||
child: Row(
|
||||
children: [
|
||||
SizedBox(
|
||||
width: 45,
|
||||
height: 40,
|
||||
child: SvgPicture.asset(Assets.linkageIconsDoorLockAlarm),
|
||||
),
|
||||
const SizedBox(width: 15),
|
||||
const Expanded(
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
BodyLarge(
|
||||
text: 'Door Lock Alarm',
|
||||
fontWeight: FontWeight.bold,
|
||||
),
|
||||
BodySmall(
|
||||
text: 'When door lock alarms, trigger linkage.',
|
||||
)
|
||||
],
|
||||
),
|
||||
),
|
||||
const SizedBox(width: 10),
|
||||
Transform.scale(
|
||||
scale: 1,
|
||||
child: CupertinoSwitch(
|
||||
value: false,
|
||||
onChanged: (value) {},
|
||||
applyTheme: true,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -30,6 +30,7 @@ class CustomText extends StatelessWidget {
|
||||
Widget build(BuildContext context) {
|
||||
//was SelectableText
|
||||
return Text(
|
||||
softWrap: true,
|
||||
text,
|
||||
style: style,
|
||||
textAlign: textAlign,
|
||||
|
||||
@@ -158,6 +158,10 @@ class Assets {
|
||||
static const String imagesTestDash2 = 'assets/images/test_dash2.png';
|
||||
static const String imagesVector = 'assets/images/Vector.png';
|
||||
static const String imagesWhiteLogo = 'assets/images/white-logo.png';
|
||||
static const String linkageIconsDoorLockAlarm =
|
||||
'assets/icons/linkageIcons/doorLockAlarm.svg';
|
||||
static const String linkageIconsFamilyHome =
|
||||
'assets/icons/linkageIcons/familyHome.svg';
|
||||
static const String presenceSensorAssetsDistance =
|
||||
'assets/icons/presence-sensor-assets/Distance.svg';
|
||||
static const String presenceSensorAssetsEmpty =
|
||||
|
||||
Reference in New Issue
Block a user