Skip to content

Commit

Permalink
removed fontSize from FormStyles
Browse files Browse the repository at this point in the history
  • Loading branch information
TheNoumanDev committed Sep 23, 2024
1 parent a4f4c8d commit 7fedfa6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
2 changes: 0 additions & 2 deletions modules/ensemble/lib/widget/helpers/form_helper.dart
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ class FormFieldController extends WidgetController {
bool? enabled;
bool required = false;
IconModel? icon;
int? fontSize;
int? maxWidth;

InputVariant? variant;
Expand Down Expand Up @@ -65,7 +64,6 @@ class FormFieldController extends WidgetController {
floatLabel = Utils.getBool(value, fallback: false),
'required': (value) => required = Utils.getBool(value, fallback: false),
'icon': (value) => icon = Utils.getIcon(value),
'fontSize': (value) => fontSize = Utils.optionalInt(value),
'maxWidth': (value) =>
maxWidth = Utils.optionalInt(value, min: 0, max: 5000),
'variant': (type) => variant = InputVariant.values.from(type),
Expand Down
6 changes: 3 additions & 3 deletions modules/ensemble/lib/widget/input/form_time.dart
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,10 @@ class Time extends StatefulWidget
class TimeController extends FormFieldController with HasTextPlaceholder {
TimeOfDay? value;

Text prettyValue(BuildContext context) {
Text prettyValue(BuildContext context, TextStyle formFieldTextStyle) {
if (value != null) {
return Text(value!.format(context),
style: TextStyle(fontSize: fontSize?.toDouble()));
style: formFieldTextStyle);
} else {
return Text(placeholder ?? 'Select a time', style: placeholderStyle);
}
Expand Down Expand Up @@ -136,7 +136,7 @@ class TimeState extends FormFieldWidgetState<Time> {
children: [
const Icon(Icons.alarm, color: Colors.black54),
const SizedBox(width: 5),
widget._controller.prettyValue(context)
widget._controller.prettyValue(context, formFieldTextStyle)
],
);
if (!isEnabled()) {
Expand Down

0 comments on commit 7fedfa6

Please sign in to comment.