import 'package:flutter/material.dart'; import 'package:go_router/go_router.dart'; import '../../data/models/benchmark.dart'; class BenchmarkCard extends StatelessWidget { const BenchmarkCard({ required this.benchmark, super.key, }); final Benchmark benchmark; @override Widget build(BuildContext context) { return Card( child: Padding( padding: const EdgeInsets.all(8.0), child: Column( mainAxisAlignment: MainAxisAlignment.spaceAround, children: [ Text( benchmark.title, textAlign: TextAlign.center, style: const TextStyle(fontSize: 18), ), Padding( padding: const EdgeInsets.symmetric(horizontal: 20.0), child: Text( benchmark.desc, textAlign: TextAlign.center, ), ), TextButton( onPressed: () { context.pushNamed(benchmark.route.name); }, child: Text(benchmark.buttonText), ), ], ), ), ); } }