301 lines
12 KiB
Dart
301 lines
12 KiB
Dart
import '/flutter_flow/flutter_flow_theme.dart';
|
|
import '/flutter_flow/flutter_flow_util.dart';
|
|
import '/flutter_flow/flutter_flow_widgets.dart';
|
|
import 'package:flutter/material.dart';
|
|
import 'package:google_fonts/google_fonts.dart';
|
|
import 'opt_modal_model.dart';
|
|
export 'opt_modal_model.dart';
|
|
|
|
class OptModalWidget extends StatefulWidget {
|
|
const OptModalWidget({super.key});
|
|
|
|
@override
|
|
State<OptModalWidget> createState() => _OptModalWidgetState();
|
|
}
|
|
|
|
class _OptModalWidgetState extends State<OptModalWidget> {
|
|
late OptModalModel _model;
|
|
|
|
@override
|
|
void setState(VoidCallback callback) {
|
|
super.setState(callback);
|
|
_model.onUpdate();
|
|
}
|
|
|
|
@override
|
|
void initState() {
|
|
super.initState();
|
|
_model = createModel(context, () => OptModalModel());
|
|
|
|
_model.textController ??= TextEditingController();
|
|
_model.textFieldFocusNode ??= FocusNode();
|
|
}
|
|
|
|
@override
|
|
void dispose() {
|
|
_model.maybeDispose();
|
|
|
|
super.dispose();
|
|
}
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return Align(
|
|
alignment: const AlignmentDirectional(1.0, -1.0),
|
|
child: Container(
|
|
width: 300.0,
|
|
height: 400.0,
|
|
decoration: BoxDecoration(
|
|
color: FlutterFlowTheme.of(context).primaryBackground,
|
|
),
|
|
child: Column(
|
|
mainAxisSize: MainAxisSize.max,
|
|
children: [
|
|
Row(
|
|
mainAxisSize: MainAxisSize.max,
|
|
mainAxisAlignment: MainAxisAlignment.center,
|
|
children: [
|
|
Padding(
|
|
padding: const EdgeInsetsDirectional.fromSTEB(0.0, 10.0, 0.0, 0.0),
|
|
child: Icon(
|
|
Icons.filter_list,
|
|
color: FlutterFlowTheme.of(context).primary,
|
|
size: 24.0,
|
|
),
|
|
),
|
|
],
|
|
),
|
|
Padding(
|
|
padding: const EdgeInsetsDirectional.fromSTEB(8.0, 0.0, 8.0, 0.0),
|
|
child: TextFormField(
|
|
controller: _model.textController,
|
|
focusNode: _model.textFieldFocusNode,
|
|
autofocus: true,
|
|
obscureText: false,
|
|
decoration: InputDecoration(
|
|
isDense: true,
|
|
labelText: FFLocalizations.of(context).getText(
|
|
'0enrtljz' /* Label here... */,
|
|
),
|
|
labelStyle: FlutterFlowTheme.of(context).labelMedium.override(
|
|
fontFamily:
|
|
FlutterFlowTheme.of(context).labelMediumFamily,
|
|
letterSpacing: 0.0,
|
|
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
|
FlutterFlowTheme.of(context).labelMediumFamily),
|
|
),
|
|
hintStyle: FlutterFlowTheme.of(context).labelMedium.override(
|
|
fontFamily:
|
|
FlutterFlowTheme.of(context).labelMediumFamily,
|
|
letterSpacing: 0.0,
|
|
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
|
FlutterFlowTheme.of(context).labelMediumFamily),
|
|
),
|
|
enabledBorder: UnderlineInputBorder(
|
|
borderSide: BorderSide(
|
|
color: FlutterFlowTheme.of(context).alternate,
|
|
width: 2.0,
|
|
),
|
|
borderRadius: BorderRadius.circular(8.0),
|
|
),
|
|
focusedBorder: UnderlineInputBorder(
|
|
borderSide: BorderSide(
|
|
color: FlutterFlowTheme.of(context).primary,
|
|
width: 2.0,
|
|
),
|
|
borderRadius: BorderRadius.circular(8.0),
|
|
),
|
|
errorBorder: UnderlineInputBorder(
|
|
borderSide: BorderSide(
|
|
color: FlutterFlowTheme.of(context).error,
|
|
width: 2.0,
|
|
),
|
|
borderRadius: BorderRadius.circular(8.0),
|
|
),
|
|
focusedErrorBorder: UnderlineInputBorder(
|
|
borderSide: BorderSide(
|
|
color: FlutterFlowTheme.of(context).error,
|
|
width: 2.0,
|
|
),
|
|
borderRadius: BorderRadius.circular(8.0),
|
|
),
|
|
suffixIcon: const Icon(
|
|
Icons.search_outlined,
|
|
),
|
|
),
|
|
style: FlutterFlowTheme.of(context).bodyMedium.override(
|
|
fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily,
|
|
letterSpacing: 0.0,
|
|
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
|
FlutterFlowTheme.of(context).bodyMediumFamily),
|
|
),
|
|
validator: _model.textControllerValidator.asValidator(context),
|
|
),
|
|
),
|
|
Column(
|
|
mainAxisSize: MainAxisSize.max,
|
|
children: [
|
|
Row(
|
|
mainAxisSize: MainAxisSize.max,
|
|
children: [
|
|
Text(
|
|
FFLocalizations.of(context).getText(
|
|
'l7tw8b92' /* Tipo de Pessoa */,
|
|
),
|
|
style: FlutterFlowTheme.of(context).bodyMedium.override(
|
|
fontFamily:
|
|
FlutterFlowTheme.of(context).bodyMediumFamily,
|
|
letterSpacing: 0.0,
|
|
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
|
FlutterFlowTheme.of(context).bodyMediumFamily),
|
|
),
|
|
),
|
|
].addToStart(const SizedBox(width: 24.0)),
|
|
),
|
|
Theme(
|
|
data: ThemeData(
|
|
checkboxTheme: CheckboxThemeData(
|
|
visualDensity: VisualDensity.compact,
|
|
materialTapTargetSize: MaterialTapTargetSize.shrinkWrap,
|
|
shape: RoundedRectangleBorder(
|
|
borderRadius: BorderRadius.circular(25),
|
|
),
|
|
),
|
|
unselectedWidgetColor:
|
|
FlutterFlowTheme.of(context).secondaryText,
|
|
),
|
|
child: CheckboxListTile(
|
|
value: _model.checkboxListTileValue1 ??= true,
|
|
onChanged: (newValue) async {
|
|
setState(() => _model.checkboxListTileValue1 = newValue!);
|
|
},
|
|
title: Text(
|
|
FFLocalizations.of(context).getText(
|
|
'dkvmdln1' /* Title */,
|
|
),
|
|
style: FlutterFlowTheme.of(context).titleLarge.override(
|
|
fontFamily:
|
|
FlutterFlowTheme.of(context).titleLargeFamily,
|
|
fontSize: 10.0,
|
|
letterSpacing: 0.0,
|
|
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
|
FlutterFlowTheme.of(context).titleLargeFamily),
|
|
),
|
|
),
|
|
tileColor: FlutterFlowTheme.of(context).secondaryBackground,
|
|
activeColor: FlutterFlowTheme.of(context).primary,
|
|
checkColor: FlutterFlowTheme.of(context).info,
|
|
dense: true,
|
|
controlAffinity: ListTileControlAffinity.leading,
|
|
shape: RoundedRectangleBorder(
|
|
borderRadius: BorderRadius.circular(0.0),
|
|
),
|
|
),
|
|
),
|
|
]
|
|
.addToStart(const SizedBox(height: 10.0))
|
|
.addToEnd(const SizedBox(height: 10.0)),
|
|
),
|
|
Column(
|
|
mainAxisSize: MainAxisSize.max,
|
|
children: [
|
|
Row(
|
|
mainAxisSize: MainAxisSize.max,
|
|
children: [
|
|
Text(
|
|
FFLocalizations.of(context).getText(
|
|
'pepv7gl9' /* Tipo de Acesso */,
|
|
),
|
|
style: FlutterFlowTheme.of(context).bodyMedium.override(
|
|
fontFamily:
|
|
FlutterFlowTheme.of(context).bodyMediumFamily,
|
|
letterSpacing: 0.0,
|
|
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
|
FlutterFlowTheme.of(context).bodyMediumFamily),
|
|
),
|
|
),
|
|
].addToStart(const SizedBox(width: 24.0)),
|
|
),
|
|
Theme(
|
|
data: ThemeData(
|
|
checkboxTheme: CheckboxThemeData(
|
|
visualDensity: VisualDensity.compact,
|
|
materialTapTargetSize: MaterialTapTargetSize.shrinkWrap,
|
|
shape: RoundedRectangleBorder(
|
|
borderRadius: BorderRadius.circular(25),
|
|
),
|
|
),
|
|
unselectedWidgetColor:
|
|
FlutterFlowTheme.of(context).secondaryText,
|
|
),
|
|
child: CheckboxListTile(
|
|
value: _model.checkboxListTileValue2 ??= true,
|
|
onChanged: (newValue) async {
|
|
setState(() => _model.checkboxListTileValue2 = newValue!);
|
|
},
|
|
title: Text(
|
|
FFLocalizations.of(context).getText(
|
|
'qos4r9fy' /* Title */,
|
|
),
|
|
style: FlutterFlowTheme.of(context).titleLarge.override(
|
|
fontFamily:
|
|
FlutterFlowTheme.of(context).titleLargeFamily,
|
|
fontSize: 10.0,
|
|
letterSpacing: 0.0,
|
|
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
|
FlutterFlowTheme.of(context).titleLargeFamily),
|
|
),
|
|
),
|
|
tileColor: FlutterFlowTheme.of(context).secondaryBackground,
|
|
activeColor: FlutterFlowTheme.of(context).primary,
|
|
checkColor: FlutterFlowTheme.of(context).info,
|
|
dense: true,
|
|
controlAffinity: ListTileControlAffinity.leading,
|
|
shape: RoundedRectangleBorder(
|
|
borderRadius: BorderRadius.circular(0.0),
|
|
),
|
|
),
|
|
),
|
|
]
|
|
.addToStart(const SizedBox(height: 10.0))
|
|
.addToEnd(const SizedBox(height: 10.0)),
|
|
),
|
|
FFButtonWidget(
|
|
onPressed: () {
|
|
print('Button pressed ...');
|
|
},
|
|
text: '',
|
|
icon: const Icon(
|
|
Icons.done,
|
|
size: 15.0,
|
|
),
|
|
options: FFButtonOptions(
|
|
height: 40.0,
|
|
padding: const EdgeInsetsDirectional.fromSTEB(24.0, 0.0, 24.0, 0.0),
|
|
iconPadding: const EdgeInsetsDirectional.fromSTEB(0.0, 0.0, 0.0, 0.0),
|
|
color: FlutterFlowTheme.of(context).primary,
|
|
textStyle: FlutterFlowTheme.of(context).titleSmall.override(
|
|
fontFamily: FlutterFlowTheme.of(context).titleSmallFamily,
|
|
color: Colors.white,
|
|
letterSpacing: 0.0,
|
|
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
|
FlutterFlowTheme.of(context).titleSmallFamily),
|
|
),
|
|
elevation: 3.0,
|
|
borderSide: const BorderSide(
|
|
color: Colors.transparent,
|
|
width: 1.0,
|
|
),
|
|
borderRadius: BorderRadius.circular(8.0),
|
|
),
|
|
),
|
|
]
|
|
.divide(const SizedBox(height: 10.0))
|
|
.addToStart(const SizedBox(height: 10.0))
|
|
.addToEnd(const SizedBox(height: 10.0)),
|
|
),
|
|
),
|
|
);
|
|
}
|
|
}
|