Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
72cb041
Remove internal state for spinner value
ened Aug 16, 2020
2e30229
request focus when popup is shown, optimize
ened Aug 16, 2020
cccf4ba
Number formatter
ened May 21, 2021
2349720
Merge pull request #1 from CsabaConsulting/number-formatter
MrCsabaToth Jun 7, 2021
28f8d9d
Towards sound null safety
MrCsabaToth Jun 7, 2021
e08b820
Eliminating lates, because they are not initialized in the constructo…
MrCsabaToth Jun 9, 2021
3540b46
Version bump for latest change
MrCsabaToth Jun 9, 2021
81cb0ae
Exclude idea (IntelliJ IDEA) metadata folder from source control
MrCsabaToth Aug 20, 2023
32e9b6f
Very old package version bumps
MrCsabaToth Aug 20, 2023
f820a4e
Simple overcoming of RaisedButton deprecation with MaterialButton, fi…
MrCsabaToth Aug 20, 2023
38255e9
Analyzer reported warnings
MrCsabaToth Aug 20, 2023
851fda7
Analyzer: The 'author' field is no longer used and can be removed.
MrCsabaToth Aug 20, 2023
c4b7a09
Allow Flutter SDK 3.0 and above as well
MrCsabaToth Aug 20, 2023
d2491a6
More package version bumps (transitive)
MrCsabaToth Aug 20, 2023
94db7b9
intl lagging package version reported by outdated
MrCsabaToth Aug 20, 2023
859fe30
Flutter (Dart) format example
MrCsabaToth Aug 20, 2023
67a17da
Flutter (Dart) format main file
MrCsabaToth Aug 20, 2023
1c1b3c2
Filling license. To follow my other two plugins, it's MIT
MrCsabaToth Aug 20, 2023
39ab395
Extra empty line end removal
MrCsabaToth Aug 20, 2023
38abde6
Start articulating the new spinner_input_plus plugin
MrCsabaToth Aug 20, 2023
f381707
Introducing linter and analyzer
MrCsabaToth Aug 21, 2023
0d387c6
Remove lengthy comments form pubspec
MrCsabaToth Aug 21, 2023
71374e7
Analyzer and linter reported changes
MrCsabaToth Aug 21, 2023
65dd28e
Moving towards the new plugin
MrCsabaToth Aug 21, 2023
40a444b
Initial changelog
MrCsabaToth Aug 21, 2023
c72c43c
Moving further towards the new plugin
MrCsabaToth Aug 21, 2023
6818740
Longer description (60-180 chars) to increase pub score
MrCsabaToth Jan 1, 2024
2eccbdd
Upgrade dependencies to latest
MrCsabaToth Jan 1, 2024
62a33be
Adding code comments, fixes #4
MrCsabaToth Jan 2, 2024
02a29a4
Version bump for new release
MrCsabaToth Jan 2, 2024
82b415d
Changelog for new release
MrCsabaToth Jan 2, 2024
1f3e72f
Completing changelog (package version increases)
MrCsabaToth Jan 2, 2024
4b14859
New release to correct code format after code documentation
MrCsabaToth Jan 2, 2024
160ed48
Correct code format after code documentation: fields require now extr…
MrCsabaToth Jan 2, 2024
3d8471f
Adding changelog for 0.0.3 release (code formatting)
MrCsabaToth Jan 2, 2024
0bdaab8
Upgrade package versions
MrCsabaToth Jan 26, 2025
947c78a
Sooth Flutter lint / analyzer issue
MrCsabaToth Jan 26, 2025
686dc42
Changelog update
MrCsabaToth Jan 26, 2025
09d3059
Upgrade analyzer, linter, and Flutter SDK to check for deprecations a…
MrCsabaToth Dec 6, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

.packages
.pub/
.idea

build/
ios/.generated/
Expand Down
24 changes: 23 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1 +1,23 @@
## [0.0.1] - 02/09/2019.
## [0.0.1] - 08/20/2023

