log changes
This commit is contained in:
parent
f091ad1955
commit
5f9843ee1a
5 changed files with 9 additions and 4 deletions
|
@ -95,7 +95,6 @@ public class MainActivity extends FlutterActivity {
|
|||
Integer width = call.argument("width");
|
||||
Integer height = call.argument("height");
|
||||
ImageEntry entry = new ImageEntry(map);
|
||||
Log.d(LOG_TAG, "getImageBytes with uri=" + entry.getUri());
|
||||
thumbnailFetcher.fetch(entry, width, height, result);
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -109,8 +109,6 @@ public class MediaStoreImageProvider {
|
|||
} catch (Exception e) {
|
||||
Log.d(LOG_TAG, "failed to get entries", e);
|
||||
}
|
||||
|
||||
Log.d(LOG_TAG, "fetch completed with " + entries.size() + " entries");
|
||||
return entries;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -9,7 +9,9 @@ class ImageFetcher {
|
|||
static Future<List<Map>> getImageEntries() async {
|
||||
try {
|
||||
final result = await platform.invokeMethod('getImageEntries');
|
||||
return (result as List).cast<Map>();
|
||||
final entries = (result as List).cast<Map>();
|
||||
debugPrint('getImageEntries found ${entries.length} entries');
|
||||
return entries;
|
||||
} on PlatformException catch (e) {
|
||||
debugPrint('getImageEntries failed with exception=${e.message}');
|
||||
}
|
||||
|
@ -17,6 +19,7 @@ class ImageFetcher {
|
|||
}
|
||||
|
||||
static Future<Uint8List> getImageBytes(Map entry, int width, int height) async {
|
||||
debugPrint('getImageBytes with uri=${entry['uri']}');
|
||||
try {
|
||||
final result = await platform.invokeMethod('getImageBytes', <String, dynamic>{
|
||||
'entry': entry,
|
||||
|
|
|
@ -32,6 +32,7 @@ class ThumbnailState extends State<Thumbnail> {
|
|||
@override
|
||||
void initState() {
|
||||
super.initState();
|
||||
// debugPrint('initState with uri=$uri entry=${widget.entry['path']}');
|
||||
initByteLoader();
|
||||
}
|
||||
|
||||
|
@ -39,6 +40,7 @@ class ThumbnailState extends State<Thumbnail> {
|
|||
void didUpdateWidget(Thumbnail oldWidget) {
|
||||
super.didUpdateWidget(oldWidget);
|
||||
if (uri == oldWidget.entry['uri'] && widget.extent == oldWidget.extent) return;
|
||||
// debugPrint('didUpdateWidget FROM uri=${oldWidget.entry['uri']} TO uri=$uri entry=${widget.entry['path']}');
|
||||
initByteLoader();
|
||||
}
|
||||
|
||||
|
@ -49,6 +51,7 @@ class ThumbnailState extends State<Thumbnail> {
|
|||
|
||||
@override
|
||||
void dispose() {
|
||||
// debugPrint('dispose with uri=$uri entry=${widget.entry['path']}');
|
||||
ImageFetcher.cancelGetImageBytes(uri);
|
||||
super.dispose();
|
||||
}
|
||||
|
|
|
@ -20,6 +20,7 @@ class ThumbnailCollection extends StatelessWidget {
|
|||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
// debugPrint('$runtimeType build with sections=${sections.length}');
|
||||
return DraggableScrollbar.arrows(
|
||||
labelTextBuilder: (double offset) => Text(
|
||||
"${offset ~/ 1}",
|
||||
|
@ -58,6 +59,7 @@ class SectionSliver extends StatelessWidget {
|
|||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
// debugPrint('$runtimeType build with sectionKey=$sectionKey');
|
||||
var columnCount = 4;
|
||||
var mediaQuery = MediaQuery.of(context);
|
||||
|
||||
|
|
Loading…
Reference in a new issue