| 1 | import 'package:flutter/material.dart'; |
| 2 | |
| 3 | class CakePayCardImagePlaceholder extends StatelessWidget { |
| 4 | const CakePayCardImagePlaceholder({this.text}); |
| 5 | |
| 6 | final String? text; |
| 7 | |
| 8 | @override |
| 9 | Widget build(BuildContext context) { |
| 10 | return AspectRatio( |
| 11 | aspectRatio: 1.8, |
| 12 | child: Container( |
| 13 | child: Center( |
| 14 | child: Text( |
| 15 | text ?? 'Image not found!', |
| 16 | style: Theme.of(context).textTheme.bodySmall?.copyWith( |
| 17 | color: Theme.of(context).colorScheme.onSurface, |
| 18 | fontWeight: FontWeight.w900, |
| 19 | ), |
| 20 | ), |
| 21 | ), |
| 22 | decoration: BoxDecoration( |
| 23 | color: Theme.of(context).colorScheme.surfaceContainer, |
| 24 | ), |
| 25 | ), |
| 26 | ); |
| 27 | } |
| 28 | } |