Fix pm entry empty values when scroll

design_3.0_internal_audit_module
zaid_daoud 3 years ago
parent 3e314447c6
commit 1c9101d8ab

@ -36,11 +36,12 @@ class _PentryInfoFormState extends State<PentryInfoForm> {
widget.model?.files ??= []; widget.model?.files ??= [];
final subtitle = AppLocalization.of(context).subtitle; final subtitle = AppLocalization.of(context).subtitle;
final userProvider = Provider.of<UserProvider>(context); final userProvider = Provider.of<UserProvider>(context);
return ListView( return Padding(
padding: EdgeInsets.only( padding: EdgeInsets.only(
top: 12 * AppStyle.getScaleFactor(context), left: 12 * AppStyle.getScaleFactor(context), right: 12 * AppStyle.getScaleFactor(context), bottom: 80 * AppStyle.getScaleFactor(context)), top: 12 * AppStyle.getScaleFactor(context), left: 12 * AppStyle.getScaleFactor(context), right: 12 * AppStyle.getScaleFactor(context), bottom: 80 * AppStyle.getScaleFactor(context)),
shrinkWrap: true, child: SingleChildScrollView(
physics: const ClampingScrollPhysics(), child: Column(
crossAxisAlignment: CrossAxisAlignment.stretch,
children: [ children: [
const SizedBox( const SizedBox(
height: 8, height: 8,
@ -188,12 +189,12 @@ class _PentryInfoFormState extends State<PentryInfoForm> {
const ASubTitle("Engineer Signature"), const ASubTitle("Engineer Signature"),
ESignature( ESignature(
oldSignature: widget.model.signatureEngineer, oldSignature: widget.model.signatureEngineer,
newSignature: widget.model.localNurseSignature, newSignature: widget.model.localEngineerSignature,
onChange: (signature) { onChange: (signature) {
if (signature == null || signature.isEmpty) { if (signature == null || signature.isEmpty) {
return; return;
} }
widget.model.localNurseSignature = signature; widget.model.localEngineerSignature = signature;
widget.model.signatureEngineer = "${DateTime.now().toIso8601String()}.png|${base64Encode(signature)}"; widget.model.signatureEngineer = "${DateTime.now().toIso8601String()}.png|${base64Encode(signature)}";
}, },
), ),
@ -201,6 +202,8 @@ class _PentryInfoFormState extends State<PentryInfoForm> {
height: 8, height: 8,
), ),
], ],
),
),
); );
} }
} }

Loading…
Cancel
Save