27 lines
558 B
Dart
27 lines
558 B
Dart
import 'package:flutter/cupertino.dart';
|
|
import 'package:lottie/lottie.dart';
|
|
|
|
class NetworkErrorWidget extends StatelessWidget {
|
|
final double? height;
|
|
final double? width;
|
|
final BoxFit fit;
|
|
|
|
const NetworkErrorWidget({
|
|
this.height,
|
|
this.width,
|
|
this.fit = BoxFit.contain,
|
|
});
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return SizedBox(
|
|
height: height ?? 200,
|
|
width: width ?? 200,
|
|
child: Lottie.asset(
|
|
'assets/lottie/network_error.json',
|
|
fit: fit,
|
|
repeat: true,
|
|
),
|
|
);
|
|
}
|
|
} |