mirror of
https://github.com/Such-Software/hash-wallet.git
synced 2026-10-22 06:28:39 +02:00
29 lines
611 B
Dart
29 lines
611 B
Dart
import 'package:flutter/material.dart';
|
|
|
|
class ImageWidget extends StatelessWidget {
|
|
ImageWidget({
|
|
@required this.image,
|
|
@required this.aspectRatioImage,
|
|
this.isLargeScreen = false});
|
|
|
|
final Image image;
|
|
final double aspectRatioImage;
|
|
final bool isLargeScreen;
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return isLargeScreen
|
|
? Flexible(
|
|
child: Container(
|
|
child: AspectRatio(
|
|
aspectRatio: aspectRatioImage,
|
|
child: FittedBox(
|
|
fit: BoxFit.contain,
|
|
child: image,
|
|
),
|
|
),
|
|
),
|
|
)
|
|
: image;
|
|
}
|
|
} |