You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
72 lines
2.0 KiB
72 lines
2.0 KiB
import 'package:flutter_svg/flutter_svg.dart';
|
|
import 'package:smartfit_app_mobile/common/colo_extension.dart';
|
|
import 'package:flutter/material.dart';
|
|
|
|
class TodayTargetCell extends StatelessWidget {
|
|
final String icon;
|
|
final String value;
|
|
final String title;
|
|
const TodayTargetCell(
|
|
{super.key,
|
|
required this.icon,
|
|
required this.value,
|
|
required this.title});
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return Container(
|
|
height: 70,
|
|
padding: const EdgeInsets.all(8),
|
|
decoration: BoxDecoration(
|
|
color: TColor.white,
|
|
borderRadius: BorderRadius.circular(15),
|
|
),
|
|
child: Row(
|
|
children: [
|
|
SvgPicture.asset(
|
|
icon,
|
|
width: 40,
|
|
height: 40,
|
|
),
|
|
const SizedBox(
|
|
width: 8,
|
|
),
|
|
Expanded(
|
|
child: Column(
|
|
mainAxisAlignment: MainAxisAlignment.center,
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
children: [
|
|
ShaderMask(
|
|
blendMode: BlendMode.srcIn,
|
|
shaderCallback: (bounds) {
|
|
return LinearGradient(
|
|
colors: TColor.primaryG,
|
|
begin: Alignment.centerLeft,
|
|
end: Alignment.centerRight)
|
|
.createShader(
|
|
Rect.fromLTRB(0, 0, bounds.width, bounds.height));
|
|
},
|
|
child: Text(
|
|
value,
|
|
style: TextStyle(
|
|
color: TColor.white.withOpacity(0.7),
|
|
fontWeight: FontWeight.w700,
|
|
fontSize: 14),
|
|
),
|
|
),
|
|
Text(
|
|
title,
|
|
style: TextStyle(
|
|
color: TColor.black,
|
|
fontSize: 12,
|
|
),
|
|
),
|
|
],
|
|
))
|
|
],
|
|
),
|
|
);
|
|
}
|
|
}
|
|
|