v0.0.3mask_input_formatter
지정된 마스크에 따라 입력을 형식화하는 TextField 및 TextFormField용 TextInputFormatter입니다.
amjadjamali06/mask_input_formatter open-source repository details.
아래는 영문 원문 스냅샷입니다. 최신 내용은 GitHub에서 확인하세요.
The package provides TextInputFormatter for TextField and TextFormField which format the input by a given mask.
Run this command:
With Flutter:
$ flutter pub add mask_input_formatter
or add following package in your pubspec.yaml file inside the dependencies: section.
dependencies:
mask_input_formatter: ^0.0.3
import 'package:mask_input_formatter/mask_input_formatter.dart';
MaskInputFormatter myFormatter = MaskInputFormatter(mask: '(AA) #####');
TextFormField(
inputFormatters: [myFormatter],
decoration: InputDecoration(
hintText: "(AB) 12345",
)
) // TextFormField
// Input --> JK75757
// Output --> (JK) 75757 set formatted text on TextField
You can use the mask whatever you defined in formatter:
MaskInputFormatter dateFormatter = MaskInputFormatter(mask: '##/##/####');
// --> 26/05/2021
MaskInputFormatter phoneFormatter = MaskInputFormatter(mask: '+# (###) ###-####');
// --> +1 (234) 567-8901
MaskInputFormatter numberFormatter = MaskInputFormatter(mask: 'AAA-###', textAllCaps: true);
// --> XYZ-789
Check example folder for code sample
In last example. --> (AAA-###)
Suggestions and Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
Amjad Jamali & team members ( Kamran Khan, Hina Hussain, Faiza Farooqui ) :tada:
의존성 목록 2 개
{"sdk":"flutter"}{"sdk":"flutter"}사용 목적에 따라 검색하고 개발 활동을 비교한 뒤 원본 저장소에서 요구 사항을 확인하세요.
“A repository is the most basic element of GitHub.”
GitHub Docs — About repositories ↗