目前彈幕庫已經(jīng)上傳到Pub上拂玻,支持一般的移動(dòng)彈幕酸些,靜止彈幕,用戶發(fā)的單條彈幕檐蚜,定制彈幕速度魄懂,行數(shù),可以是任意類型的彈幕闯第,包括文字市栗,圖片等。
第一步添加依賴yzl_flutter_bulletchat:^0.0.2
第二步導(dǎo)入
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), ); }, ), ),~~~