WIP
This commit is contained in:
parent
2e337e1e26
commit
60a56db446
|
@ -68,228 +68,216 @@ 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)),
|
),
|
||||||
),
|
child: Column(
|
||||||
child: Column(
|
mainAxisSize: MainAxisSize.min,
|
||||||
mainAxisSize: MainAxisSize.min,
|
mainAxisAlignment: MainAxisAlignment.start,
|
||||||
mainAxisAlignment: MainAxisAlignment.start,
|
children: [
|
||||||
children: [
|
Container(
|
||||||
Container(
|
width: MediaQuery.of(context).size.width * 0.3,
|
||||||
width: maxWidth * 0.3,
|
height: MediaQuery.of(context).size.width * 0.3,
|
||||||
height: maxWidth * 0.3,
|
clipBehavior: Clip.antiAlias,
|
||||||
clipBehavior: Clip.antiAlias,
|
decoration: const BoxDecoration(
|
||||||
decoration: const BoxDecoration(
|
shape: BoxShape.circle,
|
||||||
shape: BoxShape.circle,
|
|
||||||
),
|
|
||||||
child: CachedNetworkImage(
|
|
||||||
fadeInDuration: const Duration(milliseconds: 100),
|
|
||||||
fadeOutDuration: const Duration(milliseconds: 100),
|
|
||||||
imageUrl: widget.imagePath ?? '',
|
|
||||||
fit: BoxFit.cover,
|
|
||||||
),
|
|
||||||
),
|
),
|
||||||
Row(
|
child: CachedNetworkImage(
|
||||||
children: statusLinkedHashMap.expand((linkedHashMap) {
|
fadeInDuration: const Duration(milliseconds: 100),
|
||||||
return linkedHashMap.entries
|
fadeOutDuration: const Duration(milliseconds: 100),
|
||||||
.map((MapEntry<String, Color> item) {
|
imageUrl: widget.imagePath ?? '',
|
||||||
return Expanded(
|
fit: BoxFit.cover,
|
||||||
child: Padding(
|
),
|
||||||
padding: EdgeInsets.symmetric(
|
),
|
||||||
horizontal: maxWidth * 0.05,
|
SizedBox(height: MediaQuery.of(context).size.height * 0.02),
|
||||||
),
|
Row(
|
||||||
child: TextFormField(
|
children: statusLinkedHashMap.expand((linkedHashMap) {
|
||||||
// controller: _model.textControllerStatus,
|
return linkedHashMap.entries
|
||||||
// focusNode: _model.textFieldFocusNodeStatus,
|
.map((MapEntry<String, Color> item) {
|
||||||
autofocus: false,
|
return Expanded(
|
||||||
canRequestFocus: false,
|
child: Padding(
|
||||||
readOnly: true,
|
padding: EdgeInsets.symmetric(
|
||||||
obscureText: false,
|
horizontal: MediaQuery.of(context).size.width * 0.05,
|
||||||
decoration: InputDecoration(
|
),
|
||||||
isDense: true,
|
child: TextFormField(
|
||||||
enabledBorder: OutlineInputBorder(
|
// controller: _model.textControllerStatus,
|
||||||
borderRadius: BorderRadius.circular(10.0),
|
// focusNode: _model.textFieldFocusNodeStatus,
|
||||||
borderSide: BorderSide(
|
autofocus: false,
|
||||||
color: item.value,
|
canRequestFocus: false,
|
||||||
),
|
readOnly: true,
|
||||||
),
|
obscureText: false,
|
||||||
filled: true,
|
decoration: InputDecoration(
|
||||||
fillColor: item.value,
|
isDense: true,
|
||||||
labelText: item.key,
|
enabledBorder: OutlineInputBorder(
|
||||||
labelStyle: FlutterFlowTheme.of(context)
|
borderRadius: BorderRadius.circular(10.0),
|
||||||
.labelMedium
|
borderSide: BorderSide(
|
||||||
.override(
|
color: item.value,
|
||||||
fontFamily: FlutterFlowTheme.of(context)
|
|
||||||
.labelMediumFamily,
|
|
||||||
fontWeight: FontWeight.bold,
|
|
||||||
color: FlutterFlowTheme.of(context).info,
|
|
||||||
letterSpacing: 0.0,
|
|
||||||
useGoogleFonts:
|
|
||||||
GoogleFonts.asMap().containsKey(
|
|
||||||
FlutterFlowTheme.of(context)
|
|
||||||
.labelMediumFamily,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
hintStyle: FlutterFlowTheme.of(context)
|
|
||||||
.labelMedium
|
|
||||||
.override(
|
|
||||||
fontFamily: FlutterFlowTheme.of(context)
|
|
||||||
.labelMediumFamily,
|
|
||||||
color: FlutterFlowTheme.of(context).info,
|
|
||||||
letterSpacing: 0.0,
|
|
||||||
useGoogleFonts:
|
|
||||||
GoogleFonts.asMap().containsKey(
|
|
||||||
FlutterFlowTheme.of(context)
|
|
||||||
.labelMediumFamily,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
focusedBorder: InputBorder.none,
|
|
||||||
errorBorder: InputBorder.none,
|
|
||||||
focusedErrorBorder: InputBorder.none,
|
|
||||||
suffixIcon: Icon(
|
|
||||||
Icons.info,
|
|
||||||
color: FlutterFlowTheme.of(context).info,
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
style: FlutterFlowTheme.of(context)
|
filled: true,
|
||||||
.bodyMedium
|
fillColor: item.value,
|
||||||
|
labelText: item.key,
|
||||||
|
labelStyle: FlutterFlowTheme.of(context)
|
||||||
|
.labelMedium
|
||||||
.override(
|
.override(
|
||||||
fontFamily: FlutterFlowTheme.of(context)
|
fontFamily: FlutterFlowTheme.of(context)
|
||||||
.bodyMediumFamily,
|
.labelMediumFamily,
|
||||||
|
fontWeight: FontWeight.bold,
|
||||||
color: FlutterFlowTheme.of(context).info,
|
color: FlutterFlowTheme.of(context).info,
|
||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
||||||
FlutterFlowTheme.of(context).bodyMediumFamily,
|
FlutterFlowTheme.of(context)
|
||||||
|
.labelMediumFamily,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
textAlign: TextAlign.start,
|
hintStyle: FlutterFlowTheme.of(context)
|
||||||
maxLines: null,
|
.labelMedium
|
||||||
keyboardType: TextInputType.name,
|
.override(
|
||||||
validator: _model.textController1Validator
|
fontFamily: FlutterFlowTheme.of(context)
|
||||||
.asValidator(context),
|
.labelMediumFamily,
|
||||||
|
color: FlutterFlowTheme.of(context).info,
|
||||||
|
letterSpacing: 0.0,
|
||||||
|
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
||||||
|
FlutterFlowTheme.of(context)
|
||||||
|
.labelMediumFamily,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
focusedBorder: InputBorder.none,
|
||||||
|
errorBorder: InputBorder.none,
|
||||||
|
focusedErrorBorder: InputBorder.none,
|
||||||
|
suffixIcon: Icon(
|
||||||
|
Icons.info,
|
||||||
|
color: FlutterFlowTheme.of(context).info,
|
||||||
|
),
|
||||||
),
|
),
|
||||||
),
|
style: FlutterFlowTheme.of(context).bodyMedium.override(
|
||||||
);
|
fontFamily:
|
||||||
}).toList();
|
FlutterFlowTheme.of(context).bodyMediumFamily,
|
||||||
}).toList(),
|
color: FlutterFlowTheme.of(context).info,
|
||||||
),
|
letterSpacing: 0.0,
|
||||||
ListView.builder(
|
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
||||||
shrinkWrap: true,
|
|
||||||
itemCount: labelsLinkedHashMap.length,
|
|
||||||
physics: const AlwaysScrollableScrollPhysics(),
|
|
||||||
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,
|
|
||||||
),
|
|
||||||
child: TextFormField(
|
|
||||||
readOnly: true,
|
|
||||||
initialValue: '$value',
|
|
||||||
style: FlutterFlowTheme.of(context).bodyMedium.override(
|
|
||||||
fontFamily:
|
|
||||||
FlutterFlowTheme.of(context).bodyMediumFamily,
|
FlutterFlowTheme.of(context).bodyMediumFamily,
|
||||||
color: FlutterFlowTheme.of(context).primaryText,
|
|
||||||
letterSpacing: 0.0,
|
|
||||||
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
|
||||||
FlutterFlowTheme.of(context).bodyMediumFamily,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
decoration: InputDecoration(
|
|
||||||
labelText: key,
|
|
||||||
filled: true,
|
|
||||||
fillColor:
|
|
||||||
FlutterFlowTheme.of(context).primaryBackground,
|
|
||||||
border: OutlineInputBorder(
|
|
||||||
borderRadius: BorderRadius.circular(10.0),
|
|
||||||
borderSide: BorderSide(
|
|
||||||
color: FlutterFlowTheme.of(context)
|
|
||||||
.primaryBackground, // Change border color here
|
|
||||||
),
|
|
||||||
),
|
|
||||||
labelStyle: FlutterFlowTheme.of(context)
|
|
||||||
.labelMedium
|
|
||||||
.override(
|
|
||||||
fontFamily: FlutterFlowTheme.of(context)
|
|
||||||
.labelMediumFamily,
|
|
||||||
color: FlutterFlowTheme.of(context).primaryText,
|
|
||||||
letterSpacing: 0.0,
|
|
||||||
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
|
||||||
FlutterFlowTheme.of(context).labelMediumFamily,
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
hintStyle: FlutterFlowTheme.of(context)
|
textAlign: TextAlign.start,
|
||||||
.labelMedium
|
maxLines: null,
|
||||||
.override(
|
keyboardType: TextInputType.name,
|
||||||
fontFamily: FlutterFlowTheme.of(context)
|
validator: _model.textController1Validator
|
||||||
.labelMediumFamily,
|
.asValidator(context),
|
||||||
color: FlutterFlowTheme.of(context).primaryText,
|
|
||||||
letterSpacing: 0.0,
|
|
||||||
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
|
||||||
FlutterFlowTheme.of(context).labelMediumFamily,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
enabledBorder: OutlineInputBorder(
|
|
||||||
borderRadius: BorderRadius.circular(10.0),
|
|
||||||
borderSide: BorderSide(
|
|
||||||
color: FlutterFlowTheme.of(context)
|
|
||||||
.primaryBackground, // Change border color here
|
|
||||||
),
|
|
||||||
),
|
|
||||||
focusedBorder: OutlineInputBorder(
|
|
||||||
borderRadius: BorderRadius.circular(10.0),
|
|
||||||
borderSide: BorderSide(
|
|
||||||
color: FlutterFlowTheme.of(context)
|
|
||||||
.primaryBackground, // Change border color here
|
|
||||||
),
|
|
||||||
),
|
|
||||||
errorBorder: OutlineInputBorder(
|
|
||||||
borderRadius: BorderRadius.circular(10.0),
|
|
||||||
borderSide: BorderSide(
|
|
||||||
color: FlutterFlowTheme.of(context)
|
|
||||||
.primaryBackground, // Change border color here
|
|
||||||
),
|
|
||||||
),
|
|
||||||
focusedErrorBorder: OutlineInputBorder(
|
|
||||||
borderRadius: BorderRadius.circular(10.0),
|
|
||||||
borderSide: BorderSide(
|
|
||||||
color: FlutterFlowTheme.of(context)
|
|
||||||
.primaryBackground, // Change border color here
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
},
|
}).toList();
|
||||||
),
|
}).toList(),
|
||||||
if (widget.buttons.isNotEmpty)
|
),
|
||||||
Padding(
|
SizedBox(height: MediaQuery.of(context).size.height * 0.02),
|
||||||
|
ListView.builder(
|
||||||
|
shrinkWrap: true,
|
||||||
|
itemCount: labelsLinkedHashMap.length,
|
||||||
|
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(
|
padding: EdgeInsets.symmetric(
|
||||||
horizontal: maxWidth * 0.02,
|
horizontal: MediaQuery.of(context).size.width * 0.02,
|
||||||
|
vertical: MediaQuery.of(context).size.height * 0.01,
|
||||||
),
|
),
|
||||||
child: Row(
|
child: TextFormField(
|
||||||
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
|
readOnly: true,
|
||||||
children: widget.buttons,
|
initialValue: '$value',
|
||||||
|
style: FlutterFlowTheme.of(context).bodyMedium.override(
|
||||||
|
fontFamily:
|
||||||
|
FlutterFlowTheme.of(context).bodyMediumFamily,
|
||||||
|
color: FlutterFlowTheme.of(context).primaryText,
|
||||||
|
letterSpacing: 0.0,
|
||||||
|
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
||||||
|
FlutterFlowTheme.of(context).bodyMediumFamily,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
decoration: InputDecoration(
|
||||||
|
labelText: key,
|
||||||
|
filled: true,
|
||||||
|
fillColor: FlutterFlowTheme.of(context).primaryBackground,
|
||||||
|
border: OutlineInputBorder(
|
||||||
|
borderRadius: BorderRadius.circular(10.0),
|
||||||
|
borderSide: BorderSide(
|
||||||
|
color: FlutterFlowTheme.of(context)
|
||||||
|
.primaryBackground, // Change border color here
|
||||||
|
),
|
||||||
|
),
|
||||||
|
labelStyle: FlutterFlowTheme.of(context)
|
||||||
|
.labelMedium
|
||||||
|
.override(
|
||||||
|
fontFamily:
|
||||||
|
FlutterFlowTheme.of(context).labelMediumFamily,
|
||||||
|
color: FlutterFlowTheme.of(context).primaryText,
|
||||||
|
letterSpacing: 0.0,
|
||||||
|
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
||||||
|
FlutterFlowTheme.of(context).labelMediumFamily,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
hintStyle: FlutterFlowTheme.of(context)
|
||||||
|
.labelMedium
|
||||||
|
.override(
|
||||||
|
fontFamily:
|
||||||
|
FlutterFlowTheme.of(context).labelMediumFamily,
|
||||||
|
color: FlutterFlowTheme.of(context).primaryText,
|
||||||
|
letterSpacing: 0.0,
|
||||||
|
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
||||||
|
FlutterFlowTheme.of(context).labelMediumFamily,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
enabledBorder: OutlineInputBorder(
|
||||||
|
borderRadius: BorderRadius.circular(10.0),
|
||||||
|
borderSide: BorderSide(
|
||||||
|
color: FlutterFlowTheme.of(context)
|
||||||
|
.primaryBackground, // Change border color here
|
||||||
|
),
|
||||||
|
),
|
||||||
|
focusedBorder: OutlineInputBorder(
|
||||||
|
borderRadius: BorderRadius.circular(10.0),
|
||||||
|
borderSide: BorderSide(
|
||||||
|
color: FlutterFlowTheme.of(context)
|
||||||
|
.primaryBackground, // Change border color here
|
||||||
|
),
|
||||||
|
),
|
||||||
|
errorBorder: OutlineInputBorder(
|
||||||
|
borderRadius: BorderRadius.circular(10.0),
|
||||||
|
borderSide: BorderSide(
|
||||||
|
color: FlutterFlowTheme.of(context)
|
||||||
|
.primaryBackground, // Change border color here
|
||||||
|
),
|
||||||
|
),
|
||||||
|
focusedErrorBorder: OutlineInputBorder(
|
||||||
|
borderRadius: BorderRadius.circular(10.0),
|
||||||
|
borderSide: BorderSide(
|
||||||
|
color: FlutterFlowTheme.of(context)
|
||||||
|
.primaryBackground, // Change border color here
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
),
|
),
|
||||||
),
|
);
|
||||||
]
|
},
|
||||||
.divide(const Flexible(child: SizedBox(height: 20.0)))
|
),
|
||||||
.addToEnd(const Flexible(child: SizedBox(height: 20.0)))
|
SizedBox(height: MediaQuery.of(context).size.height * 0.02),
|
||||||
.addToStart(const Flexible(child: SizedBox(height: 20.0))),
|
if (widget.buttons.isNotEmpty)
|
||||||
),
|
Row(
|
||||||
);
|
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
|
||||||
},
|
children: widget.buttons,
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue