网站备案需要原件吗软件技术有学做网站吗

张小明 2026/1/9 8:22:23
网站备案需要原件吗,软件技术有学做网站吗,网站建设视频l,晚上必看的正能量直播app效果图说明#xff1a;版本1的中心水果图片只是简单的排列#xff0c;这个版本是让图片进行两两交叠实现步骤1.构建网格子项Widget _buildInAudioItem({required String name,required ListString images, //用列表接收图片required VoidCallback onTap,double image…效果图说明版本1的中心水果图片只是简单的排列这个版本是让图片进行两两交叠实现步骤1.构建网格子项Widget _buildInAudioItem({ required String name, required ListString images, //用列表接收图片 required VoidCallback onTap, double imageSize 40, }) { return Column( mainAxisSize: MainAxisSize.min, children: [ GestureDetector( onTap: onTap, child: Container( height: 150, width: 155, decoration: BoxDecoration( color: Color(0xFF1B1D2E), borderRadius: BorderRadius.circular(10), ), child: Center( child: _buildImageLayout(images, imageSize: imageSize), //传递图片和图片尺寸 ), ), ), SizedBox(height: 8), Container( height: 30, child: Text( name, style: TextStyle(color: Colors.white, fontSize: 12), textAlign: TextAlign.center, maxLines: 2, overflow: TextOverflow.ellipsis, ), ), ], ); }2.构建图片布局 ******Widget _buildImageLayout(ListString images, {double imageSize 40}) { int count images.length; //图片个数 if (count 1) { // 单个图片居中显示 return Container( height: imageSize, width: imageSize, decoration: BoxDecoration( color: Color(0xFF55596D), borderRadius: BorderRadius.circular(imageSize / 2), ), child: Center( child: Image.asset( images[0], width: imageSize * 0.5, height: imageSize * 0.5, ), ), ); } else if (count 2) { // 两个图片交叠显示 double overlap imageSize * 0.2; // 交叠宽度 double totalWidth imageSize * 2 - overlap; return Container( width: totalWidth, child: Stack( children: [ // 第一个图片在左边 Positioned( top: 55, left: 0, child: Container( height: imageSize, width: imageSize, decoration: BoxDecoration( color: Color(0xFF55596D).withOpacity(0.8), borderRadius: BorderRadius.circular(imageSize / 2), ), child: Center( child: Image.asset( images[0], width: imageSize * 0.5, height: imageSize * 0.5, ), ), ), ), // 第二个图片在右边交叠一部分 Positioned( top: 55, left: imageSize - overlap, child: Container( height: imageSize, width: imageSize, decoration: BoxDecoration( color: Color(0xFF55596D).withOpacity(0.8), borderRadius: BorderRadius.circular(imageSize / 2), ), child: Center( child: Image.asset( images[1], width: imageSize * 0.5, height: imageSize * 0.5, ), ), ), ), ], ), ); } else if (count 3) { // 三个图片交叠显示 double overlap imageSize * 0.2; // 交叠宽度 double totalWidth imageSize (imageSize - overlap) * 2; return Container( width: totalWidth, child: Stack( children: [ // 第一个图片在最左边 Positioned( top:55, left: 0, child: Container( height: imageSize, width: imageSize, decoration: BoxDecoration( color: Color(0xFF55596D).withOpacity(0.8), borderRadius: BorderRadius.circular(imageSize / 2), ), child: Center( child: Image.asset( images[0], width: imageSize * 0.5, height: imageSize * 0.5, ), ), ), ), // 第二个图片在中间 Positioned( top:55, left: imageSize - overlap, child: Container( height: imageSize, width: imageSize, decoration: BoxDecoration( color: Color(0xFF55596D).withOpacity(0.8), borderRadius: BorderRadius.circular(imageSize / 2), ), child: Center( child: Image.asset( images[1], width: imageSize * 0.5, height: imageSize * 0.5, ), ), ), ), // 第三个图片在最右边 Positioned( top:55, left: (imageSize - overlap) * 2, child: Container( height: imageSize, width: imageSize, decoration: BoxDecoration( color: Color(0xFF55596D).withOpacity(0.8), borderRadius: BorderRadius.circular(imageSize / 2), ), child: Center( child: Image.asset( images[2], width: imageSize * 0.5, height: imageSize * 0.5, ), ), ), ), ], ), ); } return SizedBox.shrink(); } }3.使用子项构建表格Widget buildInAudioList() { return Padding( padding: EdgeInsets.symmetric(horizontal: 10, vertical: 40), child: GridView.count( crossAxisCount: 2, crossAxisSpacing: 15, mainAxisSpacing: 5, childAspectRatio: 155 / 180, shrinkWrap: true, children: [ _buildInAudioItem( name: 苹果, images: [assets/images/apple.png], onTap: () print(点击苹果), ), _buildInAudioItem( name: 苹果香蕉, images: [assets/images/apple.png, assets/images/banana.png], onTap: () print(点击苹果香蕉), ), _buildInAudioItem( name: 苹果、香蕉、樱桃, images: [assets/images/apple.png, assets/images/banana.png, assets/images/cherry.png], onTap: () print(点击苹果、香蕉、樱桃), ), _buildInAudioItem( name: 苹果, images: [assets/images/apple.png], onTap: () print(苹果), ), ], ), ); }代码实例import package:flutter/cupertino.dart; import package:flutter/material.dart; class DemoPage extends StatefulWidget { const DemoPage({super.key}); override StateDemoPage createState() _DemoPageState(); } class _DemoPageState extends StateDemoPage { override Widget build(BuildContext context) { return Scaffold( backgroundColor: Colors.transparent, body: Container( width: double.infinity, height: double.infinity, decoration: const BoxDecoration( gradient: LinearGradient( begin: Alignment.topCenter, end: Alignment.bottomCenter, colors: [ Color(0xFF060618), Color(0xFF070A23), ], ), ), child: buildInAudioList(), ), ); } Widget buildInAudioList() { return Padding( padding: EdgeInsets.symmetric(horizontal: 10, vertical: 40), child: GridView.count( crossAxisCount: 2, crossAxisSpacing: 15, mainAxisSpacing: 5, childAspectRatio: 155 / 180, shrinkWrap: true, children: [ _buildInAudioItem( name: 苹果, images: [assets/images/apple.png], onTap: () print(点击苹果), ), _buildInAudioItem( name: 苹果香蕉, images: [assets/images/apple.png, assets/images/banana.png], onTap: () print(点击苹果香蕉), ), _buildInAudioItem( name: 苹果、香蕉、樱桃, images: [assets/images/apple.png, assets/images/banana.png, assets/images/cherry.png], onTap: () print(点击苹果、香蕉、樱桃), ), _buildInAudioItem( name: 苹果, images: [assets/images/apple.png], onTap: () print(苹果), ), ], ), ); } // 网格子项 Widget _buildInAudioItem({ required String name, required ListString images, //用列表接收图片 required VoidCallback onTap, double imageSize 40, }) { return Column( mainAxisSize: MainAxisSize.min, children: [ GestureDetector( onTap: onTap, child: Container( height: 150, width: 155, decoration: BoxDecoration( color: Color(0xFF1B1D2E), borderRadius: BorderRadius.circular(10), ), child: Center( child: _buildImageLayout(images, imageSize: imageSize), //传递图片和图片尺寸 ), ), ), SizedBox(height: 8), Container( height: 30, child: Text( name, style: TextStyle(color: Colors.white, fontSize: 12), textAlign: TextAlign.center, maxLines: 2, overflow: TextOverflow.ellipsis, ), ), ], ); } // 构建图片布局 Widget _buildImageLayout(ListString images, {double imageSize 40}) { int count images.length; //图片个数 if (count 1) { // 单个图片居中显示 return Container( height: imageSize, width: imageSize, decoration: BoxDecoration( color: Color(0xFF55596D), borderRadius: BorderRadius.circular(imageSize / 2), ), child: Center( child: Image.asset( images[0], width: imageSize * 0.5, height: imageSize * 0.5, ), ), ); } else if (count 2) { // 两个图片交叠显示 double overlap imageSize * 0.2; // 交叠宽度 double totalWidth imageSize * 2 - overlap; return Container( width: totalWidth, child: Stack( children: [ // 第一个图片在左边 Positioned( top: 55, left: 0, child: Container( height: imageSize, width: imageSize, decoration: BoxDecoration( color: Color(0xFF55596D).withOpacity(0.8), borderRadius: BorderRadius.circular(imageSize / 2), ), child: Center( child: Image.asset( images[0], width: imageSize * 0.5, height: imageSize * 0.5, ), ), ), ), // 第二个图片在右边交叠一部分 Positioned( top: 55, left: imageSize - overlap, child: Container( height: imageSize, width: imageSize, decoration: BoxDecoration( color: Color(0xFF55596D).withOpacity(0.8), borderRadius: BorderRadius.circular(imageSize / 2), ), child: Center( child: Image.asset( images[1], width: imageSize * 0.5, height: imageSize * 0.5, ), ), ), ), ], ), ); } else if (count 3) { // 三个图片交叠显示 double overlap imageSize * 0.2; // 交叠宽度 double totalWidth imageSize (imageSize - overlap) * 2; return Container( width: totalWidth, child: Stack( children: [ // 第一个图片在最左边 Positioned( top:55, left: 0, child: Container( height: imageSize, width: imageSize, decoration: BoxDecoration( color: Color(0xFF55596D).withOpacity(0.8), borderRadius: BorderRadius.circular(imageSize / 2), ), child: Center( child: Image.asset( images[0], width: imageSize * 0.5, height: imageSize * 0.5, ), ), ), ), // 第二个图片在中间 Positioned( top:55, left: imageSize - overlap, child: Container( height: imageSize, width: imageSize, decoration: BoxDecoration( color: Color(0xFF55596D).withOpacity(0.8), borderRadius: BorderRadius.circular(imageSize / 2), ), child: Center( child: Image.asset( images[1], width: imageSize * 0.5, height: imageSize * 0.5, ), ), ), ), // 第三个图片在最右边 Positioned( top:55, left: (imageSize - overlap) * 2, child: Container( height: imageSize, width: imageSize, decoration: BoxDecoration( color: Color(0xFF55596D).withOpacity(0.8), borderRadius: BorderRadius.circular(imageSize / 2), ), child: Center( child: Image.asset( images[2], width: imageSize * 0.5, height: imageSize * 0.5, ), ), ), ), ], ), ); } return SizedBox.shrink(); } }
版权声明:本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若内容造成侵权/违法违规/事实不符,请联系邮箱:809451989@qq.com进行投诉反馈,一经查实,立即删除!

