Skip to content

Instantly share code, notes, and snippets.

André Luis andre-bahia

Block or report user

Report or block andre-bahia

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@andre-bahia
andre-bahia / CurrencyPtBrInputFormatter.dart
Created Dec 1, 2019
Flutter TextInputFormatter Currency pt_BR
View CurrencyPtBrInputFormatter.dart
import 'package:flutter/services.dart';
import 'package:intl/intl.dart';
class CurrencyPtBrInputFormatter extends TextInputFormatter {
TextEditingValue formatEditUpdate(TextEditingValue oldValue, TextEditingValue newValue) {
if(newValue.selection.baseOffset == 0){
return newValue;
}
You can’t perform that action at this time.