Files
syncrow-app/lib/features/scene/view/scene_add_tasks.dart
2024-06-25 10:38:39 +03:00

87 lines
2.8 KiB
Dart

import 'package:flutter/material.dart';
import 'package:flutter_bloc/flutter_bloc.dart';
import 'package:flutter_svg/flutter_svg.dart';
import 'package:syncrow_app/features/scene/bloc/create_scene/create_scene_bloc.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';
import 'package:syncrow_app/utils/resource_manager/strings_manager.dart';
class SceneAddTasksView extends StatelessWidget {
const SceneAddTasksView({super.key});
@override
Widget build(BuildContext context) {
return DefaultScaffold(
title: 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: BlocProvider(
create: (context) => CreateSceneBloc(),
child: const Column(
mainAxisSize: MainAxisSize.min,
children: [
SizedBox(
height: 24,
),
// IF
IFDefaultContainer(),
SizedBox(
height: 8,
),
// THEN
ThenDefaultContainer(),
SizedBox(
height: 100,
),
],
),
),
),
Positioned(
bottom: 16,
right: 40,
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),
),
),
),
)
],
),
);
}
}