mirror of
https://github.com/kuhyx/todo-app.git
synced 2026-11-10 19:07:02 +01:00
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
28 lines
750 B
Dart
28 lines
750 B
Dart
import 'dart:typed_data';
|
|
|
|
import 'package:flutter/widgets.dart';
|
|
|
|
/// Receives pasted or dropped images and the count of non-image files.
|
|
typedef ImageInputCallback =
|
|
void Function(List<Uint8List> images, int rejected);
|
|
|
|
/// Off the web there is no document to paste or drop onto (Android attaches
|
|
/// through the 📎 button), so this is just [child].
|
|
class ImageInputListener extends StatelessWidget {
|
|
/// Wraps [child]; [onImages] is never called on this platform.
|
|
const ImageInputListener({
|
|
required this.onImages,
|
|
required this.child,
|
|
super.key,
|
|
});
|
|
|
|
/// Unused off the web.
|
|
final ImageInputCallback onImages;
|
|
|
|
/// The screen body.
|
|
final Widget child;
|
|
|
|
@override
|
|
Widget build(BuildContext context) => child;
|
|
}
|