Skip to content

ideati/mechanical_counter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Mechanical Counter plugin for Flutter

pub package

A Flutter plugin for iOS and Android for interacting with numbers from a familiar interface mimicking a mechanical digital counter.

Real thing In Chrome

Installation

First, add mechanical_counter as a dependency in your pubspec.yaml file.

iOS

No configuration required - the plugin should work out of the box.

Android

No configuration required - the plugin should work out of the box.

Example

import 'dart:io';

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

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

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: MyHomePage(),
    );
  }
}

class MyHomePage extends StatefulWidget {
  @override
  _MyHomePageState createState() => _MyHomePageState();
}

class _MyHomePageState extends State<MyHomePage> {

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text('Mechanical Counter Example'),
      ),
      body: Center(
        MechanicalCounter(
          digits: 6,
          onChanged: (newValue) => print("Value changed to $newValue")),
        ),
      ),
    );
  }
}

About

Flutter widget for a numerical interface inspired on mechanical counters

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published