passo_mobile_app/lib/utils/formatters.dart

13 lines
456 B
Dart

import 'package:mask_text_input_formatter/mask_text_input_formatter.dart';
var mobileFormatter = MaskTextInputFormatter(
mask: "+63 (###) ###-####",
filter: {"#": RegExp(r"^[1-9][0-9]*$")},
type: MaskAutoCompletionType.lazy,
initialText: "0");
var landLineFormatter = MaskTextInputFormatter(
mask: "(###) ###-###",
filter: {"#": RegExp(r"^[0-9]")},
type: MaskAutoCompletionType.lazy,
initialText: "0");