oscilloscope 0.0.1

  • README.md
  • Example
  • Installing
  • Versions
  • 71

oscilloscope widget package for Flutter #

Oscilloscope is a graphical display similar to the trace on an oscilloscope that will display values as it scrolls across the screen. The widget uses a List <double> as the source of the data to display and will scale the information to fit the display. Take a look at the example to see how it can be used.

Each time a value is added to the dataset another point is plotted on the trace, this trace will extends from left to right across the screen until it reaches the end. At this pint the trace will then scroll to show new values.

The display can be customised using the follwoing values:

  • backgroundColor - the default is Colors.black
  • traceColor - the default color is Colors.white
  • padding - the default is 10.0

The other settings are

  • dataSet - this is the data that is used to generate the trace
  • yAxisMin - an indicator to define the minimum value found in the dataSet (default 0.0)
  • yAxisMax - an indicator to define the maximum value found in the dataSet (default 1.0)

yAxisMin and yAxisMax are used by the widget to determine the scaling factor so all data values are displayed. These values can be altered to modify the data display scale.

Getting Started #

For help getting started with Flutter, view the online documentation.

[0.0.1] - 13 Sept 2018.

  • Initial Release


/// Demo of using the oscilloscope package
/// In this demo 2 displays are generated showing the outputs for Sine & Cosine
/// The scope displays will show the data sets  which will fill the yAxis and then the screen display will 'scroll'
import 'package:flutter/material.dart';
import 'package:oscilloscope/oscilloscope.dart';
import 'dart:math';
import 'dart:async';

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

class MyApp extends StatelessWidget {
  Widget build(BuildContext context) {
    return new MaterialApp(
      title: "Oscilloscope Display Example",
      home: Shell(),

class Shell extends StatefulWidget {
  _ShellState createState() => _ShellState();

class _ShellState extends State<Shell> {
  List<double> traceX = List();
  List<double> traceY = List();
  double radians = 0.0;
  Timer _timer;

  /// method to generate tTst  Wave Pattern Sets
  /// this gives us a value between +1  & -1 for sign & cosine
  _generateTrace(Timer t) {
    // generate our  values
    var sv = sin((radians * pi));
    var cv = cos((radians * pi));

    // Add to the growing dataset
    setState(() {

    // adjust to recyle the radian value ( 0 = 2Pi RADS)
    radians += 0.05;
    if (radians >= 2.0) {
      radians = 0.0;

  initState() {
    // create our timer to generate test values
    _timer = Timer.periodic(Duration(milliseconds: 60), _generateTrace);

  void dispose() {

  Widget build(BuildContext context) {
    // Create A Scope Display
    Oscilloscope scopeOne = Oscilloscope(
      padding: 20.0,
      backgroundColor: Colors.black,
      traceColor: Colors.green,
      yAxisMax: 1.0,
      yAxisMin: -1.0,
      dataSet: traceX,

    // Create A Scope Display
    Oscilloscope scopeTwo = Oscilloscope(
      padding: 20.0,
      backgroundColor: Colors.black,
      traceColor: Colors.yellow,
      yAxisMax: 1.0,
      yAxisMin: -1.0,
      dataSet: traceY,

    // Generate the Scaffold
    return Scaffold(
      appBar: AppBar(
        title: Text("OscilloScope Demo"),
      body: Column(
        children: <Widget>[
          Expanded(flex: 1, child: scopeOne),
            flex: 1,
            child: scopeTwo,

Use this package as a library

1. Depend on it

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

  oscilloscope: ^0.0.1

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:oscilloscope/oscilloscope.dart';
Version Uploaded Documentation Archive
0.0.3 Sep 14, 2018 Go to the documentation of oscilloscope 0.0.3 Download oscilloscope 0.0.3 archive
0.0.2 Sep 14, 2018 Go to the documentation of oscilloscope 0.0.2 Download oscilloscope 0.0.2 archive
0.0.1 Sep 13, 2018 Go to the documentation of oscilloscope 0.0.1 Download oscilloscope 0.0.1 archive
Describes how popular the package is relative to other packages. [more]
Code health derived from static analysis. [more]
Reflects how tidy and up-to-date the package is. [more]
Weighted score of the above. [more]
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


Detected platforms: Flutter

References Flutter, and has no conflicting libraries.

Maintenance suggestions

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.


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