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