diff --git a/lib/new_views/common_widgets/app_text_form_field.dart b/lib/new_views/common_widgets/app_text_form_field.dart index d9570aba..227319f5 100644 --- a/lib/new_views/common_widgets/app_text_form_field.dart +++ b/lib/new_views/common_widgets/app_text_form_field.dart @@ -43,6 +43,7 @@ class AppTextFormField extends StatefulWidget { final VoidCallback? onTap; final bool showSpeechToText; final Color? enableColor; + final bool makeMultiLinesNull; const AppTextFormField({ Key? key, @@ -74,6 +75,7 @@ class AppTextFormField extends StatefulWidget { this.showShadow = true, this.showWithoutDecoration = false, this.alignLabelWithHint = false, // Provide default value + this.makeMultiLinesNull = false, this.onTap, this.enableColor, }) : super(key: key); @@ -179,7 +181,7 @@ class _AppTextFormFieldState extends State { onChanged: widget.onChange, obscureText: widget.obscureText ?? false, keyboardType: widget.textInputType, - maxLines: widget.textInputType == TextInputType.multiline ? 4 : 1, + maxLines: widget.makeMultiLinesNull ? null:widget.textInputType == TextInputType.multiline ? 4 : 1, obscuringCharacter: "*", controller: widget.controller, textInputAction: widget.textInputType == TextInputType.multiline ? null : widget.textInputAction ?? TextInputAction.next, diff --git a/lib/views/pages/user/ppm/update_ppm/ppm_pm_check_list_form.dart b/lib/views/pages/user/ppm/update_ppm/ppm_pm_check_list_form.dart index e357c36b..5fca35f2 100644 --- a/lib/views/pages/user/ppm/update_ppm/ppm_pm_check_list_form.dart +++ b/lib/views/pages/user/ppm/update_ppm/ppm_pm_check_list_form.dart @@ -1,7 +1,6 @@ import 'package:flutter/material.dart'; import 'package:provider/provider.dart'; import 'package:test_sa/controllers/providers/api/ppm_provider.dart'; -import 'package:test_sa/controllers/providers/settings/setting_provider.dart'; import 'package:test_sa/extensions/context_extension.dart'; import 'package:test_sa/extensions/int_extensions.dart'; import 'package:test_sa/extensions/string_extensions.dart'; @@ -94,7 +93,8 @@ class _PpmPmChecklistFormState extends State { labelText: "Task Comment".addTranslation, labelStyle: AppTextStyles.tinyFont.copyWith(color: context.isDark ? AppColor.neutral30 : AppColor.neutral120, fontWeight: FontWeight.w500), initialValue: list[index].taskComment ?? "", - // enable: false, + textInputType: TextInputType.multiline, + makeMultiLinesNull: true, backgroundColor: context.isDark ? AppColor.neutral20 : AppColor.neutral100, showShadow: false, onChange: (text) {