- Initial release
- Fork a fork of [spinner_inout](https://pub.dev/packages/spinner_input)
- Original: [spinner_input](https://github.com/Ali-Azmoud/spinner_input)
- The fork source: [spinner_input](https://github.com/ened/spinner_input)
- Upgrade dependencies
- Brush up code
- Introducing Analyzer and Linter and fixing reported issue

# [0.0.2] - 01/01/2024

- Increase description length to fall between 60-180 to increase pub score.
- Adding code comments (partially the goal is to increase pub score)
- Increase package versions

# [0.0.3] - 01/01/2024

- Correct code format after code documentation: fields require now extra new line separation

# [0.0.4] - 01/25/2024

- Increase package versions
22 changes: 21 additions & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1 +1,21 @@
TODO: Add your license here.
MIT License

2023 Copyright (c) Csaba Tóth.

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.
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,3 @@ A Spinner Input for flutter like HTML5 input-spinner
You can find examples in example directory

![](intro.gif)

8 changes: 8 additions & 0 deletions analysis_options.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
include: package:flutter_lints/flutter.yaml

# https://dart-lang.github.io/linter/lints/index.html
# https://dart.dev/guides/language/analysis-options
linter:
rules:

analyzer:
227 changes: 112 additions & 115 deletions example/example.dart
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
import 'package:flutter/material.dart';
import 'package:spinner_input/spinner_input.dart';
import 'package:spinner_input_plus/spinner_input_plus.dart';

void main() => runApp(MySpinner());
void main() => runApp(const MySpinner());

class MySpinner extends StatefulWidget {
const MySpinner({Key? key}) : super(key: key);

@override
_MySpinnerState createState() => _MySpinnerState();
MySpinnerState createState() => MySpinnerState();
}

class _MySpinnerState extends State<MySpinner> {
class MySpinnerState extends State<MySpinner> {
double spinner = 0;
double spinner3 = -5;
double spinner4 = 20;
Expand All @@ -18,122 +20,117 @@ class _MySpinnerState extends State<MySpinner> {
@override
Widget build(BuildContext context) {
return MaterialApp(
home: Scaffold(
appBar: AppBar(),
body: Column(
children: <Widget>[


// default spinner
Container(
margin: EdgeInsets.all(20),
child: SpinnerInput(
spinnerValue: spinner,
// minValue: 0,
// maxValue: 200,
onChange: (newValue) {
setState(() {
spinner = newValue;
});
},
),
home: Scaffold(
appBar: AppBar(),
body: Column(
children: <Widget>[
// default spinner
Container(
margin: const EdgeInsets.all(20),
child: SpinnerInput(
spinnerValue: spinner,
// minValue: 0,
// maxValue: 200,
onChange: (newValue) {
setState(() {
spinner = newValue;
});
},
),



// Set step ( can be int or double )
Container(
margin: EdgeInsets.all(20),
child: SpinnerInput(
minValue: 0,
maxValue: 200,
step: 5,
plusButton: SpinnerButtonStyle(elevation: 0, color: Colors.blue, borderRadius: BorderRadius.circular(0)),
minusButton: SpinnerButtonStyle(elevation: 0, color: Colors.red, borderRadius: BorderRadius.circular(0)),
middleNumberWidth: 70,
middleNumberStyle: TextStyle(fontSize: 21),
middleNumberBackground: Colors.yellowAccent.withOpacity(0.5),
spinnerValue: spinner3,
onChange: (newValue) {
setState(() {
spinner3 = newValue;
});
},
),

// Set step ( can be int or double )
Container(
margin: const EdgeInsets.all(20),
child: SpinnerInput(
minValue: 0,
maxValue: 200,
step: 5,
plusButton: SpinnerButtonStyle(
elevation: 0,
color: Colors.blue,
borderRadius: BorderRadius.circular(0),
),
),




// Disable long press and input-popup
Container(
margin: EdgeInsets.all(20),
child: SpinnerInput(
minValue: 0,
maxValue: 200,
disabledLongPress: true,
disabledPopup: true,
step: 5,
spinnerValue: spinner4,
onChange: (newValue) {
setState(() {
spinner4 = newValue;
});
},
minusButton: SpinnerButtonStyle(
elevation: 0,
color: Colors.red,
borderRadius: BorderRadius.circular(0),
),
middleNumberWidth: 70,
middleNumberStyle: const TextStyle(fontSize: 21),
middleNumberBackground: Colors.yellowAccent.withAlpha(128),
spinnerValue: spinner3,
onChange: (newValue) {
setState(() {
spinner3 = newValue;
});
},
),


// A little more customized buttons
Container(
margin: EdgeInsets.all(20),
child: SpinnerInput(
minValue: 0,
maxValue: 200,
step: 5.524,
fractionDigits: 3,
plusButton: SpinnerButtonStyle(
color: Colors.green,
height: 60,
width: 60,
elevation: 1,
highlightElevation: 10,
child: Icon(Icons.thumb_up)
),
minusButton: SpinnerButtonStyle(
color: Colors.red,
borderRadius: BorderRadius.circular(0),
),
spinnerValue: spinner5,
onChange: (newValue) {
setState(() {
spinner5 = newValue;
});
},
),
),

// Disable long press and input-popup
Container(
margin: const EdgeInsets.all(20),
child: SpinnerInput(
minValue: 0,
maxValue: 200,
disabledLongPress: true,
disabledPopup: true,
step: 5,
spinnerValue: spinner4,
onChange: (newValue) {
setState(() {
spinner4 = newValue;
});
},
),



// RTL support
Container(
margin: EdgeInsets.all(50),
child: SpinnerInput(
direction: TextDirection.rtl,
spinnerValue: spinner6,
onChange: (newValue) {
setState(() {
spinner6 = newValue;
});
},
),

// A little more customized buttons
Container(
margin: const EdgeInsets.all(20),
child: SpinnerInput(
minValue: 0,
maxValue: 200,
step: 5.524,
fractionDigits: 3,
plusButton: SpinnerButtonStyle(
color: Colors.green,
height: 60,
width: 60,
elevation: 1,
highlightElevation: 10,
child: const Icon(Icons.thumb_up),
),
)




],
),
));
minusButton: SpinnerButtonStyle(
color: Colors.red,
borderRadius: BorderRadius.circular(0),
),
spinnerValue: spinner5,
onChange: (newValue) {
setState(() {
spinner5 = newValue;
});
},
),
),

// RTL support
Container(
margin: const EdgeInsets.all(50),
child: SpinnerInput(
direction: TextDirection.rtl,
spinnerValue: spinner6,
onChange: (newValue) {
setState(() {
spinner6 = newValue;
});
},
),
),
],
),
),
);
}
}
Loading