mirror of
https://github.com/SyncrowIOT/syncrow-app.git
synced 2026-10-25 16:07:54 +00:00
connected all apis , create functionality is working
This commit is contained in:
@@ -35,7 +35,7 @@ class CreateSceneView extends StatelessWidget {
|
||||
Routes.sceneTasksRoute,
|
||||
arguments: CreateSceneEnum.tabToRun,
|
||||
);
|
||||
context.read<CreateSceneBloc>().tasksList.clear();
|
||||
context.read<CreateSceneBloc>().add(ClearTaskListEvent());
|
||||
},
|
||||
),
|
||||
DefaultContainer(
|
||||
@@ -53,3 +53,5 @@ class CreateSceneView extends StatelessWidget {
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -3,11 +3,11 @@ import 'package:flutter_bloc/flutter_bloc.dart';
|
||||
import 'package:syncrow_app/features/devices/model/device_control_model.dart';
|
||||
import 'package:syncrow_app/features/devices/model/device_model.dart';
|
||||
import 'package:syncrow_app/features/scene/bloc/create_scene/create_scene_bloc.dart';
|
||||
import 'package:syncrow_app/features/scene/helper/scene_helper.dart';
|
||||
import 'package:syncrow_app/features/scene/helper/scene_operations_data_helper.dart';
|
||||
import 'package:syncrow_app/features/scene/model/scene_static_function.dart';
|
||||
import 'package:syncrow_app/features/scene/widgets/alert_dialog_countdown.dart';
|
||||
import 'package:syncrow_app/features/scene/widgets/alert_dialog_functions_body.dart';
|
||||
import 'package:syncrow_app/features/scene/widgets/alert_dialog_temperature_body.dart';
|
||||
import 'package:syncrow_app/features/scene/widgets/alert_dialogs/alert_dialog_countdown.dart';
|
||||
import 'package:syncrow_app/features/scene/widgets/alert_dialogs/alert_dialog_functions_body.dart';
|
||||
import 'package:syncrow_app/features/scene/widgets/alert_dialogs/alert_dialog_temperature_body.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/default_scaffold.dart';
|
||||
@@ -18,12 +18,13 @@ import 'package:syncrow_app/utils/context_extension.dart';
|
||||
|
||||
import 'package:syncrow_app/utils/resource_manager/color_manager.dart';
|
||||
|
||||
class DeviceFunctionsView extends StatelessWidget with SceneHelper {
|
||||
class DeviceFunctionsView extends StatelessWidget
|
||||
with SceneOperationsDataHelper {
|
||||
const DeviceFunctionsView({super.key});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
/// this whole widget i need to revamp it later
|
||||
/// this whole widget needs a refactor later
|
||||
///
|
||||
/// static functions based on type
|
||||
final device = ModalRoute.of(context)?.settings.arguments as DeviceModel;
|
||||
|
||||
@@ -1,10 +1,9 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_svg/flutter_svg.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_button.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/generated/assets.dart';
|
||||
import 'package:syncrow_app/utils/context_extension.dart';
|
||||
import 'package:syncrow_app/utils/resource_manager/color_manager.dart';
|
||||
@@ -60,18 +59,7 @@ class SceneTasksView extends StatelessWidget {
|
||||
left: 40,
|
||||
child: SizedBox(
|
||||
width: context.width * 0.8,
|
||||
child: DefaultButton(
|
||||
onPressed: () {},
|
||||
customButtonStyle: ButtonStyle(
|
||||
backgroundColor: WidgetStateProperty.all<Color>(
|
||||
ColorsManager.primaryColorWithOpacity,
|
||||
),
|
||||
),
|
||||
child: BodyLarge(
|
||||
text: 'Save',
|
||||
style: context.bodyLarge.copyWith(color: Colors.white),
|
||||
),
|
||||
),
|
||||
child: const CreateSceneSaveButton(),
|
||||
),
|
||||
)
|
||||
],
|
||||
|
||||
@@ -48,8 +48,10 @@ class SceneView extends StatelessWidget {
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Row(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
crossAxisAlignment:
|
||||
CrossAxisAlignment.start,
|
||||
mainAxisAlignment:
|
||||
MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Image.asset(
|
||||
height: 50,
|
||||
@@ -85,8 +87,10 @@ class SceneView extends StatelessWidget {
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Row(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
crossAxisAlignment:
|
||||
CrossAxisAlignment.start,
|
||||
mainAxisAlignment:
|
||||
MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Image.asset(
|
||||
height: 50,
|
||||
|
||||
Reference in New Issue
Block a user