Custom widget that allows for an inputfield spilt over multiple fields
Find a file
2023-05-15 14:14:40 +02:00
example fix: disable interactive selection for hidden inputs to prevent overwrite on change 2023-05-15 14:14:40 +02:00
lib fix: disable interactive selection for hidden inputs to prevent overwrite on change 2023-05-15 14:14:40 +02:00
test Add BSD-3-Clause license 2022-11-01 08:38:55 +01:00
.gitignore Init Commit 2022-10-12 10:37:59 +02:00
analysis_options.yaml ported component from appshell 2022-10-12 16:42:12 +02:00
bitbucket-pipelines.yml Init Commit 2022-10-12 10:37:59 +02:00
CHANGELOG.md fix: disable interactive selection for hidden inputs to prevent overwrite on change 2023-05-15 14:14:40 +02:00
CONTRIBUTING.md Init Commit 2022-10-12 10:37:59 +02:00
LICENSE Add BSD-3-Clause license 2022-11-01 08:38:55 +01:00
pubspec.yaml fix: disable interactive selection for hidden inputs to prevent overwrite on change 2023-05-15 14:14:40 +02:00
README.md ported component from appshell 2022-10-12 16:42:12 +02:00

style: effective dart

Custom widget that allows for an inputfield spilt over multiple fields Ported from the appshell.

Setup

To use this package, add flutter_single_character_input as a dependency in your pubspec.yaml file.

 flutter_single_character_input:
    git:
      url: https://github.com/Iconica-Development/flutter_single_character_input.git
      ref: master

How to use

 SingleCharacterInput(
          characters: [
            InputCharacter(
              hint: '1',
              keyboardType: const TextInputType.numberWithOptions(
                signed: true,
                decimal: true,
              ),
              formatter: (value) {
                if (RegExp('[0-9]').hasMatch(value)) {
                  return value;
                }
                return '';
              },
            ),
            InputCharacter(
              hint: 'B',
              keyboardType: TextInputType.name,
              formatter: (value) {
                if (RegExp('[A-Za-z]').hasMatch(value)) {
                  return value.toUpperCase();
                }
                return '';
              },
            ),
          ],
          textStyle: Theme.of(context).textTheme.headline1?.copyWith(
                fontWeight: FontWeight.w400,
                fontSize: 28,
              ),
          inputDecoration: InputDecoration(
            hintStyle: Theme.of(context).textTheme.bodyText1?.copyWith(
                  fontWeight: FontWeight.w400,
                  color: const Color(0xFFBBBBBB),
                  fontSize: 28,
                ),
            isDense: true,
            isCollapsed: true,
          ),
          buildDecoration: (context, input) {
            return Container(
              margin: const EdgeInsets.all(5),
              child: Container(
                padding: const EdgeInsets.symmetric(vertical: 15),
                width: 32,
                child: input,
              ),
            );
          },
          onChanged: (value, finished) {},
        ),

Issues

Please file any issues, bugs or feature request as an issue on our GitHub page. Commercial support is available if you need help with integration with your app or services. You can contact us at support@iconica.nl.

Want to contribute

If you would like to contribute to the plugin (e.g. by improving the documentation, solving a bug or adding a cool new feature), please carefully review our contribution guide and send us your pull request.

Author

This flutter-single-character-input for Flutter is developed by Iconica. You can contact us at support@iconica.nl