mirror of
https://github.com/SyncrowIOT/syncrow-app.git
synced 2025-07-16 18:16:21 +00:00
67 lines
2.5 KiB
Dart
67 lines
2.5 KiB
Dart
import 'package:flutter/material.dart';
|
|
import 'package:syncrow_app/features/scene/view/scene_tasks_view.dart';
|
|
import 'package:syncrow_app/features/scene/widgets/effective_period_setting/effective_period_bottom_sheet.dart';
|
|
import 'package:syncrow_app/features/scene/widgets/scene_list_tile.dart';
|
|
import 'package:syncrow_app/features/shared_widgets/default_container.dart';
|
|
import 'package:syncrow_app/features/shared_widgets/text_widgets/body_large.dart';
|
|
import 'package:syncrow_app/utils/context_extension.dart';
|
|
import 'package:syncrow_app/utils/resource_manager/color_manager.dart';
|
|
import 'package:syncrow_app/utils/resource_manager/font_manager.dart';
|
|
|
|
class SceneAutoSettings extends StatelessWidget {
|
|
const SceneAutoSettings({super.key});
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
final sceneSettings =
|
|
ModalRoute.of(context)!.settings.arguments as Map<String, dynamic>? ??
|
|
{};
|
|
final sceneId = sceneSettings['sceneId'] as String? ?? '';
|
|
final isAutomation = sceneSettings['isAutomation'] as bool? ?? false;
|
|
final sceneName = sceneSettings['sceneName'] as String? ?? '';
|
|
|
|
return Scaffold(
|
|
backgroundColor: ColorsManager.backgroundColor,
|
|
appBar: AppBar(
|
|
centerTitle: true,
|
|
backgroundColor: ColorsManager.backgroundColor,
|
|
title: const BodyLarge(
|
|
text: "Settings",
|
|
fontColor: ColorsManager.secondaryColor,
|
|
fontWeight: FontsManager.bold,
|
|
),
|
|
),
|
|
body: DefaultContainer(
|
|
padding: EdgeInsets.zero,
|
|
child: Column(
|
|
mainAxisSize: MainAxisSize.min,
|
|
mainAxisAlignment: MainAxisAlignment.center,
|
|
children: [
|
|
Visibility(
|
|
visible: isAutomation == true,
|
|
child: SceneListTile(
|
|
padding:
|
|
const EdgeInsets.symmetric(horizontal: 16, vertical: 8),
|
|
titleString: "Effective Period",
|
|
trailingWidget: const Icon(Icons.arrow_forward_ios_rounded),
|
|
onPressed: () {
|
|
context.customBottomSheet(
|
|
child: const EffectPeriodBottomSheetContent(),
|
|
);
|
|
},
|
|
),
|
|
),
|
|
Visibility(
|
|
visible: sceneName.isNotEmpty,
|
|
child: DeleteBottomSheetContent(
|
|
isAutomation: isAutomation,
|
|
sceneId: sceneId,
|
|
),
|
|
),
|
|
],
|
|
),
|
|
),
|
|
);
|
|
}
|
|
}
|