拆组建
This commit is contained in:
parent
b579588881
commit
04a487fec9
@ -1,6 +1,8 @@
|
|||||||
// ignore_for_file: dead_code
|
// ignore_for_file: dead_code
|
||||||
// import 'dart:js';
|
// import 'dart:js';
|
||||||
|
|
||||||
|
import 'dart:ffi';
|
||||||
|
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter/widgets.dart';
|
import 'package:flutter/widgets.dart';
|
||||||
import 'package:get/get.dart';
|
import 'package:get/get.dart';
|
||||||
@ -45,13 +47,19 @@ class HomePageView extends GetView <HomePageController> {
|
|||||||
childAspectRatio: 0.7,
|
childAspectRatio: 0.7,
|
||||||
padding: const EdgeInsets.symmetric(horizontal: 10),
|
padding: const EdgeInsets.symmetric(horizontal: 10),
|
||||||
children: List.generate(controller.typeList.length, (index) {
|
children: List.generate(controller.typeList.length, (index) {
|
||||||
|
return getBodyItem(controller.typeList[index].data![0].previewThumb!,controller.typeList[index].name!,index);
|
||||||
|
}),
|
||||||
|
));
|
||||||
|
}
|
||||||
|
|
||||||
|
Stack getBodyItem(String imgUrl,String title,int index){
|
||||||
return Stack(//堆叠效果
|
return Stack(//堆叠效果
|
||||||
children: [
|
children: [
|
||||||
FadeInImage.memoryNetwork(
|
FadeInImage.memoryNetwork(
|
||||||
width: double.infinity,
|
width: double.infinity,
|
||||||
height: double.infinity,
|
height: double.infinity,
|
||||||
placeholder: kTransparentImage,
|
placeholder: kTransparentImage,
|
||||||
image: controller.typeList[index].data![0].previewThumb!,
|
image: imgUrl,
|
||||||
fit: BoxFit.cover,
|
fit: BoxFit.cover,
|
||||||
),
|
),
|
||||||
|
|
||||||
@ -60,7 +68,7 @@ class HomePageView extends GetView <HomePageController> {
|
|||||||
color: Colors.transparent,
|
color: Colors.transparent,
|
||||||
child: InkWell(
|
child: InkWell(
|
||||||
onTap: () {
|
onTap: () {
|
||||||
print("dsfadf");
|
print("xxaaa");
|
||||||
},
|
},
|
||||||
child: Align(
|
child: Align(
|
||||||
alignment: Alignment.bottomCenter,
|
alignment: Alignment.bottomCenter,
|
||||||
@ -71,7 +79,7 @@ class HomePageView extends GetView <HomePageController> {
|
|||||||
child: Align(
|
child: Align(
|
||||||
alignment: Alignment.center,
|
alignment: Alignment.center,
|
||||||
child: Text(
|
child: Text(
|
||||||
controller.typeList[index].name!,
|
title,
|
||||||
style: const TextStyle(
|
style: const TextStyle(
|
||||||
color: Colors.white
|
color: Colors.white
|
||||||
),
|
),
|
||||||
@ -82,12 +90,9 @@ class HomePageView extends GetView <HomePageController> {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|
||||||
|
|
||||||
],
|
],
|
||||||
);
|
);
|
||||||
}),
|
|
||||||
));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//初始化顶部数据
|
//初始化顶部数据
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user