diff --git a/example/lib/main.dart b/example/lib/main.dart index 8e8b759..e99774e 100644 --- a/example/lib/main.dart +++ b/example/lib/main.dart @@ -121,7 +121,6 @@ class _MyHomePageState extends State { ), ), ); - print(editedImage); } } diff --git a/lib/upload_image/look_images_widget.dart b/lib/upload_image/look_images_widget.dart index 563b862..1a2e76d 100644 --- a/lib/upload_image/look_images_widget.dart +++ b/lib/upload_image/look_images_widget.dart @@ -7,6 +7,7 @@ class LookImagesTool { static lookImages({ required List listData, int? currentPage, + Function? editCallback, }) async { showDialog( context: Get.context!, @@ -15,6 +16,7 @@ class LookImagesTool { return LookImagesWidget( listData: listData, currentPage: currentPage, + editCallback: editCallback, ); }); } @@ -23,11 +25,13 @@ class LookImagesTool { class LookImagesWidget extends StatefulWidget { final List listData; final int? currentPage; + final Function? editCallback; const LookImagesWidget({ super.key, required this.listData, this.currentPage, + this.editCallback, }); @override @@ -77,6 +81,10 @@ class _LookImagesWidgetState extends State { left: 15, top: 50, child: GestureDetector(onTap: () => Get.back(), child: Icon(Icons.arrow_back_ios, color: Colors.white))), + Positioned( + right: 15, + top: 50, + child: GestureDetector(onTap: () => widget.editCallback?.call(), child: Icon(Icons.edit, color: Colors.white))), //图片张数指示器 Positioned( left: 0,