import '/flutter_flow/flutter_flow_theme.dart'; import '/flutter_flow/flutter_flow_util.dart'; import 'package:flutter/material.dart'; import 'package:google_fonts/google_fonts.dart'; import 'select_header_component_model.dart'; export 'select_header_component_model.dart'; class SelectHeaderComponentWidget extends StatefulWidget { const SelectHeaderComponentWidget({ super.key, required this.selectToggle, bool? toggleIndexValue, }) : toggleIndexValue = toggleIndexValue ?? true; final Future Function(bool toggleIndex)? selectToggle; final bool toggleIndexValue; @override State createState() => _SelectHeaderComponentWidgetState(); } class _SelectHeaderComponentWidgetState extends State { late SelectHeaderComponentModel _model; @override void setState(VoidCallback callback) { super.setState(callback); _model.onUpdate(); } @override void initState() { super.initState(); _model = createModel(context, () => SelectHeaderComponentModel()); } @override void dispose() { _model.maybeDispose(); super.dispose(); } @override Widget build(BuildContext context) { return Row( mainAxisSize: MainAxisSize.max, mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ Expanded( child: Container( height: 55.0, decoration: BoxDecoration( color: FlutterFlowTheme.of(context).primaryBackground, ), child: Column( mainAxisSize: MainAxisSize.max, children: [ InkWell( splashColor: Colors.transparent, focusColor: Colors.transparent, hoverColor: Colors.transparent, highlightColor: Colors.transparent, onTap: () async { await widget.selectToggle?.call( true, ); }, child: Container( width: double.infinity, height: 50.0, decoration: const BoxDecoration( borderRadius: BorderRadius.only( bottomLeft: Radius.circular(0.0), bottomRight: Radius.circular(0.0), topLeft: Radius.circular(0.0), topRight: Radius.circular(0.0), ), ), child: Align( alignment: const AlignmentDirectional(0.0, 0.0), child: Text( FFLocalizations.of(context).getText( '1gr8ztd5' /* Criar Agendamento */, ), 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), ), ), ), ), ), if (widget.toggleIndexValue == true) Padding( padding: const EdgeInsetsDirectional.fromSTEB(0.0, 2.0, 0.0, 0.0), child: Container( width: double.infinity, height: 2.0, decoration: BoxDecoration( color: FlutterFlowTheme.of(context).primary, borderRadius: BorderRadius.circular(100.0), ), ), ), ], ), ), ), Expanded( child: Container( height: 55.0, decoration: BoxDecoration( color: FlutterFlowTheme.of(context).primaryBackground, ), child: Column( mainAxisSize: MainAxisSize.max, children: [ InkWell( splashColor: Colors.transparent, focusColor: Colors.transparent, hoverColor: Colors.transparent, highlightColor: Colors.transparent, onTap: () async { await widget.selectToggle?.call( false, ); }, child: Container( width: double.infinity, height: 50.0, decoration: const BoxDecoration( borderRadius: BorderRadius.only( bottomLeft: Radius.circular(0.0), bottomRight: Radius.circular(0.0), topLeft: Radius.circular(0.0), topRight: Radius.circular(0.0), ), ), child: Align( alignment: const AlignmentDirectional(0.0, 0.0), child: Text( FFLocalizations.of(context).getText( 'xjahsbjw' /* Histórico de Visitas */, ), 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), ), ), ), ), ), if (widget.toggleIndexValue == false) Padding( padding: const EdgeInsetsDirectional.fromSTEB(0.0, 2.0, 0.0, 0.0), child: Container( width: double.infinity, height: 2.0, decoration: BoxDecoration( color: FlutterFlowTheme.of(context).primary, borderRadius: BorderRadius.circular(100.0), ), ), ), ], ), ), ), ], ); } }