mirror of
https://github.com/SyncrowIOT/syncrow-app.git
synced 2025-07-15 17:47:28 +00:00
78 lines
2.5 KiB
Dart
78 lines
2.5 KiB
Dart
import 'package:flutter/material.dart';
|
|
import 'package:flutter_svg/flutter_svg.dart';
|
|
import 'package:syncrow_app/features/scene/model/scene_settings_route_arguments.dart';
|
|
import 'package:syncrow_app/features/scene/widgets/create_scene_save_button.dart';
|
|
import 'package:syncrow_app/features/scene/widgets/if_then_containers/if_container.dart';
|
|
import 'package:syncrow_app/features/scene/widgets/if_then_containers/then_container.dart';
|
|
import 'package:syncrow_app/features/shared_widgets/default_scaffold.dart';
|
|
import 'package:syncrow_app/generated/assets.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/strings_manager.dart';
|
|
|
|
class SceneTasksView extends StatelessWidget {
|
|
const SceneTasksView({super.key});
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
final sceneSettings = ModalRoute.of(context)!.settings.arguments
|
|
as SceneSettingsRouteArguments;
|
|
return DefaultScaffold(
|
|
title: sceneSettings.sceneName.isNotEmpty
|
|
? sceneSettings.sceneName
|
|
: StringsManager.createScene,
|
|
padding: EdgeInsets.zero,
|
|
actions: [
|
|
SizedBox(
|
|
width: 40,
|
|
child: GestureDetector(
|
|
child: SvgPicture.asset(
|
|
Assets.assetsIconsSettings,
|
|
colorFilter: const ColorFilter.mode(
|
|
ColorsManager.textPrimaryColor,
|
|
BlendMode.srcIn,
|
|
),
|
|
),
|
|
),
|
|
),
|
|
],
|
|
child: Stack(
|
|
children: [
|
|
SingleChildScrollView(
|
|
child: Column(
|
|
mainAxisSize: MainAxisSize.min,
|
|
children: [
|
|
const SizedBox(
|
|
height: 24,
|
|
),
|
|
// IF
|
|
const IFDefaultContainer(),
|
|
const SizedBox(
|
|
height: 8,
|
|
),
|
|
// THEN
|
|
ThenDefaultContainer(sceneId: sceneSettings.sceneId),
|
|
const SizedBox(
|
|
height: 100,
|
|
),
|
|
],
|
|
),
|
|
),
|
|
Positioned(
|
|
bottom: 16,
|
|
right: 40,
|
|
left: 40,
|
|
child: SizedBox(
|
|
width: context.width * 0.8,
|
|
child: CreateSceneSaveButton(
|
|
sceneName: sceneSettings.sceneName,
|
|
sceneId: sceneSettings.sceneId,
|
|
),
|
|
),
|
|
)
|
|
],
|
|
),
|
|
);
|
|
}
|
|
}
|