mirror of
https://github.com/SyncrowIOT/syncrow-app.git
synced 2025-07-15 17:47:28 +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.
103 lines
3.4 KiB
Dart
103 lines
3.4 KiB
Dart
import 'package:flutter/material.dart';
|
|
import 'package:flutter_svg/flutter_svg.dart';
|
|
import 'package:syncrow_app/features/dashboard/view/widgets/card_title.dart';
|
|
import 'package:syncrow_app/features/shared_widgets/text_widgets/body_small.dart';
|
|
import 'package:syncrow_app/features/shared_widgets/united_text.dart';
|
|
import 'package:syncrow_app/generated/assets.dart';
|
|
import 'package:syncrow_app/utils/resource_manager/strings_manager.dart';
|
|
|
|
class CarbonEmission extends StatelessWidget {
|
|
const CarbonEmission({
|
|
super.key,
|
|
});
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return Container(
|
|
padding: const EdgeInsets.only(right: 20, left: 20, top: 10),
|
|
decoration: BoxDecoration(
|
|
color: Colors.white,
|
|
borderRadius: BorderRadius.circular(20),
|
|
),
|
|
constraints: const BoxConstraints(
|
|
minHeight: 80,
|
|
maxHeight: 100,
|
|
),
|
|
child: Column(
|
|
mainAxisAlignment: MainAxisAlignment.start,
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
children: [
|
|
const CardTitle(
|
|
title: "Carbon Emission",
|
|
),
|
|
const SizedBox(height: 10),
|
|
Row(
|
|
mainAxisAlignment: MainAxisAlignment.start,
|
|
children: [
|
|
Row(
|
|
mainAxisAlignment: MainAxisAlignment.start,
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
children: [
|
|
SizedBox.square(
|
|
dimension: 30,
|
|
child: SvgPicture.asset(
|
|
Assets.assetsIconsCO2,
|
|
fit: BoxFit.contain,
|
|
),
|
|
),
|
|
const SizedBox(height: 5),
|
|
const Column(
|
|
mainAxisAlignment: MainAxisAlignment.start,
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
children: [
|
|
BodySmall(
|
|
text: StringsManager.emissions,
|
|
),
|
|
UnitedText(
|
|
value: '120.00',
|
|
valueSize: 14,
|
|
unit: 'kg',
|
|
unitSize: 10,
|
|
),
|
|
],
|
|
),
|
|
],
|
|
),
|
|
const SizedBox(width: 20),
|
|
Row(
|
|
mainAxisAlignment: MainAxisAlignment.start,
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
children: [
|
|
SizedBox.square(
|
|
dimension: 30,
|
|
child: SvgPicture.asset(
|
|
Assets.assetsIconsSustainability,
|
|
fit: BoxFit.contain,
|
|
),
|
|
),
|
|
const SizedBox(width: 5),
|
|
const Column(
|
|
mainAxisAlignment: MainAxisAlignment.start,
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
children: [
|
|
BodySmall(
|
|
text: StringsManager.reductions,
|
|
),
|
|
UnitedText(
|
|
value: '20.00',
|
|
valueSize: 14,
|
|
unit: 'kg',
|
|
unitSize: 10,
|
|
),
|
|
],
|
|
),
|
|
],
|
|
),
|
|
],
|
|
)
|
|
],
|
|
),
|
|
);
|
|
}
|
|
}
|