查看大图

This commit is contained in:
bluesea 2024-05-13 16:21:16 +08:00
parent e6aefe8f3b
commit 36af3eb367
2 changed files with 8 additions and 4 deletions

View File

@ -3,6 +3,7 @@ import 'package:get/get.dart';
import 'package:wallpaper/pages/imgcategorypage/imgcategorypage_controller.dart';
import 'package:wallpaper/models/imgnetodel.dart';
import 'package:transparent_image/transparent_image.dart';
import 'package:wallpaper/pages/imgscanpage/imgscanpage_view.dart';
class ImgCategoryPageView extends GetView {
// const ImgCategoryPageView({super.key});
@ -36,7 +37,7 @@ class ImgCategoryPageView extends GetView {
childAspectRatio: 0.7,
padding: const EdgeInsets.symmetric(horizontal: 10),
children: List.generate(dataModel.data!.length, (index) {
return getBodyItem(dataModel.data![index].previewThumb!,index);
return getBodyItem(dataModel.data![index].previewThumb!, index);
}),
);
}
@ -56,8 +57,7 @@ class ImgCategoryPageView extends GetView {
color: Colors.transparent,
child: InkWell(
onTap: () {
print("查看大图...");
// Get.to(ImgCategoryPageView(stitle: title,dataModel: controller.typeList[index]));
Get.to(ImgScanPageView(dataModel: dataModel,currentIndex: index,));
},
child: Align(
alignment: Alignment.bottomCenter,

View File

@ -1,8 +1,12 @@
import 'package:flutter/material.dart';
import 'package:get/get.dart';
import 'package:wallpaper/models/imgnetodel.dart';
class ImgScanPageView extends GetView {
const ImgScanPageView({super.key});
final NetImgCategory dataModel;
final int currentIndex;
const ImgScanPageView({super.key,required this.dataModel,required this.currentIndex});
@override
Widget build(BuildContext context) {