{"id":18456401,"url":"https://github.com/nicosnicolaou16/dynamic_single_text_field","last_synced_at":"2025-07-23T16:08:21.307Z","repository":{"id":248180661,"uuid":"664065518","full_name":"NicosNicolaou16/dynamic_single_text_field","owner":"NicosNicolaou16","description":"This package is a dynamic single text field (it is like PIN/OTP code view but has not PIN/OTP functionalities) with top/bottom text label, and different customizations.","archived":false,"fork":false,"pushed_at":"2025-06-08T21:54:56.000Z","size":4406,"stargazers_count":6,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-06-08T22:21:31.002Z","etag":null,"topics":["dart","dart-library","dart-package","dynamic-single-text","flutter","flutter-library","library","package","text-field"],"latest_commit_sha":null,"homepage":"https://pub.dev/packages/dynamic_single_text_field","language":"Dart","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/NicosNicolaou16.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2023-07-08T20:27:37.000Z","updated_at":"2025-05-23T02:38:57.000Z","dependencies_parsed_at":"2024-07-12T22:53:27.353Z","dependency_job_id":"5b467e68-bcf6-4d9b-adc4-511487d4b653","html_url":"https://github.com/NicosNicolaou16/dynamic_single_text_field","commit_stats":null,"previous_names":["nicosnicolaou16/dynamic_single_text_field"],"tags_count":13,"template":false,"template_full_name":null,"purl":"pkg:github/NicosNicolaou16/dynamic_single_text_field","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NicosNicolaou16%2Fdynamic_single_text_field","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NicosNicolaou16%2Fdynamic_single_text_field/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NicosNicolaou16%2Fdynamic_single_text_field/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NicosNicolaou16%2Fdynamic_single_text_field/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/NicosNicolaou16","download_url":"https://codeload.github.com/NicosNicolaou16/dynamic_single_text_field/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NicosNicolaou16%2Fdynamic_single_text_field/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266708514,"owners_count":23971946,"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","status":"online","status_checked_at":"2025-07-23T02:00:09.312Z","response_time":66,"last_error":null,"robots_txt_status":null,"robots_txt_updated_at":null,"robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["dart","dart-library","dart-package","dynamic-single-text","flutter","flutter-library","library","package","text-field"],"created_at":"2024-11-06T08:11:25.362Z","updated_at":"2025-07-23T16:08:21.297Z","avatar_url":"https://github.com/NicosNicolaou16.png","language":"Dart","funding_links":[],"categories":[],"sub_categories":[],"readme":"## Features\n\nThis package is a dynamic single text field allows for the dynamic creation of multiple text fields\nbased on the developer's needs (similar to OTP/passcode inputs, but without the OTP/passcode\nfunctionality—only the UI is provided).\nYou can create a list of `SingleTextModel` instances, each representing a single text field. Each\n`SingleTextModel` can be customized with values such as preset characters,\nand additional text displayed under the field. Each `SingleTextModel` accepts a single input\ncharacter.\n\n## Getting started\n\nVersion Minimum Flutter SDK: 3.0.0\n\nTested Versioning: \u003cbr /\u003e\nFlutter SDK version: 3.32.2 \u003cbr /\u003e\nDart Version: 3.8.1 \u003cbr /\u003e \u003cbr /\u003e\n\n## Usage\n\n| Parameters                 | Description                                                                                                                                                                                                      |\n|----------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `singleTextModelList`      | This parameter is the list of model for single text. Important Note: Use this model to insert data into dynamic single text: `SingleTextModel({this.singleText = \"\", this.topLabelText, this.bottomLabelText});` |\n| `scrollPhysics`            | This parameter is the option to set scroll physics for the ListView                                                                                                                                              |\n| `scrollController`         | This parameter is the option to set the scroll controller for the ListView                                                                                                                                       |\n| `singleDynamicListHeight`  | This parameter is the option to set the height of the dynamic ListView, with default value 150                                                                                                                   |\n| `singleTextHeight`         | This parameter is the option to set the height for the single texts, with default value 70                                                                                                                       |\n| `singleTextWidth`          | This parameter is the option to set the width for the single texts, with default value 70                                                                                                                        |\n| `textFieldTextStyle`       | This parameter is the option to set the single texts style                                                                                                                                                       |\n| `singleHintText`           | This parameter is the option to set the hint for the single texts                                                                                                                                                |\n| `singleHintTextStyle`      | This parameter is the option to set the hint for single text style                                                                                                                                               |\n| `inputBorder`              | This parameter is the option to set the input border for single texts                                                                                                                                            |\n| `enableInputBorder`        | This parameter is the option to set the enable border for single texts                                                                                                                                           |\n| `disableInputBorder`       | This parameter is the option to set the disable border for single texts                                                                                                                                          |\n| `focusedInputBorder`       | This parameter is the option to set the focused border for single texts                                                                                                                                          |\n| `textInputType`            | This parameter is the option to set the input type for single texts, with default value text                                                                                                                     |\n| `cursorColor`              | This parameter is the option to set the cursor color for single texts, with default value black                                                                                                                  |\n| `isReadOnly`               | This parameter is the option to set if the single texts is read only, with default value false                                                                                                                   |\n| `isObscureText`            | This parameter is the option to set if the single texts is obscure, with default value false                                                                                                                     |\n| `obscuringCharacter`       | This parameter is the option to set the obscuring character for single texts, with default value •                                                                                                               |\n| `singleTextFillColor`      | This parameter is the option to set the fill color for single texts                                                                                                                                              |\n| `onChangeSingleText`       | This parameter is the call back to get the character during the typing (real time) and the index of the single text                                                                                              |\n| `onSubmitSingleText`       | This parameter is the call back to get the character when press the done/return button from the keyboard                                                                                                         |\n| `onValidationBaseOnLength` | This parameter is the call back to validate the characters based on the length                                                                                                                                   |\n| `showLabelsType`           | This parameter is the enum class to set if need label on top or bottom or both, `showBottomLabelType`, `showBothLabelsType`, `hideLabelsType` default value: `hideLabelsType`                                    |\n| `textStyleTopLabel`        | This parameter is the top label text style                                                                                                                                                                       |\n| `textStyleBottomLabel`     | This parameter is the bottom label text style                                                                                                                                                                    |\n| `widgetLeftMargin`         | This parameter is the single texts left margin, with default value 20                                                                                                                                            |\n| `topLabelMarginBottom`     | This parameter is the top label text margin bottom, with default value 0                                                                                                                                         |\n| `bottomLabelMarginTop`     | This parameter is the bottom label text margin top, with default value 0                                                                                                                                         |\n\n\u003cp align=\"left\"\u003e\n\u003ca title=\"simulator_image\"\u003e\u003cimg src=\"https://github.com/NicosNicolaou16/dynamic_single_text_field/raw/main/screenshots/Screenshot_20240712_220940.png\" height=\"500\" width=\"200\"\u003e\u003c/a\u003e\n\u003ca title=\"simulator_image\"\u003e\u003cimg src=\"https://github.com/NicosNicolaou16/dynamic_single_text_field/raw/main/screenshots/example_gif.gif\" height=\"500\" width=\"200\"\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n```dart\nimport 'package:dynamic_single_text_field/dynamic_single_text_field.dart';\nimport 'package:flutter/foundation.dart';\nimport 'package:flutter/material.dart';\n\nvoid main() {\n  runApp(const MyApp());\n}\n\nclass MyApp extends StatelessWidget {\n  const MyApp({super.key});\n\n  @override\n  Widget build(BuildContext context) {\n    return MaterialApp(\n      debugShowCheckedModeBanner: false,\n      title: 'Sample Project',\n      theme: ThemeData(\n        colorScheme: ColorScheme.fromSeed(seedColor: Colors.deepPurple),\n        useMaterial3: true,\n      ),\n      home: const MyHomePage(),\n    );\n  }\n}\n\nclass MyHomePage extends StatefulWidget {\n  const MyHomePage({\n    super.key,\n  });\n\n  @override\n  State\u003cMyHomePage\u003e createState() =\u003e _MyHomePageState();\n}\n\nclass _MyHomePageState extends State\u003cMyHomePage\u003e {\n  final List\u003cSingleTextModel\u003e singleTextModelList1 = [];\n  final List\u003cSingleTextModel\u003e singleTextModelList2 = [];\n  final List\u003cSingleTextModel\u003e singleTextModelList3 = [];\n\n  @override\n  void initState() {\n    /**\n     * initializing three list with the SingleTextModel\n     * */\n    List.generate(\n        7,\n            (index) =\u003e\n            singleTextModelList1.add(SingleTextModel(\n              singleText: \"\",\n            )));\n    List.generate(\n        7,\n            (index) =\u003e\n            singleTextModelList2.add(SingleTextModel(\n                singleText: \"\",\n                topLabelText: \"top label $index\",\n                bottomLabelText: \"bottom label $index\")));\n    List.generate(\n        7,\n            (index) =\u003e\n            singleTextModelList3.add(SingleTextModel(\n                singleText: \"\",\n                topLabelText: \"top label $index\",\n                bottomLabelText: \"bottom label $index\")));\n    super.initState();\n  }\n\n  InputBorder getInputBorder() =\u003e\n      const OutlineInputBorder(\n        borderSide: BorderSide(\n          color: Colors.green,\n          width: 3,\n        ),\n        borderRadius: BorderRadius.all(\n          Radius.circular(\n            70,\n          ),\n        ),\n      );\n\n  @override\n  Widget build(BuildContext context) {\n    return Scaffold(\n      resizeToAvoidBottomInset: true,\n      body: SingleChildScrollView(\n        child: Column(\n          children: [\n            const SizedBox(\n              height: 100,\n            ),\n            DynamicSingleTextField(\n              singleTextModelList: singleTextModelList1,\n              showLabelsType: ShowLabelsTypeEnum.hideLabelsType,\n              inputBorder: getInputBorder(),\n              singleDynamicListHeight: 70,\n              topLabelMarginBottom: 20,\n              bottomLabelMarginTop: 20,\n              enableInputBorder: getInputBorder(),\n              disableInputBorder: getInputBorder(),\n              focusedInputBorder: getInputBorder(),\n              textInputType: TextInputType.number,\n              onChangeSingleText: (String value, int index) {\n                if (kDebugMode) {\n                  print(\"value: $value index: $index\");\n                }\n              },\n              onValidationBaseOnLength: () {\n                if (kDebugMode) {\n                  print(\"validated\");\n                }\n              },\n            ),\n            const SizedBox(\n              height: 100,\n            ),\n            DynamicSingleTextField(\n              singleTextModelList: singleTextModelList2,\n              showLabelsType: ShowLabelsTypeEnum.showBothLabelsType,\n              inputBorder: getInputBorder(),\n              topLabelMarginBottom: 20,\n              bottomLabelMarginTop: 20,\n              enableInputBorder: getInputBorder(),\n              disableInputBorder: getInputBorder(),\n              focusedInputBorder: getInputBorder(),\n              textInputType: TextInputType.number,\n              onChangeSingleText: (String value, int index) {\n                if (kDebugMode) {\n                  print(\"value: $value index: $index\");\n                }\n              },\n              onValidationBaseOnLength: () {\n                if (kDebugMode) {\n                  print(\"validated\");\n                }\n              },\n            ),\n            const SizedBox(\n              height: 100,\n            ),\n            DynamicSingleTextField(\n              singleTextModelList: singleTextModelList3,\n              showLabelsType: ShowLabelsTypeEnum.showBothLabelsType,\n              inputBorder: getInputBorder(),\n              topLabelMarginBottom: 20,\n              bottomLabelMarginTop: 20,\n              textInputType: TextInputType.text,\n              onChangeSingleText: (String value, int index) {\n                if (kDebugMode) {\n                  print(\"value: $value index: $index\");\n                }\n              },\n              onSubmitSingleText: (String value) {\n                if (kDebugMode) {\n                  print(\"value: $value\");\n                }\n              },\n              onValidationBaseOnLength: () {\n                if (kDebugMode) {\n                  print(\"validated\");\n                }\n              },\n            ),\n          ],\n        ),\n      ),\n    );\n  }\n}\n\n```\n\n## Additional information\n\nThank you for using my package, any feedback is welcome. You can report any bug, ask a question on\npackage GitHub repository.\nhttps://github.com/NicosNicolaou16/dynamic_single_text_field/issues","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnicosnicolaou16%2Fdynamic_single_text_field","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnicosnicolaou16%2Fdynamic_single_text_field","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnicosnicolaou16%2Fdynamic_single_text_field/lists"}