{"id":15442367,"url":"https://github.com/eunicevassoa/flutter_quantity_input","last_synced_at":"2026-01-11T04:05:00.675Z","repository":{"id":56837554,"uuid":"431536669","full_name":"4inka/flutter_quantity_input","owner":"4inka","description":"Quantity input plugin for flutter","archived":true,"fork":false,"pushed_at":"2024-03-12T04:23:24.000Z","size":314,"stargazers_count":4,"open_issues_count":5,"forks_count":4,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-01-12T20:35:45.472Z","etag":null,"topics":["flutter","flutter-package","number-input","quantity-input"],"latest_commit_sha":null,"homepage":"","language":"Dart","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/4inka.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-11-24T15:31:20.000Z","updated_at":"2024-10-03T10:42:35.000Z","dependencies_parsed_at":"2022-09-12T11:51:36.569Z","dependency_job_id":null,"html_url":"https://github.com/4inka/flutter_quantity_input","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/4inka%2Fflutter_quantity_input","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/4inka%2Fflutter_quantity_input/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/4inka%2Fflutter_quantity_input/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/4inka%2Fflutter_quantity_input/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/4inka","download_url":"https://codeload.github.com/4inka/flutter_quantity_input/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":236085453,"owners_count":19092548,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["flutter","flutter-package","number-input","quantity-input"],"created_at":"2024-10-01T19:27:02.144Z","updated_at":"2025-10-11T11:30:28.186Z","avatar_url":"https://github.com/4inka.png","language":"Dart","funding_links":["https://www.buymeacoffee.com/4inka"],"categories":[],"sub_categories":[],"readme":"# Quantity Input\n\n\u003ca href=\"https://www.buymeacoffee.com/4inka\" target=\"_blank\"\u003e\u003cimg src=\"https://cdn.buymeacoffee.com/buttons/v2/default-violet.png\" alt=\"Buy Me A Pizza\" style=\"height: 60px !important;width: 217px !important;\" \u003e\u003c/a\u003e\n\n\nA Flutter plugin to handle number inputs with increment and decrement buttons.\n\n## Preview\n![Preview](https://raw.githubusercontent.com/4inka/flutter_quantity_input/main/preview/preview.gif)\n\n## Usage\n\nIn the `pubspec.yaml` of your flutter project, add the following dependency:\n\n``` yaml\ndependencies:\n  ...\n  quantity_input: ^1.0.2\n```\n\nYou can create a simple quantity input widget with the following example:\n\n``` dart\nimport 'package:flutter/material.dart';\nimport 'package:quantity_input/quantity_input.dart';\n\nvoid main() {\n  runApp(MyApp());\n}\n\nclass MyApp extends StatefulWidget {\n  @override\n  State\u003cMyHomePage\u003e createState() =\u003e _MyHomePageState();\n}\n\nclass _MyHomePageState extends State\u003cMyHomePage\u003e {\n  int simpleIntInput = 0;\n\n  @override\n  Widget build(BuildContext context) {\n    return MaterialApp(\n      title: 'Example',\n      theme: ThemeData(\n        primarySwatch: Colors.blue,\n      ),\n      home: SafeArea(\n        child: Scaffold(\n          appBar: AppBar(\n            title: Text('Example')\n          ),\n          body: Center(\n            child: Column(  \n              mainAxisSize: MainAxisSize.min,\n              children: [\n                QuantityInput(\n                  value: simpleIntInput,\n                  onChanged: (value) =\u003e setState(() =\u003e simpleIntInput = int.parse(value.replaceAll(',', '')))\n                ),\n                Text(\n                  'Value: $simpleIntInput',\n                  style: TextStyle(\n                    color: Colors.black,\n                    fontWeight: FontWeight.bold\n                  )\n                )\n              ]\n            )\n          )\n        )\n      )\n    );\n  }\n}\n```\n\n**If the value returned by `onChanged` has tousand separators, it is recommended to remove the commas from String before parsing as shown in example before.**\n\n## API\n| Attribute | Type | Required | Description | Default value |\n|:---|:---|:---:|:---|:---|\n| value | `int`/`double` | :heavy_check_mark: | Has to be an int or double depending on QuantityInputType variable |  |\n| onChanged | `Function(String)` | :heavy_check_mark: | Detects changes to the input and sends value through param |  |\n| step | `int`/`double` | :x: | The value that is incremented or decremented each time the user presses a button | 1 |\n| decimalDigits | `int` | :x: | The number of decimal places that can be displayed for double input | 1 |\n| minValue | `int`/`double` | :x: | Set min value to be displayed in input | 1 |\n| maxValue | `int`/`double` | :x: | Set max value to be displayed in input | 100 |\n| inputWidth | `double` | :x: | The width of the textfield input | 80 |\n| buttonColor | `Color` | :x: | Sets color for increment and decrement buttons | Primary app color |\n| iconColor | `Color` | :x: | Sets color for icons inside increment and decrement buttons | Colors.white |\n| label | `String` | :x: | Sets label for input |  |\n| readOnly | `bool` | :x: | Determines if the input will be readOnly | false |\n| acceptsZero | `bool` | :x: | If set to true, the input can accept the value 0 | false |\n| acceptsNegatives | `bool` | :x: | If set to true, the input can accept negative values | false |\n| type | `QuantityInputType` | :x: | Determines if the input will manage values as int or double | QuantityInputType.int |\n| decoration | `InputDecoration` | :x: | Sets custom InputDecoration to the widget TextFormField |  |\n| elevation | `double` | :x: | Sets elevation to increment and decrement buttons | 5 |\n\n## Issues \u0026 Suggestions\nIf you encounter any issue you or want to leave a suggestion you can do it by filling an [issue](https://github.com/4inka/flutter_quantity_input/issues).\n\n### Thank you for the support!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feunicevassoa%2Fflutter_quantity_input","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Feunicevassoa%2Fflutter_quantity_input","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feunicevassoa%2Fflutter_quantity_input/lists"}