stepper_counter_swipe 0.0.6

  • Readme
  • Changelog
  • Example
  • Installing
  • 85

stepper_counter_swipe #

Awesome Flutter

This concept of the widget is inspired by Nikolay Kuchkarov. Designers asked his what if a user swipes left and will hold such type of button. Could this stepper count faster? I released this version with more functionality in this subject.

gif #

Created #

Usage example #

import 'package:stepper_counter_swipe/stepper_counter_swipe.dart';
...
Container(
  padding: const EdgeInsets.all(8.0),
  child: StepperSwipe(
    initialValue:0,
    speedTransitionLimitCount: 3, //Trigger count for fast counting
    onChanged: (int value) => print('new value $value'),
    firstIncrementDuration: Duration(milliseconds: 250), //Unit time before fast counting
    secondIncrementDuration: Duration(milliseconds: 100), //Unit time during fast counting
    direction: Axis.horizontal,
    dragButtonColor: Colors.blueAccent,
    withNaturalNumbers: false,
    maxValue:50,
    stepperValue:widget.val,
    withFastCount: true,
    onChanged: (int val) => print('New value : $val'),
  ),
),
...

Getting Started #

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

[0.0.1n] - TODO: Add release date. #

[0.0.6] - TODO: 08.07.2020. #

  • TODO: Describe initial release.

example/lib/main.dart

import 'package:flutter/material.dart';
import 'package:stepper_counter_swipe/stepper_counter_swipe.dart';
void main() => runApp(MyApp());

class MyApp extends StatefulWidget {
 int val=0;
  @override
  _MyAppState createState() => _MyAppState();

  
}

class _MyAppState extends State<MyApp> {
   
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        backgroundColor: Colors.green,
        body: Center(
          child: StepperSwipe(
            initialValue:0,
            speedTransitionLimitCount: 1,
            firstIncrementDuration: Duration(milliseconds: 100),
            secondIncrementDuration: Duration(milliseconds: 100),
            direction: Axis.horizontal,
            dragButtonColor: Colors.blueAccent,
            withSpring: true,
            maxValue:50,
            stepperValue:widget.val,
            withNaturalNumbers: true,
            withFastCount: true,
            onChanged: (int val) => print('New value : $val'),
          ),
        ),
      ),
    );
  }
}

Use this package as a library

1. Depend on it

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


dependencies:
  stepper_counter_swipe: ^0.0.6

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:stepper_counter_swipe/stepper_counter_swipe.dart';
  
Popularity:
Describes how popular the package is relative to other packages. [more]
75
Health:
Code health derived from static analysis. [more]
100
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
90
Overall:
Weighted score of the above. [more]
85
Learn more about scoring.

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

  • Dart: 2.8.4
  • pana: 0.13.15
  • Flutter: 1.17.5

Analysis suggestions

Package not compatible with SDK dart

Because:

  • stepper_counter_swipe that is a package requiring null.

Health suggestions

Fix lib/src/steppercounter.dart. (-0.50 points)

Analysis of lib/src/steppercounter.dart reported 1 hint:

line 9 col 7: This class (or a class that this class inherits from) is marked as '@immutable', but one or more of its instance fields aren't final: StepperSwipe.stepperValue

Format lib/stepper_counter_swipe.dart.

Run flutter format to format lib/stepper_counter_swipe.dart.

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.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.1.0 <3.0.0
flutter 0.0.0
Transitive dependencies
collection 1.14.12 1.14.13
meta 1.1.8 1.2.2
sky_engine 0.0.99
typed_data 1.1.6 1.2.0
vector_math 2.0.8 2.1.0-nullsafety
Dev dependencies
flutter_test