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

郑州做网站哪家最好石家庄seo网络优化的公司

郑州做网站哪家最好,石家庄seo网络优化的公司,秦皇岛app开发公司,日照房管局建设信息网站上效果: 有些不能理解官方例子里的动画为什么没有效果,有可能是我写法不对 后续如果有动画效果修复了,再更新这篇,没有动画效果,总觉得感受的丝滑效果差了很多 上代码: 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});Widget build(BuildContext context) {return MaterialApp(home: Scaffold(appBar: AppBar(title: Text('PageView Demo!'),),body: PageViewDemo(),),);}
}class PageViewDemo extends StatefulWidget {const PageViewDemo({super.key});createState() => _PageViewDemoState();
}class _PageViewDemoState extends State<PageViewDemo>with TickerProviderStateMixin {late PageController _pageViewController;late TabController _tabController;int _currentPageIndex = 0;void initState() {super.initState();_pageViewController = PageController();_tabController = TabController(length: 3, vsync: this);}void dispose() {super.dispose();_pageViewController.dispose();_tabController.dispose();}Widget 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;Widget 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.ds6.com.cn/news/25818.html

相关文章:

  • 网站建设_广告关键词排名
  • 怎么下载自己做的网站营销关键词有哪些
  • 网站做301还是302广州最新消息今天
  • 淘宝网站后台怎么做站长工具介绍
  • 奥数辅导机构网站建设app开发网站
  • seo网站优化优化排名凡科网免费建站官网
  • 网站建设中关村武汉最新今天的消息
  • dreamweaver发布网站模板临沂百度代理公司有几个
  • 网站线下推广怎么做刷粉网站推广便宜
  • 做贱奴网站seo引擎搜索入口
  • 我自己做的网站一直没有效果怎么办线上销售怎么做推广
  • 河南省建筑资质查询qq排名优化网站
  • 郑州高端网站定制常宁seo外包
  • 做房地产什么网站好免费域名的网站
  • 虚拟展馆官方网站建设目前病毒的最新情况
  • 重庆建设工程信息网官网官方seo网站建设优化什么意思
  • 企业网站类型主要包括免费seo网站推广在线观看
  • 做网站UI工具优化推荐
  • 做网站大概seo优化网
  • 不让在建设门户网站品牌推广策划营销策划
  • 中小企业网站制作方法北京seo营销公司
  • dede免费模板教育网站下载百度app免费下载安装
  • 杜桥做网站哪家好哪个公司做网站推广最好
  • 长春平面网站建设推广软件赚钱的app
  • 在深圳做网站平台需要什么备案时事政治2023最新热点事件
  • 门户网站定义千锋教育培训机构就业率
  • 河海大学学风建设网站百度人工智能开放平台
  • 网站建设加盟免费引流在线推广
  • 做网站运用的软件整站seo服务
  • 做网站 属于电子商务ui设计公司