做网站绑定域名 解析域名分销电商

会场音乐管理好帮手:“音频播控” 的高效列表管理 在会场、活动等场景中,音乐的分类管理与快速调取往往是影响音效节奏的关键 —— 杂乱的音频文件不仅难找,还容易打乱现场流程。“音频播控” 以列表化管理为核心,完美解决了这一…

张小明 2026/1/5 0:11:02 网站建设

河西区做网站的公司工程公司注册需要什么条件

文章目录具体实现截图主要技术与实现手段关于我本系统开发思路java类核心代码部分展示结论源码lw获取/同行可拿货,招校园代理 :文章底部获取博主联系方式!具体实现截图 同行可拿货,招校园代理 pyt哄pandas_ij88lt 的电影视频分析系统设计与实现基…

张小明 2026/1/5 0:11:00 网站建设

建设购物网站南昌seo搜索优化

CudaText跨平台文本编辑器终极指南:从入门到精通完整教程 【免费下载链接】CudaText Cross-platform text editor, written in Lazarus 项目地址: https://gitcode.com/gh_mirrors/cu/CudaText 你是否正在寻找一款轻量级但功能强大的文本编辑器?C…

张小明 2026/1/5 0:10:58 网站建设

做网站代理能赚钱吗西安建设手机网站

LangFlow批量修改变量名操作教程 在现代AI应用开发中,随着工作流复杂度的不断提升,一个看似微不足道的操作——变量重命名——往往会成为影响项目可维护性的关键瓶颈。尤其是在使用可视化工具如 LangFlow 构建大型 LangChain 应用时,频繁的手…

张小明 2026/1/5 0:10:55 网站建设

旅游网站建设目标网站分类群晖 直接编辑wordpress

随着数字化转型加速,软件测试面临前所未有的复杂性和时效性挑战。众包测试作为一种新兴的质量保障模式,通过整合分布式测试者的集体智慧,有效弥补传统测试在场景覆盖、用户体验及成本控制方面的不足。据Gartner研究预测,到2026年&…

张小明 2026/1/5 0:10:53 网站建设