当前位置: 首页 > 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.hkea.cn/news/14378479/

相关文章:

  • 深圳手机网站建设报价wordpress侧边栏标题字数
  • 网站建设摊销年限最新规定手机怎么注册自己的网站
  • 在线教育网站模板打不开网站怎么办
  • 用php做网站河南seo网站策划
  • 网站备案怎么弄昆明餐饮网站建设
  • 哪个网站做浏览器主页好建设法规 课程网站
  • 销售网站建设深圳住房建设部网站
  • 重庆做网站推广的公司联通公网ip申请 做网站
  • 南庄九江网站建设dw做网站时怎么在图片上加字
  • 一个人可以备案几个网站免费下载ppt的网站
  • 建网站需要哪些资质网站那个做的比较好
  • 东阳网站建设yw81莆田 做网站的公司
  • 五屏网站建设多少钱申请开网店的详细步骤
  • 机构编制网站建设前几年做那些网站致富
  • 医院网站建设管理规范云南网站建设维修公司
  • wordpress文章不发在首页鱼头seo软件
  • 长沙网络推广小公司惠州seo网络推广
  • 网站开发发和后台开发有什么区别做自适应网站公司
  • 株洲企业网站建设工作沈阳市营商环境建设监督局网站
  • 石家庄网站优化公司广西网站建设seo优化
  • 做网站前应该先出图福建seo推广方案
  • 网站设计参考上海中国建设银行网站
  • 宁波网站建设方案推广外包公司名称
  • php网站模板怎么安装兰州营销型网站
  • 网站全屏轮播代码网站开发下人员配置
  • 沈阳有多少网站安徽省建设部网站
  • 图门市建设局网站国内网站建设最好公司
  • al万词推广网站引流新版阿里指数官网
  • 做平台是做网站和微信小程序的好别小程序订单管理系统
  • 视频 播放网站怎么做的jsp网站开发实例视频