Flutter版本的海外剧
发表于|更新于
|浏览量:
背景
前阵子抓包,有两个海外剧的接口,最近有时间,打算温习一下 Flutter,就用来写了一个简单的 APP,包含轮播图、下拉刷新、上拉加载以及播放功能。
效果如下:
运行时需要注意 Flutter 版本的问题,可能需要修改 播放器的 package 中的代码,直接Google 搜索,修改即可,如有疑问可以联系我。
代码放在 Github 上,地址是:meiju_flutter
文章作者: 今是昨非
版权声明: 本博客所有文章除特别声明外,均采用 CC BY-NC-SA 4.0 许可协议。转载请注明来源 今是昨非的博客!
相关推荐
2021-07-27
Flutter组件基础——Button
Flutter组件基础——ButtonFlutter中常用的Button有ElevatedButton、TextButton、OutlinedButton,之前可能还有RaisedButton、FlatButton、OutlineButton,但是已被废弃,参考RaisedButton vs ElevatedButton, FlatButton vs TextButton and OutlineButton vs OutlinedButton TextButtonTextButton可简单理解为按钮,即可点击的Text。 常用属性如下: TextButton常用属性: autofocus child clipBehavior enabled focusNode onLongPress onPressed style 来看一下,定义三个按钮,分别对应,按钮不可点击,按钮可点击,按钮带有渐变背景,三种情况,效果如下: 使用代码如下: 123456789101112131415161718192021222324252627282930313233343536373839...
2021-07-16
Flutter环境安装 && 运行
Flutter环境安装 && 运行背景Flutter环境配置到运行,问题备忘记录。比如遇到Android sdkmanager tool not found和Running Gradle task 'assembleDebug'... Flutter安装超级精简版通过homebrew直接安装,可能需要外网 brew install flutter 手动,Flutter环境搭建 首先下载Flutter安装包,下载地址:https://flutter.dev/docs/development/tools/sdk/releases?tab=macos 其次,解压已下载文件,把文件放入指定目录中,注意:建议放入可以放入用户根目录下,因为后续需要指定bin文件地址,这个目录最好不会经常变动 然后,配置环境变量 打开terminal,如果是zsh,输入open .zshrc;(如果是bash,则输入open .baseprofile)在文件末尾添加如下代码,其中pwd为刚刚解压的flutter/bin文件地址, 1export PATH=&quo...
2021-07-27
Flutter布局基础——Card
Flutter布局基础——CardCard,卡片式布局,带有一点圆角和阴影。通常用于关联信息的展示,比如:相册信息、经纬度、联系人信息等等。 Card的使用来看一下,如何做一个,常见的列表元素的控件,左侧是个Icon,上面是title,然后是desc,最下面是按钮,常见于订单列表。 要实现的效果如下: 然后看如何实现: ListTile这里需要介绍一下ListTile,Flutter提供的固定高度的,左侧或右侧带有Icon以及文案的控件。 可实现效果如下: 代码如下: 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768class MyApp extends StatelessWidget { @override Widget build(BuildContext context) { return MaterialApp( home...
2022-09-23
Flutter组件——Tabbar
[Flutter组件——Tabbar]使用Tabar使用,设置indicator的样式,长短,设置tab选中和未选中的样式,根据数组创建Tabbar。 代码如下: 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677import 'package:flutter/material.dart';class TabbarDemo extends StatefulWidget { TabbarDemo({Key? key}) : super(key: key); _TabbarDemoState createState() => _TabbarDemoState();}class _TabbarDemoState extends State<TabbarDemo> ...
2021-07-22
Flutter组件基础——ListView
Flutter组件基础——ListViewListView是滚动列表,类似于iOS中ScrollView,可横向、纵向滚动,内容不限。 ListView的使用ListView的使用很简单,但是需要多多练习; ListView的使用,通过设置children来实现,children中的Item为Widget对象。 纵向滚动代码如下: 123456789101112131415161718192021222324252627282930313233343536373839class MyApp extends StatelessWidget { @override Widget build(BuildContext context) { return MaterialApp( title: 'ListView Learn', home: Scaffold( appBar: new AppBar( tit...
2021-07-19
Flutter组件基础——Text
Flutter组件基础——Text组件文本组件:Text WidgetText是文本组件,类似于iOS中UILabel,用于文本的展示,是布局的基础控件之一。 文本对齐方式:TextAlign TextAlign center:Align the text in the center of the cotainer left:Align the text on the left edge of the container right:Align the text on the right edge of the container start:Align the text on the leading edge of the container. For left-to-right text(TextDirection.ltr), this is the left edge. For the right-to-left text(TextDirection.rtl), this is the right edge. end:Align the text on the trai...
公告
This is my Blog