Commit 518c7755 authored by netyouli's avatar netyouli

修复图片广场显示问题

parent 5e105725
......@@ -23,6 +23,7 @@ import 'model.dart';
class AIDrawImageController extends GetxController {
late TabController tabController;
late TabController categoryController;
var currentIndex = 0;
ScrollController textToImageController = ScrollController(initialScrollOffset: 0);
var model = AIDrawTextToImageModel();
......
......@@ -110,9 +110,10 @@ class AIDrawImagePage extends GetView<AIDrawImageController> {
});
controller.tabController = tabController;
tabController.addListener(() {
if (tabController.index == 2) {
if (tabController.index == 2 && controller.currentIndex != tabController.index) {
controller.requestSquareImages();
}
controller.currentIndex = tabController.index;
});
return Column(
children: [
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment