marquee 0.1.0

  • README.md
  • CHANGELOG.md
  • Example
  • Installing
  • Versions
  • 89

marquee #

A Flutter widget that scrolls its child infinitely. Features vertical and horizontal scrolling as well as custom velocities.

Appreciate the widget? Show some ❤️ and star the repo to support the project.

Resources #

Usage #

The Marquee repeats its child over and over and scrolls it automatically.

Marquee(
  child: Text('There once was a boy who told this story about a boy: "'),
)

scrollAxis #

While normally, the Marquee scrolls horizontally, by setting the scrollAxis property to either Axis.horizontal or Axis.vertical, you can specify the direction in which the Marquee scrolls.

Marquee(
  scrollAxis: Axis.vertical,
  child: Text("Look what's below this:"),
)

blankSpace #

If you want to have some space between the children, there's a blankSpace property you can set:

Marquee(
  blankSpace: 300.0,
  child: Text('Wait for it...'),
)

velocity #

You can also customize the velocity the Marquee scrolls with. Just set the velocity parameter to any velocity in pixels per second.

Marquee(
  velocity: 1000.0,
  child: Text('Gotta go faaaaaast...'),
)

LICENSE #

Copyright (c) 2018 Marcel Garus

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

[0.1.0] - 2018/10/22

  • Added example.

[0.0.2] - 2018/10/22

  • Improved readme.

[0.0.1] - 2018/10/22

  • Initial release featuring custom scrollAxis, blankSpace and velocity.

example/main.dart

import 'package:flutter/material.dart';
import 'package:marquee/marquee.dart';

void main() => runApp(MyApp());

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Marquee',
      home: Scaffold(
        backgroundColor: Colors.deepOrange,
        body: ListView(
          padding: EdgeInsets.only(top: 50.0),
          children: <Widget>[
            _buildMarquee(),
            _buildVerticalMarquee(),
            _buildMarqueeWithBlankSpace(),
            _buildFastMarquee()
          ].map((marquee) {
            return Padding(
              padding: EdgeInsets.all(16.0),
              child: Container(
                height: 50.0,
                color: Colors.white,
                child: marquee
              )
            );
          }).toList(),
        )
      ),
    );
  }

  Widget _buildMarquee() {
    return Marquee(
      child: Text('There once was a boy who told this story about a boy: "'),
    );
  }

  Widget _buildVerticalMarquee() {
    return Marquee(
      scrollAxis: Axis.vertical,
      child: Text("Look what's below this:"),
    );
  }

  Widget _buildMarqueeWithBlankSpace() {
    return Marquee(
      blankSpace: 300.0,
      child: Text('Wait for it...'),
    );
  }

  Widget _buildFastMarquee() {
    return Marquee(
      velocity: 1000.0,
      child: Text('Gotta go faaaaaast...'),
    );
  }
}

Use this package as a library

1. Depend on it

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


dependencies:
  marquee: ^0.1.0

2. Install it

You can install packages from the command line:

with Flutter:


$ flutter packages get

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

3. Import it

Now in your Dart code, you can use:


import 'package:marquee/marquee.dart';
  
Version Uploaded Documentation Archive
1.1.0 Nov 8, 2018 Go to the documentation of marquee 1.1.0 Download marquee 1.1.0 archive
1.0.2 Oct 29, 2018 Go to the documentation of marquee 1.0.2 Download marquee 1.0.2 archive
1.0.1 Oct 29, 2018 Go to the documentation of marquee 1.0.1 Download marquee 1.0.1 archive
1.0.0 Oct 29, 2018 Go to the documentation of marquee 1.0.0 Download marquee 1.0.0 archive
0.1.0 Oct 22, 2018 Go to the documentation of marquee 0.1.0 Download marquee 0.1.0 archive
0.0.2 Oct 22, 2018 Go to the documentation of marquee 0.0.2 Download marquee 0.0.2 archive
0.0.1 Oct 22, 2018 Go to the documentation of marquee 0.0.1 Download marquee 0.0.1 archive
Popularity:
Describes how popular the package is relative to other packages. [more]
77
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]
89
Learn more about scoring.

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

  • Dart: 2.1.0
  • pana: 0.12.13
  • Flutter: 1.2.0

Platforms

Detected platforms: Flutter

References Flutter, and has no conflicting libraries.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.0.0-dev.68.0 <3.0.0
flutter 0.0.0
Transitive dependencies
collection 1.14.11
meta 1.1.6 1.1.7
sky_engine 0.0.99
typed_data 1.1.6
vector_math 2.0.8
Dev dependencies
flutter_test