Skip to content

Commit

Permalink
Merge pull request #154 from bramdekker/master
Browse files Browse the repository at this point in the history
added contentPadding parameter (fixes #153)
  • Loading branch information
codegrue committed Jan 6, 2021
2 parents e752b50 + 5ae9ccd commit 89ed168
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 10 deletions.
13 changes: 6 additions & 7 deletions example/ios/Flutter/flutter_export_environment.sh
Original file line number Diff line number Diff line change
@@ -1,16 +1,15 @@
#!/bin/sh
# This is a generated file; do not edit or check into version control.
export "FLUTTER_ROOT=/Users/jeff/Development/flutter"
export "FLUTTER_APPLICATION_PATH=/Users/jeff/OneDrive/Projects/Code/Flutter Packages/card_settings/example"
export "FLUTTER_TARGET=/Users/jeff/OneDrive/Projects/Code/Flutter Packages/card_settings/example/lib/main.dart"
export "FLUTTER_ROOT=C:\src\flutter"
export "FLUTTER_APPLICATION_PATH=C:\Users\BramDesktop\Documents\GitHub\card_settings\example"
export "FLUTTER_TARGET=lib\main.dart"
export "FLUTTER_BUILD_DIR=build"
export "SYMROOT=${SOURCE_ROOT}/../build/ios"
export "SYMROOT=${SOURCE_ROOT}/../build\ios"
export "OTHER_LDFLAGS=$(inherited) -framework Flutter"
export "FLUTTER_FRAMEWORK_DIR=/Users/jeff/Development/flutter/bin/cache/artifacts/engine/ios"
export "FLUTTER_FRAMEWORK_DIR=C:\src\flutter\bin\cache\artifacts\engine\ios"
export "FLUTTER_BUILD_NAME=1.0.0"
export "FLUTTER_BUILD_NUMBER=1.0.0"
export "DART_DEFINES=flutter.inspector.structuredErrors%3Dtrue"
export "DART_OBFUSCATION=false"
export "TRACK_WIDGET_CREATION=true"
export "TRACK_WIDGET_CREATION=false"
export "TREE_SHAKE_ICONS=false"
export "PACKAGE_CONFIG=.packages"
8 changes: 5 additions & 3 deletions lib/widgets/text_fields/card_settings_text.dart
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ class CardSettingsText extends FormField<String>
Key key,
String initialValue,
bool autovalidate: false,
AutovalidateMode autovalidateMode : AutovalidateMode.onUserInteraction,
AutovalidateMode autovalidateMode: AutovalidateMode.onUserInteraction,
this.enabled = true,
this.onSaved,
this.validator,
Expand Down Expand Up @@ -56,7 +56,7 @@ class CardSettingsText extends FormField<String>
this.showMaterialonIOS,
this.showClearButtonIOS = OverlayVisibilityMode.never,
this.fieldPadding,

this.contentPadding = const EdgeInsets.all(0.0),
}) : //assert(initialValue == null || controller == null),
assert(keyboardType != null),
assert(autofocus != null),
Expand Down Expand Up @@ -154,6 +154,8 @@ class CardSettingsText extends FormField<String>
@override
final EdgeInsetsGeometry fieldPadding;

final EdgeInsetsGeometry contentPadding;

///Since the CupertinoTextField does not support onSaved, please use [onChanged] or [onFieldSubmitted] instead
@override
final FormFieldSetter<String> onSaved;
Expand Down Expand Up @@ -448,7 +450,7 @@ class _CardSettingsTextState extends FormFieldState<String> {
readOnly: !widget.enabled,
style: contentStyle(context, value, widget.enabled),
decoration: InputDecoration(
contentPadding: EdgeInsets.all(0.0),
contentPadding: widget.contentPadding,
border: InputBorder.none,
errorText: errorText,
prefixText: widget?.prefixText,
Expand Down

0 comments on commit 89ed168

Please sign in to comment.