|
|
|
@ -6,7 +6,6 @@ import 'package:test_sa/extensions/text_extensions.dart';
|
|
|
|
import 'package:test_sa/extensions/widget_extensions.dart';
|
|
|
|
import 'package:test_sa/extensions/widget_extensions.dart';
|
|
|
|
import 'package:test_sa/new_views/app_style/app_color.dart';
|
|
|
|
import 'package:test_sa/new_views/app_style/app_color.dart';
|
|
|
|
|
|
|
|
|
|
|
|
import '../../app_style/sizing.dart';
|
|
|
|
|
|
|
|
import '../loaders/image_loader.dart';
|
|
|
|
import '../loaders/image_loader.dart';
|
|
|
|
|
|
|
|
|
|
|
|
class ESignature extends StatefulWidget {
|
|
|
|
class ESignature extends StatefulWidget {
|
|
|
|
@ -49,16 +48,7 @@ class _ESignatureState extends State<ESignature> {
|
|
|
|
|
|
|
|
|
|
|
|
@override
|
|
|
|
@override
|
|
|
|
Widget build(BuildContext context) {
|
|
|
|
Widget build(BuildContext context) {
|
|
|
|
return Column(
|
|
|
|
return FormField<String>(onSaved: (_) async {
|
|
|
|
children: [
|
|
|
|
|
|
|
|
if (widget.oldSignature != null || signature != null)
|
|
|
|
|
|
|
|
Container(
|
|
|
|
|
|
|
|
width: MediaQuery.of(context).size.width,
|
|
|
|
|
|
|
|
padding: const EdgeInsets.only(bottom: 8),
|
|
|
|
|
|
|
|
height: 90 * AppStyle.getScaleFactor(context),
|
|
|
|
|
|
|
|
child: signature != null ? Image.memory(signature) : ImageLoader(boxFit: BoxFit.contain, url: widget.oldSignature),
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
FormField<String>(onSaved: (_) async {
|
|
|
|
|
|
|
|
widget.onSaved(signature);
|
|
|
|
widget.onSaved(signature);
|
|
|
|
}, builder: (FormFieldState<String> state) {
|
|
|
|
}, builder: (FormFieldState<String> state) {
|
|
|
|
return Column(
|
|
|
|
return Column(
|
|
|
|
@ -101,7 +91,14 @@ class _ESignatureState extends State<ESignature> {
|
|
|
|
}),
|
|
|
|
}),
|
|
|
|
],
|
|
|
|
],
|
|
|
|
),
|
|
|
|
),
|
|
|
|
AbsorbPointer(
|
|
|
|
(widget.oldSignature != null || signature != null || !_editable)
|
|
|
|
|
|
|
|
? Container(
|
|
|
|
|
|
|
|
height: 135.toScreenHeight,
|
|
|
|
|
|
|
|
width: MediaQuery.of(context).size.width,
|
|
|
|
|
|
|
|
padding: const EdgeInsets.only(bottom: 8),
|
|
|
|
|
|
|
|
child: signature != null ? Image.memory(signature) : ImageLoader(boxFit: BoxFit.contain, url: widget.oldSignature),
|
|
|
|
|
|
|
|
)
|
|
|
|
|
|
|
|
: AbsorbPointer(
|
|
|
|
absorbing: !_editable,
|
|
|
|
absorbing: !_editable,
|
|
|
|
child: Signature(
|
|
|
|
child: Signature(
|
|
|
|
controller: _controller,
|
|
|
|
controller: _controller,
|
|
|
|
@ -156,8 +153,6 @@ class _ESignatureState extends State<ESignature> {
|
|
|
|
)
|
|
|
|
)
|
|
|
|
],
|
|
|
|
],
|
|
|
|
);
|
|
|
|
);
|
|
|
|
}),
|
|
|
|
});
|
|
|
|
],
|
|
|
|
|
|
|
|
);
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|