diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 9badbc2..08c9397 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -12,7 +12,7 @@ build: image: cirrusci/flutter:latest script: - flutter clean - - flutter build web --web-renderer canvaskit + - flutter build web --web-renderer html only: - test - dev diff --git a/lib/widgets/skeleton_image.dart b/lib/widgets/skeleton_image.dart index ad97cd0..71adcae 100644 --- a/lib/widgets/skeleton_image.dart +++ b/lib/widgets/skeleton_image.dart @@ -8,7 +8,6 @@ import 'package:didvan/services/network/request.dart'; import 'package:didvan/services/network/request_helper.dart'; import 'package:flutter/foundation.dart'; import 'package:flutter/material.dart'; -import 'package:transparent_image/transparent_image.dart'; class SkeletonImage extends StatefulWidget { final String imageUrl; @@ -54,32 +53,28 @@ class _SkeletonImageState extends State { @override Widget build(BuildContext context) { - if (kIsWeb) { - // if (_isLoading) { - // return _aspectRatioGenerator( - // child: ShimmerPlaceholder( - // borderRadius: widget.borderRadius, - // width: widget.aspectRatio == null ? widget.width : null, - // height: widget.aspectRatio == null ? widget.height : null, - // ), - // ); - // } - return _aspectRatioGenerator( - child: ClipRRect( - borderRadius: widget.borderRadius, - child: FadeInImage( - image: NetworkImage( - RequestHelper.baseUrl + widget.imageUrl, - headers: {'Authorization': 'Bearer ${RequestService.token}'}, - ), - placeholder: MemoryImage(kTransparentImage), - fit: BoxFit.cover, - width: widget.width, - height: widget.height, - ), - ), - ); - } + // if (kIsWeb) { + // if (_isLoading) { + // return _aspectRatioGenerator( + // child: ShimmerPlaceholder( + // borderRadius: widget.borderRadius, + // width: widget.aspectRatio == null ? widget.width : null, + // height: widget.aspectRatio == null ? widget.height : null, + // ), + // ); + // } + // return _aspectRatioGenerator( + // child: ClipRRect( + // borderRadius: widget.borderRadius, + // child: Image.memory( + // _bytes, + // fit: BoxFit.cover, + // width: widget.width, + // height: widget.height, + // ), + // ), + // ); + // } return _aspectRatioGenerator( child: CachedNetworkImage( httpHeaders: {'Authorization': 'Bearer ${RequestService.token}'}, diff --git a/pubspec.lock b/pubspec.lock index f5d3d20..7f8137a 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -378,6 +378,13 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "0.12.11" + material_color_utilities: + dependency: transitive + description: + name: material_color_utilities + url: "https://pub.dartlang.org" + source: hosted + version: "0.1.3" meta: dependency: transitive description: @@ -648,7 +655,7 @@ packages: name: test_api url: "https://pub.dartlang.org" source: hosted - version: "0.4.3" + version: "0.4.8" transparent_image: dependency: "direct main" description: