mirror of
https://github.com/SyncrowIOT/syncrow-app.git
synced 2025-07-16 01:56:19 +00:00

changed the method of generating assets to be more declrative when it comes to names of the assets. it now include the file path name e.g (asset in the path "assets/images/home-images/home.png" will be generated as this "String assetsImagesHomeImageshome = "path" ". this will be very helpful in the future when we want to orgnize the assets dir.
119 lines
4.6 KiB
Dart
119 lines
4.6 KiB
Dart
import 'package:flutter/material.dart';
|
|
import 'package:flutter_bloc/flutter_bloc.dart';
|
|
import 'package:syncrow_app/features/scene/bloc/scene_cubit.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) => SceneCubit(),
|
|
child: BlocBuilder<SceneCubit, SceneState>(
|
|
builder: (context, state) {
|
|
return 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,
|
|
)
|
|
],
|
|
),
|
|
),
|
|
),
|
|
),
|
|
],
|
|
)
|
|
],
|
|
);
|
|
},
|
|
),
|
|
);
|
|
}
|
|
}
|