{"id":13551605,"url":"https://github.com/fadhly-permata/flutter_moneytextfieldform","last_synced_at":"2026-02-24T04:39:24.320Z","repository":{"id":56834874,"uuid":"170337182","full_name":"fadhly-permata/flutter_moneytextfieldform","owner":"fadhly-permata","description":"MoneyTextFormField is one of the flutter widget packages that can be used to input values in the form of currencies, by displaying the output format in realtime.","archived":false,"fork":false,"pushed_at":"2019-03-23T07:46:23.000Z","size":989,"stargazers_count":11,"open_issues_count":6,"forks_count":8,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-12-24T23:24:23.100Z","etag":null,"topics":["flutter","flutter-plugin","flutter-widget","money","moneytextformfield","textfield","textfromfield"],"latest_commit_sha":null,"homepage":"https://pub.dartlang.org/packages/moneytextformfield","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/fadhly-permata.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":"2019-02-12T15:00:48.000Z","updated_at":"2023-01-01T13:26:27.000Z","dependencies_parsed_at":"2022-09-02T03:40:52.485Z","dependency_job_id":null,"html_url":"https://github.com/fadhly-permata/flutter_moneytextfieldform","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/fadhly-permata%2Fflutter_moneytextfieldform","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fadhly-permata%2Fflutter_moneytextfieldform/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fadhly-permata%2Fflutter_moneytextfieldform/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fadhly-permata%2Fflutter_moneytextfieldform/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fadhly-permata","download_url":"https://codeload.github.com/fadhly-permata/flutter_moneytextfieldform/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246925249,"owners_count":20855861,"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-plugin","flutter-widget","money","moneytextformfield","textfield","textfromfield"],"created_at":"2024-08-01T12:01:51.103Z","updated_at":"2025-10-22T23:04:41.308Z","avatar_url":"https://github.com/fadhly-permata.png","language":"Dart","funding_links":[],"categories":["Dart"],"sub_categories":[],"readme":"# MoneyTextFormField\n\n\u003e `MoneyTextFormField` is one of the flutter widget packages that can be used to input values in the form of currencies, by displaying the output format in realtime.\n\u003e\n\u003e This widget uses the `FlutterMoneyFormatter` package as a basic engine that has a very powerful ability to format currencies.\n\u003e\n\u003e [![latest version](https://img.shields.io/pub/v/moneytextformfield.svg?style=plastic\u0026logo=data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA4AAAAOCAQAAAC1QeVaAAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAAAmJLR0QA/4ePzL8AAAAHdElNRQfjAg8HMDMbfsHaAAABSUlEQVQY0y2LsUvUYRyHn+/7fe2uVMIz4hcnin+BFCrdZq1BQ1MN4VJxY7MoRLg7OGQ0NPkfiIOYBbYpiUO0VSQ15UFxHHf8fu/7cTif9XkeEz/54TO5qX4xtmJP8mZ8vR+vpt/q4gU3QitP3Iwr9fdhyerhPjZ7cBZH9Rf75ldSp11tXKsnZYHlEDvrt9dO4/dkjwjF6tde43M5GjGBlGoxrNtainGOsef9RqsMIyfUEZg8V1pVslf+crL3dup6EW6ZOMMRGEbmnmqh07bpkLEB89xhgMFQo8dRy4AZMGAe+EINkAEp2B6QhvHw7nOJ+9Fuq2guNsvKDaNiBvGLkUTQuf8Pd3e6U+MLKnGAkmkyf8xN/+zAeuFBKt+FZ6qGmux+tP3xw0TFGz7ZoffRlqQkSSolvRCK8Skmz9lpE3lIl0CiUfUix34BalOOAMgIffsAAAAldEVYdGRhdGU6Y3JlYXRlADIwMTktMDItMTVUMDc6NDg6NTEtMDU6MDCMNC56AAAAJXRFWHRkYXRlOm1vZGlmeQAyMDE5LTAyLTE1VDA3OjQ4OjUxLTA1OjAw/WmWxgAAAABJRU5ErkJggg==)](https://pub.dartlang.org/packages/moneytextformfield)\n\u003e [![last commit](https://img.shields.io/github/last-commit/fadhly-permata/flutter_moneytextfieldform.svg?style=plastic\u0026logo=github)](https://github.com/fadhly-permata/flutter_moneytextfieldform)\n\u003e [![License](https://img.shields.io/badge/license-BSD-blue.svg?style=plastic\u0026logo=data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA4AAAAOCAMAAAAolt3jAAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAACPVBMVEXLy9UAAADLy9Tn7ubo7+bh5+Lb397b397i6OLc4N/f4+Df5ODc4N/i5+Li5+Lk6ePj6ePf4uAAAFbo7ubn7uU5F3re4eDw9+ru9unk6uTu9unOztbLy9XQ0NfMzNXKydTLytXLytTKydPMzNXPz9fNzdbIyNPY29zZ3N3Z3N3Y29zb397b397Y29zZ3N3Z3N3Y29zIyNPNzdW/vM3Y29zc4N/c4N/c4N/c4N/c4N/c4N/c4N/c39/c4N/X29zAvM3b397c4N/b397b3t7b397b397b39/b397b3t7b39/c4N/b397b39/b397b39/a3t7c4N/c4N/a3t7b397b397b39/b39/b39/b39/b397b4N7b39/b397b39/b39/b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QwNzozODo1My0wNTowMEPNkmwAAAAASUVORK5CYII=)](https://github.com/fadhly-permata/flutter_moneytextfieldform/blob/master/LICENSE)\n\n\n#### Dependencies :\n[![intl](https://img.shields.io/pub/vpre/flutter_money_formatter.svg?label=FlutterMoneyFormatter\u0026colorA=gray\u0026colorB=green\u0026style=plastic)](https://pub.dartlang.org/packages/flutter_money_formatter)\n\n\n---\n\n# Install\n\nFor complete steps in installing `MoneyTextFormField` you can see in the [**Installation Guide**](https://pub.dartlang.org/packages/moneytextformfield#-installing-tab-).\n\n\n# Usage\n\nThe following is the simplest example of using `MoneyTextFormField`:\n\n```dart\nimport 'package:moneytextformfield/moneytextformfield.dart';\n\n  /// ... some lines of code ...\n  MoneyTextFormField(\n    settings: MoneyTextFormFieldSettings()\n  )\n  /// ... some lines of code ...\n```\n\nFor those of you who have not yet understood how to implement the widget package, you can use the following code in the `main.dart` file on your Flutter project:\n\n\n```dart\nimport 'package:flutter/material.dart';\nimport 'package:moneytextformfield/moneytextformfield.dart';\n\nvoid main() =\u003e runApp(MyApp());\n\nclass MyApp extends StatefulWidget {\n  @override\n  _MyAppState createState() =\u003e _MyAppState();\n}\n\nclass _MyAppState extends State\u003cMyApp\u003e {\n  TextEditingController mycontroller = TextEditingController();\n\n  @override\n  void initState() {  \n    super.initState();\n  }\n\n  @override\n  Widget build(BuildContext context) {\n    return MaterialApp(\n      home: Scaffold(\n        appBar: AppBar(\n          title: const Text('MoneyTextFormField Demo'),\n        ),\n        floatingActionButton: FloatingActionButton(\n          onPressed: () =\u003e print(mycontroller.text),\n          child: Icon(Icons.save),\n        ),\n        body: Column(\n          children: \u003cWidget\u003e[\n            /// Begin of :\u003e MoneyTextFormField\n            MoneyTextFormField(\n              settings: MoneyTextFormFieldSettings(\n                controller: mycontroller\n              )\n            )\n            /// End of :\u003e MoneyTextFormField\n          ]\n        )\n      )\n    );\n  }\n}\n```\n\nFrom the above code it will look more or less like the following:\n\n\u003e ![MoneyTextFormField](doc/mtff-full-format.gif)\n\u003e\n\u003e Figure 1: Using full format\n\nBy doing a little modification, you will get the following results:\n\n\u003e ![MoneyTextFormField](doc/mtff-compact-format.gif)\n\u003e\n\u003e Figure 2: Using compact format\n\nReferring to the example code above, to retrieve the value inputted by the user, you can get it through the `mycontroller.text` as in the `onPressed` event in the `FloatingActionButton` widget.\n\n---\n\n# Configurations\nFor now, `MoneyTextFormField` only uses one property to configure the display of that object, the `settings` property that has a data type is an instance of `MoneyTextFormFieldSettings`. \n\n\n## MoneyTextFormFieldSettings\n\n| Name                          | Data Type     | Description |\n| ----------------------------- | ------------- | ----------- |\n| `controller`                  | `TextEditingController`                   | A [controller](https://docs.flutter.io/flutter/widgets/TextEditingController-class.html) for an editable text field. |\n| `validator`                   | `FormFieldValidator\u003cString\u003e`              | An optional method that validates an input. Returns an error string to display if the input is invalid, or null otherwise. |\n| `inputFormatters`             | `List\u003cTextInputFormatter\u003e`                | A [TextInputFormatter](https://docs.flutter.io/flutter/services/TextInputFormatter-class.html) can be optionally injected to provide as-you-type validation and formatting of the text being edited. |\n| `onChanged`                   | `void`                                    | An optional method that register a closure to be called when the object changes. |\n| `moneyFormatSettings`         | `MoneyFormatSettings`                     | [See here](#MoneyFormatSettings) |\n| `appearanceSettings`          | `AppearanceSettings`                      | [See here](#appearancesettings) |\n| `enabled`                     | `bool`                                    | Whether the form is able to receive user input. |\n\n\u003e\u003e **Tips:** \n\u003e\u003e\n\u003e\u003e No need to initialize the value in `controller.text`, because the value will be ignored. the `controller` property is only intended to capture the value inputted by the user.\n\n\u003e\u003e **Notes:**\n\u003e\u003e\n\u003e\u003e The value contained in `controller.text` is exactly the same as the one inputted by the user and has a `String` data type. If you want to get results in the same format, you can use the `FlutterMoneyFormatter` package which is also used by `MoneyTextFormField`.\n\u003e\u003e\n\u003e\u003e\u003e [See detailed information about `FlutterMoneyFormatter`.](https://pub.dartlang.org/packages/flutter_money_formatter)\n\n\n## AppearanceSettings\n\n| Name                          | Data Type           | Description |\n| ----------------------------- | ------------------- | ----------- |\n| `labelText`                   | `String`            | Text that describes the input field. Default value is `'Amount'` |\n| `hintText`                    | `String`            | Text that suggests what sort of input the field accepts. |\n| `icon`                        | `Widget`            | An icon to show before the input field and outside of the decoration's container. |\n| `labelStyle`                  | `TextStyle`         | The style to use for the `labelText` when the label is above (i.e., vertically adjacent to) the input field. |\n| `inputStyle`                  | `TextStyle`         | The style to use for the input field. |\n| `formattedStyle`              | `TextStyle`         | The style to use for the formatted output text. |\n| `errorStyle`                  | `TextStyle`         | The style to use for the `errorText` |\n| `padding`                     | `EdgeInsetGeometry` | The amount of space by which to inset the widget |\n\n\n## MoneyFormatSettings\n| Name                          | Data Type             | Description |\n| ----------------------------- | --------------------- | ----------- |\n| `amount`                      | `double`              | Decimal value that will be used when initializing the widget. Default value is `0.00`. |\n| `fractionDigits`              | `int`                 | The fraction digits that will be used on formatted output. Default value is `2`. |\n| `currencySymbol`              | `String`              | The symbol that will be used on formatted output. Default value is `'$'` (dollar sign). |\n| `thousandSeparator`           | `String`              | The character that will be used as thousand separator on formatted output. Default value is `','` (comma).  |\n| `decimalSeparator`            | `String`              | The character that will be used as decimal separator on formatted output. Default value is `'.'` (dot). |\n| `symbolAndNumberSeparator`    | `String`              | The character that will be used as separator between symbol and number. Default value is `' '` (space). |\n| `displayFormat`               | `MoneyDisplayFormat`  | [See here](#MoneyDisplayFormat) |\n\n\n## MoneyDisplayFormat\n`MoneyDisplayFormat` is an enum object with values such as the following:\n\n| Name                  | Description |\n| --------------------- | ----------- |\n| nonSymbol             | Used to display currency values in full format and without a currency symbol. |\n| symbolOnLeft          | Used to display currency values in full format with currency symbols on the left. |\n| symbolOnRight         | Used to display currency values in full format with currency symbols on the right. |\n| compactNonSymbol      | Used to display currency values in a short format and without a currency symbol. |\n| compactSymbolOnLeft   | Used to display currency values in a short format with a currency symbol on the left. |\n| compactSymbolOnRight  | Used to display currency values in a short format with a currency symbol on the right. |\n\n---\n\n## Demo\n\nFor more complete samples, you can grab it from the [example directory](https://github.com/fadhly-permata/flutter_moneytextfieldform/tree/master/example).\n\n## Our Other Package\n\nSee our [other packages here](https://pub.dartlang.org/flutter/packages?q=email%3Afadhly.permata%40gmail.com).\n\n## Help Me\n\nIf you find any issues, bugs, have questions, or want to request a new features you can [do it here](https://github.com/fadhly-permata/flutter_moneytextfieldform/issues). You can also help me to improve features or fix some issues by [forking this project via Github](https://github.com/fadhly-permata/flutter_moneytextfieldform)\n\n## Change Log\n\nAre you curious about the changes that occur in each version? [See here for detailed informations](https://pub.dartlang.org/packages/moneytextformfield#-changelog-tab-).\n\n---\n\n# License\n\n```text\nCopyright (c) 2019, Fadhly Permata \u003cfadhly.permata@gmail.com\u003e\nAll rights reserved.\n\nRedistribution and use in source and binary forms, with or without\nmodification, are permitted provided that the following conditions are met:\n\n1. Redistributions of source code must retain the above copyright notice, this\n   list of conditions and the following disclaimer.\n2. Redistributions in binary form must reproduce the above copyright notice,\n   this list of conditions and the following disclaimer in the documentation\n   and/or other materials provided with the distribution.\n\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND\nANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\nWARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\nDISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR\nANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\nLOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND\nON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\nSOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n\nThe views and conclusions contained in the software and documentation are those\nof the authors and should not be interpreted as representing official policies,\neither expressed or implied, of the MoneyTextFormField project.\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffadhly-permata%2Fflutter_moneytextfieldform","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffadhly-permata%2Fflutter_moneytextfieldform","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffadhly-permata%2Fflutter_moneytextfieldform/lists"}