xiaoyaocz / flutter_ns_danmaku

简单的Flutter弹幕组件

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

一个简单的Flutter弹幕组件。

截图

DEMO 案例
screenshot1 screenshot2

说明

debug模式下会卡顿掉帧,请在profilerelease模式下运行查看实际效果。

在一些机型上加载较多弹幕会掉帧,如果有好的优化方案,欢迎PR。

示例

dependencies: 
  # 请使用Git引用此包
  ns_danmaku: 
    git: 
        url: https://github.com/xiaoyaocz/flutter_ns_danmaku.git
        ref: master

Example:

import 'package:ns_danmaku/ns_danmaku.dart';

class _DanmakuPageState extends State<DanmakuPage> {
  late DanmakuController _controller;
  @override
  Widget build(BuildContext context) {
    return Stack(
      children: [
        //Your container, such as a player
        Container(),
        // Danmaku
        DanmakuView(
          createdController: (e) {
            _controller = e;
          },
          option: DanmakuOption(),
        ),
      ],
    );
}

更新修改

v0.0.6

  • 增加FontWeight配置
  • 修改borderText -> strokeText

参考及引用

xiaoyaocz/NSDanmaku 本项目的UWP版,有兴趣可以看看

https://zhuanlan.zhihu.com/p/159027974

https://www.zhihu.com/question/370464345

LaoMengFlutter/flutter-do

About

简单的Flutter弹幕组件

License:MIT License


Languages

Language:Dart 43.6%Language:C++ 31.7%Language:CMake 20.2%Language:HTML 2.0%Language:C 1.9%Language:Swift 0.5%Language:Kotlin 0.2%Language:Objective-C 0.0%