当前位置: 首页 > news >正文

网站规划的原则是什么为什么网站建设要值班

网站规划的原则是什么,为什么网站建设要值班,哪个网站的域名便宜,建设电子商务网站的预期收益上效果#xff1a; 有些不能理解官方例子里的动画为什么没有效果#xff0c;有可能是我写法不对 后续如果有动画效果修复了#xff0c;再更新这篇#xff0c;没有动画效果#xff0c;总觉得感受的丝滑效果差了很多 上代码#xff1a; import package:flutter/material.…上效果 有些不能理解官方例子里的动画为什么没有效果有可能是我写法不对 后续如果有动画效果修复了再更新这篇没有动画效果总觉得感受的丝滑效果差了很多 上代码 import package:flutter/material.dart; import package:flutter/foundation.dart; import package:logging/logging.dart;const TAG OfficePageViewDemo;class OfficePageViewDemo extends StatelessWidget {const OfficePageViewDemo({super.key});overrideWidget build(BuildContext context) {return MaterialApp(home: Scaffold(appBar: AppBar(title: Text(PageView Demo!),),body: PageViewDemo(),),);} }class PageViewDemo extends StatefulWidget {const PageViewDemo({super.key});overridecreateState() _PageViewDemoState(); }class _PageViewDemoState extends StatePageViewDemowith TickerProviderStateMixin {late PageController _pageViewController;late TabController _tabController;int _currentPageIndex 0;overridevoid initState() {super.initState();_pageViewController PageController();_tabController TabController(length: 3, vsync: this);}overridevoid dispose() {super.dispose();_pageViewController.dispose();_tabController.dispose();}overrideWidget build(BuildContext context) {final TextTheme textTheme Theme.of(context).textTheme;return Stack(alignment: Alignment.bottomCenter,children: [PageView(controller: _pageViewController,onPageChanged: _handlePageViewChanged,children: [Center(child: Text(First Page,style: textTheme.titleLarge,),),Center(child: Text(Second Page,style: textTheme.titleLarge,),),Center(child: Text(Third Page,style: textTheme.titleLarge,),),],),PageIndicator(tabController: _tabController,currentPageIndex: _currentPageIndex,onUpdateCurrentPageIndex: _updateCurrentPageIndex,isOnDesktopAndWeb: _isOnDesktopAndWeb,)],);}void _handlePageViewChanged(int currentPageIndex) {Logger(TAG).info(_handlePageViewChanged called! currentPageIndex$currentPageIndex);if (!_isOnDesktopAndWeb) {return;}_tabController.index currentPageIndex;setState(() {_currentPageIndex currentPageIndex;});}void _updateCurrentPageIndex(int index) {Logger(TAG).info(_updateCurrentPageIndex called! index$index);_tabController.index index;_pageViewController.animateToPage(index,duration: const Duration(microseconds: 400 * 2), curve: Curves.linear);}bool get _isOnDesktopAndWeb {if (kIsWeb) {return true;}switch (defaultTargetPlatform) {case TargetPlatform.macOS:case TargetPlatform.linux:case TargetPlatform.windows:return true;case TargetPlatform.android:case TargetPlatform.iOS:case TargetPlatform.fuchsia:return false;}} }class PageIndicator extends StatelessWidget {const PageIndicator({super.key,required this.tabController,required this.currentPageIndex,required this.onUpdateCurrentPageIndex,required this.isOnDesktopAndWeb});final int currentPageIndex;final TabController tabController;final void Function(int) onUpdateCurrentPageIndex;final bool isOnDesktopAndWeb;overrideWidget build(BuildContext context) {if (!isOnDesktopAndWeb) {return const SizedBox();}final ColorScheme colorScheme Theme.of(context).colorScheme;return Padding(padding: const EdgeInsets.all(8.0),child: Row(mainAxisAlignment: MainAxisAlignment.center,children: [IconButton(splashRadius: 16.0,padding: EdgeInsets.zero,onPressed: () {if (currentPageIndex 0){}else{onUpdateCurrentPageIndex(currentPageIndex - 1)}},icon: const Icon(Icons.arrow_left_rounded,size: 32.0,)),TabPageSelector(controller: tabController,color: colorScheme.surface,selectedColor: colorScheme.primary,),IconButton(splashRadius: 16.0,padding: EdgeInsets.zero,onPressed: () {if (currentPageIndex 2){}else{onUpdateCurrentPageIndex(currentPageIndex 1)}},icon: const Icon(Icons.arrow_right_rounded,size: 32.0,)),],),);} } 事实就是官方代码不过有点细微差别 有解决动画效果的回复一下蛤 还差一个拖动边界框改变 widget 的宽高效果 END
http://www.laogonggong.com/news/112540.html

相关文章:

  • 社团网站模板wordpress 百度熊掌号
  • 网站推广临沂建设银行官方网站网址
  • 手机网站设计制作公司海底捞口碑营销案例
  • a word与the wordpressseo综合查询工具
  • 网站公司怎么做运营商仙桃建设网站
  • 计算机本科论文 网站建设中石化第四建设有限公司网站
  • 长春免费建站模板wordpress是英文版
  • 企业网站开发效果电子商务行业发展现状
  • 无锡企业网站制作费用中山市企业网站seo哪里好
  • 菏泽公司网站建设制作网站设计的技术有
  • 兰州网站建设公司排名网上做网站网站代理
  • 网站架构教程沈阳关键词优化费用
  • 嘉定建站公司兰州网站维护
  • 网站和管理系统的区别开发小程序的注意事项
  • 怎么把网站排名长沙建个网站一般需要多少钱
  • 爱站库陕西建设网官网证查询
  • 个人建购物网站怎么备案wordpress实用的插件
  • wordpress网站特别慢郑州网站建设报价
  • 成都信用体系建设网站江苏网站建设电话
  • 南沙建设网站网站建设需网站
  • 衡水手机网站建设价格wordpress 建购物网站
  • 广州市网站设计可以直接进入的网站正能量大豆网
  • 分类网站建设方案网站排名优化提升快速
  • 自己接单做网站施工企业合同管理制度
  • 山东滕州做网站技术电话西安网站的建设
  • 做封面字体下载好的网站软件工程师面试常见问题
  • seo网站程序wordpress分类作为首页
  • 网站建设的开票编码济南网站制作策划
  • 网站视频大全网站分页
  • 预装wordpress云主机关键词排名优化网站建设公司