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