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.
65 lines
1.8 KiB
65 lines
1.8 KiB
import 'package:flutter/material.dart';
|
|
import 'package:smartfit_app_mobile/common/colo_extension.dart';
|
|
import 'package:smartfit_app_mobile/common_widget/stats.dart';
|
|
|
|
class ContainerStats extends StatelessWidget {
|
|
const ContainerStats(this.value, this.designation, this.icon, {Key? key})
|
|
: super(key: key);
|
|
|
|
final String value;
|
|
final String designation;
|
|
final IconData icon;
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return Container(
|
|
height: 100,
|
|
width: 100,
|
|
padding: const EdgeInsets.all(8),
|
|
margin: const EdgeInsets.symmetric(vertical: 5),
|
|
decoration: BoxDecoration(
|
|
color: Colors.white,
|
|
borderRadius: BorderRadius.circular(15),
|
|
border: Border.all(
|
|
color: const Color(0xffe1e1e1),
|
|
),
|
|
boxShadow: const [
|
|
BoxShadow(
|
|
color: Colors.black12,
|
|
offset: Offset(3, 3),
|
|
blurRadius: 3,
|
|
),
|
|
]),
|
|
child: Stack(
|
|
children: [
|
|
StatIcon(
|
|
icon: icon,
|
|
iconColor: TColor.white,
|
|
iconBackground: TColor.secondaryColor1,
|
|
),
|
|
Align(
|
|
alignment: Alignment.bottomLeft,
|
|
child: Column(
|
|
mainAxisSize: MainAxisSize.min,
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
children: [
|
|
Text(
|
|
designation,
|
|
style: const TextStyle(fontSize: 10),
|
|
),
|
|
Text(
|
|
value,
|
|
style: const TextStyle(
|
|
fontSize: 16,
|
|
fontWeight: FontWeight.w800,
|
|
),
|
|
),
|
|
],
|
|
),
|
|
)
|
|
],
|
|
),
|
|
);
|
|
}
|
|
}
|