Files
syncrow-app/lib/features/scene/view/scene_view.dart
Mohammad Salameh fbe2f5fe53 !! BIG CHANGE TO ASSETS GEN !!
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.
2024-05-07 12:26:12 +03:00

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,
)
],
),
),
),
),
],
)
],
);
},
),
);
}
}