美文网首页
flutter 弹幕库 yzl_flutter_bulletch

flutter 弹幕库 yzl_flutter_bulletch

作者: emisunshine | 来源:发表于2020-08-11 11:42 被阅读0次

    目前弹幕库已经上传到Pub上,支持一般的移动弹幕,静止弹幕,用户发的单条弹幕,定制弹幕速度,行数,可以是任意类型的弹幕,包括文字,图片等。

    第一步添加依赖yzl_flutter_bulletchat:^0.0.2

    第二步导入

    import 'package:yzl_flutter_bulletchat/bulletchat.dart';import 'package:yzl_flutter_bulletchat/bulletchat_data.dart';import 'package:yzl_flutter_bulletchat/bulletchat_item.dart';import 'package:yzl_flutter_bulletchat/bulletchat_item_child.dart';import 'package:yzl_flutter_bulletchat/flutterbulletchat.dart';

    第三步 使用

    ```Container( width: width, height: height,

    ```

     child: BulletChat.builder( builder: (context, data) {returnText( (dataasBulletChatData).contentasString, style: TextStyle(color: Colors.orange), ); }, width: width, height: height, maxLine:5, globalKey: globalKey, data: list, option: AvoidOption.AVOIDCOLLISION, savageBulletItemBuilder: (context, data) {returnText( (dataasBulletChatData).contentasString, style: TextStyle(color: Colors.red), ); }, ), ),~~~

    相关文章

      网友评论

          本文标题:flutter 弹幕库 yzl_flutter_bulletch

          本文链接:https://www.haomeiwen.com/subject/ntuedktx.html