bidirectional_scroll_view 0.0.6

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

bidirectional_scroll_view #

This package for Flutter allows you to scroll in both horizontal and vertical directions.

It works as follows:

    new BidirectionalScrollViewPlugin(child: <replace with your own widget>)

Support #

Please file issues and feature requests.

[0.0.5]

  • NEW: Add ability to set the x and y offset of scroll view
  • NEW: Add getter methods for x and y scroll values
  • NEW: Add getter methods for overscrolled widget width and height
  • NEW: Add getter methods for container that holds the overscrolled widget width and height

[0.0.4]

  • NEW: Add optional listener for x and y scroll values
  • NEW: Add velocityFactor to make fling velocity configurable
  • FIX: Prevent fling and gesture animation mixing up

[0.0.3]

  • NEW: Bring project files to root level

[0.0.2]

  • NEW: Add Flutter mention to project

[0.0.1]

  • NEW: Initial Release.

example/lib/main.dart

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

void main() {
  runApp(new MyApp());
}

class MyApp extends StatefulWidget {
  @override
  _MyAppState createState() => new _MyAppState();
}

class _MyAppState extends State<MyApp> {
  BidirectionalScrollViewPlugin _plugin;


  @override
  void initState() {
    super.initState();
    _plugin = new BidirectionalScrollViewPlugin(
      child: _buildWidgets(),
      velocityFactor: 2.0,
      scrollListener: (offset) {
        print("----------");
        print("new x and y scroll offset: " + offset.dx.toString() + " " + offset.dy.toString());
        print("x and y scroll offset getters: " + _plugin.x.toString() + " " + _plugin.y.toString());
        print("height and width of overscrolled widget: " + _plugin.height.toString() + " " + _plugin.width.toString());
        print("height and width of the container: " + _plugin.containerHeight.toString() + " " + _plugin.containerWidth.toString());
        print("----------");
      },
    );

    //_plugin.offset = new Offset(10.0, 10.0); // use this method to set a new offset where appropriate
  }

  @override
  Widget build(BuildContext context) {
    return new MaterialApp(
      home: new Scaffold(
        appBar: new AppBar(
          title: new Text('Bidirectional ScrollView Plugin'),
        ),
        body: new Center(
          child: _plugin
        ),
      ),
    );
  }

  Widget _buildWidgets() {
    List<Widget> list = new List();

    for (int i = 0; i < 10; i++) {
      list.add(new Container(
        padding: new EdgeInsets.all(5.0),
        color: Colors.white,
        height: 80.0,
        width: 120.0,
        child: new Container(
          color: Colors.grey,
        ),
      ));
    }

    return new Row(
      children: [
        new Column(
          children: list.map((widget) {
            return widget;
          }).toList(),
        ),
        new Column(
          children: list.map((widget) {
            return widget;
          }).toList(),
        ),
        new Column(
          children: list.map((widget) {
            return widget;
          }).toList(),
        ),
        new Column(
          children: list.map((widget) {
            return widget;
          }).toList(),
        ),
        new Column(
          children: list.map((widget) {
            return widget;
          }).toList(),
        ),
        new Column(
          children: list.map((widget) {
            return widget;
          }).toList(),
        ),
        new Column(
          children: list.map((widget) {
            return widget;
          }).toList(),
        ),
        new Column(
          children: list.map((widget) {
            return widget;
          }).toList(),
        ),
        new Column(
          children: list.map((widget) {
            return widget;
          }).toList(),
        ),
        new Column(
          children: list.map((widget) {
            return widget;
          }).toList(),
        ),
        new Column(
          children: list.map((widget) {
            return widget;
          }).toList(),
        ),
        new Column(
          children: list.map((widget) {
            return widget;
          }).toList(),
        ),
        new Column(
          children: list.map((widget) {
            return widget;
          }).toList(),
        ),
        new Column(
          children: list.map((widget) {
            return widget;
          }).toList(),
        ),
      ],
    );
  }
}

Use this package as a library

1. Depend on it

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


dependencies:
  bidirectional_scroll_view: ^0.0.6

2. Install it

You can install packages from the command line:

with pub:


$ pub get

with Flutter:


$ flutter packages get

Alternatively, your editor might support pub get or 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:bidirectional_scroll_view/bidirectional_scroll_view.dart';
  
Version Uploaded Documentation Archive
0.0.6 Oct 19, 2018 Go to the documentation of bidirectional_scroll_view 0.0.6 Download bidirectional_scroll_view 0.0.6 archive
0.0.5 Jul 30, 2017 Go to the documentation of bidirectional_scroll_view 0.0.5 Download bidirectional_scroll_view 0.0.5 archive
0.0.4 Jul 29, 2017 Go to the documentation of bidirectional_scroll_view 0.0.4 Download bidirectional_scroll_view 0.0.4 archive
0.0.3 Jul 29, 2017 Go to the documentation of bidirectional_scroll_view 0.0.3 Download bidirectional_scroll_view 0.0.3 archive
0.0.2 Jul 24, 2017 Go to the documentation of bidirectional_scroll_view 0.0.2 Download bidirectional_scroll_view 0.0.2 archive
0.0.1 Jul 24, 2017 Go to the documentation of bidirectional_scroll_view 0.0.1 Download bidirectional_scroll_view 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]
0
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
28
Overall:
Weighted score of the above. [more]
44
Learn more about scoring.

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

  • Dart: 2.1.0
  • pana: 0.12.13+1
  • Flutter: 1.2.1

Platforms

Detected platforms:

Error(s) prevent platform classification:

Fix dependencies in pubspec.yaml.

Analysis issues and suggestions

Fix dependencies in pubspec.yaml.

Running flutter packages pub upgrade failed with the following output:

ERR: The current Dart SDK version is 2.1.2-dev.0.0.flutter-0a7dcf17eb.
 
 Because bidirectional_scroll_view requires SDK version >=1.19.0 <2.1.0, version solving failed.

Health suggestions

Format lib/bidirectional_scroll_view.dart.

Run flutter format to format lib/bidirectional_scroll_view.dart.

Maintenance issues and suggestions

Fix platform conflicts. (-20 points)

Error(s) prevent platform classification:

Fix dependencies in pubspec.yaml.

Support the latest stable Dart SDK in pubspec.yaml. (-20 points)

The SDK constraint in pubspec.yaml doesn't allow the latest stable Dart SDK release.

Make sure dartdoc successfully runs on your package's source files. (-10 points)

Dependencies were not resolved.

The package description is too short. (-12 points)

Add more detail to the description field of pubspec.yaml. Use 60 to 180 characters to describe the package, what it does, and its target use case.

Package is pre-v0.1 release. (-10 points)

While nothing is inherently wrong with versions of 0.0.*, it might mean that the author is still experimenting with the general direction of the API.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=1.19.0 <2.1.0