Flutter版本的海外剧
发表于|更新于
|浏览量:
背景
前阵子抓包,有两个海外剧的接口,最近有时间,打算温习一下 Flutter,就用来写了一个简单的 APP,包含轮播图、下拉刷新、上拉加载以及播放功能。
效果如下:
运行时需要注意 Flutter 版本的问题,可能需要修改 播放器的 package 中的代码,直接Google 搜索,修改即可,如有疑问可以联系我。
代码放在 Github 上,地址是:meiju_flutter
文章作者: 今是昨非
版权声明: 本博客所有文章除特别声明外,均采用 CC BY-NC-SA 4.0 许可协议。转载请注明来源 今是昨非的博客!
相关推荐
2021-07-23
Flutter布局基础——Row水平布局
Flutter布局基础——Row水平布局Flutter中水平布局使用Row,可设置元素水平方向排列,如果想要子元素充满,可把子元素使用Expanded包括起来。 背景使用Row布局的Widget,不能滑动;通常使用Row布局的时候,默认所有的子元素加起来不能超过父视图的宽度。如果想要横向滑动,可考虑使用ListView。 Ps:当所有子元素的宽度超出了父视图Row的宽度后,会有警告。 如果想要竖向布局,使用Column。 如果只有一个元素,可考虑使用Align或者Center来布局。 基础介绍 Row常用属性 children: 子视图 textDirection: 子视图布局方向 TextDirection.ltr: 从左到右 TextDirection.rtl: 从右到左 mainAxisAlignment: 子视图在父视图上的布局方式,水平方向布局 MainAxisAlignment.spaceAround: 子视图之间和子视图距离父视图都留有间距 MainAxisAlignment.center: 所有子试图居中 MainAxisAlignment.end: 所...
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-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-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...
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-26
Flutter布局基础——Stack层叠布局
Flutter布局基础——Stack层叠布局层叠布局适用于子视图叠放一起,且位置能够相对于父视图边界确认的情况。 比如,可用于图片上加文字,按钮上加渐变阴影等等。 Stack Widget的子视图要么是positioned,要么是non-positioned。Positioned子视图是指使用Positioned的widget包括起来的子视图,通过设置相对于Stack的top、bottom、left、right属性来确认自身位置,其中至少要有一个不为空。 Stack Widget的大小取决于所有non-positioned的子视图。non-positioned的子视图的位置根据alignment属性确定,(当alignment为left-to-right时,子视图默认从左上角开始;当aligment为right-to-left时,子视图从右上角开始;)。 Stack 基础使用Stack常用属性 Stack常用属性 children:子视图 alignment:子视图的对齐方式 topLeft:顶部左对齐 topCenter:顶部居中对齐 topRight:顶部右对齐 cent...
公告
This is my Blog