|
|
|
@ -1,5 +1,6 @@
|
|
|
|
import 'package:cached_network_image/cached_network_image.dart';
|
|
|
|
import 'package:cached_network_image/cached_network_image.dart';
|
|
|
|
import 'package:flutter/material.dart';
|
|
|
|
import 'package:flutter/material.dart';
|
|
|
|
|
|
|
|
import 'package:test_sa/new_views/app_style/app_color.dart';
|
|
|
|
|
|
|
|
|
|
|
|
class ImageLoader extends StatelessWidget {
|
|
|
|
class ImageLoader extends StatelessWidget {
|
|
|
|
final String? url;
|
|
|
|
final String? url;
|
|
|
|
@ -20,7 +21,7 @@ class ImageLoader extends StatelessWidget {
|
|
|
|
alignment: Alignment.center,
|
|
|
|
alignment: Alignment.center,
|
|
|
|
width: width,
|
|
|
|
width: width,
|
|
|
|
height: height,
|
|
|
|
height: height,
|
|
|
|
placeholder: (context, url) => const Center(child: CircularProgressIndicator()),
|
|
|
|
placeholder: (context, url) => Center(child: CircularProgressIndicator(color: AppColor.loadingColor(context))),
|
|
|
|
errorWidget: (context, url, error) => Icon(showDefaultIcon ? Icons.image_outlined : Icons.broken_image_rounded),
|
|
|
|
errorWidget: (context, url, error) => Icon(showDefaultIcon ? Icons.image_outlined : Icons.broken_image_rounded),
|
|
|
|
);
|
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|