flutter_barrage 0.4.3

  • Readme
  • Changelog
  • Example
  • Installing
  • 67

flutter_barrage #

[![Join the chat at https://gitter.im/flutter_barrage/community](https://badges.gitter.im/flutter_barrage/community.svg)](https://gitter.im/flutter_barrage/community?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)

A barrage wall flutter plugin. 一个弹幕墙插件。

Getting Started #

more examples

  • show barrage only
List<Bullet> bullets = List<Bullet>.generate(100, (i) {
  final showTime = random.nextInt(60000); // in 60s
  return Bullet(child: Text('$i-$showTime}'), showTime: showTime);
});
Stack(
  children: <Widget>[
    Positioned(
      top: 200,
      width: MediaQuery.of(context).size.width,
      height:
          MediaQuery.of(context).size.width * MediaQuery.of(context).size.aspectRatio + 200,
      child: BarrageWall(
        massiveMode: false, // disabled by default
        timelineNotifier: timelineNotifier, // send a BarrageValue notifier let bullet fires using your own timeline
        bullets: bullets,
        child: new Container(),
      ),
    )
  ],
);
  • show barrage with send bullet function
Column(
  children: <Widget>[
    Expanded(
      flex: 9,
      child: Stack(
        children: <Widget>[
          Positioned(
//                    top: 20,
            width: MediaQuery.of(context).size.width,
            height: MediaQuery.of(context).size.width *
                    MediaQuery.of(context).size.aspectRatio +
                100,
            child: BarrageWall(
              debug: true, // show debug panel
              speed: 4, // speed of bullet show in screen (seconds)
              /*
              speed: 8,
              speedCorrectionInMilliseconds: 3000,*/
              /*
                timelineNotifier: timelineNotifier, // send a BarrageValue notifier let bullet fires using your own timeline*/
              bullets: bullets,
              child: new Container(),
              controller: barrageWallController,
            ),
          ),
        ],
      ),
    ),
    Expanded(
      child: Padding(
          padding: const EdgeInsets.all(8.0),
          child: TextField(
//                    controller: textEditingController,
              maxLength: 20,
              onSubmitted: (text) {
//                      textEditingController.clear();
                barrageWallController.send([new Bullet(child: Text(text))]);
              })),
    ),
  ],
)

0.4.3 #

  • fix cannot send bullet issue

0.4.2 #

  • update flutter channel to stable

0.4.1 #

  • dependency update

0.4.0 #

  • feat: add enable/disable function for controller
  • feat: add barrage cleaner to improve performance

0.3.4 #

  • fix timelineNotifier not working when init in barrageWall

0.3.3 #

  • fix cannot send bullet when initial bullets is empty

0.3.2 #

  • add chewie example
  • fix issues in fullscreen mode

0.3.1 #

  • add speedCorrection param to adjust speed for each channels
  • add safeBottomHeight param to make user choose the height of the safe area

0.3.0 #

  • add massive mode

0.2.0+1 #

  • fix timelineNotifier may be null issue

0.2.0 #

  • add send bullet function

0.1.0+1 #

  • Update example

0.1.0 #

  • Add example

0.0.1 #

  • Initial first release

example/README.md

flutter_barrage_example #

https://github.com/danielwii/flutter_barrage/tree/master/example

Use this package as a library

1. Depend on it

Add this to your package's pubspec.yaml file:


dependencies:
  flutter_barrage: ^0.4.3

2. Install it

You can install packages from the command line:

with Flutter:


$ flutter pub get

Alternatively, your editor might support flutter pub get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:


import 'package:flutter_barrage/flutter_barrage.dart';
  
Popularity:
Describes how popular the package is relative to other packages. [more]
34
Health:
Code health derived from static analysis. [more]
100
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
100
Overall:
Weighted score of the above. [more]
67
Learn more about scoring.

We analyzed this package on Oct 11, 2019, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.5.1
  • pana: 0.12.21
  • Flutter: 1.9.1+hotfix.4

Platforms

Detected platforms: Flutter

References Flutter, and has no conflicting libraries.

Health suggestions

Fix lib/flutter_barrage.dart. (-0.50 points)

Analysis of lib/flutter_barrage.dart reported 1 hint:

line 102 col 7: The value of the field '_processed' isn't used.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.1.0 <3.0.0
flutter 0.0.0
quiver ^2.0.3 2.0.5
Transitive dependencies
collection 1.14.11 1.14.12
matcher 0.12.5
meta 1.1.7
path 1.6.4
sky_engine 0.0.99
stack_trace 1.9.3
typed_data 1.1.6
vector_math 2.0.8
Dev dependencies
flutter_test