mirror of
https://github.com/SyncrowIOT/syncrow-app.git
synced 2025-07-15 17:47:28 +00:00
123 lines
5.4 KiB
Dart
123 lines
5.4 KiB
Dart
import 'package:flutter/material.dart';
|
|
import 'package:flutter_bloc/flutter_bloc.dart';
|
|
import 'package:syncrow_app/features/app_layout/bloc/home_cubit.dart';
|
|
import 'package:syncrow_app/features/scene/bloc/scene_bloc/scene_bloc.dart';
|
|
import 'package:syncrow_app/features/shared_widgets/create_unit.dart';
|
|
import 'package:syncrow_app/features/shared_widgets/default_container.dart';
|
|
import 'package:syncrow_app/features/shared_widgets/text_widgets/body_medium.dart';
|
|
import 'package:syncrow_app/features/shared_widgets/text_widgets/body_small.dart';
|
|
import 'package:syncrow_app/features/shared_widgets/text_widgets/title_medium.dart';
|
|
import 'package:syncrow_app/generated/assets.dart';
|
|
import 'package:syncrow_app/utils/resource_manager/strings_manager.dart';
|
|
|
|
class SceneView extends StatelessWidget {
|
|
const SceneView({super.key});
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return BlocProvider(
|
|
create: (BuildContext context) => SceneBloc(),
|
|
child: BlocBuilder<SceneBloc, SceneState>(
|
|
builder: (context, state) {
|
|
return HomeCubit.getInstance().spaces?.isEmpty ?? true
|
|
? const CreateUnitWidget()
|
|
: Column(
|
|
mainAxisAlignment: MainAxisAlignment.start,
|
|
crossAxisAlignment: CrossAxisAlignment.stretch,
|
|
children: [
|
|
const TitleMedium(
|
|
text: StringsManager.routine,
|
|
style: TextStyle(
|
|
fontSize: 32,
|
|
fontWeight: FontWeight.bold,
|
|
),
|
|
),
|
|
const SizedBox(height: 20),
|
|
const BodySmall(
|
|
text: StringsManager.tapToRunRoutine,
|
|
),
|
|
Row(
|
|
children: [
|
|
Expanded(
|
|
child: Padding(
|
|
padding: const EdgeInsets.symmetric(
|
|
vertical: 10,
|
|
),
|
|
child: DefaultContainer(
|
|
child: Column(
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
children: [
|
|
Row(
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
children: [
|
|
Image.asset(
|
|
height: 50,
|
|
width: 50,
|
|
Assets.assetsIconsHot1,
|
|
fit: BoxFit.contain,
|
|
),
|
|
const Icon(
|
|
Icons.play_circle,
|
|
size: 40,
|
|
color: Colors.grey,
|
|
)
|
|
],
|
|
),
|
|
const BodyMedium(
|
|
text: StringsManager.summerMode,
|
|
fontWeight: FontWeight.bold,
|
|
fontSize: 16,
|
|
)
|
|
],
|
|
),
|
|
),
|
|
),
|
|
),
|
|
const SizedBox(width: 10),
|
|
Expanded(
|
|
child: Padding(
|
|
padding: const EdgeInsets.symmetric(
|
|
vertical: 10,
|
|
),
|
|
child: DefaultContainer(
|
|
child: Column(
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
children: [
|
|
Row(
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
children: [
|
|
Image.asset(
|
|
height: 50,
|
|
width: 50,
|
|
Assets.assetsIconsWinter1,
|
|
fit: BoxFit.contain,
|
|
),
|
|
const Icon(
|
|
Icons.play_circle,
|
|
size: 40,
|
|
color: Colors.grey,
|
|
)
|
|
],
|
|
),
|
|
const BodyMedium(
|
|
text: StringsManager.winterMode,
|
|
fontWeight: FontWeight.bold,
|
|
fontSize: 16,
|
|
)
|
|
],
|
|
),
|
|
),
|
|
),
|
|
),
|
|
],
|
|
)
|
|
],
|
|
);
|
|
},
|
|
),
|
|
);
|
|
}
|
|
}
|