This commit is contained in:
jantunesmesias 2024-08-09 11:29:43 -03:00
parent 2e337e1e26
commit 60a56db446
1 changed files with 190 additions and 202 deletions

View File

@ -68,13 +68,12 @@ class _VisitRequestTemplateComponentWidgetState
Widget build(BuildContext context) {
context.watch<FFAppState>();
return LayoutBuilder(
builder: (context, constraints) {
final maxWidth = constraints.maxWidth;
final maxHeight = constraints.maxHeight;
return Container(
width: maxWidth,
return SingleChildScrollView(
child: Container(
constraints: BoxConstraints(
maxWidth: MediaQuery.of(context).size.width,
maxHeight: MediaQuery.of(context).size.height,
),
decoration: BoxDecoration(
color: FlutterFlowTheme.of(context).primaryBackground,
borderRadius: const BorderRadius.all(Radius.circular(25.0)),
@ -84,8 +83,8 @@ class _VisitRequestTemplateComponentWidgetState
mainAxisAlignment: MainAxisAlignment.start,
children: [
Container(
width: maxWidth * 0.3,
height: maxWidth * 0.3,
width: MediaQuery.of(context).size.width * 0.3,
height: MediaQuery.of(context).size.width * 0.3,
clipBehavior: Clip.antiAlias,
decoration: const BoxDecoration(
shape: BoxShape.circle,
@ -97,6 +96,7 @@ class _VisitRequestTemplateComponentWidgetState
fit: BoxFit.cover,
),
),
SizedBox(height: MediaQuery.of(context).size.height * 0.02),
Row(
children: statusLinkedHashMap.expand((linkedHashMap) {
return linkedHashMap.entries
@ -104,7 +104,7 @@ class _VisitRequestTemplateComponentWidgetState
return Expanded(
child: Padding(
padding: EdgeInsets.symmetric(
horizontal: maxWidth * 0.05,
horizontal: MediaQuery.of(context).size.width * 0.05,
),
child: TextFormField(
// controller: _model.textControllerStatus,
@ -132,8 +132,7 @@ class _VisitRequestTemplateComponentWidgetState
fontWeight: FontWeight.bold,
color: FlutterFlowTheme.of(context).info,
letterSpacing: 0.0,
useGoogleFonts:
GoogleFonts.asMap().containsKey(
useGoogleFonts: GoogleFonts.asMap().containsKey(
FlutterFlowTheme.of(context)
.labelMediumFamily,
),
@ -145,8 +144,7 @@ class _VisitRequestTemplateComponentWidgetState
.labelMediumFamily,
color: FlutterFlowTheme.of(context).info,
letterSpacing: 0.0,
useGoogleFonts:
GoogleFonts.asMap().containsKey(
useGoogleFonts: GoogleFonts.asMap().containsKey(
FlutterFlowTheme.of(context)
.labelMediumFamily,
),
@ -159,11 +157,9 @@ class _VisitRequestTemplateComponentWidgetState
color: FlutterFlowTheme.of(context).info,
),
),
style: FlutterFlowTheme.of(context)
.bodyMedium
.override(
fontFamily: FlutterFlowTheme.of(context)
.bodyMediumFamily,
style: FlutterFlowTheme.of(context).bodyMedium.override(
fontFamily:
FlutterFlowTheme.of(context).bodyMediumFamily,
color: FlutterFlowTheme.of(context).info,
letterSpacing: 0.0,
useGoogleFonts: GoogleFonts.asMap().containsKey(
@ -181,18 +177,19 @@ class _VisitRequestTemplateComponentWidgetState
}).toList();
}).toList(),
),
SizedBox(height: MediaQuery.of(context).size.height * 0.02),
ListView.builder(
shrinkWrap: true,
itemCount: labelsLinkedHashMap.length,
physics: const AlwaysScrollableScrollPhysics(),
physics: const NeverScrollableScrollPhysics(),
itemBuilder: (context, index) {
String key = labelsLinkedHashMap.keys.elementAt(index);
String value = labelsLinkedHashMap[key]!;
// return Text('key: $key, value: $value');
return Padding(
padding: EdgeInsets.symmetric(
horizontal: maxWidth * 0.02,
vertical: maxHeight * 0.01,
horizontal: MediaQuery.of(context).size.width * 0.02,
vertical: MediaQuery.of(context).size.height * 0.01,
),
child: TextFormField(
readOnly: true,
@ -209,8 +206,7 @@ class _VisitRequestTemplateComponentWidgetState
decoration: InputDecoration(
labelText: key,
filled: true,
fillColor:
FlutterFlowTheme.of(context).primaryBackground,
fillColor: FlutterFlowTheme.of(context).primaryBackground,
border: OutlineInputBorder(
borderRadius: BorderRadius.circular(10.0),
borderSide: BorderSide(
@ -221,8 +217,8 @@ class _VisitRequestTemplateComponentWidgetState
labelStyle: FlutterFlowTheme.of(context)
.labelMedium
.override(
fontFamily: FlutterFlowTheme.of(context)
.labelMediumFamily,
fontFamily:
FlutterFlowTheme.of(context).labelMediumFamily,
color: FlutterFlowTheme.of(context).primaryText,
letterSpacing: 0.0,
useGoogleFonts: GoogleFonts.asMap().containsKey(
@ -232,8 +228,8 @@ class _VisitRequestTemplateComponentWidgetState
hintStyle: FlutterFlowTheme.of(context)
.labelMedium
.override(
fontFamily: FlutterFlowTheme.of(context)
.labelMediumFamily,
fontFamily:
FlutterFlowTheme.of(context).labelMediumFamily,
color: FlutterFlowTheme.of(context).primaryText,
letterSpacing: 0.0,
useGoogleFonts: GoogleFonts.asMap().containsKey(
@ -273,23 +269,15 @@ class _VisitRequestTemplateComponentWidgetState
);
},
),
SizedBox(height: MediaQuery.of(context).size.height * 0.02),
if (widget.buttons.isNotEmpty)
Padding(
padding: EdgeInsets.symmetric(
horizontal: maxWidth * 0.02,
),
child: Row(
Row(
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
children: widget.buttons,
),
],
),
]
.divide(const Flexible(child: SizedBox(height: 20.0)))
.addToEnd(const Flexible(child: SizedBox(height: 20.0)))
.addToStart(const Flexible(child: SizedBox(height: 20.0))),
),
);
},
);
}
}