From 7e1526e32513cda853b16e91107c0d08ea33a367 Mon Sep 17 00:00:00 2001 From: ElZombieIsra Date: Fri, 22 Feb 2019 20:04:12 -0600 Subject: [PATCH 1/4] Fixed: updateText crashes when text is Null --- lib/flutter_masked_text.dart | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/flutter_masked_text.dart b/lib/flutter_masked_text.dart index 4a29252..ab0c154 100644 --- a/lib/flutter_masked_text.dart +++ b/lib/flutter_masked_text.dart @@ -32,8 +32,10 @@ class MaskedTextController extends TextEditingController { String _lastUpdatedText = ''; void updateText(String text) { - this.text = this._applyMask(this.mask, text); - this._lastUpdatedText = this.text; + if(text != null){ + this.text = this._applyMask(this.mask, text); + this._lastUpdatedText = this.text; + } } void updateMask(String mask) { From e7f061b59aad0c4422466ab4d4dfb516deaef0e1 Mon Sep 17 00:00:00 2001 From: Ben-hur Santos Ott Date: Sun, 24 Feb 2019 21:14:17 -0300 Subject: [PATCH 2/4] feat(0.8.0): refactoring money mask --- .gitignore | 2 + .idea/codeStyles/Project.xml | 29 -- .idea/libraries/Dart_Packages.xml | 330 ++----------- .idea/libraries/Dart_SDK.xml | 27 -- .idea/libraries/Flutter_Plugins.xml | 7 - .idea/misc.xml | 27 -- .idea/modules.xml | 8 - .idea/vcs.xml | 6 - .idea/workspace.xml | 369 ++++++++------- CHANGELOG.md | 11 + Makefile | 11 +- README.md | 15 + example/masked_text_sample/.gitignore | 71 --- example/masked_text_sample/.metadata | 10 - example/masked_text_sample/README.md | 8 - .../android/app/build.gradle | 61 --- .../android/app/src/main/AndroidManifest.xml | 39 -- .../maskedtextsample/MainActivity.java | 13 - .../main/res/drawable/launch_background.xml | 12 - .../src/main/res/mipmap-hdpi/ic_launcher.png | Bin 544 -> 0 bytes .../src/main/res/mipmap-mdpi/ic_launcher.png | Bin 442 -> 0 bytes .../src/main/res/mipmap-xhdpi/ic_launcher.png | Bin 721 -> 0 bytes .../main/res/mipmap-xxhdpi/ic_launcher.png | Bin 1031 -> 0 bytes .../main/res/mipmap-xxxhdpi/ic_launcher.png | Bin 1443 -> 0 bytes .../app/src/main/res/values/styles.xml | 8 - .../masked_text_sample/android/build.gradle | 29 -- .../android/gradle.properties | 1 - .../gradle/wrapper/gradle-wrapper.properties | 6 - .../android/settings.gradle | 15 - .../ios/Flutter/AppFrameworkInfo.plist | 26 -- .../ios/Flutter/Debug.xcconfig | 1 - .../ios/Flutter/Release.xcconfig | 1 - .../ios/Runner.xcodeproj/project.pbxproj | 436 ------------------ .../contents.xcworkspacedata | 7 - .../xcshareddata/xcschemes/Runner.xcscheme | 93 ---- .../contents.xcworkspacedata | 7 - .../xcshareddata/WorkspaceSettings.xcsettings | 8 - .../ios/Runner/AppDelegate.h | 6 - .../ios/Runner/AppDelegate.m | 13 - .../AppIcon.appiconset/Contents.json | 122 ----- .../Icon-App-1024x1024@1x.png | Bin 11112 -> 0 bytes .../AppIcon.appiconset/Icon-App-20x20@1x.png | Bin 564 -> 0 bytes .../AppIcon.appiconset/Icon-App-20x20@2x.png | Bin 1283 -> 0 bytes .../AppIcon.appiconset/Icon-App-20x20@3x.png | Bin 1588 -> 0 bytes .../AppIcon.appiconset/Icon-App-29x29@1x.png | Bin 1025 -> 0 bytes .../AppIcon.appiconset/Icon-App-29x29@2x.png | Bin 1716 -> 0 bytes .../AppIcon.appiconset/Icon-App-29x29@3x.png | Bin 1920 -> 0 bytes .../AppIcon.appiconset/Icon-App-40x40@1x.png | Bin 1283 -> 0 bytes .../AppIcon.appiconset/Icon-App-40x40@2x.png | Bin 1895 -> 0 bytes .../AppIcon.appiconset/Icon-App-40x40@3x.png | Bin 2665 -> 0 bytes .../AppIcon.appiconset/Icon-App-60x60@2x.png | Bin 2665 -> 0 bytes .../AppIcon.appiconset/Icon-App-60x60@3x.png | Bin 3831 -> 0 bytes .../AppIcon.appiconset/Icon-App-76x76@1x.png | Bin 1888 -> 0 bytes .../AppIcon.appiconset/Icon-App-76x76@2x.png | Bin 3294 -> 0 bytes .../Icon-App-83.5x83.5@2x.png | Bin 3612 -> 0 bytes .../LaunchImage.imageset/Contents.json | 23 - .../LaunchImage.imageset/LaunchImage.png | Bin 68 -> 0 bytes .../LaunchImage.imageset/LaunchImage@2x.png | Bin 68 -> 0 bytes .../LaunchImage.imageset/LaunchImage@3x.png | Bin 68 -> 0 bytes .../LaunchImage.imageset/README.md | 5 - .../Runner/Base.lproj/LaunchScreen.storyboard | 37 -- .../ios/Runner/Base.lproj/Main.storyboard | 26 -- .../masked_text_sample/ios/Runner/Info.plist | 45 -- example/masked_text_sample/ios/Runner/main.m | 9 - .../lib/flutter_masked_text.dart | 225 --------- example/masked_text_sample/lib/main.dart | 70 --- example/masked_text_sample/pubspec.yaml | 68 --- flutter_masked_text.iml | 3 + lib/flutter_masked_text.dart | 91 ++-- pubspec.lock | 253 +--------- pubspec.yaml | 2 +- test/flutter_masked_text_test.dart | 9 +- 72 files changed, 326 insertions(+), 2375 deletions(-) delete mode 100644 .idea/codeStyles/Project.xml delete mode 100644 .idea/libraries/Dart_SDK.xml delete mode 100644 .idea/libraries/Flutter_Plugins.xml delete mode 100644 .idea/misc.xml delete mode 100644 .idea/modules.xml delete mode 100644 .idea/vcs.xml delete mode 100644 example/masked_text_sample/.gitignore delete mode 100644 example/masked_text_sample/.metadata delete mode 100644 example/masked_text_sample/README.md delete mode 100644 example/masked_text_sample/android/app/build.gradle delete mode 100644 example/masked_text_sample/android/app/src/main/AndroidManifest.xml delete mode 100644 example/masked_text_sample/android/app/src/main/java/com/example/maskedtextsample/MainActivity.java delete mode 100644 example/masked_text_sample/android/app/src/main/res/drawable/launch_background.xml delete mode 100644 example/masked_text_sample/android/app/src/main/res/mipmap-hdpi/ic_launcher.png delete mode 100644 example/masked_text_sample/android/app/src/main/res/mipmap-mdpi/ic_launcher.png delete mode 100644 example/masked_text_sample/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png delete mode 100644 example/masked_text_sample/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png delete mode 100644 example/masked_text_sample/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png delete mode 100644 example/masked_text_sample/android/app/src/main/res/values/styles.xml delete mode 100644 example/masked_text_sample/android/build.gradle delete mode 100644 example/masked_text_sample/android/gradle.properties delete mode 100644 example/masked_text_sample/android/gradle/wrapper/gradle-wrapper.properties delete mode 100644 example/masked_text_sample/android/settings.gradle delete mode 100644 example/masked_text_sample/ios/Flutter/AppFrameworkInfo.plist delete mode 100644 example/masked_text_sample/ios/Flutter/Debug.xcconfig delete mode 100644 example/masked_text_sample/ios/Flutter/Release.xcconfig delete mode 100644 example/masked_text_sample/ios/Runner.xcodeproj/project.pbxproj delete mode 100644 example/masked_text_sample/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata delete mode 100644 example/masked_text_sample/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme delete mode 100644 example/masked_text_sample/ios/Runner.xcworkspace/contents.xcworkspacedata delete mode 100644 example/masked_text_sample/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings delete mode 100644 example/masked_text_sample/ios/Runner/AppDelegate.h delete mode 100644 example/masked_text_sample/ios/Runner/AppDelegate.m delete mode 100644 example/masked_text_sample/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json delete mode 100644 example/masked_text_sample/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png delete mode 100644 example/masked_text_sample/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png delete mode 100644 example/masked_text_sample/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png delete mode 100644 example/masked_text_sample/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png delete mode 100644 example/masked_text_sample/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png delete mode 100644 example/masked_text_sample/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png delete mode 100644 example/masked_text_sample/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png delete mode 100644 example/masked_text_sample/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png delete mode 100644 example/masked_text_sample/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png delete mode 100644 example/masked_text_sample/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png delete mode 100644 example/masked_text_sample/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png delete mode 100644 example/masked_text_sample/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png delete mode 100644 example/masked_text_sample/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png delete mode 100644 example/masked_text_sample/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png delete mode 100644 example/masked_text_sample/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png delete mode 100644 example/masked_text_sample/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json delete mode 100644 example/masked_text_sample/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png delete mode 100644 example/masked_text_sample/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png delete mode 100644 example/masked_text_sample/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png delete mode 100644 example/masked_text_sample/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md delete mode 100644 example/masked_text_sample/ios/Runner/Base.lproj/LaunchScreen.storyboard delete mode 100644 example/masked_text_sample/ios/Runner/Base.lproj/Main.storyboard delete mode 100644 example/masked_text_sample/ios/Runner/Info.plist delete mode 100644 example/masked_text_sample/ios/Runner/main.m delete mode 100644 example/masked_text_sample/lib/flutter_masked_text.dart delete mode 100644 example/masked_text_sample/lib/main.dart delete mode 100644 example/masked_text_sample/pubspec.yaml diff --git a/.gitignore b/.gitignore index 446ed0d..b60b215 100644 --- a/.gitignore +++ b/.gitignore @@ -3,8 +3,10 @@ .packages .pub/ +.idea build/ ios/.generated/ ios/Flutter/Generated.xcconfig ios/Runner/GeneratedPluginRegistrant.* + diff --git a/.idea/codeStyles/Project.xml b/.idea/codeStyles/Project.xml deleted file mode 100644 index 30aa626..0000000 --- a/.idea/codeStyles/Project.xml +++ /dev/null @@ -1,29 +0,0 @@ - - - - - - - - - - - - - - \ No newline at end of file diff --git a/.idea/libraries/Dart_Packages.xml b/.idea/libraries/Dart_Packages.xml index d96f80d..a2b8513 100644 --- a/.idea/libraries/Dart_Packages.xml +++ b/.idea/libraries/Dart_Packages.xml @@ -2,66 +2,31 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + diff --git a/.idea/libraries/Dart_SDK.xml b/.idea/libraries/Dart_SDK.xml deleted file mode 100644 index ff827be..0000000 --- a/.idea/libraries/Dart_SDK.xml +++ /dev/null @@ -1,27 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/.idea/libraries/Flutter_Plugins.xml b/.idea/libraries/Flutter_Plugins.xml deleted file mode 100644 index b0f6971..0000000 --- a/.idea/libraries/Flutter_Plugins.xml +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - \ No newline at end of file diff --git a/.idea/misc.xml b/.idea/misc.xml deleted file mode 100644 index de732b4..0000000 --- a/.idea/misc.xml +++ /dev/null @@ -1,27 +0,0 @@ - - - - - - - \ No newline at end of file diff --git a/.idea/modules.xml b/.idea/modules.xml deleted file mode 100644 index 228130c..0000000 --- a/.idea/modules.xml +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - - diff --git a/.idea/vcs.xml b/.idea/vcs.xml deleted file mode 100644 index 35eb1dd..0000000 --- a/.idea/vcs.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/.idea/workspace.xml b/.idea/workspace.xml index 681cc5a..37fa503 100644 --- a/.idea/workspace.xml +++ b/.idea/workspace.xml @@ -2,7 +2,78 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -20,10 +91,10 @@ - - + + - + @@ -32,22 +103,19 @@ - - + + - - - - - - - - - + + + + + + @@ -55,8 +123,8 @@ - - + + @@ -66,22 +134,10 @@ - - + + - - - - - - - - - - - - - + @@ -99,16 +155,6 @@ - - - - - - - - - - @@ -138,18 +184,20 @@ + @@ -166,9 +214,6 @@ - - - @@ -181,16 +226,14 @@ - - - - -