From c1779f10064c39bcdf02136b871c1e7a7d639df9 Mon Sep 17 00:00:00 2001 From: Brian Quinlan Date: Thu, 7 Sep 2023 10:19:47 -0700 Subject: [PATCH] Renable cached images --- .github/workflows/cronet.yml | 4 +--- pkgs/cronet_http/example/lib/main.dart | 6 +++--- pkgs/cronet_http/example/pubspec.yaml | 2 +- 3 files changed, 5 insertions(+), 7 deletions(-) diff --git a/.github/workflows/cronet.yml b/.github/workflows/cronet.yml index 0b35e16aae..cd788c6c72 100644 --- a/.github/workflows/cronet.yml +++ b/.github/workflows/cronet.yml @@ -55,9 +55,7 @@ jobs: java-version: '17' - uses: subosito/flutter-action@v2 with: - # TODO: Change to 'stable' when a release version of flutter - # pins version 1.21.1 or later of 'package:test' - channel: 'master' + channel: 'stable' - name: Run tests uses: reactivecircus/android-emulator-runner@v2 with: diff --git a/pkgs/cronet_http/example/lib/main.dart b/pkgs/cronet_http/example/lib/main.dart index 985f7f0d07..f3d17ea3d4 100644 --- a/pkgs/cronet_http/example/lib/main.dart +++ b/pkgs/cronet_http/example/lib/main.dart @@ -5,7 +5,7 @@ import 'dart:convert'; import 'dart:io'; -// import 'package:cached_network_image/cached_network_image.dart'; +import 'package:cached_network_image/cached_network_image.dart'; import 'package:cronet_http/cronet_http.dart'; import 'package:flutter/material.dart'; import 'package:http/http.dart'; @@ -124,10 +124,10 @@ class _BookListState extends State { itemBuilder: (context, index) => Card( key: ValueKey(widget.books[index].title), child: ListTile( -/* leading: CachedNetworkImage( + leading: CachedNetworkImage( placeholder: (context, url) => const CircularProgressIndicator(), - imageUrl: widget.books[index].imageUrl),*/ + imageUrl: widget.books[index].imageUrl), title: Text(widget.books[index].title), subtitle: Text(widget.books[index].description), ), diff --git a/pkgs/cronet_http/example/pubspec.yaml b/pkgs/cronet_http/example/pubspec.yaml index 828c5e845d..b38ebb043b 100644 --- a/pkgs/cronet_http/example/pubspec.yaml +++ b/pkgs/cronet_http/example/pubspec.yaml @@ -7,7 +7,7 @@ environment: sdk: ">=2.19.0 <3.0.0" dependencies: -# cached_network_image: ^3.2.3 + cached_network_image: ^3.2.3 cronet_http: path: ../ cupertino_icons: ^1.0.2