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.
89 lines
2.7 KiB
89 lines
2.7 KiB
import 'package:flutter_svg/svg.dart';
|
|
import 'package:smartfit_app_mobile/common/colo_extension.dart';
|
|
import 'package:flutter/material.dart';
|
|
|
|
class WorkoutRow extends StatelessWidget {
|
|
final Map wObj;
|
|
final VoidCallback onDelete;
|
|
final VoidCallback onClick;
|
|
const WorkoutRow(
|
|
{Key? key,
|
|
required this.wObj,
|
|
required this.onDelete,
|
|
required this.onClick})
|
|
: super(key: key);
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
var media = MediaQuery.of(context).size;
|
|
return Container(
|
|
margin: const EdgeInsets.symmetric(vertical: 8, horizontal: 2),
|
|
padding: const EdgeInsets.symmetric(vertical: 15, horizontal: 15),
|
|
decoration: BoxDecoration(
|
|
color: TColor.white,
|
|
borderRadius: BorderRadius.circular(20),
|
|
boxShadow: const [BoxShadow(color: Colors.black12, blurRadius: 2)],
|
|
),
|
|
child: Row(
|
|
children: [
|
|
ClipRRect(
|
|
borderRadius: BorderRadius.circular(30),
|
|
child: SvgPicture.asset(
|
|
wObj["image"].toString(),
|
|
width: 60,
|
|
height: 60,
|
|
fit: BoxFit.cover,
|
|
),
|
|
),
|
|
const SizedBox(width: 15),
|
|
Expanded(
|
|
child: Row(
|
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
children: [
|
|
Expanded(
|
|
child: Column(
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
children: [
|
|
Text(
|
|
wObj["nomActivite"].toString(),
|
|
style: TextStyle(
|
|
color: TColor.black,
|
|
fontSize: 12,
|
|
),
|
|
),
|
|
],
|
|
),
|
|
),
|
|
Column(
|
|
crossAxisAlignment: CrossAxisAlignment.end,
|
|
children: [
|
|
IconButton(
|
|
onPressed: onClick,
|
|
icon: Image.asset(
|
|
"assets/img/next_icon.png",
|
|
width: 30,
|
|
height: 30,
|
|
fit: BoxFit.contain,
|
|
),
|
|
),
|
|
IconButton(
|
|
// ici pour remove l'activité
|
|
onPressed: onDelete,
|
|
icon: Image.asset(
|
|
"assets/img/corbeille.png",
|
|
width: 30,
|
|
height: 30,
|
|
fit: BoxFit.contain,
|
|
),
|
|
),
|
|
],
|
|
),
|
|
],
|
|
),
|
|
),
|
|
],
|
|
),
|
|
);
|
|
}
|
|
}
|