摘要: Flutter中的轮动图以及抖音上下滑页切换视频功能等等,这些都可以通过 PageView 轻松实现 PageView常见属性: PageView 的使用 class MyPage extends StatefulWidget { const MyPage({super.key}); @overri 阅读全文
posted @ 2024-01-04 23:28 鲤斌 阅读(332) 评论(0) 推荐(0) 编辑
摘要: 代码 const timeout = Duration(seconds: 3); var t=Timer.periodic(timeout, (timer) { print('afterTimer='+DateTime.now().toString());); // timer.cancel(); 阅读全文
posted @ 2024-01-04 23:27 鲤斌 阅读(236) 评论(0) 推荐(0) 编辑
摘要: <template> <div> <audio ref="audio" :src="audioSrc"></audio> <button @click="playAudio">播放</button> <button @click="changePlaybackRate(1.5)">加速</butto 阅读全文
posted @ 2024-01-04 15:27 鲤斌 阅读(225) 评论(0) 推荐(0) 编辑
摘要: BLoC(Business Logic Component)是一种在Flutter中用于管理状态和处理业务逻辑的设计模式和架构模式。 BLoC 的核心思想是将应用程序的状态、业务逻辑和UI分离开来,以实现单向数据流。 主要组件组成: Business Logic(业务逻辑): BLoC 本质上是一个 阅读全文
posted @ 2024-01-04 14:01 鲤斌 阅读(206) 评论(0) 推荐(0) 编辑
摘要: 原生效果 <template> <div> <transition> <img :src="imageUrl" class="image" /> </transition> </div> </template> <script> import imageUrl from "../assets/bac 阅读全文
posted @ 2024-01-04 13:58 鲤斌 阅读(13) 评论(0) 推荐(0) 编辑
摘要: 在app.vue中 <template> <div id="app"> <router-view /> </div> </template> <style lang="scss"> // 1 @media screen and (orientation: portrait) { html { wid 阅读全文
posted @ 2024-01-04 11:59 鲤斌 阅读(288) 评论(0) 推荐(0) 编辑