main
1import 'package:blood_pressure_app/features/old_bluetooth/ui/input_card.dart';
2import 'package:flutter/material.dart';
3import 'package:blood_pressure_app/l10n/app_localizations.dart';
4
5/// Indication of a failure while taking a bluetooth measurement.
6class MeasurementFailure extends StatelessWidget {
7 /// Indicate a failure while taking a bluetooth measurement.
8 const MeasurementFailure({super.key, required this.onTap});
9
10 /// Called when the user requests closing.
11 final void Function() onTap;
12
13 @override
14 Widget build(BuildContext context) => GestureDetector(
15 onTap: onTap,
16 child: InputCard(
17 onClosed: onTap,
18 child: Center(
19 child: Column(
20 mainAxisAlignment: MainAxisAlignment.center,
21 children: [
22 const Icon(Icons.error_outline, color: Colors.red),
23 const SizedBox(height: 8,),
24 Text(AppLocalizations.of(context)!.errMeasurementRead),
25 const SizedBox(height: 4,),
26 Text(AppLocalizations.of(context)!.tapToClose),
27 const SizedBox(height: 8,),
28 ],
29 ),
30 ),
31 ),
32 );
33
34}