Updating to latest FlutterFlow output.

This commit is contained in:
FlutterFlow 2024-06-11 11:15:54 +00:00
parent 6bdfcf371c
commit 5241206a6a
82 changed files with 10144 additions and 3876 deletions

View File

@ -5,7 +5,8 @@
<uses-permission android:name="android.permission.CAMERA"/>
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.READ_PRIVILEGED_PHONE_STATE"/>
<uses-permission android:name="android.permission.READ_PHONE_STATE"/>
<application
android:label="FREHub"
tools:replace="android:label"

Binary file not shown.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.8 KiB

View File

@ -44,8 +44,8 @@
97C146FB1CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = "<group>"; };
97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = "<group>"; };
6436409A27A31CDE00820AF7 /* pt */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = pt; path = pt.lproj/InfoPlist.strings; sourceTree = "<group>"; };
6436409A27A31CD500820AF7 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = "<group>"; };
6436409C27A31CD800820AF7 /* pt */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = pt; path = pt.lproj/InfoPlist.strings; sourceTree = "<group>"; };
6436409327A31CD800820AF7 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = "<group>"; };
97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
/* End PBXFileReference section */
@ -225,8 +225,8 @@
6436409C27A31CD800820AF7 /* InfoPlist.strings */ = {
isa = PBXVariantGroup;
children = (
6436409A27A31CDE00820AF7 /* pt */,
6436409A27A31CD500820AF7 /* en */,
6436409C27A31CD800820AF7 /* pt */,
6436409327A31CD800820AF7 /* en */,
);
name = InfoPlist.strings;
sourceTree = "<group>";

View File

@ -1,7 +1,12 @@
import '/application_components/molecular_components/throw_exception/throw_exception_widget.dart';
import '/backend/api_requests/api_calls.dart';
import '/flutter_flow/flutter_flow_theme.dart';
import '/flutter_flow/flutter_flow_util.dart';
import '/custom_code/actions/index.dart' as actions;
import '/flutter_flow/random_data_util.dart' as random_data;
import 'package:flutter/material.dart';
Future repeatVisitScheduleActionBlock(
Future repeatVisitScheduleAction(
BuildContext context, {
List<dynamic>? visitorJsonList,
String? visitorStrList,
@ -49,5 +54,228 @@ Future repeatVisitScheduleActionBlock(
true,
),
}.withoutNulls,
extra: <String, dynamic>{
kTransitionInfoKey: const TransitionInfo(
hasTransition: true,
transitionType: PageTransitionType.fade,
),
},
);
}
Future<Color> manageStatusColorAction(
BuildContext context, {
required String? visitStatusStr,
}) async {
if (visitStatusStr == 'A') {
return FlutterFlowTheme.of(context).success;
} else if ((visitStatusStr == 'C') ||
(visitStatusStr == 'F') ||
(visitStatusStr == 'B') ||
(visitStatusStr == 'I')) {
return FlutterFlowTheme.of(context).error;
}
return FlutterFlowTheme.of(context).warning;
}
Future singInActionApp(
BuildContext context, {
String? emailAdress,
String? password,
}) async {
String? devUUID;
ApiCallResponse? loginCall;
await Future.wait([
Future(() async {
FFAppState().email = emailAdress!;
}),
Future(() async {
FFAppState().passwd = password!;
}),
]);
if ((FFAppState().email != '') &&
(FFAppState().passwd != '')) {
devUUID = await actions.getDevUUID();
FFAppState().devUUID = devUUID!;
loginCall = await PhpGroup.loginCall.call(
email: FFAppState().email,
password: FFAppState().passwd,
uuid: FFAppState().devUUID,
type: FFAppState().device,
description: random_data.randomString(
10,
10,
true,
false,
false,
),
);
FFAppState().userUUID = PhpGroup.loginCall.userUUID(
(loginCall.jsonBody ?? ''),
)!;
if (PhpGroup.loginCall.error(
(loginCall.jsonBody ?? ''),
) ==
false) {
FFAppState().isLogged = true;
context.goNamed(
'homePage',
extra: <String, dynamic>{
kTransitionInfoKey: const TransitionInfo(
hasTransition: true,
transitionType: PageTransitionType.fade,
),
},
);
} else {
await showModalBottomSheet(
isScrollControlled: true,
backgroundColor: Colors.transparent,
enableDrag: false,
context: context,
builder: (context) {
return Padding(
padding: MediaQuery.viewInsetsOf(context),
child: ThrowExceptionWidget(
msg: PhpGroup.loginCall.msg(
(loginCall?.jsonBody ?? ''),
)!,
),
);
},
);
FFAppState().email = '';
FFAppState().passwd = '';
FFAppState().update(() {});
}
} else {
return;
}
}
Future<bool> signUpActionApp(
BuildContext context, {
required String? name,
String? passwd,
required String? email,
String? device,
}) async {
ApiCallResponse? registerCall;
if ((email != null && email != '') &&
(passwd != null && passwd != '') &&
(name != null && name != '')) {
registerCall = await PhpGroup.registerCall.call(
name: name,
password: passwd,
email: email,
token: random_data.randomString(
36,
36,
false,
false,
true,
),
uuid: random_data.randomString(
36,
36,
false,
false,
true,
),
tipo: device,
descricao: random_data.randomString(
36,
36,
true,
false,
false,
),
);
if (PhpGroup.registerCall.error(
(registerCall.jsonBody ?? ''),
) ==
false) {
return true;
}
await showDialog(
context: context,
builder: (alertDialogContext) {
return AlertDialog(
title: const Text('ERROR2'),
content: const Text('ERROR2'),
actions: [
TextButton(
onPressed: () => Navigator.pop(alertDialogContext),
child: const Text('ERROR2 '),
),
],
);
},
);
return false;
} else {
await showDialog(
context: context,
builder: (alertDialogContext) {
return AlertDialog(
title: const Text('ERROR1'),
content: const Text('ERROR1'),
actions: [
TextButton(
onPressed: () => Navigator.pop(alertDialogContext),
child: const Text('ERROR1 '),
),
],
);
},
);
return false;
}
}
Future forgotPasswdAction(
BuildContext context, {
required String? email,
}) async {
ApiCallResponse? forgotPasswd;
forgotPasswd = await PhpGroup.forgotPasswordCall.call(
email: email,
);
if (PhpGroup.forgotPasswordCall.error(
(forgotPasswd.jsonBody ?? ''),
) ==
false) {
context.pushNamed(
'LoginPage',
queryParameters: {
'device': serializeParam(
FFAppState().device,
ParamType.String,
),
}.withoutNulls,
);
} else {
return;
}
}
Future cachingLoginActionApp(BuildContext context) async {
if (FFAppState().isLogged == true) {
context.pushNamed('homePage');
} else {
if (isAndroid == true) {
FFAppState().device = 'Android';
} else if (isiOS == true) {
FFAppState().device = 'iOS';
} else {
FFAppState().device = 'Web';
}
}
}

View File

@ -57,41 +57,59 @@ class _OptionSelectionModalWidgetState extends State<OptionSelectionModalWidget>
@override
Widget build(BuildContext context) {
return Column(
mainAxisSize: MainAxisSize.max,
mainAxisAlignment: MainAxisAlignment.center,
children: [
Align(
alignment: const AlignmentDirectional(0.0, 0.0),
child: Wrap(
spacing: 17.0,
runSpacing: 0.0,
alignment: WrapAlignment.start,
crossAxisAlignment: WrapCrossAlignment.start,
direction: Axis.horizontal,
runAlignment: WrapAlignment.start,
verticalDirection: VerticalDirection.down,
clipBehavior: Clip.none,
children: [
Padding(
padding: const EdgeInsetsDirectional.fromSTEB(0.0, 10.0, 0.0, 1.0),
child: InkWell(
return InkWell(
splashColor: Colors.transparent,
focusColor: Colors.transparent,
hoverColor: Colors.transparent,
highlightColor: Colors.transparent,
onTap: () async {
Navigator.pop(context);
},
child: Column(
mainAxisSize: MainAxisSize.max,
mainAxisAlignment: MainAxisAlignment.center,
children: [
Align(
alignment: const AlignmentDirectional(0.0, 0.0),
child: Wrap(
spacing: 17.0,
runSpacing: 0.0,
alignment: WrapAlignment.start,
crossAxisAlignment: WrapCrossAlignment.start,
direction: Axis.horizontal,
runAlignment: WrapAlignment.start,
verticalDirection: VerticalDirection.down,
clipBehavior: Clip.none,
children: [
InkWell(
splashColor: Colors.transparent,
focusColor: Colors.transparent,
hoverColor: Colors.transparent,
highlightColor: Colors.transparent,
onTap: () async {
Navigator.pop(context);
context.pushNamed('fastPassPage');
},
child: Container(
width: 100.0,
height: 100.0,
decoration: BoxDecoration(
color: FlutterFlowTheme.of(context).primaryBackground,
boxShadow: [
BoxShadow(
blurRadius: 4.0,
color: FlutterFlowTheme.of(context).customColor5,
offset: const Offset(
0.0,
2.0,
),
)
],
borderRadius: BorderRadius.circular(24.0),
shape: BoxShape.rectangle,
border: Border.all(
color: FlutterFlowTheme.of(context).customColor1,
color: FlutterFlowTheme.of(context).alternate,
width: 0.5,
),
),
@ -147,8 +165,8 @@ class _OptionSelectionModalWidgetState extends State<OptionSelectionModalWidget>
alignment: const AlignmentDirectional(0.0, 0.0),
child: Text(
FFLocalizations.of(context).getText(
'omxabblt' /* Agenda
Rápida */
'bmjlmhht' /* Agenda
Rapida */
,
),
style: FlutterFlowTheme.of(context)
@ -173,10 +191,7 @@ Rápida */
),
),
),
),
Padding(
padding: const EdgeInsetsDirectional.fromSTEB(0.0, 10.0, 0.0, 1.0),
child: InkWell(
InkWell(
splashColor: Colors.transparent,
focusColor: Colors.transparent,
hoverColor: Colors.transparent,
@ -191,10 +206,20 @@ Rápida */
height: 100.0,
decoration: BoxDecoration(
color: FlutterFlowTheme.of(context).primaryBackground,
boxShadow: [
BoxShadow(
blurRadius: 4.0,
color: FlutterFlowTheme.of(context).customColor5,
offset: const Offset(
0.0,
2.0,
),
)
],
borderRadius: BorderRadius.circular(24.0),
shape: BoxShape.rectangle,
border: Border.all(
color: FlutterFlowTheme.of(context).customColor1,
color: FlutterFlowTheme.of(context).alternate,
width: 0.5,
),
),
@ -250,7 +275,7 @@ Rápida */
alignment: const AlignmentDirectional(0.0, 0.0),
child: Text(
FFLocalizations.of(context).getText(
'vpy51li0' /* Agenda
'ci8eyh2v' /* Agenda
Provisória */
,
),
@ -276,10 +301,7 @@ Provisória */
),
),
),
),
Padding(
padding: const EdgeInsetsDirectional.fromSTEB(0.0, 10.0, 0.0, 1.0),
child: InkWell(
InkWell(
splashColor: Colors.transparent,
focusColor: Colors.transparent,
hoverColor: Colors.transparent,
@ -294,10 +316,20 @@ Provisória */
height: 100.0,
decoration: BoxDecoration(
color: FlutterFlowTheme.of(context).primaryBackground,
boxShadow: [
BoxShadow(
blurRadius: 4.0,
color: FlutterFlowTheme.of(context).customColor5,
offset: const Offset(
0.0,
2.0,
),
)
],
borderRadius: BorderRadius.circular(24.0),
shape: BoxShape.rectangle,
border: Border.all(
color: FlutterFlowTheme.of(context).customColor1,
color: FlutterFlowTheme.of(context).alternate,
width: 0.5,
),
),
@ -353,7 +385,7 @@ Provisória */
alignment: const AlignmentDirectional(0.0, 0.0),
child: Text(
FFLocalizations.of(context).getText(
'8ad3hms9' /* Agenda
'jj2b545b' /* Agenda
Completa */
,
),
@ -379,11 +411,11 @@ Completa */
),
),
),
),
],
).animateOnPageLoad(animationsMap['wrapOnPageLoadAnimation']!),
),
],
],
).animateOnPageLoad(animationsMap['wrapOnPageLoadAnimation']!),
),
],
),
);
}
}

View File

@ -1,4 +1,4 @@
import '/application_components/templates_components/regisiter_vistor_component/regisiter_vistor_component_widget.dart';
import '/application_components/templates_components/regisiter_vistor_template_component/regisiter_vistor_template_component_widget.dart';
import '/flutter_flow/flutter_flow_icon_button.dart';
import '/flutter_flow/flutter_flow_theme.dart';
import '/flutter_flow/flutter_flow_util.dart';
@ -130,7 +130,7 @@ class _VisitorNotFoundComponentWidgetState
builder: (context) {
return Padding(
padding: MediaQuery.viewInsetsOf(context),
child: const RegisiterVistorComponentWidget(),
child: const RegisiterVistorTemplateComponentWidget(),
);
},
).then((value) => safeSetState(() {}));

View File

@ -2,6 +2,7 @@ import '/application_components/organism_components/bottom_arrow_linked_locals_c
import '/flutter_flow/flutter_flow_theme.dart';
import '/flutter_flow/flutter_flow_util.dart';
import '/flutter_flow/custom_functions.dart' as functions;
import '/flutter_flow/random_data_util.dart' as random_data;
import 'package:flutter/material.dart';
import 'package:google_fonts/google_fonts.dart';
import 'package:provider/provider.dart';
@ -43,119 +44,107 @@ class _LocalProfileComponentWidgetState
Widget build(BuildContext context) {
context.watch<FFAppState>();
return Container(
height: 284.0,
decoration: const BoxDecoration(),
child: Column(
mainAxisSize: MainAxisSize.max,
children: [
Stack(
children: [
Align(
alignment: const AlignmentDirectional(0.0, 0.0),
child: Material(
color: Colors.transparent,
elevation: 0.0,
child: Container(
width: double.infinity,
height: 119.0,
decoration: BoxDecoration(
color: const Color(0xFF1AAB5F),
border: Border.all(
color: const Color(0xFF1AAB5F),
),
),
),
return Visibility(
visible: random_data.randomInteger(0, 10) != null,
child: Container(
decoration: const BoxDecoration(),
child: Align(
alignment: const AlignmentDirectional(0.0, -1.0),
child: Material(
color: Colors.transparent,
elevation: 0.0,
child: Container(
width: double.infinity,
height: 119.0,
decoration: BoxDecoration(
color: const Color(0xFF1AAB5F),
border: Border.all(
color: const Color(0xFF1AAB5F),
),
),
Align(
alignment: const AlignmentDirectional(0.0, 0.0),
child: Padding(
padding: const EdgeInsets.all(24.0),
child: Container(
width: 200.0,
height: 200.0,
decoration: BoxDecoration(
color: FlutterFlowTheme.of(context).primaryBackground,
shape: BoxShape.circle,
),
alignment: const AlignmentDirectional(0.0, 0.0),
child: Align(
alignment: const AlignmentDirectional(0.0, 0.0),
child: Padding(
padding: const EdgeInsets.all(2.0),
child: InkWell(
splashColor: Colors.transparent,
focusColor: Colors.transparent,
hoverColor: Colors.transparent,
highlightColor: Colors.transparent,
onTap: () async {
showModalBottomSheet(
isScrollControlled: true,
backgroundColor: const Color(0x00FFFFFF),
context: context,
builder: (context) {
return Padding(
padding: MediaQuery.viewInsetsOf(context),
child: const SizedBox(
height: double.infinity,
child:
BottomArrowLinkedLocalsComponentWidget(),
),
);
},
).then((value) => safeSetState(() {}));
},
child: ClipRRect(
borderRadius: BorderRadius.circular(200.0),
child: Image.network(
valueOrDefault<String>(
'https://freaccess.com.br/freaccess/Images/Clients/${FFAppState().cliUUID}.png',
'https://storage.googleapis.com/flutterflow-io-6f20.appspot.com/projects/flutter-freaccess-hub-0xgz9q/assets/7ftdetkzc3s0/360_F_64676383_LdbmhiNM6Ypzb3FM4PPuFP9rHe7ri8Ju.jpg',
),
width: 300.0,
height: 200.0,
child: Row(
mainAxisSize: MainAxisSize.max,
children: [
Align(
alignment: const AlignmentDirectional(-1.0, 0.0),
child: Padding(
padding: const EdgeInsets.all(2.0),
child: InkWell(
splashColor: Colors.transparent,
focusColor: Colors.transparent,
hoverColor: Colors.transparent,
highlightColor: Colors.transparent,
onTap: () async {
showModalBottomSheet(
isScrollControlled: true,
backgroundColor: const Color(0x00FFFFFF),
context: context,
builder: (context) {
return Padding(
padding: MediaQuery.viewInsetsOf(context),
child: const SizedBox(
height: double.infinity,
child:
BottomArrowLinkedLocalsComponentWidget(),
),
);
},
).then((value) => safeSetState(() {}));
},
child: ClipRRect(
borderRadius: BorderRadius.circular(200.0),
child: Image.network(
valueOrDefault<String>(
'https://freaccess.com.br/freaccess/Images/Clients/${FFAppState().cliUUID}.png',
'https://storage.googleapis.com/flutterflow-io-6f20.appspot.com/projects/flutter-freaccess-hub-0xgz9q/assets/7ftdetkzc3s0/360_F_64676383_LdbmhiNM6Ypzb3FM4PPuFP9rHe7ri8Ju.jpg',
),
width: 80.0,
height: 80.0,
fit: BoxFit.cover,
alignment: const Alignment(0.0, 0.0),
errorBuilder: (context, error, stackTrace) =>
Image.asset(
'assets/images/error_image.svg',
width: 80.0,
height: 80.0,
fit: BoxFit.cover,
alignment: const Alignment(0.0, 0.0),
errorBuilder: (context, error, stackTrace) =>
Image.asset(
'assets/images/error_image.svg',
width: 300.0,
height: 200.0,
fit: BoxFit.cover,
alignment: const Alignment(0.0, 0.0),
),
),
),
),
),
),
),
),
Column(
mainAxisSize: MainAxisSize.max,
mainAxisAlignment: MainAxisAlignment.center,
children: [
Text(
valueOrDefault<String>(
functions.convertToUppercase(FFAppState().local),
'NOME DO LOCAL',
),
style:
FlutterFlowTheme.of(context).labelMedium.override(
fontFamily: 'Nunito',
color: FlutterFlowTheme.of(context).info,
fontSize: 14.0,
letterSpacing: 0.0,
fontWeight: FontWeight.w500,
useGoogleFonts:
GoogleFonts.asMap().containsKey('Nunito'),
),
),
],
),
]
.divide(const SizedBox(width: 20.0))
.addToStart(const SizedBox(width: 20.0))
.addToEnd(const SizedBox(width: 20.0)),
),
],
),
),
Column(
mainAxisSize: MainAxisSize.max,
mainAxisAlignment: MainAxisAlignment.center,
children: [
Text(
valueOrDefault<String>(
functions.convertToUppercase(FFAppState().local),
'NOME DO LOCAL',
),
style: FlutterFlowTheme.of(context).labelMedium.override(
fontFamily: 'Nunito',
color: FlutterFlowTheme.of(context).primaryText,
fontSize: 20.0,
letterSpacing: 0.0,
fontWeight: FontWeight.w500,
useGoogleFonts: GoogleFonts.asMap().containsKey('Nunito'),
),
),
],
),
],
),
),
);
}

View File

@ -1,3 +1,4 @@
import '/application_components/molecular_components/option_selection_modal/option_selection_modal_widget.dart';
import '/application_components/organism_components/menu_list_view_component/menu_list_view_component_widget.dart';
import '/application_components/organism_components/menu_staggered_view_component/menu_staggered_view_component_widget.dart';
import '/flutter_flow/flutter_flow_util.dart';
@ -34,4 +35,43 @@ class MenuComponentModel extends FlutterFlowModel<MenuComponentWidget> {
Future changeMenuStyle(BuildContext context) async {
isGrid = !isGrid;
}
Future scheduleVisitOptAction(BuildContext context) async {
await showModalBottomSheet(
isScrollControlled: true,
backgroundColor: Colors.transparent,
enableDrag: false,
context: context,
builder: (context) {
return Padding(
padding: MediaQuery.viewInsetsOf(context),
child: const OptionSelectionModalWidget(),
);
},
);
}
Future registerVisitorOptAction(BuildContext context) async {
context.pushNamed(
'registerVisitorPage',
extra: <String, dynamic>{
kTransitionInfoKey: const TransitionInfo(
hasTransition: true,
transitionType: PageTransitionType.fade,
),
},
);
}
Future peopleOnThePropertyAction(BuildContext context) async {
context.pushNamed(
'peopleOnThePropertyPage',
extra: <String, dynamic>{
kTransitionInfoKey: const TransitionInfo(
hasTransition: true,
transitionType: PageTransitionType.fade,
),
},
);
}
}

View File

@ -50,6 +50,18 @@ class _MenuComponentWidgetState extends State<MenuComponentWidget> {
await _model.changeMenuStyle(context);
setState(() {});
},
registerVisitorOptAction: () async {
await _model.registerVisitorOptAction(context);
setState(() {});
},
scheduleVisitOptAction: () async {
await _model.scheduleVisitOptAction(context);
setState(() {});
},
peopleOnThePropertyOptAction: () async {
await _model.peopleOnThePropertyAction(context);
setState(() {});
},
),
);
} else {
@ -58,10 +70,22 @@ class _MenuComponentWidgetState extends State<MenuComponentWidget> {
updateCallback: () => setState(() {}),
updateOnChange: true,
child: MenuStaggeredViewComponentWidget(
changeMenuStyle: () async {
changeMenuStyleAction: () async {
await _model.changeMenuStyle(context);
setState(() {});
},
registerVisitorOptAction: () async {
await _model.registerVisitorOptAction(context);
setState(() {});
},
scheduleVisitOptAction: () async {
await _model.scheduleVisitOptAction(context);
setState(() {});
},
peopleOnThePropertyOptAction: () async {
await _model.peopleOnThePropertyAction(context);
setState(() {});
},
),
);
}

View File

@ -1,10 +1,8 @@
import '/application_components/molecular_components/option_selection_modal/option_selection_modal_widget.dart';
import '/flutter_flow/flutter_flow_icon_button.dart';
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 'package:provider/provider.dart';
import 'menu_list_view_component_model.dart';
export 'menu_list_view_component_model.dart';
@ -12,9 +10,15 @@ class MenuListViewComponentWidget extends StatefulWidget {
const MenuListViewComponentWidget({
super.key,
required this.changeMenuStyle,
required this.registerVisitorOptAction,
required this.scheduleVisitOptAction,
required this.peopleOnThePropertyOptAction,
});
final Future Function()? changeMenuStyle;
final Future Function()? registerVisitorOptAction;
final Future Function()? scheduleVisitOptAction;
final Future Function()? peopleOnThePropertyOptAction;
@override
State<MenuListViewComponentWidget> createState() =>
@ -46,8 +50,6 @@ class _MenuListViewComponentWidgetState
@override
Widget build(BuildContext context) {
context.watch<FFAppState>();
return Wrap(
spacing: 0.0,
runSpacing: 0.0,
@ -62,42 +64,46 @@ class _MenuListViewComponentWidgetState
padding: const EdgeInsetsDirectional.fromSTEB(5.0, 0.0, 5.0, 0.0),
child: Container(
width: double.infinity,
height: 106.0,
height: 125.0,
decoration: const BoxDecoration(),
child: ListView(
padding: EdgeInsets.zero,
padding: const EdgeInsets.fromLTRB(
10.0,
0,
10.0,
0,
),
scrollDirection: Axis.horizontal,
children: [
Padding(
padding: const EdgeInsetsDirectional.fromSTEB(10.0, 10.0, 0.0, 1.0),
padding: const EdgeInsetsDirectional.fromSTEB(0.0, 10.0, 0.0, 20.0),
child: InkWell(
splashColor: Colors.transparent,
focusColor: Colors.transparent,
hoverColor: Colors.transparent,
highlightColor: Colors.transparent,
onTap: () async {
await showModalBottomSheet(
isScrollControlled: true,
backgroundColor: Colors.transparent,
enableDrag: false,
context: context,
builder: (context) {
return Padding(
padding: MediaQuery.viewInsetsOf(context),
child: const OptionSelectionModalWidget(),
);
},
).then((value) => safeSetState(() {}));
await widget.scheduleVisitOptAction?.call();
},
child: Container(
width: 100.0,
height: double.infinity,
decoration: BoxDecoration(
color: FlutterFlowTheme.of(context).primaryBackground,
boxShadow: [
BoxShadow(
blurRadius: 4.0,
color: FlutterFlowTheme.of(context).customColor5,
offset: const Offset(
0.0,
2.0,
),
)
],
borderRadius: BorderRadius.circular(24.0),
shape: BoxShape.rectangle,
border: Border.all(
color: FlutterFlowTheme.of(context).customColor1,
color: FlutterFlowTheme.of(context).alternate,
width: 0.5,
),
),
@ -182,36 +188,34 @@ Visita */
),
),
Padding(
padding: const EdgeInsetsDirectional.fromSTEB(10.0, 10.0, 0.0, 1.0),
padding: const EdgeInsetsDirectional.fromSTEB(0.0, 10.0, 0.0, 20.0),
child: InkWell(
splashColor: Colors.transparent,
focusColor: Colors.transparent,
hoverColor: Colors.transparent,
highlightColor: Colors.transparent,
onTap: () async {
context.pushNamed(
'registerVisitorPage',
queryParameters: {
'userUUID': serializeParam(
FFAppState().userUUID,
ParamType.String,
),
'devUUID': serializeParam(
FFAppState().devUUID,
ParamType.String,
),
}.withoutNulls,
);
await widget.registerVisitorOptAction?.call();
},
child: Container(
width: 100.0,
height: 0.0,
height: double.infinity,
decoration: BoxDecoration(
color: FlutterFlowTheme.of(context).primaryBackground,
boxShadow: [
BoxShadow(
blurRadius: 4.0,
color: FlutterFlowTheme.of(context).customColor5,
offset: const Offset(
0.0,
2.0,
),
)
],
borderRadius: BorderRadius.circular(24.0),
shape: BoxShape.rectangle,
border: Border.all(
color: FlutterFlowTheme.of(context).customColor1,
color: FlutterFlowTheme.of(context).alternate,
width: 0.5,
),
),
@ -296,16 +300,26 @@ Visitante */
),
),
Padding(
padding: const EdgeInsetsDirectional.fromSTEB(10.0, 10.0, 0.0, 1.0),
padding: const EdgeInsetsDirectional.fromSTEB(0.0, 10.0, 0.0, 20.0),
child: Container(
width: 100.0,
height: double.infinity,
decoration: BoxDecoration(
color: FlutterFlowTheme.of(context).primaryBackground,
boxShadow: [
BoxShadow(
blurRadius: 4.0,
color: FlutterFlowTheme.of(context).customColor5,
offset: const Offset(
0.0,
2.0,
),
)
],
borderRadius: BorderRadius.circular(24.0),
shape: BoxShape.rectangle,
border: Border.all(
color: FlutterFlowTheme.of(context).customColor1,
color: FlutterFlowTheme.of(context).alternate,
width: 0.5,
),
),
@ -388,16 +402,26 @@ Condomínio */
),
),
Padding(
padding: const EdgeInsetsDirectional.fromSTEB(10.0, 10.0, 0.0, 1.0),
padding: const EdgeInsetsDirectional.fromSTEB(0.0, 10.0, 0.0, 20.0),
child: Container(
width: 100.0,
height: double.infinity,
decoration: BoxDecoration(
color: FlutterFlowTheme.of(context).primaryBackground,
boxShadow: [
BoxShadow(
blurRadius: 4.0,
color: FlutterFlowTheme.of(context).customColor5,
offset: const Offset(
0.0,
2.0,
),
)
],
borderRadius: BorderRadius.circular(24.0),
shape: BoxShape.rectangle,
border: Border.all(
color: FlutterFlowTheme.of(context).customColor1,
color: FlutterFlowTheme.of(context).alternate,
width: 0.5,
),
),
@ -480,108 +504,26 @@ Pet */
),
),
Padding(
padding: const EdgeInsetsDirectional.fromSTEB(10.0, 10.0, 0.0, 1.0),
padding: const EdgeInsetsDirectional.fromSTEB(0.0, 10.0, 0.0, 20.0),
child: Container(
width: 100.0,
height: double.infinity,
decoration: BoxDecoration(
color: FlutterFlowTheme.of(context).primaryBackground,
boxShadow: [
BoxShadow(
blurRadius: 4.0,
color: FlutterFlowTheme.of(context).customColor5,
offset: const Offset(
0.0,
2.0,
),
)
],
borderRadius: BorderRadius.circular(24.0),
shape: BoxShape.rectangle,
border: Border.all(
color: FlutterFlowTheme.of(context).customColor1,
width: 0.5,
),
),
child: Padding(
padding: const EdgeInsets.all(4.0),
child: Column(
mainAxisSize: MainAxisSize.min,
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Align(
alignment: const AlignmentDirectional(0.0, 0.0),
child: Row(
mainAxisSize: MainAxisSize.max,
mainAxisAlignment: MainAxisAlignment.center,
children: [
Expanded(
child: Align(
alignment: const AlignmentDirectional(-1.0, 0.0),
child: Padding(
padding: const EdgeInsetsDirectional.fromSTEB(
8.0, 0.0, 0.0, 0.0),
child: Container(
width: 30.0,
height: 30.0,
decoration: BoxDecoration(
color: FlutterFlowTheme.of(context)
.primaryBackground,
shape: BoxShape.circle,
),
alignment:
const AlignmentDirectional(0.0, 0.0),
child: Icon(
FFIcons.kvector3,
color: FlutterFlowTheme.of(context)
.accent1,
size: 24.0,
),
),
),
),
),
],
),
),
Align(
alignment: const AlignmentDirectional(0.0, 0.0),
child: Row(
mainAxisSize: MainAxisSize.min,
mainAxisAlignment: MainAxisAlignment.center,
children: [
Align(
alignment: const AlignmentDirectional(0.0, 0.0),
child: Text(
FFLocalizations.of(context).getText(
'xlp8dyn6' /* Agendar
Visita */
,
),
style: FlutterFlowTheme.of(context)
.titleLarge
.override(
fontFamily: 'Nunito',
color: FlutterFlowTheme.of(context)
.primaryText,
fontSize: 14.0,
letterSpacing: 0.0,
fontWeight: FontWeight.w500,
useGoogleFonts: GoogleFonts.asMap()
.containsKey('Nunito'),
),
),
),
],
),
),
].divide(const SizedBox(height: 0.0)),
),
),
),
),
Padding(
padding: const EdgeInsetsDirectional.fromSTEB(10.0, 10.0, 0.0, 1.0),
child: Container(
width: 100.0,
height: double.infinity,
decoration: BoxDecoration(
color: FlutterFlowTheme.of(context).primaryBackground,
borderRadius: BorderRadius.circular(24.0),
shape: BoxShape.rectangle,
border: Border.all(
color: FlutterFlowTheme.of(context).customColor1,
color: FlutterFlowTheme.of(context).alternate,
width: 0.5,
),
),
@ -664,98 +606,118 @@ de Acesso */
),
),
Padding(
padding: const EdgeInsetsDirectional.fromSTEB(10.0, 10.0, 0.0, 1.0),
child: Container(
width: 100.0,
height: double.infinity,
decoration: BoxDecoration(
color: FlutterFlowTheme.of(context).primaryBackground,
borderRadius: BorderRadius.circular(24.0),
shape: BoxShape.rectangle,
border: Border.all(
color: FlutterFlowTheme.of(context).customColor1,
width: 0.5,
padding: const EdgeInsetsDirectional.fromSTEB(0.0, 10.0, 0.0, 20.0),
child: InkWell(
splashColor: Colors.transparent,
focusColor: Colors.transparent,
hoverColor: Colors.transparent,
highlightColor: Colors.transparent,
onTap: () async {
await widget.peopleOnThePropertyOptAction?.call();
},
child: Container(
width: 100.0,
height: double.infinity,
decoration: BoxDecoration(
color: FlutterFlowTheme.of(context).primaryBackground,
boxShadow: [
BoxShadow(
blurRadius: 4.0,
color: FlutterFlowTheme.of(context).customColor5,
offset: const Offset(
0.0,
2.0,
),
)
],
borderRadius: BorderRadius.circular(24.0),
shape: BoxShape.rectangle,
border: Border.all(
color: FlutterFlowTheme.of(context).alternate,
width: 0.5,
),
),
),
child: Padding(
padding: const EdgeInsets.all(4.0),
child: Column(
mainAxisSize: MainAxisSize.min,
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Align(
alignment: const AlignmentDirectional(0.0, 0.0),
child: Row(
mainAxisSize: MainAxisSize.max,
mainAxisAlignment: MainAxisAlignment.center,
children: [
Expanded(
child: Align(
alignment: const AlignmentDirectional(-1.0, 0.0),
child: Padding(
padding: const EdgeInsetsDirectional.fromSTEB(
8.0, 0.0, 0.0, 0.0),
child: Container(
width: 30.0,
height: 30.0,
decoration: BoxDecoration(
color: FlutterFlowTheme.of(context)
.primaryBackground,
shape: BoxShape.circle,
),
alignment:
const AlignmentDirectional(0.0, 0.0),
child: Icon(
FFIcons.kfast,
color: FlutterFlowTheme.of(context)
.accent1,
size: 24.0,
child: Padding(
padding: const EdgeInsets.all(4.0),
child: Column(
mainAxisSize: MainAxisSize.min,
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Align(
alignment: const AlignmentDirectional(0.0, 0.0),
child: Row(
mainAxisSize: MainAxisSize.max,
mainAxisAlignment: MainAxisAlignment.center,
children: [
Expanded(
child: Align(
alignment:
const AlignmentDirectional(-1.0, 0.0),
child: Padding(
padding: const EdgeInsetsDirectional.fromSTEB(
8.0, 0.0, 0.0, 0.0),
child: Container(
width: 30.0,
height: 30.0,
decoration: BoxDecoration(
color: FlutterFlowTheme.of(context)
.primaryBackground,
shape: BoxShape.circle,
),
alignment:
const AlignmentDirectional(0.0, 0.0),
child: Icon(
Icons.people,
color: FlutterFlowTheme.of(context)
.accent1,
size: 24.0,
),
),
),
),
),
),
],
],
),
),
),
Align(
alignment: const AlignmentDirectional(0.0, 0.0),
child: Row(
mainAxisSize: MainAxisSize.min,
mainAxisAlignment: MainAxisAlignment.center,
children: [
Align(
alignment: const AlignmentDirectional(0.0, 0.0),
child: Text(
FFLocalizations.of(context).getText(
'45gqx8e0' /* Agenda
Auto-Visita */
,
Align(
alignment: const AlignmentDirectional(0.0, 0.0),
child: Row(
mainAxisSize: MainAxisSize.min,
mainAxisAlignment: MainAxisAlignment.center,
children: [
Align(
alignment: const AlignmentDirectional(0.0, 0.0),
child: Text(
FFLocalizations.of(context).getText(
'rxnrtdau' /* Pessoas na
Propriedade */
,
),
style: FlutterFlowTheme.of(context)
.titleLarge
.override(
fontFamily: 'Nunito',
color: FlutterFlowTheme.of(context)
.primaryText,
fontSize: 14.0,
letterSpacing: 0.0,
fontWeight: FontWeight.w500,
useGoogleFonts: GoogleFonts.asMap()
.containsKey('Nunito'),
),
),
style: FlutterFlowTheme.of(context)
.titleLarge
.override(
fontFamily: 'Nunito',
color: FlutterFlowTheme.of(context)
.primaryText,
fontSize: 14.0,
letterSpacing: 0.0,
fontWeight: FontWeight.w500,
useGoogleFonts: GoogleFonts.asMap()
.containsKey('Nunito'),
),
),
),
],
],
),
),
),
].divide(const SizedBox(height: 0.0)),
].divide(const SizedBox(height: 0.0)),
),
),
),
),
),
],
].divide(const SizedBox(width: 15.0)),
),
),
),

View File

@ -84,7 +84,7 @@ class _MessageWellComponentWidgetState
.override(
fontFamily:
FlutterFlowTheme.of(context).labelMediumFamily,
color: FlutterFlowTheme.of(context).secondaryText,
color: FlutterFlowTheme.of(context).customColor4,
letterSpacing: 0.0,
fontWeight: FontWeight.normal,
useGoogleFonts: GoogleFonts.asMap().containsKey(

View File

@ -1,5 +1,5 @@
import '/application_components/molecular_components/throw_exception/throw_exception_widget.dart';
import '/application_components/templates_components/visitor_details_modal/visitor_details_modal_widget.dart';
import '/application_components/visitor_details_modal_template_component/visitor_details_modal_template_component_widget.dart';
import '/backend/api_requests/api_calls.dart';
import '/flutter_flow/flutter_flow_icon_button.dart';
import '/flutter_flow/flutter_flow_theme.dart';
@ -206,7 +206,7 @@ class _ScheduleVisitDetailWidgetState extends State<ScheduleVisitDetailWidget> {
MediaQuery.viewInsetsOf(
context),
child:
const VisitorDetailsModalWidget(),
const VisitorDetailsModalTemplateComponentWidget(),
);
},
).then((value) =>
@ -921,7 +921,6 @@ class _ScheduleVisitDetailWidgetState extends State<ScheduleVisitDetailWidget> {
await PhpGroup.postScheduleVisitCall.call(
devUUID: FFAppState().devUUID,
userUUID: FFAppState().userUUID,
cliUUID: FFAppState().cliUUID,
atividade: 'putVisita',
devDesc: widget.visitObsStr,
idVisitante: widget.visitorStrList,
@ -932,6 +931,7 @@ class _ScheduleVisitDetailWidgetState extends State<ScheduleVisitDetailWidget> {
functions.extractIdToStr(widget.visitResonStr!),
idNAC: functions.extractIdToStr(widget.visitLevelStr!),
obs: widget.visitObsStr,
cliID: FFAppState().cliUUID,
);
if (PhpGroup.postScheduleVisitCall.error(
(_model.postScheduleVisit?.jsonBody ?? ''),

View File

@ -4,12 +4,10 @@ import 'view_visit_detail_widget.dart' show ViewVisitDetailWidget;
import 'package:flutter/material.dart';
class ViewVisitDetailModel extends FlutterFlowModel<ViewVisitDetailWidget> {
/// Local state fields for this component.
Color? statusColor;
/// State fields for stateful widgets in this component.
// Stores action output result for [Action Block - manageStatusColorAction] action in viewVisitDetail widget.
Color? visitStatusColor;
// State field(s) for TextField widget.
FocusNode? textFieldFocusNode1;
TextEditingController? textController1;

View File

@ -1,9 +1,10 @@
import '/application_components/molecular_components/throw_exception/throw_exception_widget.dart';
import '/application_components/templates_components/visitor_details_modal/visitor_details_modal_widget.dart';
import '/application_components/visitor_details_modal_template_component/visitor_details_modal_template_component_widget.dart';
import '/backend/api_requests/api_calls.dart';
import '/flutter_flow/flutter_flow_icon_button.dart';
import '/flutter_flow/flutter_flow_theme.dart';
import '/flutter_flow/flutter_flow_util.dart';
import '/actions/actions.dart' as action_blocks;
import 'package:cached_network_image/cached_network_image.dart';
import 'package:flutter/material.dart';
import 'package:flutter/scheduler.dart';
@ -26,8 +27,6 @@ class ViewVisitDetailWidget extends StatefulWidget {
required this.visitorStrList,
this.visitorJsonList,
required this.visitIdStr,
required this.updateToggleIdx,
this.repeatVisitScheduleActionBlock,
});
final String? visitorImgPath;
@ -41,8 +40,6 @@ class ViewVisitDetailWidget extends StatefulWidget {
final String? visitorStrList;
final List<dynamic>? visitorJsonList;
final String? visitIdStr;
final Future Function()? updateToggleIdx;
final Future Function()? repeatVisitScheduleActionBlock;
@override
State<ViewVisitDetailWidget> createState() => _ViewVisitDetailWidgetState();
@ -64,23 +61,14 @@ class _ViewVisitDetailWidgetState extends State<ViewVisitDetailWidget> {
// On component load action.
SchedulerBinding.instance.addPostFrameCallback((_) async {
if (widget.visitStatusStr == 'A') {
_model.statusColor = FlutterFlowTheme.of(context).primary;
setState(() {});
} else if ((widget.visitStatusStr == 'C') ||
(widget.visitStatusStr == 'F') ||
(widget.visitStatusStr == 'B') ||
(widget.visitStatusStr == 'I')) {
_model.statusColor = FlutterFlowTheme.of(context).error;
setState(() {});
} else {
_model.statusColor = FlutterFlowTheme.of(context).warning;
setState(() {});
}
_model.visitStatusColor = await action_blocks.manageStatusColorAction(
context,
visitStatusStr: widget.visitStatusStr,
);
});
_model.textController1 ??=
TextEditingController(text: widget.visitorStrList);
_model.textController1 ??= TextEditingController(
text: widget.visitTempStr == 'null' ? '' : widget.visitTempStr);
_model.textFieldFocusNode1 ??= FocusNode();
_model.textController2 ??=
@ -203,7 +191,8 @@ class _ViewVisitDetailWidgetState extends State<ViewVisitDetailWidget> {
builder: (context) {
return Padding(
padding: MediaQuery.viewInsetsOf(context),
child: const VisitorDetailsModalWidget(),
child:
const VisitorDetailsModalTemplateComponentWidget(),
);
},
).then((value) => safeSetState(() {}));
@ -767,7 +756,10 @@ class _ViewVisitDetailWidgetState extends State<ViewVisitDetailWidget> {
width: double.infinity,
height: 35.0,
decoration: BoxDecoration(
color: _model.statusColor,
color: valueOrDefault<Color>(
_model.visitStatusColor,
FlutterFlowTheme.of(context).primary,
),
borderRadius: const BorderRadius.only(
bottomLeft: Radius.circular(0.0),
bottomRight: Radius.circular(0.0),
@ -857,7 +849,6 @@ class _ViewVisitDetailWidgetState extends State<ViewVisitDetailWidget> {
hoverColor: Colors.transparent,
highlightColor: Colors.transparent,
onTap: () async {
await widget.updateToggleIdx?.call();
Navigator.pop(context);
context.pushNamed(

View File

@ -0,0 +1,26 @@
import '/backend/api_requests/api_calls.dart';
import '/flutter_flow/flutter_flow_util.dart';
import 'forgot_password_template_component_widget.dart'
show ForgotPasswordTemplateComponentWidget;
import 'package:flutter/material.dart';
class ForgotPasswordTemplateComponentModel
extends FlutterFlowModel<ForgotPasswordTemplateComponentWidget> {
/// State fields for stateful widgets in this component.
// State field(s) for emailAddress widget.
FocusNode? emailAddressFocusNode;
TextEditingController? emailAddressTextController;
String? Function(BuildContext, String?)? emailAddressTextControllerValidator;
// Stores action output result for [Backend Call - API (forgotPassword)] action in Button-Login widget.
ApiCallResponse? req;
@override
void initState(BuildContext context) {}
@override
void dispose() {
emailAddressFocusNode?.dispose();
emailAddressTextController?.dispose();
}
}

View File

@ -0,0 +1,292 @@
import '/backend/api_requests/api_calls.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 'forgot_password_template_component_model.dart';
export 'forgot_password_template_component_model.dart';
class ForgotPasswordTemplateComponentWidget extends StatefulWidget {
const ForgotPasswordTemplateComponentWidget({super.key});
@override
State<ForgotPasswordTemplateComponentWidget> createState() =>
_ForgotPasswordTemplateComponentWidgetState();
}
class _ForgotPasswordTemplateComponentWidgetState
extends State<ForgotPasswordTemplateComponentWidget> {
late ForgotPasswordTemplateComponentModel _model;
@override
void setState(VoidCallback callback) {
super.setState(callback);
_model.onUpdate();
}
@override
void initState() {
super.initState();
_model = createModel(context, () => ForgotPasswordTemplateComponentModel());
_model.emailAddressTextController ??= TextEditingController();
_model.emailAddressFocusNode ??= FocusNode();
}
@override
void dispose() {
_model.maybeDispose();
super.dispose();
}
@override
Widget build(BuildContext context) {
return Align(
alignment: const AlignmentDirectional(0.0, 1.0),
child: Container(
width: double.infinity,
height: 300.0,
constraints: const BoxConstraints(
maxWidth: 570.0,
),
decoration: BoxDecoration(
color: FlutterFlowTheme.of(context).primaryBackground,
),
child: Column(
mainAxisSize: MainAxisSize.max,
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
// This row exists for when the "app bar" is hidden on desktop, having a way back for the user can work well.
if (responsiveVisibility(
context: context,
phone: false,
tablet: false,
))
Padding(
padding: const EdgeInsetsDirectional.fromSTEB(16.0, 0.0, 16.0, 8.0),
child: InkWell(
splashColor: Colors.transparent,
focusColor: Colors.transparent,
hoverColor: Colors.transparent,
highlightColor: Colors.transparent,
onTap: () async {
context.safePop();
},
child: Row(
mainAxisSize: MainAxisSize.max,
children: [
const Padding(
padding: EdgeInsetsDirectional.fromSTEB(
0.0, 12.0, 0.0, 12.0),
child: Icon(
Icons.arrow_back_rounded,
color: Color(0xFF15161E),
size: 24.0,
),
),
Padding(
padding:
const EdgeInsetsDirectional.fromSTEB(12.0, 0.0, 0.0, 0.0),
child: Text(
'',
style:
FlutterFlowTheme.of(context).bodyMedium.override(
fontFamily: 'Plus Jakarta Sans',
color: const Color(0xFF15161E),
fontSize: 14.0,
letterSpacing: 0.0,
fontWeight: FontWeight.w500,
useGoogleFonts: GoogleFonts.asMap()
.containsKey('Plus Jakarta Sans'),
),
),
),
],
),
),
),
Padding(
padding: const EdgeInsetsDirectional.fromSTEB(16.0, 0.0, 0.0, 0.0),
child: Text(
FFLocalizations.of(context).getText(
'xxm3ajsy' /* ESQUECEU SUA SENHA? */,
),
style: FlutterFlowTheme.of(context).headlineMedium.override(
fontFamily: 'Outfit',
color: FlutterFlowTheme.of(context).primaryText,
fontSize: 24.0,
letterSpacing: 0.0,
fontWeight: FontWeight.w500,
useGoogleFonts: GoogleFonts.asMap().containsKey('Outfit'),
),
),
),
Padding(
padding: const EdgeInsetsDirectional.fromSTEB(16.0, 4.0, 16.0, 4.0),
child: Text(
FFLocalizations.of(context).getText(
'wu2f7yzo' /* Não se preucupe nós vamos te a... */,
),
style: FlutterFlowTheme.of(context).labelMedium.override(
fontFamily: 'Plus Jakarta Sans',
color: FlutterFlowTheme.of(context).primaryText,
fontSize: 14.0,
letterSpacing: 0.0,
fontWeight: FontWeight.w500,
useGoogleFonts:
GoogleFonts.asMap().containsKey('Plus Jakarta Sans'),
),
),
),
Padding(
padding: const EdgeInsetsDirectional.fromSTEB(16.0, 12.0, 16.0, 0.0),
child: SizedBox(
width: double.infinity,
child: TextFormField(
controller: _model.emailAddressTextController,
focusNode: _model.emailAddressFocusNode,
autofillHints: const [AutofillHints.email],
obscureText: false,
decoration: InputDecoration(
labelText: FFLocalizations.of(context).getText(
'mtz8l7ft' /* Email */,
),
labelStyle:
FlutterFlowTheme.of(context).labelMedium.override(
fontFamily: 'Plus Jakarta Sans',
color: FlutterFlowTheme.of(context).accent1,
fontSize: 14.0,
letterSpacing: 0.0,
fontWeight: FontWeight.w500,
useGoogleFonts: GoogleFonts.asMap()
.containsKey('Plus Jakarta Sans'),
),
hintText: FFLocalizations.of(context).getText(
'w7y5wlnv' /* digite o seu email..... */,
),
hintStyle:
FlutterFlowTheme.of(context).labelMedium.override(
fontFamily: 'Plus Jakarta Sans',
color: FlutterFlowTheme.of(context).primaryText,
fontSize: 14.0,
letterSpacing: 0.0,
fontWeight: FontWeight.w500,
useGoogleFonts: GoogleFonts.asMap()
.containsKey('Plus Jakarta Sans'),
),
enabledBorder: OutlineInputBorder(
borderSide: BorderSide(
color: FlutterFlowTheme.of(context).accent1,
width: 2.0,
),
borderRadius: BorderRadius.circular(12.0),
),
focusedBorder: OutlineInputBorder(
borderSide: BorderSide(
color: FlutterFlowTheme.of(context).accent3,
width: 2.0,
),
borderRadius: BorderRadius.circular(12.0),
),
errorBorder: OutlineInputBorder(
borderSide: BorderSide(
color: FlutterFlowTheme.of(context).error,
width: 2.0,
),
borderRadius: BorderRadius.circular(12.0),
),
focusedErrorBorder: OutlineInputBorder(
borderSide: BorderSide(
color: FlutterFlowTheme.of(context).error,
width: 2.0,
),
borderRadius: BorderRadius.circular(12.0),
),
filled: true,
fillColor: FlutterFlowTheme.of(context).primaryBackground,
contentPadding:
const EdgeInsetsDirectional.fromSTEB(24.0, 24.0, 20.0, 24.0),
suffixIcon: Icon(
Icons.email,
color: FlutterFlowTheme.of(context).accent1,
size: 22.0,
),
),
style: FlutterFlowTheme.of(context).bodyMedium.override(
fontFamily: 'Plus Jakarta Sans',
color: FlutterFlowTheme.of(context).secondaryText,
fontSize: 14.0,
letterSpacing: 0.0,
fontWeight: FontWeight.w500,
useGoogleFonts: GoogleFonts.asMap()
.containsKey('Plus Jakarta Sans'),
),
maxLines: null,
keyboardType: TextInputType.emailAddress,
cursorColor: const Color(0xFF6F61EF),
validator: _model.emailAddressTextControllerValidator
.asValidator(context),
),
),
),
Align(
alignment: const AlignmentDirectional(0.0, 0.0),
child: Padding(
padding: const EdgeInsetsDirectional.fromSTEB(0.0, 24.0, 0.0, 0.0),
child: FFButtonWidget(
onPressed: () async {
var shouldSetState = false;
_model.req = await PhpGroup.forgotPasswordCall.call(
email: _model.emailAddressTextController.text,
);
shouldSetState = true;
if (PhpGroup.forgotPasswordCall.error(
(_model.req?.jsonBody ?? ''),
) ==
false) {
Navigator.pop(context);
} else {
if (shouldSetState) setState(() {});
return;
}
if (shouldSetState) setState(() {});
},
text: FFLocalizations.of(context).getText(
'74rnd5bu' /* Enviar */,
),
options: FFButtonOptions(
width: 270.0,
height: 50.0,
padding: const EdgeInsetsDirectional.fromSTEB(0.0, 0.0, 0.0, 0.0),
iconPadding:
const EdgeInsetsDirectional.fromSTEB(0.0, 0.0, 0.0, 0.0),
color: const Color(0xFF1AAB5F),
textStyle: FlutterFlowTheme.of(context).titleSmall.override(
fontFamily: 'Plus Jakarta Sans',
color: Colors.white,
fontSize: 16.0,
letterSpacing: 0.0,
fontWeight: FontWeight.w500,
useGoogleFonts: GoogleFonts.asMap()
.containsKey('Plus Jakarta Sans'),
),
elevation: 3.0,
borderSide: const BorderSide(
color: Colors.transparent,
width: 1.0,
),
),
showLoadingIndicator: false,
),
),
),
],
),
),
);
}
}

View File

@ -1,12 +1,12 @@
import '/backend/api_requests/api_calls.dart';
import '/flutter_flow/flutter_flow_util.dart';
import '/flutter_flow/form_field_controller.dart';
import 'regisiter_vistor_component_widget.dart'
show RegisiterVistorComponentWidget;
import 'regisiter_vistor_template_component_widget.dart'
show RegisiterVistorTemplateComponentWidget;
import 'package:flutter/material.dart';
class RegisiterVistorComponentModel
extends FlutterFlowModel<RegisiterVistorComponentWidget> {
class RegisiterVistorTemplateComponentModel
extends FlutterFlowModel<RegisiterVistorTemplateComponentWidget> {
/// State fields for stateful widgets in this component.
bool isDataUploading = false;

View File

@ -10,20 +10,20 @@ import '/custom_code/actions/index.dart' as actions;
import 'package:flutter/material.dart';
import 'package:google_fonts/google_fonts.dart';
import 'package:provider/provider.dart';
import 'regisiter_vistor_component_model.dart';
export 'regisiter_vistor_component_model.dart';
import 'regisiter_vistor_template_component_model.dart';
export 'regisiter_vistor_template_component_model.dart';
class RegisiterVistorComponentWidget extends StatefulWidget {
const RegisiterVistorComponentWidget({super.key});
class RegisiterVistorTemplateComponentWidget extends StatefulWidget {
const RegisiterVistorTemplateComponentWidget({super.key});
@override
State<RegisiterVistorComponentWidget> createState() =>
_RegisiterVistorComponentWidgetState();
State<RegisiterVistorTemplateComponentWidget> createState() =>
_RegisiterVistorTemplateComponentWidgetState();
}
class _RegisiterVistorComponentWidgetState
extends State<RegisiterVistorComponentWidget> {
late RegisiterVistorComponentModel _model;
class _RegisiterVistorTemplateComponentWidgetState
extends State<RegisiterVistorTemplateComponentWidget> {
late RegisiterVistorTemplateComponentModel _model;
@override
void setState(VoidCallback callback) {
@ -34,7 +34,8 @@ class _RegisiterVistorComponentWidgetState
@override
void initState() {
super.initState();
_model = createModel(context, () => RegisiterVistorComponentModel());
_model =
createModel(context, () => RegisiterVistorTemplateComponentModel());
_model.textController1 ??= TextEditingController();
_model.textFieldFocusNode1 ??= FocusNode();

View File

@ -1,12 +1,12 @@
import '/backend/api_requests/api_calls.dart';
import '/flutter_flow/flutter_flow_util.dart';
import 'login_page_widget.dart' show LoginPageWidget;
import 'sign_in_template_component_widget.dart'
show SignInTemplateComponentWidget;
import 'package:flutter/material.dart';
class LoginPageModel extends FlutterFlowModel<LoginPageWidget> {
/// State fields for stateful widgets in this page.
class SignInTemplateComponentModel
extends FlutterFlowModel<SignInTemplateComponentWidget> {
/// State fields for stateful widgets in this component.
final unfocusNode = FocusNode();
// State field(s) for emailAddress widget.
FocusNode? emailAddressFocusNode;
TextEditingController? emailAddressTextController;
@ -16,8 +16,6 @@ class LoginPageModel extends FlutterFlowModel<LoginPageWidget> {
TextEditingController? passwordTextController;
late bool passwordVisibility;
String? Function(BuildContext, String?)? passwordTextControllerValidator;
// Stores action output result for [Backend Call - API (login)] action in signInButtonLoginForm widget.
ApiCallResponse? smallDisplayApi;
@override
void initState(BuildContext context) {
@ -26,7 +24,6 @@ class LoginPageModel extends FlutterFlowModel<LoginPageWidget> {
@override
void dispose() {
unfocusNode.dispose();
emailAddressFocusNode?.dispose();
emailAddressTextController?.dispose();

View File

@ -0,0 +1,900 @@
import '/application_components/templates_components/forgot_password_template_component/forgot_password_template_component_widget.dart';
import '/flutter_flow/flutter_flow_animations.dart';
import '/flutter_flow/flutter_flow_theme.dart';
import '/flutter_flow/flutter_flow_util.dart';
import '/flutter_flow/flutter_flow_widgets.dart';
import '/actions/actions.dart' as action_blocks;
import 'package:flutter/gestures.dart';
import 'package:flutter/material.dart';
import 'package:flutter_animate/flutter_animate.dart';
import 'package:google_fonts/google_fonts.dart';
import 'sign_in_template_component_model.dart';
export 'sign_in_template_component_model.dart';
class SignInTemplateComponentWidget extends StatefulWidget {
const SignInTemplateComponentWidget({
super.key,
required this.toggleOnBoardingPageAction,
});
final Future Function(String toggleValueSignInParam)?
toggleOnBoardingPageAction;
@override
State<SignInTemplateComponentWidget> createState() =>
_SignInTemplateComponentWidgetState();
}
class _SignInTemplateComponentWidgetState
extends State<SignInTemplateComponentWidget> with TickerProviderStateMixin {
late SignInTemplateComponentModel _model;
final animationsMap = <String, AnimationInfo>{};
@override
void setState(VoidCallback callback) {
super.setState(callback);
_model.onUpdate();
}
@override
void initState() {
super.initState();
_model = createModel(context, () => SignInTemplateComponentModel());
_model.emailAddressTextController ??= TextEditingController();
_model.emailAddressFocusNode ??= FocusNode();
_model.passwordTextController ??= TextEditingController();
_model.passwordFocusNode ??= FocusNode();
animationsMap.addAll({
'containerOnPageLoadAnimation': AnimationInfo(
trigger: AnimationTrigger.onPageLoad,
effectsBuilder: () => [
VisibilityEffect(duration: 1.ms),
FadeEffect(
curve: Curves.easeInOut,
delay: 0.0.ms,
duration: 300.0.ms,
begin: 0.0,
end: 1.0,
),
MoveEffect(
curve: Curves.easeInOut,
delay: 0.0.ms,
duration: 300.0.ms,
begin: const Offset(0.0, 140.0),
end: const Offset(0.0, 0.0),
),
ScaleEffect(
curve: Curves.easeInOut,
delay: 0.0.ms,
duration: 300.0.ms,
begin: const Offset(0.9, 0.9),
end: const Offset(1.0, 1.0),
),
TiltEffect(
curve: Curves.easeInOut,
delay: 0.0.ms,
duration: 300.0.ms,
begin: const Offset(-0.349, 0),
end: const Offset(0, 0),
),
],
),
});
}
@override
void dispose() {
_model.maybeDispose();
super.dispose();
}
@override
Widget build(BuildContext context) {
return Row(
mainAxisSize: MainAxisSize.max,
children: [
Expanded(
flex: 6,
child: Container(
width: 100.0,
height: double.infinity,
decoration: const BoxDecoration(),
alignment: const AlignmentDirectional(0.0, -1.0),
child: Align(
alignment: const AlignmentDirectional(0.0, 0.0),
child: SingleChildScrollView(
child: Column(
mainAxisSize: MainAxisSize.max,
mainAxisAlignment: MainAxisAlignment.center,
children: [
Padding(
padding:
const EdgeInsetsDirectional.fromSTEB(0.0, 35.0, 0.0, 35.0),
child: Container(
width: 548.0,
height: 112.0,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(16.0),
),
alignment: const AlignmentDirectional(0.0, 0.0),
child: Padding(
padding: const EdgeInsets.all(20.0),
child: Column(
mainAxisSize: MainAxisSize.min,
mainAxisAlignment: MainAxisAlignment.center,
children: [
Expanded(
child: Align(
alignment: const AlignmentDirectional(0.0, 1.0),
child: Padding(
padding: const EdgeInsets.all(3.0),
child: Text(
FFLocalizations.of(context).getText(
'9hbdjxrz' /* VAMOS LA! ENTRE COM A SUA CONT... */,
),
textAlign: TextAlign.start,
style: FlutterFlowTheme.of(context)
.displaySmall
.override(
fontFamily: 'Plus Jakarta Sans',
color: FlutterFlowTheme.of(context)
.primaryText,
fontSize: 24.0,
letterSpacing: 0.0,
fontWeight: FontWeight.w500,
useGoogleFonts: GoogleFonts.asMap()
.containsKey(
'Plus Jakarta Sans'),
),
),
),
),
),
],
),
),
),
),
Container(
width: 291.0,
height: 167.0,
decoration: const BoxDecoration(),
child: ClipRRect(
borderRadius: BorderRadius.circular(8.0),
child: Image.network(
'https://storage.googleapis.com/flutterflow-io-6f20.appspot.com/projects/flutter-freaccess-hub-0xgz9q/assets/sr43ucngg4a4/Vector.png',
width: 603.0,
height: 155.0,
fit: BoxFit.contain,
),
),
),
Column(
mainAxisSize: MainAxisSize.max,
children: [
Align(
alignment: const AlignmentDirectional(0.0, 0.0),
child: Padding(
padding: const EdgeInsetsDirectional.fromSTEB(
34.0, 0.0, 34.0, 0.0),
child: Container(
width: double.infinity,
constraints: const BoxConstraints(
maxWidth: 570.0,
),
decoration: BoxDecoration(
color: FlutterFlowTheme.of(context)
.primaryBackground,
borderRadius: BorderRadius.circular(12.0),
shape: BoxShape.rectangle,
),
child: Align(
alignment: const AlignmentDirectional(0.0, 0.0),
child: Padding(
padding: const EdgeInsets.all(32.0),
child: Column(
mainAxisSize: MainAxisSize.max,
crossAxisAlignment:
CrossAxisAlignment.center,
children: [
Padding(
padding: const EdgeInsetsDirectional.fromSTEB(
0.0, 0.0, 0.0, 16.0),
child: SizedBox(
width: double.infinity,
child: TextFormField(
controller: _model
.emailAddressTextController,
focusNode:
_model.emailAddressFocusNode,
autofocus: false,
textCapitalization:
TextCapitalization.none,
textInputAction:
TextInputAction.next,
obscureText: false,
decoration: InputDecoration(
labelText:
FFLocalizations.of(context)
.getText(
'1ltg0ylb' /* Email */,
),
labelStyle: FlutterFlowTheme.of(
context)
.labelLarge
.override(
fontFamily:
'Plus Jakarta Sans',
color: FlutterFlowTheme.of(
context)
.primaryText,
fontSize: 16.0,
letterSpacing: 0.0,
fontWeight: FontWeight.w500,
useGoogleFonts: GoogleFonts
.asMap()
.containsKey(
'Plus Jakarta Sans'),
),
enabledBorder: OutlineInputBorder(
borderSide: BorderSide(
color: FlutterFlowTheme.of(
context)
.customColor1,
width: 0.5,
),
borderRadius:
BorderRadius.circular(12.0),
),
focusedBorder: OutlineInputBorder(
borderSide: BorderSide(
color: FlutterFlowTheme.of(
context)
.success,
width: 0.5,
),
borderRadius:
BorderRadius.circular(12.0),
),
errorBorder: OutlineInputBorder(
borderSide: BorderSide(
color: FlutterFlowTheme.of(
context)
.error,
width: 0.5,
),
borderRadius:
BorderRadius.circular(12.0),
),
focusedErrorBorder:
OutlineInputBorder(
borderSide: BorderSide(
color: FlutterFlowTheme.of(
context)
.error,
width: 0.5,
),
borderRadius:
BorderRadius.circular(12.0),
),
suffixIcon: Icon(
Icons.email,
color:
FlutterFlowTheme.of(context)
.accent1,
size: 22.0,
),
),
style: FlutterFlowTheme.of(context)
.bodyLarge
.override(
fontFamily:
'Plus Jakarta Sans',
color: FlutterFlowTheme.of(
context)
.primaryText,
fontSize: 16.0,
letterSpacing: 0.0,
fontWeight: FontWeight.w500,
useGoogleFonts: GoogleFonts
.asMap()
.containsKey(
'Plus Jakarta Sans'),
),
keyboardType:
TextInputType.emailAddress,
validator: _model
.emailAddressTextControllerValidator
.asValidator(context),
),
),
),
Padding(
padding: const EdgeInsetsDirectional.fromSTEB(
0.0, 0.0, 0.0, 16.0),
child: SizedBox(
width: double.infinity,
child: TextFormField(
controller:
_model.passwordTextController,
focusNode: _model.passwordFocusNode,
autofocus: false,
textInputAction:
TextInputAction.send,
obscureText:
!_model.passwordVisibility,
decoration: InputDecoration(
labelText:
FFLocalizations.of(context)
.getText(
'2x19ce8k' /* Senha */,
),
labelStyle: FlutterFlowTheme.of(
context)
.labelLarge
.override(
fontFamily:
'Plus Jakarta Sans',
color: FlutterFlowTheme.of(
context)
.primaryText,
fontSize: 16.0,
letterSpacing: 0.0,
fontWeight: FontWeight.w500,
useGoogleFonts: GoogleFonts
.asMap()
.containsKey(
'Plus Jakarta Sans'),
),
enabledBorder: OutlineInputBorder(
borderSide: BorderSide(
color: FlutterFlowTheme.of(
context)
.customColor1,
width: 0.5,
),
borderRadius:
BorderRadius.circular(12.0),
),
focusedBorder: OutlineInputBorder(
borderSide: const BorderSide(
color: Color(0xFF1AAB5F),
width: 0.5,
),
borderRadius:
BorderRadius.circular(12.0),
),
errorBorder: OutlineInputBorder(
borderSide: const BorderSide(
color: Color(0xFFFF5963),
width: 0.5,
),
borderRadius:
BorderRadius.circular(12.0),
),
focusedErrorBorder:
OutlineInputBorder(
borderSide: const BorderSide(
color: Color(0xFFFF5963),
width: 0.5,
),
borderRadius:
BorderRadius.circular(12.0),
),
filled: true,
fillColor:
FlutterFlowTheme.of(context)
.primaryBackground,
suffixIcon: InkWell(
onTap: () => setState(
() => _model
.passwordVisibility =
!_model
.passwordVisibility,
),
focusNode: FocusNode(
skipTraversal: true),
child: Icon(
_model.passwordVisibility
? Icons
.visibility_outlined
: Icons
.visibility_off_outlined,
color: FlutterFlowTheme.of(
context)
.accent1,
size: 24.0,
),
),
),
style: FlutterFlowTheme.of(context)
.bodyLarge
.override(
fontFamily:
'Plus Jakarta Sans',
color: FlutterFlowTheme.of(
context)
.primaryText,
fontSize: 16.0,
letterSpacing: 0.0,
fontWeight: FontWeight.w500,
useGoogleFonts: GoogleFonts
.asMap()
.containsKey(
'Plus Jakarta Sans'),
),
validator: _model
.passwordTextControllerValidator
.asValidator(context),
),
),
),
Builder(
builder: (context) {
if (MediaQuery.sizeOf(context).width <
kBreakpointSmall
? true
: false) {
return Column(
mainAxisSize: MainAxisSize.max,
children: [
Padding(
padding: const EdgeInsetsDirectional
.fromSTEB(
0.0, 0.0, 0.0, 16.0),
child: FFButtonWidget(
onPressed: ((_model.emailAddressTextController
.text ==
'') &&
(_model.passwordTextController
.text ==
''))
? null
: () async {
await action_blocks
.singInActionApp(
context,
emailAdress: _model
.emailAddressTextController
.text,
password: _model
.passwordTextController
.text,
);
setState(() {});
},
text: FFLocalizations.of(
context)
.getText(
'k44tm7wo' /* Entrar */,
),
options: FFButtonOptions(
width: double.infinity,
height: 44.0,
padding:
const EdgeInsetsDirectional
.fromSTEB(
0.0,
0.0,
0.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:
'Plus Jakarta Sans',
color: FlutterFlowTheme.of(
context)
.info,
fontSize: 16.0,
letterSpacing:
0.0,
fontWeight:
FontWeight
.w500,
useGoogleFonts: GoogleFonts
.asMap()
.containsKey(
'Plus Jakarta Sans'),
),
elevation: 3.0,
borderSide: const BorderSide(
color:
Colors.transparent,
width: 1.0,
),
borderRadius:
BorderRadius.circular(
12.0),
disabledColor:
const Color(0x951AAB5F),
),
showLoadingIndicator: false,
),
),
Padding(
padding: const EdgeInsetsDirectional
.fromSTEB(
0.0, 0.0, 0.0, 16.0),
child: FFButtonWidget(
onPressed: () async {
await widget
.toggleOnBoardingPageAction
?.call(
'SignUp',
);
},
text: FFLocalizations.of(
context)
.getText(
'14u7ipws' /* Cadastrar */,
),
options: FFButtonOptions(
width: double.infinity,
height: 44.0,
padding:
const EdgeInsetsDirectional
.fromSTEB(
0.0,
0.0,
0.0,
0.0),
iconPadding:
const EdgeInsetsDirectional
.fromSTEB(
0.0,
0.0,
0.0,
0.0),
color:
FlutterFlowTheme.of(
context)
.customColor1,
textStyle:
FlutterFlowTheme.of(
context)
.titleSmall
.override(
fontFamily:
'Plus Jakarta Sans',
color: FlutterFlowTheme.of(
context)
.secondaryText,
fontSize: 16.0,
letterSpacing:
0.0,
fontWeight:
FontWeight
.w500,
useGoogleFonts: GoogleFonts
.asMap()
.containsKey(
'Plus Jakarta Sans'),
),
elevation: 3.0,
borderSide: const BorderSide(
color:
Colors.transparent,
width: 1.0,
),
borderRadius:
BorderRadius.circular(
12.0),
),
showLoadingIndicator: false,
),
),
],
);
} else {
return Row(
mainAxisSize: MainAxisSize.max,
mainAxisAlignment:
MainAxisAlignment.spaceEvenly,
children: [
Expanded(
child: Padding(
padding:
const EdgeInsetsDirectional
.fromSTEB(0.0, 0.0,
0.0, 16.0),
child: FFButtonWidget(
onPressed: () {
print(
'signInButtonLoginForm pressed ...');
},
text: FFLocalizations.of(
context)
.getText(
'1x926nsn' /* Entrar */,
),
options: FFButtonOptions(
width: double.infinity,
height: 44.0,
padding:
const EdgeInsetsDirectional
.fromSTEB(
0.0,
0.0,
0.0,
0.0),
iconPadding:
const EdgeInsetsDirectional
.fromSTEB(
0.0,
0.0,
0.0,
0.0),
color:
FlutterFlowTheme.of(
context)
.accent1,
textStyle:
FlutterFlowTheme.of(
context)
.titleSmall
.override(
fontFamily:
'Plus Jakarta Sans',
color: FlutterFlowTheme.of(
context)
.secondaryText,
fontSize:
16.0,
letterSpacing:
0.0,
fontWeight:
FontWeight
.w500,
useGoogleFonts: GoogleFonts
.asMap()
.containsKey(
'Plus Jakarta Sans'),
),
elevation: 3.0,
borderSide: const BorderSide(
color: Colors
.transparent,
width: 1.0,
),
borderRadius:
BorderRadius
.circular(12.0),
),
showLoadingIndicator:
false,
),
),
),
Expanded(
child: Padding(
padding:
const EdgeInsetsDirectional
.fromSTEB(0.0, 0.0,
0.0, 16.0),
child: FFButtonWidget(
onPressed: () async {
context.pushNamed(
'RegisterPage');
},
text: FFLocalizations.of(
context)
.getText(
'jwvd4ai1' /* Cadastrar */,
),
options: FFButtonOptions(
width: double.infinity,
height: 44.0,
padding:
const EdgeInsetsDirectional
.fromSTEB(
0.0,
0.0,
0.0,
0.0),
iconPadding:
const EdgeInsetsDirectional
.fromSTEB(
0.0,
0.0,
0.0,
0.0),
color:
FlutterFlowTheme.of(
context)
.customColor1,
textStyle:
FlutterFlowTheme.of(
context)
.titleSmall
.override(
fontFamily:
'Plus Jakarta Sans',
color: FlutterFlowTheme.of(
context)
.secondaryText,
fontSize:
16.0,
letterSpacing:
0.0,
fontWeight:
FontWeight
.w500,
useGoogleFonts: GoogleFonts
.asMap()
.containsKey(
'Plus Jakarta Sans'),
),
elevation: 3.0,
borderSide: const BorderSide(
color: Colors
.transparent,
width: 1.0,
),
borderRadius:
BorderRadius
.circular(12.0),
),
showLoadingIndicator:
false,
),
),
),
].divide(const SizedBox(width: 7.0)),
);
}
},
),
// You will have to add an action on this rich text to go to your login page.
Padding(
padding: const EdgeInsetsDirectional.fromSTEB(
0.0, 12.0, 0.0, 12.0),
child: RichText(
textScaler:
MediaQuery.of(context).textScaler,
text: TextSpan(
children: [
TextSpan(
text:
FFLocalizations.of(context)
.getText(
'05dx91ku' /* Você esqueceu a sua senha? */,
),
style: TextStyle(
color: FlutterFlowTheme.of(
context)
.primaryText,
),
),
TextSpan(
text:
FFLocalizations.of(context)
.getText(
'p5c6d54y' /* Recupere aqui */,
),
style:
FlutterFlowTheme.of(context)
.bodyMedium
.override(
fontFamily:
'Plus Jakarta Sans',
color: FlutterFlowTheme
.of(context)
.primary,
fontSize: 14.0,
letterSpacing: 0.0,
fontWeight:
FontWeight.normal,
useGoogleFonts:
GoogleFonts
.asMap()
.containsKey(
'Plus Jakarta Sans'),
),
mouseCursor:
SystemMouseCursors.click,
recognizer:
TapGestureRecognizer()
..onTap = () async {
await showModalBottomSheet(
isScrollControlled:
true,
backgroundColor:
Colors
.transparent,
context: context,
builder: (context) {
return Padding(
padding: MediaQuery
.viewInsetsOf(
context),
child:
const ForgotPasswordTemplateComponentWidget(),
);
},
).then((value) =>
safeSetState(
() {}));
},
)
],
style: FlutterFlowTheme.of(context)
.bodyMedium
.override(
fontFamily:
FlutterFlowTheme.of(
context)
.bodyMediumFamily,
letterSpacing: 0.0,
useGoogleFonts: GoogleFonts
.asMap()
.containsKey(
FlutterFlowTheme.of(
context)
.bodyMediumFamily),
),
),
),
),
Text(
FFLocalizations.of(context).getText(
'olf967cj' /* Termo de Uso */,
),
style: FlutterFlowTheme.of(context)
.bodyMedium
.override(
fontFamily:
FlutterFlowTheme.of(context)
.bodyMediumFamily,
color:
FlutterFlowTheme.of(context)
.primaryText,
fontSize: 14.0,
letterSpacing: 0.0,
useGoogleFonts: GoogleFonts
.asMap()
.containsKey(
FlutterFlowTheme.of(
context)
.bodyMediumFamily),
),
),
],
),
),
),
).animateOnPageLoad(
animationsMap['containerOnPageLoadAnimation']!),
),
),
],
),
],
),
),
),
),
),
],
);
}
}

View File

@ -0,0 +1,45 @@
import '/flutter_flow/flutter_flow_util.dart';
import 'sign_up_template_component_widget.dart'
show SignUpTemplateComponentWidget;
import 'package:flutter/material.dart';
class SignUpTemplateComponentModel
extends FlutterFlowModel<SignUpTemplateComponentWidget> {
/// State fields for stateful widgets in this component.
// State field(s) for nameRegisterForm widget.
FocusNode? nameRegisterFormFocusNode;
TextEditingController? nameRegisterFormTextController;
String? Function(BuildContext, String?)?
nameRegisterFormTextControllerValidator;
// State field(s) for emailRegisterForm widget.
FocusNode? emailRegisterFormFocusNode;
TextEditingController? emailRegisterFormTextController;
String? Function(BuildContext, String?)?
emailRegisterFormTextControllerValidator;
// State field(s) for passwordRegisterForm widget.
FocusNode? passwordRegisterFormFocusNode;
TextEditingController? passwordRegisterFormTextController;
late bool passwordRegisterFormVisibility;
String? Function(BuildContext, String?)?
passwordRegisterFormTextControllerValidator;
// Stores action output result for [Action Block - signUpActionApp] action in SignUpButtonRegisterForm widget.
bool? signUp;
@override
void initState(BuildContext context) {
passwordRegisterFormVisibility = false;
}
@override
void dispose() {
nameRegisterFormFocusNode?.dispose();
nameRegisterFormTextController?.dispose();
emailRegisterFormFocusNode?.dispose();
emailRegisterFormTextController?.dispose();
passwordRegisterFormFocusNode?.dispose();
passwordRegisterFormTextController?.dispose();
}
}

View File

@ -0,0 +1,771 @@
import '/flutter_flow/flutter_flow_animations.dart';
import '/flutter_flow/flutter_flow_theme.dart';
import '/flutter_flow/flutter_flow_util.dart';
import '/flutter_flow/flutter_flow_widgets.dart';
import '/actions/actions.dart' as action_blocks;
import 'package:easy_debounce/easy_debounce.dart';
import 'package:flutter/material.dart';
import 'package:flutter_animate/flutter_animate.dart';
import 'package:flutter_svg/flutter_svg.dart';
import 'package:google_fonts/google_fonts.dart';
import 'package:provider/provider.dart';
import 'sign_up_template_component_model.dart';
export 'sign_up_template_component_model.dart';
class SignUpTemplateComponentWidget extends StatefulWidget {
const SignUpTemplateComponentWidget({
super.key,
required this.toggleOnBoardingPageAction,
});
final Future Function(String toggleValueSignUpParam)?
toggleOnBoardingPageAction;
@override
State<SignUpTemplateComponentWidget> createState() =>
_SignUpTemplateComponentWidgetState();
}
class _SignUpTemplateComponentWidgetState
extends State<SignUpTemplateComponentWidget> with TickerProviderStateMixin {
late SignUpTemplateComponentModel _model;
final animationsMap = <String, AnimationInfo>{};
@override
void setState(VoidCallback callback) {
super.setState(callback);
_model.onUpdate();
}
@override
void initState() {
super.initState();
_model = createModel(context, () => SignUpTemplateComponentModel());
_model.nameRegisterFormTextController ??= TextEditingController();
_model.nameRegisterFormFocusNode ??= FocusNode();
_model.nameRegisterFormFocusNode!.addListener(() => setState(() {}));
_model.emailRegisterFormTextController ??= TextEditingController();
_model.emailRegisterFormFocusNode ??= FocusNode();
_model.emailRegisterFormFocusNode!.addListener(() => setState(() {}));
_model.passwordRegisterFormTextController ??= TextEditingController();
_model.passwordRegisterFormFocusNode ??= FocusNode();
_model.passwordRegisterFormFocusNode!.addListener(() => setState(() {}));
animationsMap.addAll({
'containerOnPageLoadAnimation': AnimationInfo(
trigger: AnimationTrigger.onPageLoad,
effectsBuilder: () => [
VisibilityEffect(duration: 1.ms),
FadeEffect(
curve: Curves.easeInOut,
delay: 0.0.ms,
duration: 300.0.ms,
begin: 0.0,
end: 1.0,
),
MoveEffect(
curve: Curves.easeInOut,
delay: 0.0.ms,
duration: 300.0.ms,
begin: const Offset(0.0, 140.0),
end: const Offset(0.0, 0.0),
),
ScaleEffect(
curve: Curves.easeInOut,
delay: 0.0.ms,
duration: 300.0.ms,
begin: const Offset(0.9, 0.9),
end: const Offset(1.0, 1.0),
),
TiltEffect(
curve: Curves.easeInOut,
delay: 0.0.ms,
duration: 300.0.ms,
begin: const Offset(-0.349, 0),
end: const Offset(0, 0),
),
],
),
});
}
@override
void dispose() {
_model.maybeDispose();
super.dispose();
}
@override
Widget build(BuildContext context) {
context.watch<FFAppState>();
return Row(
mainAxisSize: MainAxisSize.max,
children: [
Expanded(
flex: 6,
child: Container(
width: 100.0,
height: double.infinity,
decoration: BoxDecoration(
color: FlutterFlowTheme.of(context).primaryBackground,
),
alignment: const AlignmentDirectional(0.0, -1.0),
child: Align(
alignment: const AlignmentDirectional(0.0, 0.0),
child: SingleChildScrollView(
child: Column(
mainAxisSize: MainAxisSize.max,
mainAxisAlignment: MainAxisAlignment.center,
children: [
Padding(
padding: const EdgeInsets.all(4.0),
child: Container(
width: 669.0,
height: 112.0,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(16.0),
),
alignment: const AlignmentDirectional(0.0, 0.0),
child: Padding(
padding: const EdgeInsets.all(20.0),
child: Column(
mainAxisSize: MainAxisSize.max,
children: [
Expanded(
child: Align(
alignment: const AlignmentDirectional(0.0, -1.0),
child: Padding(
padding: const EdgeInsets.all(4.0),
child: Text(
FFLocalizations.of(context).getText(
'49609olv' /* INSIRA SEU EMAIL E SENHA, VAMO... */,
),
textAlign: TextAlign.start,
style: FlutterFlowTheme.of(context)
.displaySmall
.override(
fontFamily: 'Plus Jakarta Sans',
color: FlutterFlowTheme.of(context)
.primaryText,
fontSize: 24.0,
letterSpacing: 0.0,
fontWeight: FontWeight.w500,
useGoogleFonts: GoogleFonts.asMap()
.containsKey(
'Plus Jakarta Sans'),
),
),
),
),
),
],
),
),
),
),
Container(
width: 291.0,
height: 167.0,
decoration: const BoxDecoration(),
child: ClipRRect(
borderRadius: BorderRadius.circular(8.0),
child: SvgPicture.network(
'https://storage.googleapis.com/flutterflow-io-6f20.appspot.com/projects/flutter-freaccess-hub-0xgz9q/assets/ug2zlyhca2sh/Frame_5.svg',
width: 603.0,
height: 155.0,
fit: BoxFit.contain,
),
),
),
Column(
mainAxisSize: MainAxisSize.max,
children: [
Align(
alignment: const AlignmentDirectional(0.0, 0.0),
child: Padding(
padding: const EdgeInsets.all(34.0),
child: Container(
width: double.infinity,
constraints: const BoxConstraints(
maxWidth: 570.0,
),
decoration: BoxDecoration(
color: FlutterFlowTheme.of(context)
.primaryBackground,
borderRadius: BorderRadius.circular(12.0),
),
child: Align(
alignment: const AlignmentDirectional(0.0, 0.0),
child: Padding(
padding: const EdgeInsets.all(32.0),
child: Column(
mainAxisSize: MainAxisSize.max,
crossAxisAlignment:
CrossAxisAlignment.center,
children: [
Padding(
padding: const EdgeInsetsDirectional.fromSTEB(
0.0, 0.0, 0.0, 16.0),
child: SizedBox(
width: double.infinity,
child: TextFormField(
controller: _model
.nameRegisterFormTextController,
focusNode: _model
.nameRegisterFormFocusNode,
onChanged: (_) =>
EasyDebounce.debounce(
'_model.nameRegisterFormTextController',
const Duration(milliseconds: 2000),
() => setState(() {}),
),
autofocus: false,
autofillHints: const [AutofillHints.name],
obscureText: false,
decoration: InputDecoration(
labelText:
FFLocalizations.of(context)
.getText(
'3corpwhd' /* Nome */,
),
labelStyle: FlutterFlowTheme.of(
context)
.labelLarge
.override(
fontFamily:
'Plus Jakarta Sans',
color: FlutterFlowTheme.of(
context)
.primaryText,
fontSize: 16.0,
letterSpacing: 0.0,
fontWeight: FontWeight.w500,
useGoogleFonts: GoogleFonts
.asMap()
.containsKey(
'Plus Jakarta Sans'),
),
enabledBorder: OutlineInputBorder(
borderSide: BorderSide(
color: FlutterFlowTheme.of(
context)
.customColor1,
width: 0.5,
),
borderRadius:
BorderRadius.circular(12.0),
),
focusedBorder: OutlineInputBorder(
borderSide: BorderSide(
color: FlutterFlowTheme.of(
context)
.success,
width: 0.5,
),
borderRadius:
BorderRadius.circular(12.0),
),
errorBorder: OutlineInputBorder(
borderSide: BorderSide(
color: FlutterFlowTheme.of(
context)
.error,
width: 0.5,
),
borderRadius:
BorderRadius.circular(12.0),
),
focusedErrorBorder:
OutlineInputBorder(
borderSide: BorderSide(
color: FlutterFlowTheme.of(
context)
.error,
width: 0.5,
),
borderRadius:
BorderRadius.circular(12.0),
),
filled: true,
fillColor:
FlutterFlowTheme.of(context)
.primaryBackground,
suffixIcon: Icon(
Icons.person,
color:
FlutterFlowTheme.of(context)
.accent1,
size: 22.0,
),
),
style: FlutterFlowTheme.of(context)
.bodyLarge
.override(
fontFamily:
'Plus Jakarta Sans',
color: FlutterFlowTheme.of(
context)
.primaryText,
fontSize: 16.0,
letterSpacing: 0.0,
fontWeight: FontWeight.w500,
useGoogleFonts: GoogleFonts
.asMap()
.containsKey(
'Plus Jakarta Sans'),
),
keyboardType: TextInputType.name,
validator: _model
.nameRegisterFormTextControllerValidator
.asValidator(context),
),
),
),
Padding(
padding: const EdgeInsetsDirectional.fromSTEB(
0.0, 0.0, 0.0, 16.0),
child: SizedBox(
width: double.infinity,
child: TextFormField(
controller: _model
.emailRegisterFormTextController,
focusNode: _model
.emailRegisterFormFocusNode,
onChanged: (_) =>
EasyDebounce.debounce(
'_model.emailRegisterFormTextController',
const Duration(milliseconds: 2000),
() => setState(() {}),
),
autofocus: false,
autofillHints: const [
AutofillHints.email
],
obscureText: false,
decoration: InputDecoration(
labelText:
FFLocalizations.of(context)
.getText(
'80wonb69' /* Email */,
),
labelStyle: FlutterFlowTheme.of(
context)
.labelLarge
.override(
fontFamily:
'Plus Jakarta Sans',
color: FlutterFlowTheme.of(
context)
.primaryText,
fontSize: 16.0,
letterSpacing: 0.0,
fontWeight: FontWeight.w500,
useGoogleFonts: GoogleFonts
.asMap()
.containsKey(
'Plus Jakarta Sans'),
),
enabledBorder: OutlineInputBorder(
borderSide: BorderSide(
color: FlutterFlowTheme.of(
context)
.primaryText,
width: 0.5,
),
borderRadius:
BorderRadius.circular(12.0),
),
focusedBorder: OutlineInputBorder(
borderSide: BorderSide(
color: FlutterFlowTheme.of(
context)
.success,
width: 0.5,
),
borderRadius:
BorderRadius.circular(12.0),
),
errorBorder: OutlineInputBorder(
borderSide: BorderSide(
color: FlutterFlowTheme.of(
context)
.error,
width: 0.5,
),
borderRadius:
BorderRadius.circular(12.0),
),
focusedErrorBorder:
OutlineInputBorder(
borderSide: BorderSide(
color: FlutterFlowTheme.of(
context)
.error,
width: 0.5,
),
borderRadius:
BorderRadius.circular(12.0),
),
filled: true,
fillColor:
FlutterFlowTheme.of(context)
.primaryBackground,
suffixIcon: Icon(
Icons.email,
color:
FlutterFlowTheme.of(context)
.accent1,
size: 22.0,
),
),
style: FlutterFlowTheme.of(context)
.bodyLarge
.override(
fontFamily:
'Plus Jakarta Sans',
color: FlutterFlowTheme.of(
context)
.customColor1,
fontSize: 16.0,
letterSpacing: 0.0,
fontWeight: FontWeight.w500,
useGoogleFonts: GoogleFonts
.asMap()
.containsKey(
'Plus Jakarta Sans'),
),
keyboardType:
TextInputType.emailAddress,
validator: _model
.emailRegisterFormTextControllerValidator
.asValidator(context),
),
),
),
Padding(
padding: const EdgeInsetsDirectional.fromSTEB(
0.0, 0.0, 0.0, 16.0),
child: SizedBox(
width: double.infinity,
child: TextFormField(
controller: _model
.passwordRegisterFormTextController,
focusNode: _model
.passwordRegisterFormFocusNode,
onChanged: (_) =>
EasyDebounce.debounce(
'_model.passwordRegisterFormTextController',
const Duration(milliseconds: 2000),
() => setState(() {}),
),
autofocus: false,
autofillHints: const [
AutofillHints.password
],
obscureText: !_model
.passwordRegisterFormVisibility,
decoration: InputDecoration(
labelText:
FFLocalizations.of(context)
.getText(
'0firji8l' /* Senha */,
),
labelStyle: FlutterFlowTheme.of(
context)
.labelLarge
.override(
fontFamily:
'Plus Jakarta Sans',
color: FlutterFlowTheme.of(
context)
.primaryText,
fontSize: 16.0,
letterSpacing: 0.0,
fontWeight: FontWeight.w500,
useGoogleFonts: GoogleFonts
.asMap()
.containsKey(
'Plus Jakarta Sans'),
),
enabledBorder: OutlineInputBorder(
borderSide: BorderSide(
color: FlutterFlowTheme.of(
context)
.customColor1,
width: 0.5,
),
borderRadius:
BorderRadius.circular(12.0),
),
focusedBorder: OutlineInputBorder(
borderSide: const BorderSide(
color: Color(0xFF1AAB5F),
width: 0.5,
),
borderRadius:
BorderRadius.circular(12.0),
),
errorBorder: OutlineInputBorder(
borderSide: const BorderSide(
color: Color(0xFFFF5963),
width: 0.5,
),
borderRadius:
BorderRadius.circular(12.0),
),
focusedErrorBorder:
OutlineInputBorder(
borderSide: const BorderSide(
color: Color(0xFFFF5963),
width: 0.5,
),
borderRadius:
BorderRadius.circular(12.0),
),
filled: true,
fillColor:
FlutterFlowTheme.of(context)
.primaryBackground,
suffixIcon: InkWell(
onTap: () => setState(
() => _model
.passwordRegisterFormVisibility =
!_model
.passwordRegisterFormVisibility,
),
focusNode: FocusNode(
skipTraversal: true),
child: Icon(
_model.passwordRegisterFormVisibility
? Icons
.visibility_outlined
: Icons
.visibility_off_outlined,
color: FlutterFlowTheme.of(
context)
.accent1,
size: 24.0,
),
),
),
style: FlutterFlowTheme.of(context)
.bodyLarge
.override(
fontFamily:
'Plus Jakarta Sans',
color: FlutterFlowTheme.of(
context)
.primaryText,
fontSize: 16.0,
letterSpacing: 0.0,
fontWeight: FontWeight.w500,
useGoogleFonts: GoogleFonts
.asMap()
.containsKey(
'Plus Jakarta Sans'),
),
validator: _model
.passwordRegisterFormTextControllerValidator
.asValidator(context),
),
),
),
Padding(
padding: const EdgeInsetsDirectional.fromSTEB(
0.0, 0.0, 0.0, 16.0),
child: FFButtonWidget(
onPressed: () async {
var shouldSetState = false;
_model.signUp = await action_blocks
.signUpActionApp(
context,
name: _model
.nameRegisterFormTextController
.text,
passwd: _model
.passwordRegisterFormTextController
.text,
email: _model
.emailRegisterFormTextController
.text,
device: FFAppState().device,
);
shouldSetState = true;
if (_model.signUp == true) {
await widget
.toggleOnBoardingPageAction
?.call(
'SignIn',
);
} else {
if (shouldSetState) {
setState(() {});
}
return;
}
if (shouldSetState) {
setState(() {});
}
},
text: FFLocalizations.of(context)
.getText(
'rnvdwzei' /* Cadastrar-se */,
),
options: FFButtonOptions(
width: double.infinity,
height: 44.0,
padding:
const EdgeInsetsDirectional.fromSTEB(
0.0, 0.0, 0.0, 0.0),
iconPadding:
const EdgeInsetsDirectional.fromSTEB(
0.0, 0.0, 0.0, 0.0),
color: FlutterFlowTheme.of(context)
.accent1,
textStyle: FlutterFlowTheme.of(
context)
.titleSmall
.override(
fontFamily:
'Plus Jakarta Sans',
color: FlutterFlowTheme.of(
context)
.secondaryText,
fontSize: 16.0,
letterSpacing: 0.0,
fontWeight: FontWeight.w500,
useGoogleFonts: GoogleFonts
.asMap()
.containsKey(
'Plus Jakarta Sans'),
),
elevation: 3.0,
borderSide: const BorderSide(
color: Colors.transparent,
width: 1.0,
),
borderRadius:
BorderRadius.circular(12.0),
),
showLoadingIndicator: false,
),
),
// You will have to add an action on this rich text to go to your login page.
Padding(
padding: const EdgeInsetsDirectional.fromSTEB(
0.0, 12.0, 0.0, 12.0),
child: InkWell(
splashColor: Colors.transparent,
focusColor: Colors.transparent,
hoverColor: Colors.transparent,
highlightColor: Colors.transparent,
onTap: () async {
await widget
.toggleOnBoardingPageAction
?.call(
'SignIn',
);
},
child: RichText(
textScaler: MediaQuery.of(context)
.textScaler,
text: TextSpan(
children: [
TextSpan(
text: FFLocalizations.of(
context)
.getText(
'a9smhn5b' /* Você já tem uma conta? */,
),
style: TextStyle(
color: FlutterFlowTheme.of(
context)
.primaryText,
),
),
TextSpan(
text: FFLocalizations.of(
context)
.getText(
'09xv5ctc' /* Clique aqui */,
),
style: FlutterFlowTheme.of(
context)
.bodyMedium
.override(
fontFamily:
'Plus Jakarta Sans',
color:
FlutterFlowTheme.of(
context)
.primary,
fontSize: 14.0,
letterSpacing: 0.0,
fontWeight:
FontWeight.w600,
useGoogleFonts: GoogleFonts
.asMap()
.containsKey(
'Plus Jakarta Sans'),
),
)
],
style:
FlutterFlowTheme.of(context)
.bodyMedium
.override(
fontFamily:
FlutterFlowTheme.of(
context)
.bodyMediumFamily,
letterSpacing: 0.0,
useGoogleFonts: GoogleFonts
.asMap()
.containsKey(
FlutterFlowTheme.of(
context)
.bodyMediumFamily),
),
),
),
),
),
],
),
),
),
).animateOnPageLoad(
animationsMap['containerOnPageLoadAnimation']!),
),
),
],
),
Text(
FFLocalizations.of(context).getText(
'huygnka2' /* Termo de Uso */,
),
style: FlutterFlowTheme.of(context).bodyMedium.override(
fontFamily:
FlutterFlowTheme.of(context).bodyMediumFamily,
color: FlutterFlowTheme.of(context).secondaryText,
fontSize: 14.0,
letterSpacing: 0.0,
useGoogleFonts: GoogleFonts.asMap().containsKey(
FlutterFlowTheme.of(context).bodyMediumFamily),
),
),
],
),
),
),
),
),
],
);
}
}

View File

@ -1,10 +1,12 @@
import '/application_components/organism_components/schedule_visit_detail/schedule_visit_detail_widget.dart';
import '/application_components/organism_components/view_visit_detail/view_visit_detail_widget.dart';
import '/flutter_flow/flutter_flow_util.dart';
import 'visit_details_modal_widget.dart' show VisitDetailsModalWidget;
import 'visit_details_modal_template_component_widget.dart'
show VisitDetailsModalTemplateComponentWidget;
import 'package:flutter/material.dart';
class VisitDetailsModalModel extends FlutterFlowModel<VisitDetailsModalWidget> {
class VisitDetailsModalTemplateComponentModel
extends FlutterFlowModel<VisitDetailsModalTemplateComponentWidget> {
/// Local state fields for this component.
Color statusColor = const Color(0xff000000);

View File

@ -2,11 +2,11 @@ import '/application_components/organism_components/schedule_visit_detail/schedu
import '/application_components/organism_components/view_visit_detail/view_visit_detail_widget.dart';
import '/flutter_flow/flutter_flow_util.dart';
import 'package:flutter/material.dart';
import 'visit_details_modal_model.dart';
export 'visit_details_modal_model.dart';
import 'visit_details_modal_template_component_model.dart';
export 'visit_details_modal_template_component_model.dart';
class VisitDetailsModalWidget extends StatefulWidget {
const VisitDetailsModalWidget({
class VisitDetailsModalTemplateComponentWidget extends StatefulWidget {
const VisitDetailsModalTemplateComponentWidget({
super.key,
this.visitStatusStr,
this.visitStartDateStr,
@ -40,12 +40,13 @@ class VisitDetailsModalWidget extends StatefulWidget {
final Future Function()? repeatVisitSchedule;
@override
State<VisitDetailsModalWidget> createState() =>
_VisitDetailsModalWidgetState();
State<VisitDetailsModalTemplateComponentWidget> createState() =>
_VisitDetailsModalTemplateComponentWidgetState();
}
class _VisitDetailsModalWidgetState extends State<VisitDetailsModalWidget> {
late VisitDetailsModalModel _model;
class _VisitDetailsModalTemplateComponentWidgetState
extends State<VisitDetailsModalTemplateComponentWidget> {
late VisitDetailsModalTemplateComponentModel _model;
@override
void setState(VoidCallback callback) {
@ -56,7 +57,8 @@ class _VisitDetailsModalWidgetState extends State<VisitDetailsModalWidget> {
@override
void initState() {
super.initState();
_model = createModel(context, () => VisitDetailsModalModel());
_model =
createModel(context, () => VisitDetailsModalTemplateComponentModel());
}
@override
@ -89,12 +91,6 @@ class _VisitDetailsModalWidgetState extends State<VisitDetailsModalWidget> {
visitorStrList: widget.visitorStrList!,
visitorJsonList: widget.visitorJsonList,
visitIdStr: widget.visitIdStr!,
updateToggleIdx: () async {
await widget.updateToggleIdx?.call();
},
repeatVisitScheduleActionBlock: () async {
await widget.repeatVisitSchedule?.call();
},
),
);
} else {

View File

@ -1,10 +1,11 @@
import '/backend/api_requests/api_calls.dart';
import '/flutter_flow/flutter_flow_util.dart';
import 'visitor_search_component_widget.dart' show VisitorSearchComponentWidget;
import 'visitor_search_modal_template_component_widget.dart'
show VisitorSearchModalTemplateComponentWidget;
import 'package:flutter/material.dart';
class VisitorSearchComponentModel
extends FlutterFlowModel<VisitorSearchComponentWidget> {
class VisitorSearchModalTemplateComponentModel
extends FlutterFlowModel<VisitorSearchModalTemplateComponentWidget> {
/// Local state fields for this component.
List<dynamic> visitors = [];

View File

@ -1,18 +1,19 @@
import '/application_components/molecular_components/visitor_not_found_component/visitor_not_found_component_widget.dart';
import '/application_components/templates_components/visitor_details_modal/visitor_details_modal_widget.dart';
import '/application_components/visitor_details_modal_template_component/visitor_details_modal_template_component_widget.dart';
import '/backend/api_requests/api_calls.dart';
import '/flutter_flow/flutter_flow_icon_button.dart';
import '/flutter_flow/flutter_flow_theme.dart';
import '/flutter_flow/flutter_flow_util.dart';
import '/flutter_flow/flutter_flow_widgets.dart';
import 'package:cached_network_image/cached_network_image.dart';
import 'package:flutter/material.dart';
import 'package:google_fonts/google_fonts.dart';
import 'package:provider/provider.dart';
import 'visitor_search_component_model.dart';
export 'visitor_search_component_model.dart';
import 'visitor_search_modal_template_component_model.dart';
export 'visitor_search_modal_template_component_model.dart';
class VisitorSearchComponentWidget extends StatefulWidget {
const VisitorSearchComponentWidget({
class VisitorSearchModalTemplateComponentWidget extends StatefulWidget {
const VisitorSearchModalTemplateComponentWidget({
super.key,
this.getVisitors,
this.getDocs,
@ -22,13 +23,14 @@ class VisitorSearchComponentWidget extends StatefulWidget {
final Future Function(List<String>? docsParam)? getDocs;
@override
State<VisitorSearchComponentWidget> createState() =>
_VisitorSearchComponentWidgetState();
State<VisitorSearchModalTemplateComponentWidget> createState() =>
_VisitorSearchModalTemplateComponentWidgetState();
}
class _VisitorSearchComponentWidgetState
extends State<VisitorSearchComponentWidget> with TickerProviderStateMixin {
late VisitorSearchComponentModel _model;
class _VisitorSearchModalTemplateComponentWidgetState
extends State<VisitorSearchModalTemplateComponentWidget>
with TickerProviderStateMixin {
late VisitorSearchModalTemplateComponentModel _model;
@override
void setState(VoidCallback callback) {
@ -39,7 +41,8 @@ class _VisitorSearchComponentWidgetState
@override
void initState() {
super.initState();
_model = createModel(context, () => VisitorSearchComponentModel());
_model =
createModel(context, () => VisitorSearchModalTemplateComponentModel());
_model.textController ??= TextEditingController();
_model.textFieldFocusNode ??= FocusNode();
@ -292,7 +295,7 @@ class _VisitorSearchComponentWidgetState
child: const SizedBox(
height: 610.0,
child:
VisitorDetailsModalWidget(),
VisitorDetailsModalTemplateComponentWidget(),
),
);
},
@ -325,8 +328,19 @@ class _VisitorSearchComponentWidgetState
ClipRRect(
borderRadius:
BorderRadius.circular(40.0),
child: Image.asset(
'assets/images/360_F_64676383_LdbmhiNM6Ypzb3FM4PPuFP9rHe7ri8Ju.jpg',
child: CachedNetworkImage(
fadeInDuration:
const Duration(milliseconds: 500),
fadeOutDuration:
const Duration(milliseconds: 500),
imageUrl:
valueOrDefault<String>(
'https://freaccess.com.br/freaccess/getImage.php?devUUID=${FFAppState().devUUID}&userUUID=${FFAppState().userUUID}&cliID=${FFAppState().cliUUID}&atividade=getFoto&Documento=${getJsonField(
visitorItem,
r'''$.VTE_DOCUMENTO''',
).toString()}&tipo=E',
'https://storage.googleapis.com/flutterflow-io-6f20.appspot.com/projects/flutter-freaccess-hub-0xgz9q/assets/7ftdetkzc3s0/360_F_64676383_LdbmhiNM6Ypzb3FM4PPuFP9rHe7ri8Ju.jpg',
),
width: 60.0,
height: 60.0,
fit: BoxFit.cover,
@ -501,8 +515,8 @@ class _VisitorSearchComponentWidgetState
borderRadius: const BorderRadius.only(
bottomLeft: Radius.circular(0.0),
bottomRight: Radius.circular(0.0),
topLeft: Radius.circular(15.0),
topRight: Radius.circular(15.0),
topLeft: Radius.circular(0.0),
topRight: Radius.circular(0.0),
),
),
),

View File

@ -0,0 +1,13 @@
import '/flutter_flow/flutter_flow_util.dart';
import 'welcome_template_component_widget.dart'
show WelcomeTemplateComponentWidget;
import 'package:flutter/material.dart';
class WelcomeTemplateComponentModel
extends FlutterFlowModel<WelcomeTemplateComponentWidget> {
@override
void initState(BuildContext context) {}
@override
void dispose() {}
}

View File

@ -0,0 +1,458 @@
import '/flutter_flow/flutter_flow_animations.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:flutter_animate/flutter_animate.dart';
import 'package:flutter_svg/flutter_svg.dart';
import 'package:google_fonts/google_fonts.dart';
import 'welcome_template_component_model.dart';
export 'welcome_template_component_model.dart';
class WelcomeTemplateComponentWidget extends StatefulWidget {
const WelcomeTemplateComponentWidget({
super.key,
required this.toggleOnboardingPageAction,
});
final Future Function(String toggleValueWelcomeParam)?
toggleOnboardingPageAction;
@override
State<WelcomeTemplateComponentWidget> createState() =>
_WelcomeTemplateComponentWidgetState();
}
class _WelcomeTemplateComponentWidgetState
extends State<WelcomeTemplateComponentWidget>
with TickerProviderStateMixin {
late WelcomeTemplateComponentModel _model;
final animationsMap = <String, AnimationInfo>{};
@override
void setState(VoidCallback callback) {
super.setState(callback);
_model.onUpdate();
}
@override
void initState() {
super.initState();
_model = createModel(context, () => WelcomeTemplateComponentModel());
animationsMap.addAll({
'containerOnPageLoadAnimation': AnimationInfo(
trigger: AnimationTrigger.onPageLoad,
effectsBuilder: () => [
VisibilityEffect(duration: 1.ms),
FadeEffect(
curve: Curves.easeInOut,
delay: 0.0.ms,
duration: 300.0.ms,
begin: 0.0,
end: 1.0,
),
MoveEffect(
curve: Curves.easeInOut,
delay: 0.0.ms,
duration: 300.0.ms,
begin: const Offset(0.0, 140.0),
end: const Offset(0.0, 0.0),
),
ScaleEffect(
curve: Curves.easeInOut,
delay: 0.0.ms,
duration: 300.0.ms,
begin: const Offset(0.9, 0.9),
end: const Offset(1.0, 1.0),
),
TiltEffect(
curve: Curves.easeInOut,
delay: 0.0.ms,
duration: 300.0.ms,
begin: const Offset(-0.349, 0),
end: const Offset(0, 0),
),
],
),
});
}
@override
void dispose() {
_model.maybeDispose();
super.dispose();
}
@override
Widget build(BuildContext context) {
return Align(
alignment: const AlignmentDirectional(0.0, 0.0),
child: SingleChildScrollView(
child: Column(
mainAxisSize: MainAxisSize.max,
mainAxisAlignment: MainAxisAlignment.spaceAround,
children: [
Align(
alignment: const AlignmentDirectional(0.0, 0.0),
child: SafeArea(
child: Container(
width: 648.0,
height: 208.0,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(16.0),
),
alignment: const AlignmentDirectional(0.0, 0.0),
child: Align(
alignment: const AlignmentDirectional(0.0, 0.0),
child: Padding(
padding: const EdgeInsets.all(14.0),
child: Column(
mainAxisSize: MainAxisSize.min,
children: [
Text(
FFLocalizations.of(context).getText(
'dsc9tuc8' /* UMA EXPERIÊCIA COMPLETA */,
),
textAlign: TextAlign.start,
style: FlutterFlowTheme.of(context)
.displaySmall
.override(
fontFamily: 'Plus Jakarta Sans',
color: FlutterFlowTheme.of(context).accent1,
fontSize: 24.0,
letterSpacing: 0.0,
fontWeight: FontWeight.w600,
useGoogleFonts: GoogleFonts.asMap()
.containsKey('Plus Jakarta Sans'),
),
),
Align(
alignment: const AlignmentDirectional(0.0, -1.0),
child: Text(
FFLocalizations.of(context).getText(
'5bgqn16z' /* COM CONFORTO ONDE VOCÊ ESTIVER... */,
),
textAlign: TextAlign.start,
style: FlutterFlowTheme.of(context)
.displaySmall
.override(
fontFamily: 'Plus Jakarta Sans',
color: FlutterFlowTheme.of(context)
.primaryText,
fontSize: 15.0,
letterSpacing: 0.0,
fontWeight: FontWeight.w600,
useGoogleFonts: GoogleFonts.asMap()
.containsKey('Plus Jakarta Sans'),
),
),
),
],
),
),
),
),
),
),
Container(
width: 284.0,
height: 200.0,
decoration: const BoxDecoration(),
child: ClipRRect(
borderRadius: BorderRadius.circular(0.0),
child: SvgPicture.network(
'https://storage.googleapis.com/flutterflow-io-6f20.appspot.com/projects/flutter-freaccess-hub-0xgz9q/assets/lv1waa0etd3j/undraw_appreciate_it_re_yc8h_(1)_1.svg',
width: 603.0,
height: double.infinity,
fit: BoxFit.contain,
),
),
),
Align(
alignment: const AlignmentDirectional(0.0, 0.0),
child: Padding(
padding: const EdgeInsets.all(34.0),
child: Container(
width: double.infinity,
constraints: const BoxConstraints(
maxWidth: 570.0,
),
decoration: BoxDecoration(
boxShadow: const [
BoxShadow(
blurRadius: 0.0,
color: Colors.transparent,
offset: Offset(
0.0,
0.0,
),
)
],
borderRadius: BorderRadius.circular(12.0),
),
child: Align(
alignment: const AlignmentDirectional(0.0, 0.0),
child: Padding(
padding: const EdgeInsets.all(32.0),
child: Column(
mainAxisSize: MainAxisSize.max,
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Builder(
builder: (context) {
if (MediaQuery.sizeOf(context).width <
kBreakpointSmall
? true
: false) {
return Column(
mainAxisSize: MainAxisSize.max,
children: [
Padding(
padding: const EdgeInsetsDirectional.fromSTEB(
0.0, 0.0, 0.0, 16.0),
child: FFButtonWidget(
onPressed: () async {
await widget
.toggleOnboardingPageAction
?.call(
'SignIn',
);
},
text:
FFLocalizations.of(context).getText(
'dynet730' /* Entrar */,
),
options: FFButtonOptions(
width: double.infinity,
height: 44.0,
padding:
const EdgeInsetsDirectional.fromSTEB(
0.0, 0.0, 0.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: 'Plus Jakarta Sans',
color:
FlutterFlowTheme.of(context)
.info,
fontSize: 16.0,
letterSpacing: 0.0,
fontWeight: FontWeight.w500,
useGoogleFonts: GoogleFonts
.asMap()
.containsKey(
'Plus Jakarta Sans'),
),
elevation: 3.0,
borderSide: const BorderSide(
color: Colors.transparent,
width: 1.0,
),
borderRadius:
BorderRadius.circular(12.0),
),
showLoadingIndicator: false,
),
),
Padding(
padding: const EdgeInsetsDirectional.fromSTEB(
0.0, 0.0, 0.0, 16.0),
child: FFButtonWidget(
onPressed: () async {
await widget
.toggleOnboardingPageAction
?.call(
'SignUp',
);
},
text:
FFLocalizations.of(context).getText(
'hha60cg7' /* Cadastrar */,
),
options: FFButtonOptions(
width: double.infinity,
height: 44.0,
padding:
const EdgeInsetsDirectional.fromSTEB(
0.0, 0.0, 0.0, 0.0),
iconPadding:
const EdgeInsetsDirectional.fromSTEB(
0.0, 0.0, 0.0, 0.0),
color: FlutterFlowTheme.of(context)
.customColor1,
textStyle: FlutterFlowTheme.of(
context)
.titleSmall
.override(
fontFamily: 'Plus Jakarta Sans',
color:
FlutterFlowTheme.of(context)
.customColor3,
fontSize: 16.0,
letterSpacing: 0.0,
fontWeight: FontWeight.w500,
useGoogleFonts: GoogleFonts
.asMap()
.containsKey(
'Plus Jakarta Sans'),
),
elevation: 3.0,
borderSide: const BorderSide(
color: Colors.transparent,
width: 1.0,
),
borderRadius:
BorderRadius.circular(12.0),
),
showLoadingIndicator: false,
),
),
],
);
} else {
return Row(
mainAxisSize: MainAxisSize.max,
mainAxisAlignment:
MainAxisAlignment.spaceEvenly,
children: [
Expanded(
child: Padding(
padding: const EdgeInsetsDirectional.fromSTEB(
0.0, 0.0, 0.0, 16.0),
child: FFButtonWidget(
onPressed: () async {
context.pushNamed(
'LoginPage',
queryParameters: {
'device': serializeParam(
'',
ParamType.String,
),
}.withoutNulls,
);
},
text: FFLocalizations.of(context)
.getText(
'zvtay8ee' /* Entrar */,
),
options: FFButtonOptions(
width: double.infinity,
height: 44.0,
padding:
const EdgeInsetsDirectional.fromSTEB(
0.0, 0.0, 0.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:
'Plus Jakarta Sans',
color: FlutterFlowTheme.of(
context)
.secondaryText,
fontSize: 16.0,
letterSpacing: 0.0,
fontWeight: FontWeight.w500,
useGoogleFonts: GoogleFonts
.asMap()
.containsKey(
'Plus Jakarta Sans'),
),
elevation: 3.0,
borderSide: const BorderSide(
color: Colors.transparent,
width: 1.0,
),
borderRadius:
BorderRadius.circular(12.0),
),
showLoadingIndicator: false,
),
),
),
Expanded(
child: Padding(
padding: const EdgeInsetsDirectional.fromSTEB(
0.0, 0.0, 0.0, 16.0),
child: FFButtonWidget(
onPressed: () async {
context.pushNamed('RegisterPage');
},
text: FFLocalizations.of(context)
.getText(
'o6zob50a' /* Cadastrar */,
),
options: FFButtonOptions(
width: double.infinity,
height: 44.0,
padding:
const EdgeInsetsDirectional.fromSTEB(
0.0, 0.0, 0.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:
'Plus Jakarta Sans',
color: FlutterFlowTheme.of(
context)
.secondaryText,
fontSize: 16.0,
letterSpacing: 0.0,
fontWeight: FontWeight.w500,
useGoogleFonts: GoogleFonts
.asMap()
.containsKey(
'Plus Jakarta Sans'),
),
elevation: 3.0,
borderSide: const BorderSide(
color: Colors.transparent,
width: 1.0,
),
borderRadius:
BorderRadius.circular(12.0),
),
showLoadingIndicator: false,
),
),
),
].divide(const SizedBox(width: 7.0)),
);
}
},
),
],
),
),
),
).animateOnPageLoad(
animationsMap['containerOnPageLoadAnimation']!),
),
),
],
),
),
);
}
}

View File

@ -0,0 +1,13 @@
import '/flutter_flow/flutter_flow_util.dart';
import 'visitor_details_modal_template_component_widget.dart'
show VisitorDetailsModalTemplateComponentWidget;
import 'package:flutter/material.dart';
class VisitorDetailsModalTemplateComponentModel
extends FlutterFlowModel<VisitorDetailsModalTemplateComponentWidget> {
@override
void initState(BuildContext context) {}
@override
void dispose() {}
}

View File

@ -2,19 +2,20 @@ 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 'visitor_details_modal_model.dart';
export 'visitor_details_modal_model.dart';
import 'visitor_details_modal_template_component_model.dart';
export 'visitor_details_modal_template_component_model.dart';
class VisitorDetailsModalWidget extends StatefulWidget {
const VisitorDetailsModalWidget({super.key});
class VisitorDetailsModalTemplateComponentWidget extends StatefulWidget {
const VisitorDetailsModalTemplateComponentWidget({super.key});
@override
State<VisitorDetailsModalWidget> createState() =>
_VisitorDetailsModalWidgetState();
State<VisitorDetailsModalTemplateComponentWidget> createState() =>
_VisitorDetailsModalTemplateComponentWidgetState();
}
class _VisitorDetailsModalWidgetState extends State<VisitorDetailsModalWidget> {
late VisitorDetailsModalModel _model;
class _VisitorDetailsModalTemplateComponentWidgetState
extends State<VisitorDetailsModalTemplateComponentWidget> {
late VisitorDetailsModalTemplateComponentModel _model;
@override
void setState(VoidCallback callback) {
@ -25,7 +26,8 @@ class _VisitorDetailsModalWidgetState extends State<VisitorDetailsModalWidget> {
@override
void initState() {
super.initState();
_model = createModel(context, () => VisitorDetailsModalModel());
_model =
createModel(context, () => VisitorDetailsModalTemplateComponentModel());
}
@override

View File

@ -0,0 +1,17 @@
import '/flutter_flow/flutter_flow_util.dart';
import 'fast_pass_page_widget.dart' show FastPassPageWidget;
import 'package:flutter/material.dart';
class FastPassPageModel extends FlutterFlowModel<FastPassPageWidget> {
/// State fields for stateful widgets in this page.
final unfocusNode = FocusNode();
@override
void initState(BuildContext context) {}
@override
void dispose() {
unfocusNode.dispose();
}
}

View File

@ -0,0 +1,44 @@
import '/flutter_flow/flutter_flow_theme.dart';
import '/flutter_flow/flutter_flow_util.dart';
import 'package:flutter/material.dart';
import 'fast_pass_page_model.dart';
export 'fast_pass_page_model.dart';
class FastPassPageWidget extends StatefulWidget {
const FastPassPageWidget({super.key});
@override
State<FastPassPageWidget> createState() => _FastPassPageWidgetState();
}
class _FastPassPageWidgetState extends State<FastPassPageWidget> {
late FastPassPageModel _model;
final scaffoldKey = GlobalKey<ScaffoldState>();
@override
void initState() {
super.initState();
_model = createModel(context, () => FastPassPageModel());
}
@override
void dispose() {
_model.dispose();
super.dispose();
}
@override
Widget build(BuildContext context) {
return GestureDetector(
onTap: () => _model.unfocusNode.canRequestFocus
? FocusScope.of(context).requestFocus(_model.unfocusNode)
: FocusScope.of(context).unfocus(),
child: Scaffold(
key: scaffoldKey,
backgroundColor: FlutterFlowTheme.of(context).primaryBackground,
),
);
}
}

View File

@ -1,6 +1,6 @@
import '/application_components/organism_components/local_profile_component/local_profile_component_widget.dart';
import '/application_components/templates_components/menu_component/menu_component_widget.dart';
import '/application_components/templates_components/message_well_component/message_well_component_widget.dart';
import '/application_components/organism_components/menu_component/menu_component_widget.dart';
import '/application_components/organism_components/message_well_component/message_well_component_widget.dart';
import '/flutter_flow/flutter_flow_util.dart';
import 'home_page_widget.dart' show HomePageWidget;
import 'package:flutter/material.dart';

View File

@ -1,7 +1,7 @@
import '/application_components/organism_components/bottom_arrow_linked_locals_component/bottom_arrow_linked_locals_component_widget.dart';
import '/application_components/organism_components/local_profile_component/local_profile_component_widget.dart';
import '/application_components/templates_components/menu_component/menu_component_widget.dart';
import '/application_components/templates_components/message_well_component/message_well_component_widget.dart';
import '/application_components/organism_components/menu_component/menu_component_widget.dart';
import '/application_components/organism_components/message_well_component/message_well_component_widget.dart';
import '/flutter_flow/flutter_flow_icon_button.dart';
import '/flutter_flow/flutter_flow_theme.dart';
import '/flutter_flow/flutter_flow_util.dart';
@ -14,14 +14,7 @@ import 'home_page_model.dart';
export 'home_page_model.dart';
class HomePageWidget extends StatefulWidget {
const HomePageWidget({
super.key,
required this.userUUID,
required this.devUUID,
});
final String? userUUID;
final String? devUUID;
const HomePageWidget({super.key});
@override
State<HomePageWidget> createState() => _HomePageWidgetState();
@ -836,7 +829,16 @@ class _HomePageWidgetState extends State<HomePageWidget> {
FFAppState().isLogged = false;
setState(() {});
context.pushNamed('WelcomePage');
context.goNamed(
'onBoardingPage',
extra: <String, dynamic>{
kTransitionInfoKey: const TransitionInfo(
hasTransition: true,
transitionType: PageTransitionType.scale,
alignment: Alignment.bottomCenter,
),
},
);
},
text: FFLocalizations.of(context).getText(
'xx0db4wi' /* Sair */,
@ -844,7 +846,7 @@ class _HomePageWidgetState extends State<HomePageWidget> {
options: FFButtonOptions(
height: 40.0,
padding: const EdgeInsetsDirectional.fromSTEB(
24.0, 0.0, 24.0, 0.0),
0.0, 0.0, 0.0, 0.0),
iconPadding: const EdgeInsetsDirectional.fromSTEB(
0.0, 0.0, 0.0, 0.0),
color: const Color(0x00D70000),
@ -898,7 +900,7 @@ class _HomePageWidgetState extends State<HomePageWidget> {
Expanded(
child: Container(
width: 100.0,
height: 120.0,
height: 100.0,
decoration: const BoxDecoration(
color: Color(0xFF1AAB5F),
),
@ -907,8 +909,9 @@ class _HomePageWidgetState extends State<HomePageWidget> {
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Align(
alignment: const AlignmentDirectional(0.0, 0.0),
alignment: const AlignmentDirectional(0.0, 1.0),
child: Container(
height: 50.0,
decoration: const BoxDecoration(),
child: Align(
alignment: const AlignmentDirectional(0.0, 0.0),
@ -932,7 +935,7 @@ class _HomePageWidgetState extends State<HomePageWidget> {
icon: const Icon(
Icons.menu_rounded,
color: Colors.white,
size: 34.0,
size: 28.0,
),
onPressed: () async {
scaffoldKey.currentState!
@ -999,10 +1002,30 @@ class _HomePageWidgetState extends State<HomePageWidget> {
),
),
),
Container(
width: 100.0,
height: 100.0,
decoration: const BoxDecoration(),
Align(
alignment: const AlignmentDirectional(0.0, 1.0),
child: Container(
width: 100.0,
height: 50.0,
decoration: const BoxDecoration(),
child: Align(
alignment: const AlignmentDirectional(1.0, 1.0),
child: FlutterFlowIconButton(
borderRadius: 20.0,
borderWidth: 1.0,
buttonSize: 40.0,
icon: Icon(
Icons.notifications_sharp,
color:
FlutterFlowTheme.of(context).info,
size: 24.0,
),
onPressed: () {
print('IconButton pressed ...');
},
),
),
),
),
],
),

View File

@ -0,0 +1,48 @@
import '/application_components/templates_components/sign_in_template_component/sign_in_template_component_widget.dart';
import '/application_components/templates_components/sign_up_template_component/sign_up_template_component_widget.dart';
import '/application_components/templates_components/welcome_template_component/welcome_template_component_widget.dart';
import '/flutter_flow/flutter_flow_util.dart';
import 'on_boarding_page_widget.dart' show OnBoardingPageWidget;
import 'package:flutter/material.dart';
class OnBoardingPageModel extends FlutterFlowModel<OnBoardingPageWidget> {
/// Local state fields for this page.
String toggleIdx = 'welcome';
/// State fields for stateful widgets in this page.
final unfocusNode = FocusNode();
// Model for signInTemplateComponent component.
late SignInTemplateComponentModel signInTemplateComponentModel;
// Model for signUpTemplateComponent component.
late SignUpTemplateComponentModel signUpTemplateComponentModel;
// Model for welcomeTemplateComponent component.
late WelcomeTemplateComponentModel welcomeTemplateComponentModel;
@override
void initState(BuildContext context) {
signInTemplateComponentModel =
createModel(context, () => SignInTemplateComponentModel());
signUpTemplateComponentModel =
createModel(context, () => SignUpTemplateComponentModel());
welcomeTemplateComponentModel =
createModel(context, () => WelcomeTemplateComponentModel());
}
@override
void dispose() {
unfocusNode.dispose();
signInTemplateComponentModel.dispose();
signUpTemplateComponentModel.dispose();
welcomeTemplateComponentModel.dispose();
}
/// Action blocks.
Future toggleOnBoardingActionPage(
BuildContext context, {
required String? toggleValue,
}) async {
toggleIdx = toggleValue!;
}
}

View File

@ -0,0 +1,131 @@
import '/application_components/templates_components/sign_in_template_component/sign_in_template_component_widget.dart';
import '/application_components/templates_components/sign_up_template_component/sign_up_template_component_widget.dart';
import '/application_components/templates_components/welcome_template_component/welcome_template_component_widget.dart';
import '/flutter_flow/flutter_flow_theme.dart';
import '/flutter_flow/flutter_flow_util.dart';
import 'package:flutter/material.dart';
import 'package:flutter/scheduler.dart';
import 'package:provider/provider.dart';
import 'on_boarding_page_model.dart';
export 'on_boarding_page_model.dart';
class OnBoardingPageWidget extends StatefulWidget {
const OnBoardingPageWidget({super.key});
@override
State<OnBoardingPageWidget> createState() => _OnBoardingPageWidgetState();
}
class _OnBoardingPageWidgetState extends State<OnBoardingPageWidget> {
late OnBoardingPageModel _model;
final scaffoldKey = GlobalKey<ScaffoldState>();
@override
void initState() {
super.initState();
_model = createModel(context, () => OnBoardingPageModel());
// On page load action.
SchedulerBinding.instance.addPostFrameCallback((_) async {
if (FFAppState().isLogged == true) {
context.pushNamed(
'homePage',
extra: <String, dynamic>{
kTransitionInfoKey: const TransitionInfo(
hasTransition: true,
transitionType: PageTransitionType.fade,
duration: Duration(milliseconds: 0),
),
},
);
} else {
if (isAndroid == true) {
FFAppState().device = 'Android';
setState(() {});
} else if (isiOS == true) {
FFAppState().device = 'iOS';
setState(() {});
} else {
FFAppState().device = 'Web';
setState(() {});
}
}
});
}
@override
void dispose() {
_model.dispose();
super.dispose();
}
@override
Widget build(BuildContext context) {
context.watch<FFAppState>();
return GestureDetector(
onTap: () => _model.unfocusNode.canRequestFocus
? FocusScope.of(context).requestFocus(_model.unfocusNode)
: FocusScope.of(context).unfocus(),
child: Scaffold(
key: scaffoldKey,
backgroundColor: FlutterFlowTheme.of(context).primaryBackground,
body: SafeArea(
top: true,
child: Stack(
children: [
if (_model.toggleIdx == 'SignIn')
wrapWithModel(
model: _model.signInTemplateComponentModel,
updateCallback: () => setState(() {}),
updateOnChange: true,
child: SignInTemplateComponentWidget(
toggleOnBoardingPageAction: (toggleValueSignInParam) async {
await _model.toggleOnBoardingActionPage(
context,
toggleValue: toggleValueSignInParam,
);
setState(() {});
},
),
),
if (_model.toggleIdx == 'SignUp')
wrapWithModel(
model: _model.signUpTemplateComponentModel,
updateCallback: () => setState(() {}),
updateOnChange: true,
child: SignUpTemplateComponentWidget(
toggleOnBoardingPageAction: (toggleValueSignUpParam) async {
await _model.toggleOnBoardingActionPage(
context,
toggleValue: toggleValueSignUpParam,
);
setState(() {});
},
),
),
if (_model.toggleIdx == 'welcome')
wrapWithModel(
model: _model.welcomeTemplateComponentModel,
updateCallback: () => setState(() {}),
updateOnChange: true,
child: WelcomeTemplateComponentWidget(
toggleOnboardingPageAction:
(toggleValueWelcomeParam) async {
await _model.toggleOnBoardingActionPage(
context,
toggleValue: toggleValueWelcomeParam,
);
setState(() {});
},
),
),
],
),
),
),
);
}
}

View File

@ -0,0 +1,23 @@
import '/flutter_flow/flutter_flow_data_table.dart';
import '/flutter_flow/flutter_flow_util.dart';
import 'people_on_the_property_page_widget.dart'
show PeopleOnThePropertyPageWidget;
import 'package:flutter/material.dart';
class PeopleOnThePropertyPageModel
extends FlutterFlowModel<PeopleOnThePropertyPageWidget> {
/// State fields for stateful widgets in this page.
final unfocusNode = FocusNode();
// State field(s) for PaginatedDataTable widget.
final paginatedDataTableController =
FlutterFlowDataTableController<dynamic>();
@override
void initState(BuildContext context) {}
@override
void dispose() {
unfocusNode.dispose();
}
}

View File

@ -0,0 +1,289 @@
import '/backend/api_requests/api_calls.dart';
import '/flutter_flow/flutter_flow_data_table.dart';
import '/flutter_flow/flutter_flow_icon_button.dart';
import '/flutter_flow/flutter_flow_theme.dart';
import '/flutter_flow/flutter_flow_util.dart';
import 'package:cached_network_image/cached_network_image.dart';
import 'package:flutter/material.dart';
import 'package:flutter_spinkit/flutter_spinkit.dart';
import 'package:google_fonts/google_fonts.dart';
import 'package:provider/provider.dart';
import 'people_on_the_property_page_model.dart';
export 'people_on_the_property_page_model.dart';
class PeopleOnThePropertyPageWidget extends StatefulWidget {
const PeopleOnThePropertyPageWidget({super.key});
@override
State<PeopleOnThePropertyPageWidget> createState() =>
_PeopleOnThePropertyPageWidgetState();
}
class _PeopleOnThePropertyPageWidgetState
extends State<PeopleOnThePropertyPageWidget> {
late PeopleOnThePropertyPageModel _model;
final scaffoldKey = GlobalKey<ScaffoldState>();
@override
void initState() {
super.initState();
_model = createModel(context, () => PeopleOnThePropertyPageModel());
}
@override
void dispose() {
_model.dispose();
super.dispose();
}
@override
Widget build(BuildContext context) {
context.watch<FFAppState>();
return GestureDetector(
onTap: () => _model.unfocusNode.canRequestFocus
? FocusScope.of(context).requestFocus(_model.unfocusNode)
: FocusScope.of(context).unfocus(),
child: Scaffold(
key: scaffoldKey,
backgroundColor: FlutterFlowTheme.of(context).primaryBackground,
appBar: AppBar(
backgroundColor: FlutterFlowTheme.of(context).primaryBackground,
automaticallyImplyLeading: false,
leading: FlutterFlowIconButton(
borderColor: Colors.transparent,
borderRadius: 30.0,
borderWidth: 1.0,
buttonSize: 60.0,
icon: Icon(
Icons.keyboard_arrow_left,
color: FlutterFlowTheme.of(context).primaryText,
size: 30.0,
),
onPressed: () async {
context.pop();
},
),
title: Text(
FFLocalizations.of(context).getText(
'nsu13r5d' /* Pessoas na Propriedade */,
),
style: FlutterFlowTheme.of(context).headlineMedium.override(
fontFamily: 'Nunito',
color: FlutterFlowTheme.of(context).primaryText,
fontSize: 15.0,
letterSpacing: 0.0,
fontWeight: FontWeight.bold,
useGoogleFonts: GoogleFonts.asMap().containsKey('Nunito'),
),
),
actions: const [],
centerTitle: true,
),
body: SafeArea(
top: true,
child: FutureBuilder<ApiCallResponse>(
future: PhpGroup.getPessoasLocalCall.call(
cliID: FFAppState().cliUUID,
ownID: FFAppState().ownerUUID,
devUUID: FFAppState().devUUID,
userUUID: FFAppState().userUUID,
),
builder: (context, snapshot) {
// Customize what your widget looks like when it's loading.
if (!snapshot.hasData) {
return Center(
child: SizedBox(
width: 50.0,
height: 50.0,
child: SpinKitCircle(
color: FlutterFlowTheme.of(context).primary,
size: 50.0,
),
),
);
}
final columnGetPessoasLocalResponse = snapshot.data!;
return Column(
mainAxisSize: MainAxisSize.min,
mainAxisAlignment: MainAxisAlignment.start,
children: [
Expanded(
child: Builder(
builder: (context) {
final getPessoaLocal = PhpGroup.getPessoasLocalCall
.pessoas(
columnGetPessoasLocalResponse.jsonBody,
)
?.toList() ??
[];
return FlutterFlowDataTable<dynamic>(
controller: _model.paginatedDataTableController,
data: getPessoaLocal,
columnsBuilder: (onSortChanged) => [
DataColumn2(
label: DefaultTextStyle.merge(
softWrap: true,
child: Row(
mainAxisSize: MainAxisSize.max,
mainAxisAlignment: MainAxisAlignment.center,
children: [
Text(
FFLocalizations.of(context).getText(
'omjuk919' /* Foto */,
),
textAlign: TextAlign.center,
style: FlutterFlowTheme.of(context)
.labelLarge
.override(
fontFamily:
FlutterFlowTheme.of(context)
.labelLargeFamily,
color: FlutterFlowTheme.of(context)
.primaryText,
letterSpacing: 0.0,
useGoogleFonts: GoogleFonts.asMap()
.containsKey(
FlutterFlowTheme.of(context)
.labelLargeFamily),
),
),
],
),
),
),
DataColumn2(
label: DefaultTextStyle.merge(
softWrap: true,
child: Row(
mainAxisSize: MainAxisSize.max,
mainAxisAlignment: MainAxisAlignment.center,
children: [
Text(
FFLocalizations.of(context).getText(
'fli7tpz6' /* Nome */,
),
style: FlutterFlowTheme.of(context)
.labelLarge
.override(
fontFamily:
FlutterFlowTheme.of(context)
.labelLargeFamily,
color: FlutterFlowTheme.of(context)
.primaryText,
letterSpacing: 0.0,
useGoogleFonts: GoogleFonts.asMap()
.containsKey(
FlutterFlowTheme.of(context)
.labelLargeFamily),
),
),
],
),
),
),
],
dataRowBuilder: (getPessoaLocalItem,
getPessoaLocalIndex,
selected,
onSelectChanged) =>
DataRow(
color: MaterialStateProperty.all(
getPessoaLocalIndex % 2 == 0
? FlutterFlowTheme.of(context)
.primaryBackground
: FlutterFlowTheme.of(context)
.primaryBackground,
),
cells: [
Row(
mainAxisSize: MainAxisSize.max,
mainAxisAlignment: MainAxisAlignment.center,
children: [
Padding(
padding: const EdgeInsets.all(4.0),
child: Container(
width: 100.0,
height: 100.0,
clipBehavior: Clip.antiAlias,
decoration: const BoxDecoration(
shape: BoxShape.circle,
),
child: CachedNetworkImage(
fadeInDuration:
const Duration(milliseconds: 500),
fadeOutDuration:
const Duration(milliseconds: 500),
imageUrl: valueOrDefault<String>(
'https://freaccess.com.br/freaccess/getImage.php?devUUID=${FFAppState().devUUID}&userUUID=${FFAppState().userUUID}&cliID=${FFAppState().cliUUID}&atividade=getFoto&Documento=&tipo=E&Email=${getJsonField(
getPessoaLocalItem,
r'''$.USU_EMAIL''',
).toString()}',
'https://storage.googleapis.com/flutterflow-io-6f20.appspot.com/projects/flutter-freaccess-hub-0xgz9q/assets/7ftdetkzc3s0/360_F_64676383_LdbmhiNM6Ypzb3FM4PPuFP9rHe7ri8Ju.jpg',
),
fit: BoxFit.cover,
),
),
),
],
),
Container(
width: 500.0,
height: 21.0,
decoration: const BoxDecoration(),
alignment: const AlignmentDirectional(-1.0, 0.0),
child: Text(
getJsonField(
getPessoaLocalItem,
r'''$.USU_NOME''',
).toString(),
style: FlutterFlowTheme.of(context)
.bodyMedium
.override(
fontFamily: FlutterFlowTheme.of(context)
.bodyMediumFamily,
fontSize: 14.0,
letterSpacing: 0.0,
useGoogleFonts: GoogleFonts.asMap()
.containsKey(
FlutterFlowTheme.of(context)
.bodyMediumFamily),
),
),
),
].map((c) => DataCell(c)).toList(),
),
paginated: true,
selectable: false,
hidePaginator: false,
showFirstLastButtons: false,
width: MediaQuery.sizeOf(context).width * 1.0,
height: MediaQuery.sizeOf(context).height * 1.0,
headingRowHeight: 56.0,
dataRowHeight: 48.0,
columnSpacing: 20.0,
headingRowColor:
FlutterFlowTheme.of(context).primaryBackground,
borderRadius: BorderRadius.circular(0.0),
addHorizontalDivider: true,
addTopAndBottomDivider: true,
hideDefaultHorizontalDivider: false,
horizontalDividerColor:
FlutterFlowTheme.of(context).customColor5,
horizontalDividerThickness: 0.3,
addVerticalDivider: false,
);
},
),
),
],
);
},
),
),
),
);
}
}

View File

@ -14,14 +14,7 @@ import 'register_visitor_page_model.dart';
export 'register_visitor_page_model.dart';
class RegisterVisitorPageWidget extends StatefulWidget {
const RegisterVisitorPageWidget({
super.key,
required this.userUUID,
required this.devUUID,
});
final String? userUUID;
final String? devUUID;
const RegisterVisitorPageWidget({super.key});
@override
State<RegisterVisitorPageWidget> createState() =>

View File

@ -2,15 +2,12 @@ import '/flutter_flow/flutter_flow_util.dart';
import '/flutter_flow/form_field_controller.dart';
import 'schedule_complete_visit_page_widget.dart'
show ScheduleCompleteVisitPageWidget;
import 'package:carousel_slider/carousel_slider.dart';
import 'package:flutter/material.dart';
class ScheduleCompleteVisitPageModel
extends FlutterFlowModel<ScheduleCompleteVisitPageWidget> {
/// Local state fields for this page.
bool toggleIdx = true;
List<dynamic> visitorJsonList = [];
void addToVisitorJsonList(dynamic item) => visitorJsonList.add(item);
void removeFromVisitorJsonList(dynamic item) => visitorJsonList.remove(item);
@ -26,10 +23,10 @@ class ScheduleCompleteVisitPageModel
/// State fields for stateful widgets in this page.
final unfocusNode = FocusNode();
// State field(s) for Carousel widget.
CarouselController? carouselController;
int carouselCurrentIndex = 1;
// State field(s) for TabBar widget.
TabController? tabBarController;
int get tabBarCurrentIndex =>
tabBarController != null ? tabBarController!.index : 0;
// State field(s) for TextField widget.
FocusNode? textFieldFocusNode1;
@ -60,6 +57,7 @@ class ScheduleCompleteVisitPageModel
@override
void dispose() {
unfocusNode.dispose();
tabBarController?.dispose();
textFieldFocusNode1?.dispose();
textController1?.dispose();
@ -69,4 +67,23 @@ class ScheduleCompleteVisitPageModel
textFieldFocusNode3?.dispose();
textController3?.dispose();
}
/// Action blocks.
Future getVisitorsActionPage(
BuildContext context, {
List<dynamic>? visitorsJsonList,
}) async {
visitorJsonList = visitorsJsonList!.toList().cast<dynamic>();
}
Future<bool> toggleCurrentSelectionHeader(
BuildContext context, {
required bool? toggleIndexValue,
}) async {
if (toggleIndexValue == true) {
return true;
}
return false;
}
}

View File

@ -3,6 +3,8 @@ import '/application_components/organism_components/bottom_arrow_linked_locals_c
import '/backend/api_requests/api_calls.dart';
import '/flutter_flow/flutter_flow_theme.dart';
import '/flutter_flow/flutter_flow_util.dart';
import '/flutter_flow/flutter_flow_widgets.dart';
import 'package:cached_network_image/cached_network_image.dart';
import 'package:flutter/material.dart';
import 'package:google_fonts/google_fonts.dart';
import 'package:provider/provider.dart';
@ -189,93 +191,92 @@ class _ScheduleProvisionalVisitPageWidgetState
),
),
),
Padding(
padding: const EdgeInsetsDirectional.fromSTEB(
25.0, 0.0, 25.0, 0.0),
child: InkWell(
splashColor: Colors.transparent,
focusColor: Colors.transparent,
hoverColor: Colors.transparent,
highlightColor: Colors.transparent,
onTap: () async {
await showModalBottomSheet(
isScrollControlled: true,
backgroundColor: Colors.transparent,
enableDrag: false,
context: context,
builder: (context) {
return GestureDetector(
onTap: () => _model
.unfocusNode.canRequestFocus
? FocusScope.of(context)
.requestFocus(
_model.unfocusNode)
: FocusScope.of(context)
.unfocus(),
child: Padding(
padding: MediaQuery.viewInsetsOf(
context),
child:
const BottomArrowLinkedLocalsComponentWidget(),
),
);
},
).then((value) => safeSetState(() {}));
},
child: Container(
width: double.infinity,
height: 51.0,
decoration: BoxDecoration(
Stack(
children: [
FFButtonWidget(
onPressed: () async {
await showModalBottomSheet(
isScrollControlled: true,
backgroundColor: Colors.transparent,
enableDrag: false,
context: context,
builder: (context) {
return GestureDetector(
onTap: () => _model
.unfocusNode.canRequestFocus
? FocusScope.of(context)
.requestFocus(
_model.unfocusNode)
: FocusScope.of(context)
.unfocus(),
child: Padding(
padding: MediaQuery.viewInsetsOf(
context),
child:
const BottomArrowLinkedLocalsComponentWidget(),
),
);
},
).then((value) => safeSetState(() {}));
},
text: FFAppState().local,
options: FFButtonOptions(
width: 320.0,
height: 51.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)
.secondaryBackground,
borderRadius: BorderRadius.circular(24.0),
border: Border.all(
.primaryBackground,
textStyle: FlutterFlowTheme.of(context)
.titleSmall
.override(
fontFamily:
FlutterFlowTheme.of(context)
.titleSmallFamily,
color: FlutterFlowTheme.of(context)
.primaryText,
fontSize: 14.0,
letterSpacing: 0.0,
useGoogleFonts: GoogleFonts.asMap()
.containsKey(
FlutterFlowTheme.of(context)
.titleSmallFamily),
),
borderSide: BorderSide(
color: FlutterFlowTheme.of(context)
.primaryText,
width: 0.3,
),
),
child: Row(
mainAxisSize: MainAxisSize.max,
mainAxisAlignment:
MainAxisAlignment.spaceEvenly,
children: [
Container(
width: 35.0,
height: 35.0,
clipBehavior: Clip.antiAlias,
decoration: const BoxDecoration(
shape: BoxShape.circle,
),
child: Image.network(
valueOrDefault<String>(
'https://freaccess.com.br/freaccess/Images/Clients/${FFAppState().cliUUID}.png',
'https://storage.googleapis.com/flutterflow-io-6f20.appspot.com/projects/flutter-freaccess-hub-0xgz9q/assets/7ftdetkzc3s0/360_F_64676383_LdbmhiNM6Ypzb3FM4PPuFP9rHe7ri8Ju.jpg',
),
fit: BoxFit.cover,
),
),
Text(
FFAppState().local,
style: FlutterFlowTheme.of(context)
.bodyMedium
.override(
fontFamily:
FlutterFlowTheme.of(context)
.bodyMediumFamily,
letterSpacing: 0.0,
useGoogleFonts: GoogleFonts
.asMap()
.containsKey(
FlutterFlowTheme.of(
context)
.bodyMediumFamily),
),
),
],
borderRadius: BorderRadius.circular(24.0),
),
),
),
Padding(
padding: const EdgeInsetsDirectional.fromSTEB(
20.0, 10.0, 0.0, 0.0),
child: Container(
width: 35.0,
height: 35.0,
clipBehavior: Clip.antiAlias,
decoration: const BoxDecoration(
shape: BoxShape.circle,
),
child: CachedNetworkImage(
fadeInDuration:
const Duration(milliseconds: 100),
fadeOutDuration:
const Duration(milliseconds: 100),
imageUrl: valueOrDefault<String>(
'https://freaccess.com.br/freaccess/Images/Clients/${FFAppState().cliUUID}.png',
'https://storage.googleapis.com/flutterflow-io-6f20.appspot.com/projects/flutter-freaccess-hub-0xgz9q/assets/7ftdetkzc3s0/360_F_64676383_LdbmhiNM6Ypzb3FM4PPuFP9rHe7ri8Ju.jpg',
),
fit: BoxFit.cover,
),
),
),
],
),
].addToEnd(const SizedBox(height: 20.0)),
),

View File

@ -21,6 +21,7 @@ class PhpGroup {
static PostScheduleVisitorCall postScheduleVisitorCall =
PostScheduleVisitorCall();
static PostScheduleVisitCall postScheduleVisitCall = PostScheduleVisitCall();
static DebugCallCall debugCallCall = DebugCallCall();
static GetScheduleVisitCall getScheduleVisitCall = GetScheduleVisitCall();
static GetDadosCall getDadosCall = GetDadosCall();
static GetVisitorByDocCall getVisitorByDocCall = GetVisitorByDocCall();
@ -29,7 +30,7 @@ class PhpGroup {
PostProvVisitSchedulingCall();
static GetVisitsCall getVisitsCall = GetVisitsCall();
static DeleteVisitCall deleteVisitCall = DeleteVisitCall();
static DebugCall debugCall = DebugCall();
static GetPessoasLocalCall getPessoasLocalCall = GetPessoasLocalCall();
}
class LoginCall {
@ -341,7 +342,7 @@ class PostScheduleVisitCall {
Future<ApiCallResponse> call({
String? devUUID = '',
String? userUUID = '',
String? cliUUID = '',
String? cliID = '',
String? atividade = '',
String? devDesc = '',
String? idVisitante = '',
@ -364,7 +365,64 @@ class PostScheduleVisitCall {
params: {
'devUUID': devUUID,
'userUUID': userUUID,
'cliID': cliUUID,
'cliID': cliID,
'atividade': atividade,
'idVisitante': idVisitante,
'dtInicio': dtInicio,
'dtFim': dtFim,
'unica': unica,
'idMotivo': idMotivo,
'idNAC': idNAC,
'obs': obs,
'DevDesc': devDesc,
},
bodyType: BodyType.X_WWW_FORM_URL_ENCODED,
returnBody: true,
encodeBodyUtf8: false,
decodeUtf8: false,
cache: false,
alwaysAllowBody: false,
);
}
bool? error(dynamic response) => castToType<bool>(getJsonField(
response,
r'''$.error''',
));
String? errorMsg(dynamic response) => castToType<String>(getJsonField(
response,
r'''$.error_msg''',
));
}
class DebugCallCall {
Future<ApiCallResponse> call({
String? devUUID = '',
String? userUUID = '',
String? cliID = '',
String? atividade = '',
String? devDesc = '',
String? idVisitante = '',
String? dtInicio = '',
String? dtFim = '',
String? unica = '',
int? idMotivo,
int? idNAC,
String? obs = '',
}) async {
final baseUrl = PhpGroup.getBaseUrl();
return ApiManager.instance.makeApiCall(
callName: 'debugCall',
apiUrl: '$baseUrl/jonh.php',
callType: ApiCallType.POST,
headers: {
'Content-Type': 'application/x-www-form-urlencoded',
},
params: {
'devUUID': devUUID,
'userUUID': userUUID,
'cliID': cliID,
'atividade': atividade,
'DevDesc': devDesc,
'idVisitante': idVisitante,
@ -1363,17 +1421,29 @@ class DeleteVisitCall {
));
}
class DebugCall {
Future<ApiCallResponse> call() async {
class GetPessoasLocalCall {
Future<ApiCallResponse> call({
String? cliID = '',
String? ownID = '',
String? devUUID = '',
String? userUUID = '',
}) async {
final baseUrl = PhpGroup.getBaseUrl();
return ApiManager.instance.makeApiCall(
callName: 'debug',
apiUrl: '$baseUrl/jonh.php',
callName: 'getPessoasLocal',
apiUrl: '$baseUrl/getPessoasLocal.php',
callType: ApiCallType.POST,
headers: {},
params: {},
bodyType: BodyType.JSON,
headers: {
'Content-Type': 'application/x-www-form-urlencoded',
},
params: {
'cliID': cliID,
'ownID': ownID,
'devUUID': devUUID,
'userUUID': userUUID,
},
bodyType: BodyType.X_WWW_FORM_URL_ENCODED,
returnBody: true,
encodeBodyUtf8: false,
decodeUtf8: false,
@ -1381,6 +1451,34 @@ class DebugCall {
alwaysAllowBody: false,
);
}
bool? error(dynamic response) => castToType<bool>(getJsonField(
response,
r'''$.error''',
));
List? pessoas(dynamic response) => getJsonField(
response,
r'''$.pessoas''',
true,
) as List?;
List<String>? usuEmail(dynamic response) => (getJsonField(
response,
r'''$.pessoas[:].USU_EMAIL''',
true,
) as List?)
?.withoutNulls
.map((x) => castToType<String>(x))
.withoutNulls
.toList();
List<String>? usuNome(dynamic response) => (getJsonField(
response,
r'''$.pessoas[:].USU_NOME''',
true,
) as List?)
?.withoutNulls
.map((x) => castToType<String>(x))
.withoutNulls
.toList();
}
/// End PHP Group Code

View File

@ -110,20 +110,10 @@ final parametersBuilderMap =
},
),
'ForgotPasswordPage': ParameterData.none(),
'homePage': (data) async => ParameterData(
allParams: {
'userUUID': getParameter<String>(data, 'userUUID'),
'devUUID': getParameter<String>(data, 'devUUID'),
},
),
'homePage': ParameterData.none(),
'RegisterPage': ParameterData.none(),
'WelcomePage': ParameterData.none(),
'registerVisitorPage': (data) async => ParameterData(
allParams: {
'userUUID': getParameter<String>(data, 'userUUID'),
'devUUID': getParameter<String>(data, 'devUUID'),
},
),
'registerVisitorPage': ParameterData.none(),
'scheduleCompleteVisitPage': (data) async => ParameterData(
allParams: {
'visitorStrList': getParameter<String>(data, 'visitorStrList'),
@ -136,6 +126,10 @@ final parametersBuilderMap =
},
),
'scheduleProvisionalVisitPage': ParameterData.none(),
'onBoardingPage': ParameterData.none(),
'fastPassPage': ParameterData.none(),
'test': ParameterData.none(),
'peopleOnThePropertyPage': ParameterData.none(),
};
Map<String, dynamic> getInitialParameterData(Map<String, dynamic> data) {

View File

@ -0,0 +1,110 @@
// ignore_for_file: unnecessary_getters_setters
import '/backend/schema/util/schema_util.dart';
import 'index.dart';
import '/flutter_flow/flutter_flow_util.dart';
class DeviceStruct extends BaseStruct {
DeviceStruct({
String? devUUID,
String? version,
String? description,
}) : _devUUID = devUUID,
_version = version,
_description = description;
// "devUUID" field.
String? _devUUID;
String get devUUID => _devUUID ?? '';
set devUUID(String? val) => _devUUID = val;
bool hasDevUUID() => _devUUID != null;
// "version" field.
String? _version;
String get version => _version ?? '';
set version(String? val) => _version = val;
bool hasVersion() => _version != null;
// "description" field.
String? _description;
String get description => _description ?? '';
set description(String? val) => _description = val;
bool hasDescription() => _description != null;
static DeviceStruct fromMap(Map<String, dynamic> data) => DeviceStruct(
devUUID: data['devUUID'] as String?,
version: data['version'] as String?,
description: data['description'] as String?,
);
static DeviceStruct? maybeFromMap(dynamic data) =>
data is Map ? DeviceStruct.fromMap(data.cast<String, dynamic>()) : null;
Map<String, dynamic> toMap() => {
'devUUID': _devUUID,
'version': _version,
'description': _description,
}.withoutNulls;
@override
Map<String, dynamic> toSerializableMap() => {
'devUUID': serializeParam(
_devUUID,
ParamType.String,
),
'version': serializeParam(
_version,
ParamType.String,
),
'description': serializeParam(
_description,
ParamType.String,
),
}.withoutNulls;
static DeviceStruct fromSerializableMap(Map<String, dynamic> data) =>
DeviceStruct(
devUUID: deserializeParam(
data['devUUID'],
ParamType.String,
false,
),
version: deserializeParam(
data['version'],
ParamType.String,
false,
),
description: deserializeParam(
data['description'],
ParamType.String,
false,
),
);
@override
String toString() => 'DeviceStruct(${toMap()})';
@override
bool operator ==(Object other) {
return other is DeviceStruct &&
devUUID == other.devUUID &&
version == other.version &&
description == other.description;
}
@override
int get hashCode =>
const ListEquality().hash([devUUID, version, description]);
}
DeviceStruct createDeviceStruct({
String? devUUID,
String? version,
String? description,
}) =>
DeviceStruct(
devUUID: devUUID,
version: version,
description: description,
);

View File

@ -1,3 +1,4 @@
export '/backend/schema/util/schema_util.dart';
export 'action_struct.dart';
export 'device_struct.dart';

View File

@ -0,0 +1,28 @@
// Automatic FlutterFlow imports
import '/backend/schema/structs/index.dart';
import '/backend/schema/enums/enums.dart';
import '/actions/actions.dart' as action_blocks;
import '/flutter_flow/flutter_flow_theme.dart';
import '/flutter_flow/flutter_flow_util.dart';
import 'index.dart'; // Imports other custom actions
import '/flutter_flow/custom_functions.dart'; // Imports custom functions
import 'package:flutter/material.dart';
// Begin custom action code
// DO NOT REMOVE OR MODIFY THE CODE ABOVE!
import 'dart:io';
import 'package:device_info_plus/device_info_plus.dart';
Future<String?> getDevUUID() async {
var deviceInfo = DeviceInfoPlugin();
if (Platform.isIOS) {
// import 'dart:io'
var iosDeviceInfo = await deviceInfo.iosInfo;
return iosDeviceInfo.identifierForVendor; // unique ID on iOS
} else if (Platform.isAndroid) {
var androidDeviceInfo = await deviceInfo.androidInfo;
print(AndroidDeviceInfo);
return androidDeviceInfo.serialNumber; // unique ID on Android
}
}

View File

@ -1,2 +1,3 @@
export 'convert_image_file_to_base64.dart' show convertImageFileToBase64;
export 'convert_to_upload_file.dart' show convertToUploadFile;
export 'get_dev_u_u_i_d.dart' show getDevUUID;

View File

@ -0,0 +1,179 @@
// Automatic FlutterFlow imports
import '/backend/schema/structs/index.dart';
import '/backend/schema/enums/enums.dart';
import '/actions/actions.dart' as action_blocks;
import '/flutter_flow/flutter_flow_theme.dart';
import '/flutter_flow/flutter_flow_util.dart';
import 'index.dart'; // Imports other custom widgets
import '/custom_code/actions/index.dart'; // Imports custom actions
import '/flutter_flow/custom_functions.dart'; // Imports custom functions
import 'package:flutter/material.dart';
// Begin custom widget code
// DO NOT REMOVE OR MODIFY THE CODE ABOVE!
import 'package:crop_your_image/crop_your_image.dart';
import 'package:google_fonts/google_fonts.dart';
import '/backend/firebase_storage/storage.dart';
class ImageCropper extends StatefulWidget {
const ImageCropper({
super.key,
this.width,
this.height,
this.imageFile,
this.callBackAction,
this.currentUserId,
});
final double? width;
final double? height;
final FFUploadedFile? imageFile;
final Future Function(String? url)? callBackAction;
final String? currentUserId;
@override
State<ImageCropper> createState() => _ImageCropperState();
}
class _ImageCropperState extends State<ImageCropper> {
bool loading = false;
final _crop_controller = CropController();
@override
Widget build(BuildContext context) {
return Stack(
children: [
Column(
mainAxisSize: MainAxisSize.min,
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Container(
width: widget.width ?? double.infinity,
height: (widget.height ?? 555) - 80,
child: Center(
child: Crop(
image: Uint8List.fromList(widget.imageFile!.bytes!),
controller: _crop_controller,
onCropped: (image) async {
final path = _getStoragePath(_firebasePathPrefix(),
widget.imageFile!.name!, false, 0);
uploadData(path, image).then((value) {
print('image cropped');
widget.callBackAction!.call(value!);
loading = false;
});
// add error handling here
},
aspectRatio: 1 / 1,
initialSize: 0.5,
// initialArea: Rect.fromLTWH(240, 212, 800, 600),\
//initialAreaBuilder: (rect) => Rect.fromLTRB(rect.left + 80, rect.top + 80, rect.right - 80, rect.bottom - 80),
withCircleUi: true,
baseColor: Color.fromARGB(255, 0, 3, 22),
maskColor: Colors.white.withAlpha(100),
radius: 20,
onMoved: (newRect) {
// do something with current cropping area.
},
onStatusChanged: (status) {
// do something with current CropStatus
},
cornerDotBuilder: (size, edgeAlignment) =>
const DotControl(color: Colors.white),
interactive: true,
// fixArea: true,
))),
Padding(
padding: EdgeInsetsDirectional.fromSTEB(8, 5, 8, 5),
child: ElevatedButton(
onPressed: () async {
if (!loading) {
setState(() {
loading = true;
});
print('Button pressed ...');
_crop_controller.crop();
//widget.loading = true;
}
},
style: ButtonStyle(
backgroundColor: MaterialStateProperty.all<Color>(
FlutterFlowTheme.of(context).primaryColor,
),
padding: MaterialStateProperty.all<EdgeInsetsGeometry>(
EdgeInsets.zero,
),
shape: MaterialStateProperty.all<RoundedRectangleBorder>(
RoundedRectangleBorder(
borderRadius: BorderRadius.circular(100),
side: BorderSide.none,
),
),
),
child: Container(
width: 250,
height: 50,
alignment: Alignment.center,
child: loading
? CircularProgressIndicator(
valueColor:
AlwaysStoppedAnimation<Color>(Colors.white),
)
: Text(
'Crop',
style: FlutterFlowTheme.of(context)
.subtitle2
.override(
fontFamily: 'Lexend',
color: Colors.white,
fontSize: 16,
fontWeight: FontWeight.normal,
useGoogleFonts: GoogleFonts.asMap()
.containsKey(
FlutterFlowTheme.of(context)
.subtitle2Family),
),
),
),
)),
]),
Positioned(
top: 4,
right: 4,
child: IconButton(
icon: Icon(Icons.close),
onPressed: () => Navigator.pop(context),
))
],
);
}
String _getStoragePath(
String? pathPrefix,
String filePath,
bool isVideo, [
int? index,
]) {
pathPrefix ??= _firebasePathPrefix();
pathPrefix = _removeTrailingSlash(pathPrefix);
final timestamp = DateTime.now().microsecondsSinceEpoch;
final prefix = 'cropped-';
// Workaround fixed by https://github.com/flutter/plugins/pull/3685
// (not yet in stable).
final ext = isVideo ? 'mp4' : filePath.split('.').last;
final indexStr = index != null ? '_$index' : '';
return '$pathPrefix/$prefix$timestamp$indexStr.$ext';
}
String? _removeTrailingSlash(String? path) =>
path != null && path.endsWith('/')
? path.substring(0, path.length - 1)
: path;
String _firebasePathPrefix() => 'users/${widget.currentUserId}/uploads';
}
// Set your widget name, define your parameter, and then add the
// boilerplate code using the green button on the right!

View File

@ -0,0 +1 @@
export 'image_cropper.dart' show ImageCropper;

View File

@ -0,0 +1,854 @@
import 'dart:math' as math;
import 'dart:ui' show lerpDouble;
import 'package:flutter/foundation.dart';
import 'package:flutter/gestures.dart' show DragStartBehavior;
import 'package:flutter/material.dart';
import 'package:flutter/rendering.dart';
const double _kTabHeight = 46.0;
typedef _LayoutCallback = void Function(
List<double> xOffsets, TextDirection textDirection, double width);
class _TabLabelBarRenderer extends RenderFlex {
_TabLabelBarRenderer({
required super.direction,
required super.mainAxisSize,
required super.mainAxisAlignment,
required super.crossAxisAlignment,
required TextDirection super.textDirection,
required super.verticalDirection,
required this.onPerformLayout,
});
_LayoutCallback onPerformLayout;
@override
void performLayout() {
super.performLayout();
// xOffsets will contain childCount+1 values, giving the offsets of the
// leading edge of the first tab as the first value, of the leading edge of
// the each subsequent tab as each subsequent value, and of the trailing
// edge of the last tab as the last value.
RenderBox? child = firstChild;
final List<double> xOffsets = <double>[];
while (child != null) {
final FlexParentData childParentData =
child.parentData! as FlexParentData;
xOffsets.add(childParentData.offset.dx);
assert(child.parentData == childParentData);
child = childParentData.nextSibling;
}
assert(textDirection != null);
switch (textDirection!) {
case TextDirection.rtl:
xOffsets.insert(0, size.width);
break;
case TextDirection.ltr:
xOffsets.add(size.width);
break;
}
onPerformLayout(xOffsets, textDirection!, size.width);
}
}
// This class and its renderer class only exist to report the widths of the tabs
// upon layout. The tab widths are only used at paint time (see _IndicatorPainter)
// or in response to input.
class _TabLabelBar extends Flex {
const _TabLabelBar({
required super.children,
required this.onPerformLayout,
}) : super(
direction: Axis.horizontal,
mainAxisSize: MainAxisSize.max,
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.center,
verticalDirection: VerticalDirection.down,
);
final _LayoutCallback onPerformLayout;
@override
RenderFlex createRenderObject(BuildContext context) {
return _TabLabelBarRenderer(
direction: direction,
mainAxisAlignment: mainAxisAlignment,
mainAxisSize: mainAxisSize,
crossAxisAlignment: crossAxisAlignment,
textDirection: getEffectiveTextDirection(context)!,
verticalDirection: verticalDirection,
onPerformLayout: onPerformLayout,
);
}
@override
void updateRenderObject(
BuildContext context, _TabLabelBarRenderer renderObject) {
super.updateRenderObject(context, renderObject);
renderObject.onPerformLayout = onPerformLayout;
}
}
class _IndicatorPainter extends CustomPainter {
_IndicatorPainter({
required this.controller,
required this.tabKeys,
required _IndicatorPainter? old,
}) : super(repaint: controller.animation) {
if (old != null) {
saveTabOffsets(old._currentTabOffsets, old._currentTextDirection);
}
}
final TabController controller;
final List<GlobalKey> tabKeys;
// _currentTabOffsets and _currentTextDirection are set each time TabBar
// layout is completed. These values can be null when TabBar contains no
// tabs, since there are nothing to lay out.
List<double>? _currentTabOffsets;
TextDirection? _currentTextDirection;
BoxPainter? _painter;
bool _needsPaint = false;
void markNeedsPaint() {
_needsPaint = true;
}
void dispose() {
_painter?.dispose();
}
void saveTabOffsets(List<double>? tabOffsets, TextDirection? textDirection) {
_currentTabOffsets = tabOffsets;
_currentTextDirection = textDirection;
}
// _currentTabOffsets[index] is the offset of the start edge of the tab at index, and
// _currentTabOffsets[_currentTabOffsets.length] is the end edge of the last tab.
int get maxTabIndex => _currentTabOffsets!.length - 2;
double centerOf(int tabIndex) {
assert(_currentTabOffsets != null);
assert(_currentTabOffsets!.isNotEmpty);
assert(tabIndex >= 0);
assert(tabIndex <= maxTabIndex);
return (_currentTabOffsets![tabIndex] + _currentTabOffsets![tabIndex + 1]) /
2.0;
}
@override
void paint(Canvas canvas, Size size) {
_needsPaint = false;
}
@override
bool shouldRepaint(_IndicatorPainter old) {
return _needsPaint ||
controller != old.controller ||
tabKeys.length != old.tabKeys.length ||
(!listEquals(_currentTabOffsets, old._currentTabOffsets)) ||
_currentTextDirection != old._currentTextDirection;
}
}
// This class, and TabBarScrollController, only exist to handle the case
// where a scrollable TabBar has a non-zero initialIndex. In that case we can
// only compute the scroll position's initial scroll offset (the "correct"
// pixels value) after the TabBar viewport width and scroll limits are known.
class _TabBarScrollPosition extends ScrollPositionWithSingleContext {
_TabBarScrollPosition({
required super.physics,
required super.context,
required super.oldPosition,
required this.tabBar,
}) : super(
initialPixels: null,
);
final _FlutterFlowButtonTabBarState tabBar;
bool _viewportDimensionWasNonZero = false;
// Position should be adjusted at least once.
bool _needsPixelsCorrection = true;
@override
bool applyContentDimensions(double minScrollExtent, double maxScrollExtent) {
bool result = true;
if (!_viewportDimensionWasNonZero) {
_viewportDimensionWasNonZero = viewportDimension != 0.0;
}
// If the viewport never had a non-zero dimension, we just want to jump
// to the initial scroll position to avoid strange scrolling effects in
// release mode: In release mode, the viewport temporarily may have a
// dimension of zero before the actual dimension is calculated. In that
// scenario, setting the actual dimension would cause a strange scroll
// effect without this guard because the super call below would starts a
// ballistic scroll activity.
if (!_viewportDimensionWasNonZero || _needsPixelsCorrection) {
_needsPixelsCorrection = false;
correctPixels(tabBar._initialScrollOffset(
viewportDimension, minScrollExtent, maxScrollExtent));
result = false;
}
return super.applyContentDimensions(minScrollExtent, maxScrollExtent) &&
result;
}
void markNeedsPixelsCorrection() {
_needsPixelsCorrection = true;
}
}
// This class, and TabBarScrollPosition, only exist to handle the case
// where a scrollable TabBar has a non-zero initialIndex.
class _TabBarScrollController extends ScrollController {
_TabBarScrollController(this.tabBar);
final _FlutterFlowButtonTabBarState tabBar;
@override
ScrollPosition createScrollPosition(ScrollPhysics physics,
ScrollContext context, ScrollPosition? oldPosition) {
return _TabBarScrollPosition(
physics: physics,
context: context,
oldPosition: oldPosition,
tabBar: tabBar,
);
}
}
/// A Flutterflow Design widget that displays a horizontal row of tabs.
class FlutterFlowButtonTabBar extends StatefulWidget
implements PreferredSizeWidget {
/// The [tabs] argument must not be null and its length must match the [controller]'s
/// [TabController.length].
///
/// If a [TabController] is not provided, then there must be a
/// [DefaultTabController] ancestor.
///
const FlutterFlowButtonTabBar({
super.key,
required this.tabs,
this.controller,
this.isScrollable = false,
this.useToggleButtonStyle = false,
this.dragStartBehavior = DragStartBehavior.start,
this.onTap,
this.backgroundColor,
this.unselectedBackgroundColor,
this.decoration,
this.unselectedDecoration,
this.labelStyle,
this.unselectedLabelStyle,
this.labelColor,
this.unselectedLabelColor,
this.borderWidth = 0,
this.borderColor = Colors.transparent,
this.unselectedBorderColor = Colors.transparent,
this.physics = const BouncingScrollPhysics(),
this.labelPadding = const EdgeInsets.symmetric(horizontal: 4),
this.buttonMargin = const EdgeInsets.all(4),
this.padding = EdgeInsets.zero,
this.borderRadius = 8.0,
this.elevation = 0,
});
/// Typically a list of two or more [Tab] widgets.
///
/// The length of this list must match the [controller]'s [TabController.length]
/// and the length of the [TabBarView.children] list.
final List<Widget> tabs;
/// This widget's selection and animation state.
///
/// If [TabController] is not provided, then the value of [DefaultTabController.of]
/// will be used.
final TabController? controller;
/// Whether this tab bar can be scrolled horizontally.
///
/// If [isScrollable] is true, then each tab is as wide as needed for its label
/// and the entire [FlutterFlowButtonTabBar] is scrollable. Otherwise each tab gets an equal
/// share of the available space.
final bool isScrollable;
/// Whether the tab buttons should be styled as toggle buttons.
final bool useToggleButtonStyle;
/// The background [Color] of the button on its selected state.
final Color? backgroundColor;
/// The background [Color] of the button on its unselected state.
final Color? unselectedBackgroundColor;
/// The [BoxDecoration] of the button on its selected state.
///
/// If [BoxDecoration] is not provided, [backgroundColor] is used.
final BoxDecoration? decoration;
/// The [BoxDecoration] of the button on its unselected state.
///
/// If [BoxDecoration] is not provided, [unselectedBackgroundColor] is used.
final BoxDecoration? unselectedDecoration;
/// The [TextStyle] of the button's [Text] on its selected state. The color provided
/// on the TextStyle will be used for the [Icon]'s color.
final TextStyle? labelStyle;
/// The color of selected tab labels.
final Color? labelColor;
/// The color of unselected tab labels.
final Color? unselectedLabelColor;
/// The [TextStyle] of the button's [Text] on its unselected state. The color provided
/// on the TextStyle will be used for the [Icon]'s color.
final TextStyle? unselectedLabelStyle;
/// The with of solid [Border] for each button. If no value is provided, the border
/// is not drawn.
final double borderWidth;
/// The [Color] of solid [Border] for each button.
final Color? borderColor;
/// The [Color] of solid [Border] for each button. If no value is provided, the value of
/// [this.borderColor] is used.
final Color? unselectedBorderColor;
/// The [EdgeInsets] used for the [Padding] of the buttons' content.
///
/// The default value is [EdgeInsets.symmetric(horizontal: 4)].
final EdgeInsetsGeometry labelPadding;
/// The [EdgeInsets] used for the [Margin] of the buttons.
///
/// The default value is [EdgeInsets.all(4)].
final EdgeInsetsGeometry buttonMargin;
/// The amount of space by which to inset the tab bar.
final EdgeInsetsGeometry? padding;
/// The value of the [BorderRadius.circular] applied to each button.
final double borderRadius;
/// The value of the [elevation] applied to each button.
final double elevation;
final DragStartBehavior dragStartBehavior;
final ValueChanged<int>? onTap;
final ScrollPhysics? physics;
/// A size whose height depends on if the tabs have both icons and text.
///
/// [AppBar] uses this size to compute its own preferred size.
@override
Size get preferredSize {
double maxHeight = _kTabHeight;
for (final Widget item in tabs) {
if (item is PreferredSizeWidget) {
final double itemHeight = item.preferredSize.height;
maxHeight = math.max(itemHeight, maxHeight);
}
}
return Size.fromHeight(
maxHeight + labelPadding.vertical + buttonMargin.vertical);
}
@override
State<FlutterFlowButtonTabBar> createState() =>
_FlutterFlowButtonTabBarState();
}
class _FlutterFlowButtonTabBarState extends State<FlutterFlowButtonTabBar>
with TickerProviderStateMixin {
ScrollController? _scrollController;
TabController? _controller;
_IndicatorPainter? _indicatorPainter;
late AnimationController _animationController;
int _currentIndex = 0;
int _prevIndex = -1;
late double _tabStripWidth;
late List<GlobalKey> _tabKeys;
final GlobalKey _tabsParentKey = GlobalKey();
bool _debugHasScheduledValidTabsCountCheck = false;
@override
void initState() {
super.initState();
// If indicatorSize is TabIndicatorSize.label, _tabKeys[i] is used to find
// the width of tab widget i. See _IndicatorPainter.indicatorRect().
_tabKeys = widget.tabs.map((tab) => GlobalKey()).toList();
/// The animation duration is 2/3 of the tab scroll animation duration in
/// Material design (kTabScrollDuration).
_animationController = AnimationController(
vsync: this, duration: const Duration(milliseconds: 200));
// so the buttons start in their "final" state (color)
_animationController
..value = 1.0
..addListener(() {
if (mounted) {
setState(() {});
}
});
}
// If the TabBar is rebuilt with a new tab controller, the caller should
// dispose the old one. In that case the old controller's animation will be
// null and should not be accessed.
bool get _controllerIsValid => _controller?.animation != null;
void _updateTabController() {
final TabController? newController =
widget.controller ?? DefaultTabController.maybeOf(context);
assert(() {
if (newController == null) {
throw FlutterError(
'No TabController for ${widget.runtimeType}.\n'
'When creating a ${widget.runtimeType}, you must either provide an explicit '
'TabController using the "controller" property, or you must ensure that there '
'is a DefaultTabController above the ${widget.runtimeType}.\n'
'In this case, there was neither an explicit controller nor a default controller.',
);
}
return true;
}());
if (newController == _controller) {
return;
}
if (_controllerIsValid) {
_controller!.animation!.removeListener(_handleTabControllerAnimationTick);
_controller!.removeListener(_handleTabControllerTick);
}
_controller = newController;
if (_controller != null) {
_controller!.animation!.addListener(_handleTabControllerAnimationTick);
_controller!.addListener(_handleTabControllerTick);
_currentIndex = _controller!.index;
}
}
void _initIndicatorPainter() {
_indicatorPainter = !_controllerIsValid
? null
: _IndicatorPainter(
controller: _controller!,
tabKeys: _tabKeys,
old: _indicatorPainter,
);
}
@override
void didChangeDependencies() {
super.didChangeDependencies();
assert(debugCheckHasMaterial(context));
_updateTabController();
_initIndicatorPainter();
}
@override
void didUpdateWidget(FlutterFlowButtonTabBar oldWidget) {
super.didUpdateWidget(oldWidget);
if (widget.controller != oldWidget.controller) {
_updateTabController();
_initIndicatorPainter();
// Adjust scroll position.
if (_scrollController != null) {
final ScrollPosition position = _scrollController!.position;
if (position is _TabBarScrollPosition) {
position.markNeedsPixelsCorrection();
}
}
}
if (widget.tabs.length > _tabKeys.length) {
final int delta = widget.tabs.length - _tabKeys.length;
_tabKeys.addAll(List<GlobalKey>.generate(delta, (int n) => GlobalKey()));
} else if (widget.tabs.length < _tabKeys.length) {
_tabKeys.removeRange(widget.tabs.length, _tabKeys.length);
}
}
@override
void dispose() {
_indicatorPainter!.dispose();
if (_controllerIsValid) {
_controller!.animation!.removeListener(_handleTabControllerAnimationTick);
_controller!.removeListener(_handleTabControllerTick);
}
_controller = null;
// We don't own the _controller Animation, so it's not disposed here.
super.dispose();
}
int get maxTabIndex => _indicatorPainter!.maxTabIndex;
double _tabScrollOffset(
int index, double viewportWidth, double minExtent, double maxExtent) {
if (!widget.isScrollable) {
return 0.0;
}
double tabCenter = _indicatorPainter!.centerOf(index);
double paddingStart;
switch (Directionality.of(context)) {
case TextDirection.rtl:
paddingStart = widget.padding?.resolve(TextDirection.rtl).right ?? 0;
tabCenter = _tabStripWidth - tabCenter;
break;
case TextDirection.ltr:
paddingStart = widget.padding?.resolve(TextDirection.ltr).left ?? 0;
break;
}
return clampDouble(
tabCenter + paddingStart - viewportWidth / 2.0, minExtent, maxExtent);
}
double _tabCenteredScrollOffset(int index) {
final ScrollPosition position = _scrollController!.position;
return _tabScrollOffset(index, position.viewportDimension,
position.minScrollExtent, position.maxScrollExtent);
}
double _initialScrollOffset(
double viewportWidth, double minExtent, double maxExtent) {
return _tabScrollOffset(_currentIndex, viewportWidth, minExtent, maxExtent);
}
void _scrollToCurrentIndex() {
final double offset = _tabCenteredScrollOffset(_currentIndex);
_scrollController!
.animateTo(offset, duration: kTabScrollDuration, curve: Curves.ease);
}
void _scrollToControllerValue() {
final double? leadingPosition =
_currentIndex > 0 ? _tabCenteredScrollOffset(_currentIndex - 1) : null;
final double middlePosition = _tabCenteredScrollOffset(_currentIndex);
final double? trailingPosition = _currentIndex < maxTabIndex
? _tabCenteredScrollOffset(_currentIndex + 1)
: null;
final double index = _controller!.index.toDouble();
final double value = _controller!.animation!.value;
final double offset;
if (value == index - 1.0) {
offset = leadingPosition ?? middlePosition;
} else if (value == index + 1.0) {
offset = trailingPosition ?? middlePosition;
} else if (value == index) {
offset = middlePosition;
} else if (value < index) {
offset = leadingPosition == null
? middlePosition
: lerpDouble(middlePosition, leadingPosition, index - value)!;
} else {
offset = trailingPosition == null
? middlePosition
: lerpDouble(middlePosition, trailingPosition, value - index)!;
}
_scrollController!.jumpTo(offset);
}
void _handleTabControllerAnimationTick() {
assert(mounted);
if (!_controller!.indexIsChanging && widget.isScrollable) {
// Sync the TabBar's scroll position with the TabBarView's PageView.
_currentIndex = _controller!.index;
_scrollToControllerValue();
}
}
void _handleTabControllerTick() {
if (_controller!.index != _currentIndex) {
_prevIndex = _currentIndex;
_currentIndex = _controller!.index;
_triggerAnimation();
if (widget.isScrollable) {
_scrollToCurrentIndex();
}
}
setState(() {
// Rebuild the tabs after a (potentially animated) index change
// has completed.
});
}
void _triggerAnimation() {
// reset the animation so it's ready to go
_animationController
..reset()
..forward();
}
// Called each time layout completes.
void _saveTabOffsets(
List<double> tabOffsets, TextDirection textDirection, double width) {
_tabStripWidth = width;
_indicatorPainter?.saveTabOffsets(tabOffsets, textDirection);
}
void _handleTap(int index) {
assert(index >= 0 && index < widget.tabs.length);
_controller?.animateTo(index);
widget.onTap?.call(index);
}
Widget _buildStyledTab(Widget child, int index) {
final TabBarTheme tabBarTheme = TabBarTheme.of(context);
final double animationValue;
if (index == _currentIndex) {
animationValue = _animationController.value;
} else if (index == _prevIndex) {
animationValue = 1 - _animationController.value;
} else {
animationValue = 0;
}
final TextStyle? textStyle = TextStyle.lerp(
(widget.unselectedLabelStyle ??
tabBarTheme.labelStyle ??
DefaultTextStyle.of(context).style)
.copyWith(
color: widget.unselectedLabelColor,
),
(widget.labelStyle ??
tabBarTheme.labelStyle ??
DefaultTextStyle.of(context).style)
.copyWith(
color: widget.labelColor,
),
animationValue);
final Color? textColor = Color.lerp(
widget.unselectedLabelColor, widget.labelColor, animationValue);
final Color? borderColor = Color.lerp(
widget.unselectedBorderColor, widget.borderColor, animationValue);
BoxDecoration? boxDecoration = BoxDecoration.lerp(
BoxDecoration(
color: widget.unselectedDecoration?.color ??
widget.unselectedBackgroundColor ??
Colors.transparent,
boxShadow: widget.unselectedDecoration?.boxShadow,
gradient: widget.unselectedDecoration?.gradient,
borderRadius: widget.useToggleButtonStyle
? null
: BorderRadius.circular(widget.borderRadius),
),
BoxDecoration(
color: widget.decoration?.color ??
widget.backgroundColor ??
Colors.transparent,
boxShadow: widget.decoration?.boxShadow,
gradient: widget.decoration?.gradient,
borderRadius: widget.useToggleButtonStyle
? null
: BorderRadius.circular(widget.borderRadius),
),
animationValue);
if (widget.useToggleButtonStyle &&
widget.borderWidth > 0 &&
boxDecoration != null) {
if (index == 0) {
boxDecoration = boxDecoration.copyWith(
border: Border(
right: BorderSide(
color: widget.unselectedBorderColor ?? Colors.transparent,
width: widget.borderWidth / 2,
),
),
);
} else if (index == widget.tabs.length - 1) {
boxDecoration = boxDecoration.copyWith(
border: Border(
left: BorderSide(
color: widget.unselectedBorderColor ?? Colors.transparent,
width: widget.borderWidth / 2,
),
),
);
} else {
boxDecoration = boxDecoration.copyWith(
border: Border.symmetric(
vertical: BorderSide(
color: widget.unselectedBorderColor ?? Colors.transparent,
width: widget.borderWidth / 2,
),
),
);
}
}
return Padding(
key: _tabKeys[index],
// padding for the buttons
padding:
widget.useToggleButtonStyle ? EdgeInsets.zero : widget.buttonMargin,
child: TextButton(
onPressed: () => _handleTap(index),
style: ButtonStyle(
elevation: MaterialStateProperty.all(
widget.useToggleButtonStyle ? 0 : widget.elevation),
/// give a pretty small minimum size
minimumSize: MaterialStateProperty.all(const Size(10, 10)),
padding: MaterialStateProperty.all(EdgeInsets.zero),
textStyle: MaterialStateProperty.all(textStyle),
foregroundColor: MaterialStateProperty.all(textColor),
tapTargetSize: MaterialTapTargetSize.shrinkWrap,
shape: MaterialStateProperty.all(
widget.useToggleButtonStyle
? const RoundedRectangleBorder(
side: BorderSide.none,
borderRadius: BorderRadius.zero,
)
: RoundedRectangleBorder(
side: (widget.borderWidth == 0)
? BorderSide.none
: BorderSide(
color: borderColor ?? Colors.transparent,
width: widget.borderWidth,
),
borderRadius: BorderRadius.circular(widget.borderRadius),
),
),
),
child: Ink(
decoration: boxDecoration,
child: Container(
padding: widget.labelPadding,
alignment: Alignment.center,
child: child,
),
),
),
);
}
bool _debugScheduleCheckHasValidTabsCount() {
if (_debugHasScheduledValidTabsCountCheck) {
return true;
}
WidgetsBinding.instance.addPostFrameCallback((Duration duration) {
_debugHasScheduledValidTabsCountCheck = false;
if (!mounted) {
return;
}
assert(() {
if (_controller!.length != widget.tabs.length) {
throw FlutterError(
"Controller's length property (${_controller!.length}) does not match the "
"number of tabs (${widget.tabs.length}) present in TabBar's tabs property.",
);
}
return true;
}());
});
_debugHasScheduledValidTabsCountCheck = true;
return true;
}
@override
Widget build(BuildContext context) {
assert(_debugScheduleCheckHasValidTabsCount());
if (_controller!.length == 0) {
return Container(
height: _kTabHeight +
widget.labelPadding.vertical +
widget.buttonMargin.vertical,
);
}
final List<Widget> wrappedTabs =
List<Widget>.generate(widget.tabs.length, (int index) {
return _buildStyledTab(widget.tabs[index], index);
});
final int tabCount = widget.tabs.length;
// Add the tap handler to each tab. If the tab bar is not scrollable,
// then give all of the tabs equal flexibility so that they each occupy
// the same share of the tab bar's overall width.
for (int index = 0; index < tabCount; index += 1) {
if (!widget.isScrollable) {
wrappedTabs[index] = Expanded(child: wrappedTabs[index]);
}
}
Widget tabBar = AnimatedBuilder(
animation: _animationController,
key: _tabsParentKey,
builder: (context, child) {
Widget tabBarTemp = _TabLabelBar(
onPerformLayout: _saveTabOffsets,
children: wrappedTabs,
);
if (widget.useToggleButtonStyle) {
tabBarTemp = Material(
shape: widget.useToggleButtonStyle
? RoundedRectangleBorder(
side: (widget.borderWidth == 0)
? BorderSide.none
: BorderSide(
color: widget.borderColor ?? Colors.transparent,
width: widget.borderWidth,
style: BorderStyle.solid,
),
borderRadius: BorderRadius.circular(widget.borderRadius),
)
: null,
elevation: widget.useToggleButtonStyle ? widget.elevation : 0,
clipBehavior: Clip.antiAliasWithSaveLayer,
child: tabBarTemp,
);
}
return CustomPaint(
painter: _indicatorPainter,
child: tabBarTemp,
);
},
);
if (widget.isScrollable) {
_scrollController ??= _TabBarScrollController(this);
tabBar = SingleChildScrollView(
dragStartBehavior: widget.dragStartBehavior,
scrollDirection: Axis.horizontal,
controller: _scrollController,
padding: widget.padding,
physics: widget.physics,
child: tabBar,
);
} else if (widget.padding != null) {
tabBar = Padding(
padding: widget.padding!,
child: tabBar,
);
}
return tabBar;
}
}

View File

@ -0,0 +1,341 @@
import 'dart:math' as math;
import 'package:data_table_2/data_table_2.dart';
import 'package:flutter/material.dart';
export 'package:data_table_2/data_table_2.dart' show DataColumn2;
const _kDataTableHorizontalMargin = 48.0;
const kDefaultColumnSpacing = 56.0;
const _kMinRowsPerPage = 5;
typedef ColumnsBuilder<T> = List<DataColumn> Function(void Function(int, bool));
typedef DataRowBuilder<T> = DataRow? Function(
T, int, bool, void Function(bool?)?);
class FlutterFlowDataTableController<T> extends DataTableSource {
FlutterFlowDataTableController({
List<T>? initialData,
int? numRows,
PaginatorController? paginatorController,
bool selectable = false,
}) {
data = initialData?.toList() ?? [];
numRows = numRows;
this.paginatorController = paginatorController ?? PaginatorController();
_selectable = selectable;
}
DataRowBuilder<T>? _dataRowBuilder;
late PaginatorController paginatorController;
List<T> data = [];
int? _numRows;
List<T> get selectedData =>
selectedRows.where((i) => i < data.length).map(data.elementAt).toList();
bool _selectable = false;
final Set<int> selectedRows = {};
int rowsPerPage = defaultRowsPerPage;
int? sortColumnIndex;
bool sortAscending = true;
void init({
DataRowBuilder<T>? dataRowBuilder,
bool? selectable,
List<T>? initialData,
int? initialNumRows,
}) {
_dataRowBuilder = dataRowBuilder ?? _dataRowBuilder;
_selectable = selectable ?? _selectable;
data = initialData?.toList() ?? data;
_numRows = initialNumRows;
}
void updateData({
List<T>? data,
int? numRows,
bool notify = true,
}) {
this.data = data?.toList() ?? this.data;
_numRows = numRows ?? _numRows;
if (notify) {
notifyListeners();
}
}
void updateSort({
required int columnIndex,
required bool ascending,
Function(int, bool)? onSortChanged,
}) {
sortColumnIndex = columnIndex;
sortAscending = ascending;
if (onSortChanged != null) {
onSortChanged(columnIndex, ascending);
}
notifyListeners();
}
@override
DataRow? getRow(int index) {
final row = data.elementAtOrNull(index);
return _dataRowBuilder != null && row != null
? _dataRowBuilder!(
row,
index,
selectedRows.contains(index),
_selectable
? (selected) {
if (selected == null) {
return;
}
selected
? selectedRows.add(index)
: selectedRows.remove(index);
notifyListeners();
}
: null,
)
: null;
}
@override
bool get isRowCountApproximate => false;
@override
int get rowCount => _numRows ?? data.length;
@override
int get selectedRowCount => selectedRows.length;
}
class FlutterFlowDataTable<T> extends StatefulWidget {
const FlutterFlowDataTable({
super.key,
required this.controller,
required this.data,
this.numRows,
required this.columnsBuilder,
required this.dataRowBuilder,
this.emptyBuilder,
this.onPageChanged,
this.onSortChanged,
this.onRowsPerPageChanged,
this.paginated = true,
this.selectable = false,
this.hidePaginator = false,
this.showFirstLastButtons = false,
this.width,
this.height,
this.minWidth,
this.headingRowHeight = 56,
this.dataRowHeight = kMinInteractiveDimension,
this.columnSpacing = kDefaultColumnSpacing,
this.headingRowColor,
this.sortIconColor,
this.borderRadius,
this.addHorizontalDivider = true,
this.addTopAndBottomDivider = false,
this.hideDefaultHorizontalDivider = false,
this.addVerticalDivider = false,
this.horizontalDividerColor,
this.horizontalDividerThickness,
this.verticalDividerColor,
this.verticalDividerThickness,
this.checkboxUnselectedFillColor,
this.checkboxSelectedFillColor,
this.checkboxUnselectedBorderColor,
this.checkboxSelectedBorderColor,
this.checkboxCheckColor,
});
final FlutterFlowDataTableController<T> controller;
final List<T> data;
final int? numRows;
final ColumnsBuilder columnsBuilder;
final DataRowBuilder<T> dataRowBuilder;
final Widget? Function()? emptyBuilder;
// Callback functions
final Function(int)? onPageChanged;
final Function(int, bool)? onSortChanged;
final Function(int)? onRowsPerPageChanged;
// Functionality options
final bool paginated;
final bool selectable;
final bool showFirstLastButtons;
final bool hidePaginator;
// Size and shape options
final double? width;
final double? height;
final double? minWidth;
final double headingRowHeight;
final double dataRowHeight;
final double columnSpacing;
// Table style options
final Color? headingRowColor;
final Color? sortIconColor;
final BorderRadius? borderRadius;
final bool addHorizontalDivider;
final bool addTopAndBottomDivider;
final bool hideDefaultHorizontalDivider;
final Color? horizontalDividerColor;
final double? horizontalDividerThickness;
final bool addVerticalDivider;
final Color? verticalDividerColor;
final double? verticalDividerThickness;
// Checkbox style options
final Color? checkboxUnselectedFillColor;
final Color? checkboxSelectedFillColor;
final Color? checkboxUnselectedBorderColor;
final Color? checkboxSelectedBorderColor;
final Color? checkboxCheckColor;
@override
State<FlutterFlowDataTable<T>> createState() =>
_FlutterFlowDataTableState<T>();
}
class _FlutterFlowDataTableState<T> extends State<FlutterFlowDataTable<T>> {
FlutterFlowDataTableController<T> get controller => widget.controller;
int get rowCount => controller.rowCount;
int get initialRowsPerPage =>
rowCount > _kMinRowsPerPage ? defaultRowsPerPage : _kMinRowsPerPage;
@override
void initState() {
super.initState();
dataTableShowLogs = false; // Disables noisy DataTable2 debug statements.
controller.init(
dataRowBuilder: widget.dataRowBuilder,
selectable: widget.selectable,
initialData: widget.data,
initialNumRows: widget.numRows,
);
// ignore: cascade_invocations
controller.addListener(() => setState(() {}));
}
@override
void didUpdateWidget(FlutterFlowDataTable<T> oldWidget) {
super.didUpdateWidget(oldWidget);
controller.updateData(
data: widget.data,
numRows: widget.numRows,
notify: true,
);
}
@override
Widget build(BuildContext context) {
final columns = widget.columnsBuilder(
(index, ascending) {
controller.updateSort(
columnIndex: index,
ascending: ascending,
onSortChanged: widget.onSortChanged,
);
setState(() {});
},
);
final checkboxThemeData = CheckboxThemeData(
checkColor: MaterialStateProperty.all(
widget.checkboxCheckColor ?? Colors.black54,
),
fillColor: MaterialStateProperty.resolveWith(
(states) => states.contains(MaterialState.selected)
? widget.checkboxSelectedFillColor ?? Colors.white.withOpacity(0.01)
: widget.checkboxUnselectedFillColor ??
Colors.white.withOpacity(0.01),
),
side: MaterialStateBorderSide.resolveWith(
(states) => BorderSide(
width: 2.0,
color: states.contains(MaterialState.selected)
? widget.checkboxSelectedBorderColor ?? Colors.black54
: widget.checkboxUnselectedBorderColor ?? Colors.black54,
),
),
overlayColor: MaterialStateProperty.all(Colors.transparent),
);
final horizontalBorder = widget.addHorizontalDivider
? BorderSide(
color: widget.horizontalDividerColor ?? Colors.transparent,
width: widget.horizontalDividerThickness ?? 1.0,
)
: BorderSide.none;
return ClipRRect(
borderRadius: widget.borderRadius ?? BorderRadius.zero,
child: SizedBox(
width: widget.width,
height: widget.height,
child: Theme(
data: Theme.of(context).copyWith(
iconTheme: widget.sortIconColor != null
? IconThemeData(color: widget.sortIconColor)
: null,
),
child: PaginatedDataTable2(
source: controller,
controller:
widget.paginated ? controller.paginatorController : null,
rowsPerPage: widget.paginated ? initialRowsPerPage : rowCount,
availableRowsPerPage: const [5, 10, 25, 50, 100],
onPageChanged: widget.onPageChanged != null
? (index) => widget.onPageChanged!(index)
: null,
columnSpacing: widget.columnSpacing,
onRowsPerPageChanged: widget.paginated
? (value) {
controller.rowsPerPage = value ?? initialRowsPerPage;
if (widget.onRowsPerPageChanged != null) {
widget.onRowsPerPageChanged!(controller.rowsPerPage);
}
}
: null,
columns: columns,
empty: widget.emptyBuilder != null ? widget.emptyBuilder!() : null,
sortColumnIndex: controller.sortColumnIndex,
sortAscending: controller.sortAscending,
showCheckboxColumn: widget.selectable,
datarowCheckboxTheme: checkboxThemeData,
headingCheckboxTheme: checkboxThemeData,
hidePaginator: !widget.paginated || widget.hidePaginator,
wrapInCard: false,
renderEmptyRowsInTheEnd: false,
border: TableBorder(
horizontalInside: horizontalBorder,
verticalInside: widget.addVerticalDivider
? BorderSide(
color: widget.verticalDividerColor ?? Colors.transparent,
width: widget.verticalDividerThickness ?? 1.0,
)
: BorderSide.none,
bottom: widget.addTopAndBottomDivider
? horizontalBorder
: BorderSide.none,
),
dividerThickness: widget.hideDefaultHorizontalDivider ? 0.0 : null,
headingRowColor: MaterialStateProperty.all(widget.headingRowColor),
headingRowHeight: widget.headingRowHeight,
dataRowHeight: widget.dataRowHeight,
showFirstLastButtons: widget.showFirstLastButtons,
minWidth: math.max(widget.minWidth ?? 0, _getColumnsWidth(columns)),
),
),
),
);
}
// Return the total fixed width of all columns that have a specified width,
// plus one to make the data table scrollable if there is insufficient space.
double _getColumnsWidth(List<DataColumn> columns) =>
columns.where((c) => c is DataColumn2 && c.fixedWidth != null).fold(
((widget.selectable ? 2 : 1) * _kDataTableHorizontalMargin) + 1,
(sum, col) => sum + (col as DataColumn2).fixedWidth!,
);
}

View File

@ -66,6 +66,8 @@ abstract class FlutterFlowTheme {
late Color customColor1;
late Color customColor2;
late Color customColor3;
late Color customColor4;
late Color customColor5;
@Deprecated('Use displaySmallFamily instead')
String get title1Family => displaySmallFamily;
@ -164,7 +166,7 @@ class LightModeTheme extends FlutterFlowTheme {
late Color accent1 = const Color(0xFF1AAB5F);
late Color accent2 = const Color(0x4D000000);
late Color accent3 = const Color(0xFFFFFFFF);
late Color accent4 = const Color(0xFFFFFFFF);
late Color accent4 = const Color(0xFF1AAB5F);
late Color success = const Color(0xFF1AAB5F);
late Color warning = const Color(0xFFF3C344);
late Color error = const Color(0xFFD70000);
@ -173,6 +175,8 @@ class LightModeTheme extends FlutterFlowTheme {
late Color customColor1 = const Color(0xFF000000);
late Color customColor2 = const Color(0xFF1AAB5F);
late Color customColor3 = const Color(0xFFFFFFFF);
late Color customColor4 = const Color(0xFFCFCFCF);
late Color customColor5 = const Color(0xFF979595);
}
abstract class Typography {
@ -569,6 +573,8 @@ class DarkModeTheme extends FlutterFlowTheme {
late Color customColor1 = const Color(0xFFFFFFFF);
late Color customColor2 = const Color(0xFFFFFFFF);
late Color customColor3 = const Color(0xFF1AAB5F);
late Color customColor4 = const Color(0xFF232323);
late Color customColor5 = const Color(0xFF232323);
}
extension TextStyleHelper on TextStyle {

View File

@ -14,6 +14,7 @@ import 'package:url_launcher/url_launcher.dart';
import '../main.dart';
export 'keep_alive_wrapper.dart';
export 'lat_lng.dart';
export 'place.dart';
export 'uploaded_file.dart';

View File

@ -107,43 +107,43 @@ Locale createLocale(String language) => language.contains('_')
final kTranslationsMap = <Map<String, Map<String, String>>>[
// LoginPage
{
'uem0mca5': {
'0113wf5c': {
'pt': 'VAMOS LA! ENTRE COM A SUA CONTA',
'en': 'LET\'S GO! SIGN IN WITH YOUR ACCOUNT',
},
'90ls8ppo': {
'f2go5a71': {
'pt': 'Email',
'en': 'Email',
},
'rvlumyaw': {
'paon3y0v': {
'pt': 'Senha',
'en': 'Password',
},
'2d3903lt': {
'wmbzwstw': {
'pt': 'Entrar',
'en': 'Sign-In',
},
'zj6pyujp': {
'j8567afe': {
'pt': 'Cadastrar',
'en': 'Sign-Up',
},
'iqhyif1d': {
'y3wd9q18': {
'pt': 'Entrar',
'en': 'Sign-In',
},
'5x5bp2u1': {
'j6ufb6sq': {
'pt': 'Cadastrar',
'en': 'Sign-Up',
},
'1fqjz9q7': {
'h85112qs': {
'pt': 'Você esqueceu a sua senha?',
'en': 'Have you forgotten your password?',
},
'7miyd406': {
'di48hdaj': {
'pt': ' Recupere aqui',
'en': 'recover here',
},
'63xv5ewj': {
'gx2fp6zq': {
'pt': 'Termo de Uso',
'en': 'Terms of use',
},
@ -154,25 +154,25 @@ final kTranslationsMap = <Map<String, Map<String, String>>>[
},
// ForgotPasswordPage
{
'lpduiuif': {
'gfvplb0h': {
'pt': 'ESQUECEU SUA SENHA?',
'en': 'FORGOT YOUR PASSWORD?',
},
'8t05j98w': {
'azssgpdi': {
'pt':
'Não se preucupe nós vamos te ajudar, digite o email cadastrado no aplicativo e clique em enviar.',
'en':
'Don\'t worry, we will help you, enter the email registered in the application and click send.',
},
'4gcoci7a': {
'0o139961': {
'pt': 'Email',
'en': 'Email',
},
'a7p2iikz': {
'aanw1fp3': {
'pt': 'digite o seu email.....',
'en': 'enter your email.....',
},
'z9ghb8dz': {
'e7hdgc4q': {
'pt': 'Enviar',
'en': 'To send',
},
@ -234,39 +234,39 @@ final kTranslationsMap = <Map<String, Map<String, String>>>[
},
// RegisterPage
{
'oxy0n1p4': {
'2d8uulm3': {
'pt': 'INSIRA SEU EMAIL E SENHA, VAMOS TE CADASTRAR!',
'en': 'ENTER YOUR EMAIL AND PASSWORD, LET\'S REGISTER YOU!',
},
'w0y3fz89': {
'8kjhi406': {
'pt': 'Nome',
'en': 'Name',
},
'4bfdpd0o': {
'ro4zkkxp': {
'pt': 'Email',
'en': 'Email',
},
'v0iobs5a': {
'j5yny8ee': {
'pt': '',
'en': '',
},
'byjglkpk': {
'lzgobioa': {
'pt': 'Senha',
'en': 'Password',
},
'w9vrsnmf': {
'c7sfyeh8': {
'pt': 'Cadastrar-se',
'en': 'Sign-Up',
},
'zep60lcd': {
'jglpa1tr': {
'pt': 'Você já tem uma conta? ',
'en': 'You already have an account?',
},
'tl8k1ld9': {
'hfcm0td9': {
'pt': 'Clique aqui',
'en': 'Click here',
},
'dbtzii7i': {
'c3kno4t9': {
'pt': 'Termo de Uso',
'en': '',
},
@ -277,27 +277,27 @@ final kTranslationsMap = <Map<String, Map<String, String>>>[
},
// WelcomePage
{
'3pl41wkq': {
'xflxvs9y': {
'pt': 'UMA EXPERIÊCIA COMPLETA',
'en': 'A COMPLETE EXPERIENCE',
},
'13nhoxpg': {
'5a86wzd1': {
'pt': 'COM CONFORTO ONDE VOCÊ ESTIVER.',
'en': 'WITH COMFORT WHEREVER YOU ARE.',
},
'zt5uc5g5': {
'65nuva6j': {
'pt': 'Entrar',
'en': 'Sign-In',
},
'jteakpo0': {
'9u6oaw01': {
'pt': 'Cadastrar',
'en': 'Sign-Up',
},
'qoc86gvo': {
'd1qem43w': {
'pt': 'Entrar',
'en': 'Sign-In',
},
'p5tgmj0c': {
'bhowzv2u': {
'pt': 'Cadastrar',
'en': 'Sign-Up',
},
@ -371,86 +371,114 @@ final kTranslationsMap = <Map<String, Map<String, String>>>[
},
// scheduleCompleteVisitPage
{
'e4w9lbke': {
'pt': 'Criar Agendamento',
'en': 'Create Schedule',
},
'47bsumoy': {
'pt': 'Histórico de Visitas',
'en': 'Visit History',
},
'15ekd1ge': {
'61lcxdgm': {
'pt': 'Agendar Visita',
'en': 'Schedule Visit',
},
'qo0pg2at': {
'ueth1f4g': {
'pt': 'Cadastrar Visita',
'en': 'Register Visit',
},
'u0jocx7e': {
'pt': 'Quais visitantes você deseja cadastrar?',
'en': 'Which visitors do you want to register?',
},
'i0jhuu3e': {
'r8soavtz': {
'pt': 'Clique para adicionar um visitante',
'en': 'Click to add photo for visitor',
'en': 'Click to add a visitor',
},
'z4ry3tge': {
'98evnbbe': {
'pt': 'Qual o período de validade da visita?',
'en': 'Visit Validity Period',
},
'9mg9nv2j': {
'pt': 'Ínicio da Visita',
'en': 'Start of the Visit',
'qygj6ra5': {
'pt': 'Inicio da Visita',
'en': 'Start of Visit',
},
'y5s85khj': {
'pt': 'Quando a visitas se inicia?',
'en': 'When does the visit start?',
},
'4o0cbb70': {
'pt': 'Término da Visita',
'bv2edxku': {
'pt': '',
'en': 'End of Visit',
},
'bhmgddc4': {
'53cbwqh9': {
'pt': 'Quando você inicia a visita?',
'en': 'When do you start the visit?',
},
'p4ws3t66': {
'pt': 'Fim da Visita',
'en': 'End of Visit',
},
'yw6d2jj8': {
'pt': '',
'en': 'End of Visit',
},
'xpgc5e8d': {
'pt': 'Quando a visita terminá?',
'en': 'When will the visit end?',
},
'p81uol2v': {
'0meymh6u': {
'pt': 'Quais são os motivos da visita?',
'en': 'What are the reasons for the visit?',
},
'x1ij847i': {
'2f68zi9t': {
'pt': 'Motivo da Visita',
'en': 'End of Visit',
},
'6p3e0bzr': {
'pt': 'Escolha um motivo aqui',
'en': 'Choose a reason here',
},
'ejyyypuz': {
'taxe2jy2': {
'pt': 'Search for an item...',
'en': '',
},
'kmgv5j7x': {
'il4di4ln': {
'pt': 'Nível de Acesso',
'en': 'End of Visit',
},
'2wun8p6c': {
'pt': 'Escolha um nível de acesso aqui',
'en': 'Choose an access level here',
},
'izwi0ya7': {
'stweh7pd': {
'pt': 'Search for an item...',
'en': '',
},
'mddp33o0': {
'8rk26eg1': {
'pt': 'Visita se encerra após o primeiro acesso?',
'en': 'Does the visit end after the first access?',
},
'68j9gw4h': {
'lgv0q5ht': {
'pt': 'Visita única',
'en': 'Single visit',
},
'9rudpkq7': {
'eftcs67c': {
'pt': 'Você tem alguma observação sobre está visita?',
'en': 'Do you have any observations about this visit?',
},
'4rgpxrfe': {
't0q2vuup': {
'pt': 'Observações da Visita',
'en': 'Visit Observations',
},
'7knytis2': {
'w18iztdm': {
'pt': 'Escreva as suas observações aqui',
'en': 'Write your observations here',
},
'k4uraqam': {
'pt': 'Histórico de Visitas',
'en': 'Visit History',
},
'i46frqyi': {
'pt': 'Visitante: ',
'en': 'Visitor:',
},
'73b1kj59': {
'pt': 'Início em: ',
'en': 'Beginning in:',
},
'klzzrfbn': {
'pt': 'Fim em: ',
'en': 'End in:',
},
'v3mpyspm': {
'pt': 'scheduleVisit',
'en': '',
@ -511,7 +539,47 @@ final kTranslationsMap = <Map<String, Map<String, String>>>[
'en': '',
},
},
// visitorDetailsModal
// onBoardingPage
{
'6exl3e75': {
'pt': 'Home',
'en': '',
},
},
// fastPassPage
{
'koh6s96f': {
'pt': 'Home',
'en': '',
},
},
// test
{
'ah1ah1j6': {
'pt': 'Home',
'en': '',
},
},
// peopleOnThePropertyPage
{
'omjuk919': {
'pt': 'Foto',
'en': 'Photo',
},
'fli7tpz6': {
'pt': 'Nome',
'en': 'Name',
},
'nsu13r5d': {
'pt': 'Pessoas na Propriedade',
'en': 'People on the Property',
},
'qv3fubdf': {
'pt': 'Home',
'en': '',
},
},
// visitorDetailsModalTemplateComponent
{
'kqzf7nx2': {
'pt': 'Nome do Visitante',
@ -537,7 +605,7 @@ final kTranslationsMap = <Map<String, Map<String, String>>>[
'en': 'ERROR',
},
},
// regisiterVistorComponent
// regisiterVistorTemplateComponent
{
'wnhkedzt': {
'pt': 'Cadastrar Visitante',
@ -596,7 +664,7 @@ final kTranslationsMap = <Map<String, Map<String, String>>>[
'en': 'Register',
},
},
// visitorSearchComponent
// visitorSearchModalTemplateComponent
{
'cjlpru1m': {
'pt': 'Procure pelo documento do visitante ',
@ -728,15 +796,15 @@ final kTranslationsMap = <Map<String, Map<String, String>>>[
},
// optionSelectionModal
{
'omxabblt': {
'pt': 'Agenda \npida',
'en': 'Schedule \nQuick',
'bmjlmhht': {
'pt': 'Agenda\nRapida',
'en': 'Schedule \nVisit',
},
'vpy51li0': {
'ci8eyh2v': {
'pt': 'Agenda\nProvisória',
'en': 'Schedule\nProvisional',
},
'8ad3hms9': {
'jj2b545b': {
'pt': 'Agenda\nCompleta',
'en': 'Schedule\nComplete',
},
@ -759,49 +827,41 @@ final kTranslationsMap = <Map<String, Map<String, String>>>[
'pt': 'Cadastrar \nPet',
'en': 'Register\npet',
},
'xlp8dyn6': {
'pt': 'Agendar \nVisita',
'en': 'To schedule\nVisit',
},
'l6b9o7yn': {
'pt': 'QR Code \nde Acesso',
'en': 'QR Code\nAccess',
},
'45gqx8e0': {
'pt': 'Agenda \nAuto-Visita',
'en': 'Schedule\nSelf-Visit',
'rxnrtdau': {
'pt': 'Pessoas na\nPropriedade',
'en': 'People on\nthe Property',
},
},
// menuStaggeredViewComponent
{
'jn7p6pj6': {
'pt': 'Agenda \nAuto-Visita',
'en': 'Schedule\nSelf-Visit',
'ee33l0ms': {
'pt': 'Agendar \nVisita',
'en': 'Schedule \nVisit',
},
'yymmdtyv': {
'pt': 'Cadastrar\nVisitante',
'en': 'Register\nVisitor',
'ya37l3jt': {
'pt': 'Cadastrar\n Visitante',
'en': 'Register\n Visitor',
},
'f2jbm9jz': {
'pt': 'Vincular \nCondomínio',
'h8s3adu8': {
'pt': 'Vincular\nCondomínio',
'en': 'Link\nCondominium',
},
'rs5a7h6m': {
'pt': 'Cadastrar \nPet',
'j6tfixen': {
'pt': 'Cadastrar\nPet',
'en': 'Register\npet',
},
'if2zuaok': {
'pt': 'Agendar \nVisita',
'en': 'To schedule\nVisit',
},
'r4mjqq6s': {
'pt': 'Agendar \nVisita',
'en': 'To schedule\nVisit',
},
'cilu7ief': {
'pt': 'QR Code \nde Acesso',
'9tli4i2x': {
'pt': 'QR Code\nde Acesso',
'en': 'QR Code\nAccess',
},
'i22hecs8': {
'pt': 'Pessoas na\nPropriedade',
'en': 'People on\nthe Property',
},
},
// messageWellComponent
{
@ -814,6 +874,151 @@ final kTranslationsMap = <Map<String, Map<String, String>>>[
'en': 'All',
},
},
// signInTemplateComponent
{
'9hbdjxrz': {
'pt': 'VAMOS LA! ENTRE COM A SUA CONTA',
'en': 'LET\'S GO! SIGN IN WITH YOUR ACCOUNT',
},
'1ltg0ylb': {
'pt': 'Email',
'en': 'Email',
},
'2x19ce8k': {
'pt': 'Senha',
'en': 'Password',
},
'k44tm7wo': {
'pt': 'Entrar',
'en': 'Sign-In',
},
'14u7ipws': {
'pt': 'Cadastrar',
'en': 'Sign-Up',
},
'1x926nsn': {
'pt': 'Entrar',
'en': 'Sign-In',
},
'jwvd4ai1': {
'pt': 'Cadastrar',
'en': 'Sign-Up',
},
'05dx91ku': {
'pt': 'Você esqueceu a sua senha?',
'en': 'Have you forgotten your password?',
},
'p5c6d54y': {
'pt': ' Recupere aqui',
'en': 'recover here',
},
'olf967cj': {
'pt': 'Termo de Uso',
'en': 'Terms of use',
},
},
// signUpTemplateComponent
{
'49609olv': {
'pt': 'INSIRA SEU EMAIL E SENHA, VAMOS TE CADASTRAR!',
'en': 'ENTER YOUR EMAIL AND PASSWORD, LET\'S REGISTER YOU!',
},
'3corpwhd': {
'pt': 'Nome',
'en': 'Name',
},
'80wonb69': {
'pt': 'Email',
'en': 'Email',
},
'ws143wf4': {
'pt': '',
'en': '',
},
'0firji8l': {
'pt': 'Senha',
'en': 'Password',
},
'rnvdwzei': {
'pt': 'Cadastrar-se',
'en': 'Sign-Up',
},
'a9smhn5b': {
'pt': 'Você já tem uma conta? ',
'en': 'You already have an account?',
},
'09xv5ctc': {
'pt': 'Clique aqui',
'en': 'Click here',
},
'huygnka2': {
'pt': 'Termo de Uso',
'en': '',
},
},
// welcomeTemplateComponent
{
'dsc9tuc8': {
'pt': 'UMA EXPERIÊCIA COMPLETA',
'en': 'A COMPLETE EXPERIENCE',
},
'5bgqn16z': {
'pt': 'COM CONFORTO ONDE VOCÊ ESTIVER.',
'en': 'WITH COMFORT WHEREVER YOU ARE.',
},
'dynet730': {
'pt': 'Entrar',
'en': 'Sign-In',
},
'hha60cg7': {
'pt': 'Cadastrar',
'en': 'Sign-Up',
},
'zvtay8ee': {
'pt': 'Entrar',
'en': 'Sign-In',
},
'o6zob50a': {
'pt': 'Cadastrar',
'en': 'Sign-Up',
},
},
// forgotPasswordTemplateComponent
{
'xxm3ajsy': {
'pt': 'ESQUECEU SUA SENHA?',
'en': 'FORGOT YOUR PASSWORD?',
},
'wu2f7yzo': {
'pt':
'Não se preucupe nós vamos te ajudar, digite o email cadastrado no aplicativo e clique em enviar.',
'en':
'Don\'t worry, we will help you, enter the email registered in the application and click send.',
},
'mtz8l7ft': {
'pt': 'Email',
'en': 'Email',
},
'w7y5wlnv': {
'pt': 'digite o seu email.....',
'en': 'enter your email.....',
},
'74rnd5bu': {
'pt': 'Enviar',
'en': 'To send',
},
},
// selectHeaderComponent
{
'1gr8ztd5': {
'pt': 'Criar Agendamento',
'en': 'Create Schedule',
},
'xjahsbjw': {
'pt': 'Histórico de Visitas',
'en': 'Visit History',
},
},
// Miscellaneous
{
'i5smty81': {
@ -824,6 +1029,14 @@ final kTranslationsMap = <Map<String, Map<String, String>>>[
'pt': '',
'en': '',
},
'7zjyxhuq': {
'pt': '',
'en': '',
},
'd86ioepz': {
'pt': '',
'en': '',
},
'lt3ssl76': {
'pt': '',
'en': '',

View File

@ -0,0 +1,25 @@
import 'package:flutter/material.dart';
class KeepAliveWidgetWrapper extends StatefulWidget {
const KeepAliveWidgetWrapper({
super.key,
required this.builder,
});
final WidgetBuilder builder;
@override
State<KeepAliveWidgetWrapper> createState() => _KeepAliveWidgetWrapperState();
}
class _KeepAliveWidgetWrapperState extends State<KeepAliveWidgetWrapper>
with AutomaticKeepAliveClientMixin {
@override
bool get wantKeepAlive => true;
@override
Widget build(BuildContext context) {
super.build(context);
return widget.builder(context);
}
}

View File

@ -42,7 +42,7 @@ GoRouter createRouter(AppStateNotifier appStateNotifier) => GoRouter(
),
),
)
: const WelcomePageWidget(),
: const OnBoardingPageWidget(),
routes: [
FFRoute(
name: '_initialize',
@ -57,7 +57,7 @@ GoRouter createRouter(AppStateNotifier appStateNotifier) => GoRouter(
),
),
)
: const WelcomePageWidget(),
: const OnBoardingPageWidget(),
),
FFRoute(
name: 'LoginPage',
@ -77,16 +77,7 @@ GoRouter createRouter(AppStateNotifier appStateNotifier) => GoRouter(
FFRoute(
name: 'homePage',
path: '/homePage',
builder: (context, params) => HomePageWidget(
userUUID: params.getParam(
'userUUID',
ParamType.String,
),
devUUID: params.getParam(
'devUUID',
ParamType.String,
),
),
builder: (context, params) => const HomePageWidget(),
),
FFRoute(
name: 'RegisterPage',
@ -101,16 +92,7 @@ GoRouter createRouter(AppStateNotifier appStateNotifier) => GoRouter(
FFRoute(
name: 'registerVisitorPage',
path: '/registerVisitorPage',
builder: (context, params) => RegisterVisitorPageWidget(
userUUID: params.getParam(
'userUUID',
ParamType.String,
),
devUUID: params.getParam(
'devUUID',
ParamType.String,
),
),
builder: (context, params) => const RegisterVisitorPageWidget(),
),
FFRoute(
name: 'scheduleCompleteVisitPage',
@ -155,6 +137,26 @@ GoRouter createRouter(AppStateNotifier appStateNotifier) => GoRouter(
name: 'scheduleProvisionalVisitPage',
path: '/scheduleProvisionalVisitPage',
builder: (context, params) => const ScheduleProvisionalVisitPageWidget(),
),
FFRoute(
name: 'onBoardingPage',
path: '/onBoardingPage',
builder: (context, params) => const OnBoardingPageWidget(),
),
FFRoute(
name: 'fastPassPage',
path: '/fastPassPage',
builder: (context, params) => const FastPassPageWidget(),
),
FFRoute(
name: 'test',
path: '/test',
builder: (context, params) => const TestWidget(),
),
FFRoute(
name: 'peopleOnThePropertyPage',
path: '/peopleOnThePropertyPage',
builder: (context, params) => const PeopleOnThePropertyPageWidget(),
)
].map((r) => r.toRoute(appStateNotifier)).toList(),
);

View File

@ -1,12 +1,12 @@
// Export pages
export '/application_pages/login_page/login_page_widget.dart'
export '/legacy/on_boarding_legacy/login_page/login_page_widget.dart'
show LoginPageWidget;
export '/application_pages/forgot_password_page/forgot_password_page_widget.dart'
export '/legacy/on_boarding_legacy/forgot_password_page/forgot_password_page_widget.dart'
show ForgotPasswordPageWidget;
export '/application_pages/home_page/home_page_widget.dart' show HomePageWidget;
export '/application_pages/register_page/register_page_widget.dart'
export '/legacy/on_boarding_legacy/register_page/register_page_widget.dart'
show RegisterPageWidget;
export '/application_pages/welcome_page/welcome_page_widget.dart'
export '/legacy/on_boarding_legacy/welcome_page/welcome_page_widget.dart'
show WelcomePageWidget;
export '/application_pages/register_visitor_page/register_visitor_page_widget.dart'
show RegisterVisitorPageWidget;
@ -14,3 +14,10 @@ export '/application_pages/schedule_complete_visit_page/schedule_complete_visit_
show ScheduleCompleteVisitPageWidget;
export '/application_pages/schedule_provisional_visit_page/schedule_provisional_visit_page_widget.dart'
show ScheduleProvisionalVisitPageWidget;
export '/application_pages/on_boarding_page/on_boarding_page_widget.dart'
show OnBoardingPageWidget;
export '/application_pages/fast_pass_page/fast_pass_page_widget.dart'
show FastPassPageWidget;
export '/legacy/test/test_widget.dart' show TestWidget;
export '/application_pages/people_on_the_property_page/people_on_the_property_page_widget.dart'
show PeopleOnThePropertyPageWidget;

View File

@ -1,9 +1,8 @@
import '/flutter_flow/flutter_flow_util.dart';
import 'visitor_details_modal_widget.dart' show VisitorDetailsModalWidget;
import 'image_cropper_widget.dart' show ImageCropperWidget;
import 'package:flutter/material.dart';
class VisitorDetailsModalModel
extends FlutterFlowModel<VisitorDetailsModalWidget> {
class ImageCropperModel extends FlutterFlowModel<ImageCropperWidget> {
@override
void initState(BuildContext context) {}

View File

@ -0,0 +1,64 @@
import '/flutter_flow/flutter_flow_theme.dart';
import '/flutter_flow/flutter_flow_util.dart';
import '/custom_code/widgets/index.dart' as custom_widgets;
import 'package:flutter/material.dart';
import 'image_cropper_model.dart';
export 'image_cropper_model.dart';
class ImageCropperWidget extends StatefulWidget {
const ImageCropperWidget({
super.key,
required this.uploadImageFile,
});
final FFUploadedFile? uploadImageFile;
@override
State<ImageCropperWidget> createState() => _ImageCropperWidgetState();
}
class _ImageCropperWidgetState extends State<ImageCropperWidget> {
late ImageCropperModel _model;
@override
void setState(VoidCallback callback) {
super.setState(callback);
_model.onUpdate();
}
@override
void initState() {
super.initState();
_model = createModel(context, () => ImageCropperModel());
}
@override
void dispose() {
_model.maybeDispose();
super.dispose();
}
@override
Widget build(BuildContext context) {
return Container(
width: 500.0,
height: 500.0,
decoration: BoxDecoration(
color: FlutterFlowTheme.of(context).secondaryBackground,
),
child: SizedBox(
width: double.infinity,
height: double.infinity,
child: custom_widgets.ImageCropper(
width: double.infinity,
height: double.infinity,
imageFile: widget.uploadImageFile,
callBackAction: (url) async {
Navigator.pop(context, url);
},
),
),
);
}
}

View File

@ -0,0 +1,12 @@
import '/flutter_flow/flutter_flow_util.dart';
import 'legacy_local_component_widget.dart' show LegacyLocalComponentWidget;
import 'package:flutter/material.dart';
class LegacyLocalComponentModel
extends FlutterFlowModel<LegacyLocalComponentWidget> {
@override
void initState(BuildContext context) {}
@override
void dispose() {}
}

View File

@ -0,0 +1,167 @@
import '/application_components/organism_components/bottom_arrow_linked_locals_component/bottom_arrow_linked_locals_component_widget.dart';
import '/flutter_flow/flutter_flow_theme.dart';
import '/flutter_flow/flutter_flow_util.dart';
import '/flutter_flow/custom_functions.dart' as functions;
import '/flutter_flow/random_data_util.dart' as random_data;
import 'package:flutter/material.dart';
import 'package:google_fonts/google_fonts.dart';
import 'package:provider/provider.dart';
import 'legacy_local_component_model.dart';
export 'legacy_local_component_model.dart';
class LegacyLocalComponentWidget extends StatefulWidget {
const LegacyLocalComponentWidget({super.key});
@override
State<LegacyLocalComponentWidget> createState() =>
_LegacyLocalComponentWidgetState();
}
class _LegacyLocalComponentWidgetState
extends State<LegacyLocalComponentWidget> {
late LegacyLocalComponentModel _model;
@override
void setState(VoidCallback callback) {
super.setState(callback);
_model.onUpdate();
}
@override
void initState() {
super.initState();
_model = createModel(context, () => LegacyLocalComponentModel());
}
@override
void dispose() {
_model.maybeDispose();
super.dispose();
}
@override
Widget build(BuildContext context) {
context.watch<FFAppState>();
return Visibility(
visible: random_data.randomInteger(0, 10) != null,
child: Container(
height: 284.0,
decoration: const BoxDecoration(),
child: Column(
mainAxisSize: MainAxisSize.max,
children: [
Stack(
children: [
Align(
alignment: const AlignmentDirectional(0.0, 0.0),
child: Material(
color: Colors.transparent,
elevation: 0.0,
child: Container(
width: double.infinity,
height: 119.0,
decoration: BoxDecoration(
color: const Color(0xFF1AAB5F),
border: Border.all(
color: const Color(0xFF1AAB5F),
),
),
),
),
),
Align(
alignment: const AlignmentDirectional(0.0, 0.0),
child: Padding(
padding: const EdgeInsets.all(24.0),
child: Container(
width: 200.0,
height: 200.0,
decoration: BoxDecoration(
color: FlutterFlowTheme.of(context).primaryBackground,
shape: BoxShape.circle,
),
alignment: const AlignmentDirectional(0.0, 0.0),
child: Align(
alignment: const AlignmentDirectional(0.0, 0.0),
child: Padding(
padding: const EdgeInsets.all(2.0),
child: InkWell(
splashColor: Colors.transparent,
focusColor: Colors.transparent,
hoverColor: Colors.transparent,
highlightColor: Colors.transparent,
onTap: () async {
showModalBottomSheet(
isScrollControlled: true,
backgroundColor: const Color(0x00FFFFFF),
context: context,
builder: (context) {
return Padding(
padding: MediaQuery.viewInsetsOf(context),
child: const SizedBox(
height: double.infinity,
child:
BottomArrowLinkedLocalsComponentWidget(),
),
);
},
).then((value) => safeSetState(() {}));
},
child: ClipRRect(
borderRadius: BorderRadius.circular(200.0),
child: Image.network(
valueOrDefault<String>(
'https://freaccess.com.br/freaccess/Images/Clients/${FFAppState().cliUUID}.png',
'https://storage.googleapis.com/flutterflow-io-6f20.appspot.com/projects/flutter-freaccess-hub-0xgz9q/assets/7ftdetkzc3s0/360_F_64676383_LdbmhiNM6Ypzb3FM4PPuFP9rHe7ri8Ju.jpg',
),
width: 300.0,
height: 200.0,
fit: BoxFit.cover,
alignment: const Alignment(0.0, 0.0),
errorBuilder: (context, error, stackTrace) =>
Image.asset(
'assets/images/error_image.svg',
width: 300.0,
height: 200.0,
fit: BoxFit.cover,
alignment: const Alignment(0.0, 0.0),
),
),
),
),
),
),
),
),
),
],
),
Column(
mainAxisSize: MainAxisSize.max,
mainAxisAlignment: MainAxisAlignment.center,
children: [
Text(
valueOrDefault<String>(
functions.convertToUppercase(FFAppState().local),
'NOME DO LOCAL',
),
style: FlutterFlowTheme.of(context).labelMedium.override(
fontFamily: 'Nunito',
color: FlutterFlowTheme.of(context).primaryText,
fontSize: 20.0,
letterSpacing: 0.0,
fontWeight: FontWeight.w500,
useGoogleFonts:
GoogleFonts.asMap().containsKey('Nunito'),
),
),
],
),
],
),
),
);
}
}

View File

@ -52,7 +52,7 @@ class _ForgotPasswordPageWidgetState extends State<ForgotPasswordPageWidget> {
children: [
if (isWeb == false)
Align(
alignment: const AlignmentDirectional(-1.0, -1.0),
alignment: const AlignmentDirectional(-1.0, 1.0),
child: FlutterFlowIconButton(
borderColor: Colors.transparent,
borderRadius: 30.0,
@ -141,7 +141,7 @@ class _ForgotPasswordPageWidgetState extends State<ForgotPasswordPageWidget> {
padding: const EdgeInsetsDirectional.fromSTEB(16.0, 0.0, 0.0, 0.0),
child: Text(
FFLocalizations.of(context).getText(
'lpduiuif' /* ESQUECEU SUA SENHA? */,
'gfvplb0h' /* ESQUECEU SUA SENHA? */,
),
style: FlutterFlowTheme.of(context).headlineMedium.override(
fontFamily: 'Outfit',
@ -158,7 +158,7 @@ class _ForgotPasswordPageWidgetState extends State<ForgotPasswordPageWidget> {
padding: const EdgeInsetsDirectional.fromSTEB(16.0, 4.0, 16.0, 4.0),
child: Text(
FFLocalizations.of(context).getText(
'8t05j98w' /* Não se preucupe nós vamos te a... */,
'azssgpdi' /* Não se preucupe nós vamos te a... */,
),
style: FlutterFlowTheme.of(context).labelMedium.override(
fontFamily: 'Plus Jakarta Sans',
@ -182,7 +182,7 @@ class _ForgotPasswordPageWidgetState extends State<ForgotPasswordPageWidget> {
obscureText: false,
decoration: InputDecoration(
labelText: FFLocalizations.of(context).getText(
'4gcoci7a' /* Email */,
'0o139961' /* Email */,
),
labelStyle:
FlutterFlowTheme.of(context).labelMedium.override(
@ -195,7 +195,7 @@ class _ForgotPasswordPageWidgetState extends State<ForgotPasswordPageWidget> {
.containsKey('Plus Jakarta Sans'),
),
hintText: FFLocalizations.of(context).getText(
'a7p2iikz' /* digite o seu email..... */,
'aanw1fp3' /* digite o seu email..... */,
),
hintStyle:
FlutterFlowTheme.of(context).labelMedium.override(
@ -296,7 +296,7 @@ class _ForgotPasswordPageWidgetState extends State<ForgotPasswordPageWidget> {
if (shouldSetState) setState(() {});
},
text: FFLocalizations.of(context).getText(
'z9ghb8dz' /* Enviar */,
'e7hdgc4q' /* Enviar */,
),
options: FFButtonOptions(
width: 270.0,

View File

@ -0,0 +1,113 @@
import '/application_components/molecular_components/throw_exception/throw_exception_widget.dart';
import '/backend/api_requests/api_calls.dart';
import '/flutter_flow/flutter_flow_util.dart';
import '/custom_code/actions/index.dart' as actions;
import 'login_page_widget.dart' show LoginPageWidget;
import 'package:flutter/material.dart';
class LoginPageModel extends FlutterFlowModel<LoginPageWidget> {
/// State fields for stateful widgets in this page.
final unfocusNode = FocusNode();
// State field(s) for emailAddress widget.
FocusNode? emailAddressFocusNode;
TextEditingController? emailAddressTextController;
String? Function(BuildContext, String?)? emailAddressTextControllerValidator;
// State field(s) for password widget.
FocusNode? passwordFocusNode;
TextEditingController? passwordTextController;
late bool passwordVisibility;
String? Function(BuildContext, String?)? passwordTextControllerValidator;
@override
void initState(BuildContext context) {
passwordVisibility = false;
}
@override
void dispose() {
unfocusNode.dispose();
emailAddressFocusNode?.dispose();
emailAddressTextController?.dispose();
passwordFocusNode?.dispose();
passwordTextController?.dispose();
}
/// Action blocks.
Future signInActionPage(
BuildContext context, {
required String? emailAdress,
required String? passwd,
}) async {
String? devUUID;
ApiCallResponse? loginCall;
await Future.wait([
Future(() async {
FFAppState().email = emailAdress!;
}),
Future(() async {
FFAppState().passwd = passwd!;
}),
]);
if ((FFAppState().email != '') &&
(FFAppState().passwd != '')) {
devUUID = await actions.getDevUUID();
FFAppState().devUUID = devUUID!;
loginCall = await PhpGroup.loginCall.call(
email: FFAppState().email,
password: FFAppState().passwd,
uuid: FFAppState().devUUID,
type: FFAppState().device,
description: '',
);
FFAppState().userUUID = FFAppState().userUUID;
if (PhpGroup.loginCall.error(
(loginCall.jsonBody ?? ''),
) ==
false) {
FFAppState().isLogged = true;
context.goNamed(
'homePage',
extra: <String, dynamic>{
kTransitionInfoKey: const TransitionInfo(
hasTransition: true,
transitionType: PageTransitionType.fade,
),
},
);
} else {
await showModalBottomSheet(
isScrollControlled: true,
backgroundColor: Colors.transparent,
enableDrag: false,
context: context,
builder: (context) {
return GestureDetector(
onTap: () => unfocusNode.canRequestFocus
? FocusScope.of(context).requestFocus(unfocusNode)
: FocusScope.of(context).unfocus(),
child: Padding(
padding: MediaQuery.viewInsetsOf(context),
child: ThrowExceptionWidget(
msg: PhpGroup.loginCall.msg(
(loginCall?.jsonBody ?? ''),
)!,
),
),
);
},
);
FFAppState().email = '';
FFAppState().passwd = '';
FFAppState().update(() {});
}
} else {
FFAppState().email = '';
FFAppState().passwd = '';
}
}
}

View File

@ -1,15 +1,12 @@
import '/application_components/molecular_components/throw_exception/throw_exception_widget.dart';
import '/backend/api_requests/api_calls.dart';
import '/flutter_flow/flutter_flow_animations.dart';
import '/flutter_flow/flutter_flow_theme.dart';
import '/flutter_flow/flutter_flow_util.dart';
import '/flutter_flow/flutter_flow_widgets.dart';
import '/flutter_flow/random_data_util.dart' as random_data;
import '/actions/actions.dart' as action_blocks;
import 'package:flutter/gestures.dart';
import 'package:flutter/material.dart';
import 'package:flutter_animate/flutter_animate.dart';
import 'package:google_fonts/google_fonts.dart';
import 'package:provider/provider.dart';
import 'login_page_model.dart';
export 'login_page_model.dart';
@ -91,8 +88,6 @@ class _LoginPageWidgetState extends State<LoginPageWidget>
@override
Widget build(BuildContext context) {
context.watch<FFAppState>();
return GestureDetector(
onTap: () => _model.unfocusNode.canRequestFocus
? FocusScope.of(context).requestFocus(_model.unfocusNode)
@ -146,28 +141,26 @@ class _LoginPageWidgetState extends State<LoginPageWidget>
child: Text(
FFLocalizations.of(context)
.getText(
'uem0mca5' /* VAMOS LA! ENTRE COM A SUA CONT... */,
'0113wf5c' /* VAMOS LA! ENTRE COM A SUA CONT... */,
),
textAlign: TextAlign.start,
style:
FlutterFlowTheme.of(context)
.displaySmall
.override(
fontFamily:
'Plus Jakarta Sans',
color:
FlutterFlowTheme.of(
context)
.primaryText,
fontSize: 24.0,
letterSpacing: 0.0,
fontWeight:
FontWeight.normal,
useGoogleFonts: GoogleFonts
.asMap()
.containsKey(
'Plus Jakarta Sans'),
),
style: FlutterFlowTheme.of(
context)
.displaySmall
.override(
fontFamily:
'Plus Jakarta Sans',
color: FlutterFlowTheme.of(
context)
.primaryText,
fontSize: 24.0,
letterSpacing: 0.0,
fontWeight: FontWeight.w500,
useGoogleFonts: GoogleFonts
.asMap()
.containsKey(
'Plus Jakarta Sans'),
),
),
),
),
@ -243,7 +236,7 @@ class _LoginPageWidgetState extends State<LoginPageWidget>
FFLocalizations.of(
context)
.getText(
'90ls8ppo' /* Email */,
'f2go5a71' /* Email */,
),
labelStyle:
FlutterFlowTheme.of(
@ -371,7 +364,7 @@ class _LoginPageWidgetState extends State<LoginPageWidget>
FFLocalizations.of(
context)
.getText(
'rvlumyaw' /* Senha */,
'paon3y0v' /* Senha */,
),
labelStyle:
FlutterFlowTheme.of(
@ -514,182 +507,21 @@ class _LoginPageWidgetState extends State<LoginPageWidget>
child: FFButtonWidget(
onPressed:
() async {
var shouldSetState =
false;
await Future
.wait([
Future(
() async {
FFAppState()
.email =
_model
.emailAddressTextController
.text;
setState(
() {});
}),
Future(
() async {
FFAppState()
.passwd =
_model
.passwordTextController
.text;
setState(
() {});
}),
]);
if ((FFAppState()
.email !=
'') &&
(FFAppState()
.passwd !=
'')) {
FFAppState()
.devUUID =
random_data
.randomString(
36,
36,
false,
false,
true,
);
setState(() {});
_model.smallDisplayApi =
await PhpGroup
.loginCall
.call(
email:
FFAppState()
.email,
password:
FFAppState()
.passwd,
uuid: FFAppState()
.devUUID,
type: FFAppState()
.device,
description:
'',
);
shouldSetState =
true;
FFAppState()
.userUUID =
PhpGroup
.loginCall
.userUUID(
(_model.smallDisplayApi
?.jsonBody ??
''),
)!;
setState(() {});
if (PhpGroup
.loginCall
.error(
(_model.smallDisplayApi
?.jsonBody ??
''),
) ==
false) {
FFAppState()
.isLogged =
true;
setState(
() {});
context
.goNamed(
'homePage',
queryParameters:
{
'userUUID':
serializeParam(
FFAppState()
.userUUID,
ParamType
.String,
),
'devUUID':
serializeParam(
FFAppState()
.devUUID,
ParamType
.String,
),
}.withoutNulls,
extra: <String,
dynamic>{
kTransitionInfoKey:
const TransitionInfo(
hasTransition:
true,
transitionType:
PageTransitionType.fade,
),
},
);
} else {
await showModalBottomSheet(
isScrollControlled:
true,
backgroundColor:
Colors
.transparent,
enableDrag:
false,
context:
context,
builder:
(context) {
return GestureDetector(
onTap: () => _model.unfocusNode.canRequestFocus
? FocusScope.of(context).requestFocus(_model.unfocusNode)
: FocusScope.of(context).unfocus(),
child:
Padding(
padding:
MediaQuery.viewInsetsOf(context),
child:
ThrowExceptionWidget(
msg:
PhpGroup.loginCall.msg(
(_model.smallDisplayApi?.jsonBody ?? ''),
)!,
),
),
);
},
).then((value) =>
safeSetState(
() {}));
setState(() {
_model
.emailAddressTextController
?.clear();
_model
.passwordTextController
?.clear();
});
}
} else {
if (shouldSetState) {
setState(
() {});
}
return;
}
if (shouldSetState) {
setState(() {});
}
await action_blocks
.singInActionApp(
context,
emailAdress: _model
.emailAddressTextController
.text,
password: _model
.passwordTextController
.text,
);
},
text: FFLocalizations
.of(context)
.getText(
'2d3903lt' /* Entrar */,
'wmbzwstw' /* Entrar */,
),
options:
FFButtonOptions(
@ -764,7 +596,7 @@ class _LoginPageWidgetState extends State<LoginPageWidget>
text: FFLocalizations
.of(context)
.getText(
'zj6pyujp' /* Cadastrar */,
'j8567afe' /* Cadastrar */,
),
options:
FFButtonOptions(
@ -850,7 +682,7 @@ class _LoginPageWidgetState extends State<LoginPageWidget>
text: FFLocalizations
.of(context)
.getText(
'iqhyif1d' /* Entrar */,
'y3wd9q18' /* Entrar */,
),
options:
FFButtonOptions(
@ -931,7 +763,7 @@ class _LoginPageWidgetState extends State<LoginPageWidget>
text: FFLocalizations
.of(context)
.getText(
'5x5bp2u1' /* Cadastrar */,
'j6ufb6sq' /* Cadastrar */,
),
options:
FFButtonOptions(
@ -1028,7 +860,7 @@ class _LoginPageWidgetState extends State<LoginPageWidget>
text: FFLocalizations
.of(context)
.getText(
'1fqjz9q7' /* Você esqueceu a sua senha? */,
'h85112qs' /* Você esqueceu a sua senha? */,
),
style: TextStyle(
color: FlutterFlowTheme
@ -1040,7 +872,7 @@ class _LoginPageWidgetState extends State<LoginPageWidget>
text: FFLocalizations
.of(context)
.getText(
'7miyd406' /* Recupere aqui */,
'di48hdaj' /* Recupere aqui */,
),
style: FlutterFlowTheme
.of(context)
@ -1106,7 +938,7 @@ class _LoginPageWidgetState extends State<LoginPageWidget>
),
Text(
FFLocalizations.of(context).getText(
'63xv5ewj' /* Termo de Uso */,
'gx2fp6zq' /* Termo de Uso */,
),
style: FlutterFlowTheme.of(context)
.bodyMedium

View File

@ -1,4 +1,3 @@
import '/backend/api_requests/api_calls.dart';
import '/flutter_flow/flutter_flow_util.dart';
import 'register_page_widget.dart' show RegisterPageWidget;
import 'package:flutter/material.dart';
@ -33,8 +32,6 @@ class RegisterPageModel extends FlutterFlowModel<RegisterPageWidget> {
late bool passwordRegisterFormVisibility;
String? Function(BuildContext, String?)?
passwordRegisterFormTextControllerValidator;
// Stores action output result for [Backend Call - API (register)] action in SignUpButtonRegisterForm widget.
ApiCallResponse? registerCall;
@override
void initState(BuildContext context) {

View File

@ -1,15 +1,15 @@
import '/backend/api_requests/api_calls.dart';
import '/flutter_flow/flutter_flow_animations.dart';
import '/flutter_flow/flutter_flow_theme.dart';
import '/flutter_flow/flutter_flow_util.dart';
import '/flutter_flow/flutter_flow_widgets.dart';
import '/flutter_flow/random_data_util.dart' as random_data;
import '/actions/actions.dart' as action_blocks;
import 'package:easy_debounce/easy_debounce.dart';
import 'package:flutter/material.dart';
import 'package:flutter/scheduler.dart';
import 'package:flutter_animate/flutter_animate.dart';
import 'package:flutter_svg/flutter_svg.dart';
import 'package:google_fonts/google_fonts.dart';
import 'package:provider/provider.dart';
import 'register_page_model.dart';
export 'register_page_model.dart';
@ -108,6 +108,8 @@ class _RegisterPageWidgetState extends State<RegisterPageWidget>
@override
Widget build(BuildContext context) {
context.watch<FFAppState>();
return GestureDetector(
onTap: () => _model.unfocusNode.canRequestFocus
? FocusScope.of(context).requestFocus(_model.unfocusNode)
@ -158,7 +160,7 @@ class _RegisterPageWidgetState extends State<RegisterPageWidget>
padding: const EdgeInsets.all(4.0),
child: Text(
FFLocalizations.of(context).getText(
'oxy0n1p4' /* INSIRA SEU EMAIL E SENHA, VAMO... */,
'2d8uulm3' /* INSIRA SEU EMAIL E SENHA, VAMO... */,
),
textAlign: TextAlign.start,
style: FlutterFlowTheme.of(context)
@ -171,7 +173,7 @@ class _RegisterPageWidgetState extends State<RegisterPageWidget>
.primaryText,
fontSize: 24.0,
letterSpacing: 0.0,
fontWeight: FontWeight.normal,
fontWeight: FontWeight.w500,
useGoogleFonts: GoogleFonts
.asMap()
.containsKey(
@ -254,7 +256,7 @@ class _RegisterPageWidgetState extends State<RegisterPageWidget>
FFLocalizations.of(
context)
.getText(
'w0y3fz89' /* Nome */,
'8kjhi406' /* Nome */,
),
labelStyle: FlutterFlowTheme
.of(context)
@ -396,7 +398,7 @@ class _RegisterPageWidgetState extends State<RegisterPageWidget>
FFLocalizations.of(
context)
.getText(
'4bfdpd0o' /* Email */,
'ro4zkkxp' /* Email */,
),
labelStyle: FlutterFlowTheme
.of(context)
@ -539,7 +541,7 @@ class _RegisterPageWidgetState extends State<RegisterPageWidget>
FFLocalizations.of(
context)
.getText(
'byjglkpk' /* Senha */,
'lzgobioa' /* Senha */,
),
labelStyle: FlutterFlowTheme
.of(context)
@ -665,171 +667,25 @@ class _RegisterPageWidgetState extends State<RegisterPageWidget>
0.0, 0.0, 0.0, 16.0),
child: FFButtonWidget(
onPressed: () async {
await Future.wait([
Future(() async {
setState(() {
_model.emailRegisterFormTextController
?.text =
_model
.emailRegisterFormTextController
.text;
});
}),
Future(() async {
setState(() {
_model.passwordRegisterFormTextController
?.text =
_model
.passwordRegisterFormTextController
.text;
});
}),
Future(() async {
setState(() {
_model.nameRegisterFormTextController
?.text =
_model
.nameRegisterFormTextController
.text;
});
}),
]);
if ((_model.emailRegisterFormTextController.text != '') &&
(_model.passwordRegisterFormTextController
.text !=
'') &&
(_model.nameRegisterFormTextController
.text !=
'')) {
_model.registerCall =
await PhpGroup
.registerCall
.call(
name: _model
.nameRegisterFormTextController
.text,
password: _model
.passwordRegisterFormTextController
.text,
email: _model
.emailRegisterFormTextController
.text,
token: random_data
.randomString(
36,
36,
false,
false,
true,
),
uuid: random_data
.randomString(
36,
36,
false,
false,
true,
),
tipo: _model.device,
descricao: random_data
.randomString(
36,
36,
true,
false,
false,
),
);
if (PhpGroup.registerCall
.error(
(_model.registerCall
?.jsonBody ??
''),
) ==
false) {
context.goNamed(
'LoginPage',
queryParameters: {
'device':
serializeParam(
'',
ParamType.String,
),
}.withoutNulls,
extra: <String,
dynamic>{
kTransitionInfoKey:
const TransitionInfo(
hasTransition: true,
transitionType:
PageTransitionType
.fade,
),
},
);
} else {
await showDialog(
context: context,
builder:
(alertDialogContext) {
return AlertDialog(
title:
const Text('ERROR2'),
content:
const Text('ERROR2'),
actions: [
TextButton(
onPressed: () =>
Navigator.pop(
alertDialogContext),
child: const Text(
'ERROR2 '),
),
],
);
},
);
setState(() {
_model
.passwordRegisterFormTextController
?.clear();
_model
.emailRegisterFormTextController
?.clear();
_model
.nameRegisterFormTextController
?.clear();
});
}
} else {
await showDialog(
context: context,
builder:
(alertDialogContext) {
return AlertDialog(
title: const Text('ERROR1'),
content:
const Text('ERROR1'),
actions: [
TextButton(
onPressed: () =>
Navigator.pop(
alertDialogContext),
child: const Text(
'ERROR1 '),
),
],
);
},
);
}
setState(() {});
await action_blocks
.signUpActionApp(
context,
name: _model
.nameRegisterFormTextController
.text,
passwd: _model
.passwordRegisterFormTextController
.text,
email: _model
.emailRegisterFormTextController
.text,
device: FFAppState().device,
);
},
text:
FFLocalizations.of(context)
.getText(
'w9vrsnmf' /* Cadastrar-se */,
'c7sfyeh8' /* Cadastrar-se */,
),
options: FFButtonOptions(
width: double.infinity,
@ -909,7 +765,7 @@ class _RegisterPageWidgetState extends State<RegisterPageWidget>
FFLocalizations.of(
context)
.getText(
'zep60lcd' /* Você já tem uma conta? */,
'jglpa1tr' /* Você já tem uma conta? */,
),
style: TextStyle(
color: FlutterFlowTheme
@ -922,7 +778,7 @@ class _RegisterPageWidgetState extends State<RegisterPageWidget>
FFLocalizations.of(
context)
.getText(
'tl8k1ld9' /* Clique aqui */,
'hfcm0td9' /* Clique aqui */,
),
style:
FlutterFlowTheme.of(
@ -980,7 +836,7 @@ class _RegisterPageWidgetState extends State<RegisterPageWidget>
),
Text(
FFLocalizations.of(context).getText(
'dbtzii7i' /* Termo de Uso */,
'c3kno4t9' /* Termo de Uso */,
),
style: FlutterFlowTheme.of(context)
.bodyMedium

View File

@ -36,16 +36,13 @@ class _WelcomePageWidgetState extends State<WelcomePageWidget>
if (FFAppState().isLogged == true) {
context.pushNamed(
'homePage',
queryParameters: {
'userUUID': serializeParam(
FFAppState().userUUID,
ParamType.String,
extra: <String, dynamic>{
kTransitionInfoKey: const TransitionInfo(
hasTransition: true,
transitionType: PageTransitionType.fade,
duration: Duration(milliseconds: 0),
),
'devUUID': serializeParam(
FFAppState().devUUID,
ParamType.String,
),
}.withoutNulls,
},
);
} else {
if (isAndroid == true) {
@ -147,7 +144,7 @@ class _WelcomePageWidgetState extends State<WelcomePageWidget>
children: [
Text(
FFLocalizations.of(context).getText(
'3pl41wkq' /* UMA EXPERIÊCIA COMPLETA */,
'xflxvs9y' /* UMA EXPERIÊCIA COMPLETA */,
),
textAlign: TextAlign.start,
style: FlutterFlowTheme.of(context)
@ -167,7 +164,7 @@ class _WelcomePageWidgetState extends State<WelcomePageWidget>
alignment: const AlignmentDirectional(0.0, -1.0),
child: Text(
FFLocalizations.of(context).getText(
'13nhoxpg' /* COM CONFORTO ONDE VOCÊ ESTIVER... */,
'5a86wzd1' /* COM CONFORTO ONDE VOCÊ ESTIVER... */,
),
textAlign: TextAlign.start,
style: FlutterFlowTheme.of(context)
@ -265,7 +262,7 @@ class _WelcomePageWidgetState extends State<WelcomePageWidget>
text:
FFLocalizations.of(context)
.getText(
'zt5uc5g5' /* Entrar */,
'65nuva6j' /* Entrar */,
),
options: FFButtonOptions(
width: double.infinity,
@ -323,7 +320,7 @@ class _WelcomePageWidgetState extends State<WelcomePageWidget>
text:
FFLocalizations.of(context)
.getText(
'jteakpo0' /* Cadastrar */,
'9u6oaw01' /* Cadastrar */,
),
options: FFButtonOptions(
width: double.infinity,
@ -398,7 +395,7 @@ class _WelcomePageWidgetState extends State<WelcomePageWidget>
text: FFLocalizations.of(
context)
.getText(
'qoc86gvo' /* Entrar */,
'd1qem43w' /* Entrar */,
),
options: FFButtonOptions(
width: double.infinity,
@ -459,7 +456,7 @@ class _WelcomePageWidgetState extends State<WelcomePageWidget>
text: FFLocalizations.of(
context)
.getText(
'p5tgmj0c' /* Cadastrar */,
'bhowzv2u' /* Cadastrar */,
),
options: FFButtonOptions(
width: double.infinity,

View File

@ -0,0 +1,12 @@
import '/flutter_flow/flutter_flow_util.dart';
import 'select_header_component_widget.dart' show SelectHeaderComponentWidget;
import 'package:flutter/material.dart';
class SelectHeaderComponentModel
extends FlutterFlowModel<SelectHeaderComponentWidget> {
@override
void initState(BuildContext context) {}
@override
void dispose() {}
}

View File

@ -0,0 +1,185 @@
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<SelectHeaderComponentWidget> createState() =>
_SelectHeaderComponentWidgetState();
}
class _SelectHeaderComponentWidgetState
extends State<SelectHeaderComponentWidget> {
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),
),
),
),
],
),
),
),
],
);
}
}

View File

@ -0,0 +1,17 @@
import '/flutter_flow/flutter_flow_util.dart';
import 'test_widget.dart' show TestWidget;
import 'package:flutter/material.dart';
class TestModel extends FlutterFlowModel<TestWidget> {
/// State fields for stateful widgets in this page.
final unfocusNode = FocusNode();
@override
void initState(BuildContext context) {}
@override
void dispose() {
unfocusNode.dispose();
}
}

View File

@ -0,0 +1,44 @@
import '/flutter_flow/flutter_flow_theme.dart';
import '/flutter_flow/flutter_flow_util.dart';
import 'package:flutter/material.dart';
import 'test_model.dart';
export 'test_model.dart';
class TestWidget extends StatefulWidget {
const TestWidget({super.key});
@override
State<TestWidget> createState() => _TestWidgetState();
}
class _TestWidgetState extends State<TestWidget> {
late TestModel _model;
final scaffoldKey = GlobalKey<ScaffoldState>();
@override
void initState() {
super.initState();
_model = createModel(context, () => TestModel());
}
@override
void dispose() {
_model.dispose();
super.dispose();
}
@override
Widget build(BuildContext context) {
return GestureDetector(
onTap: () => _model.unfocusNode.canRequestFocus
? FocusScope.of(context).requestFocus(_model.unfocusNode)
: FocusScope.of(context).unfocus(),
child: Scaffold(
key: scaffoldKey,
backgroundColor: FlutterFlowTheme.of(context).primaryBackground,
),
);
}
}

View File

@ -0,0 +1,13 @@
import '/flutter_flow/flutter_flow_util.dart';
import 'visit_history_template_component_widget.dart'
show VisitHistoryTemplateComponentWidget;
import 'package:flutter/material.dart';
class VisitHistoryTemplateComponentModel
extends FlutterFlowModel<VisitHistoryTemplateComponentWidget> {
@override
void initState(BuildContext context) {}
@override
void dispose() {}
}

View File

@ -0,0 +1,389 @@
import '/application_components/molecular_components/opt_modal/opt_modal_widget.dart';
import '/application_components/templates_components/visit_details_modal_template_component/visit_details_modal_template_component_widget.dart';
import '/backend/api_requests/api_calls.dart';
import '/flutter_flow/flutter_flow_icon_button.dart';
import '/flutter_flow/flutter_flow_theme.dart';
import '/flutter_flow/flutter_flow_util.dart';
import '/flutter_flow/custom_functions.dart' as functions;
import 'package:cached_network_image/cached_network_image.dart';
import 'package:flutter/material.dart';
import 'package:flutter_spinkit/flutter_spinkit.dart';
import 'package:google_fonts/google_fonts.dart';
import 'package:provider/provider.dart';
import 'visit_history_template_component_model.dart';
export 'visit_history_template_component_model.dart';
class VisitHistoryTemplateComponentWidget extends StatefulWidget {
const VisitHistoryTemplateComponentWidget({
super.key,
this.parameter1,
});
final FFUploadedFile? parameter1;
@override
State<VisitHistoryTemplateComponentWidget> createState() =>
_VisitHistoryTemplateComponentWidgetState();
}
class _VisitHistoryTemplateComponentWidgetState
extends State<VisitHistoryTemplateComponentWidget> {
late VisitHistoryTemplateComponentModel _model;
@override
void setState(VoidCallback callback) {
super.setState(callback);
_model.onUpdate();
}
@override
void initState() {
super.initState();
_model = createModel(context, () => VisitHistoryTemplateComponentModel());
}
@override
void dispose() {
_model.maybeDispose();
super.dispose();
}
@override
Widget build(BuildContext context) {
context.watch<FFAppState>();
return Container(
width: double.infinity,
height: 900.0,
decoration: BoxDecoration(
color: FlutterFlowTheme.of(context).primaryBackground,
),
child: Column(
mainAxisSize: MainAxisSize.max,
children: [
Row(
mainAxisSize: MainAxisSize.max,
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
children: [
FlutterFlowIconButton(
borderColor: Colors.transparent,
borderRadius: 20.0,
borderWidth: 1.0,
buttonSize: 40.0,
icon: Icon(
Icons.settings_sharp,
color: FlutterFlowTheme.of(context).primary,
size: 24.0,
),
onPressed: () async {
await showModalBottomSheet(
isScrollControlled: true,
backgroundColor: Colors.transparent,
context: context,
builder: (context) {
return Padding(
padding: MediaQuery.viewInsetsOf(context),
child: const OptModalWidget(),
);
},
).then((value) => safeSetState(() {}));
},
),
],
),
Expanded(
child: Padding(
padding: const EdgeInsets.all(14.0),
child: FutureBuilder<ApiCallResponse>(
future: PhpGroup.getVisitsCall.call(
devUUID: FFAppState().devUUID,
userUUID: FFAppState().userUUID,
cliID: FFAppState().cliUUID,
atividade: 'getVisitas',
),
builder: (context, snapshot) {
// Customize what your widget looks like when it's loading.
if (!snapshot.hasData) {
return Center(
child: SizedBox(
width: 50.0,
height: 50.0,
child: SpinKitCircle(
color: FlutterFlowTheme.of(context).primary,
size: 50.0,
),
),
);
}
final gridViewGetVisitsResponse = snapshot.data!;
return Builder(
builder: (context) {
final visitHistory = (PhpGroup.getVisitsCall
.visitasList(
gridViewGetVisitsResponse.jsonBody,
)
?.toList() ??
[])
.take(10)
.toList();
return GridView.builder(
padding: EdgeInsets.zero,
gridDelegate: const SliverGridDelegateWithFixedCrossAxisCount(
crossAxisCount: 3,
crossAxisSpacing: 10.0,
mainAxisSpacing: 10.0,
childAspectRatio: 1.0,
),
scrollDirection: Axis.vertical,
itemCount: visitHistory.length,
itemBuilder: (context, visitHistoryIndex) {
final visitHistoryItem =
visitHistory[visitHistoryIndex];
return Container(
width: double.infinity,
height: double.infinity,
decoration: const BoxDecoration(
borderRadius: BorderRadius.only(
bottomLeft: Radius.circular(50.0),
bottomRight: Radius.circular(50.0),
topLeft: Radius.circular(25.0),
topRight: Radius.circular(25.0),
),
shape: BoxShape.rectangle,
),
child: Stack(
children: [
Container(
width: double.infinity,
height: double.infinity,
decoration: BoxDecoration(
color: valueOrDefault<Color>(
() {
if (functions.jsonToStr(getJsonField(
visitHistoryItem,
r'''$.VAW_STATUS''',
)) ==
'\"A\"') {
return FlutterFlowTheme.of(context)
.success;
} else if (functions
.jsonToStr(getJsonField(
visitHistoryItem,
r'''$.VAW_STATUS''',
)) ==
'\"C\"') {
return FlutterFlowTheme.of(context)
.error;
} else if (functions
.jsonToStr(getJsonField(
visitHistoryItem,
r'''$.VAW_STATUS''',
)) ==
'\"I\"') {
return FlutterFlowTheme.of(context)
.warning;
} else {
return FlutterFlowTheme.of(context)
.primary;
}
}(),
FlutterFlowTheme.of(context).primary,
),
borderRadius: const BorderRadius.only(
bottomLeft: Radius.circular(10.0),
bottomRight: Radius.circular(10.0),
topLeft: Radius.circular(25.0),
topRight: Radius.circular(25.0),
),
shape: BoxShape.rectangle,
),
),
InkWell(
splashColor: Colors.transparent,
focusColor: Colors.transparent,
hoverColor: Colors.transparent,
highlightColor: Colors.transparent,
onTap: () async {
await showModalBottomSheet(
isScrollControlled: true,
backgroundColor: Colors.transparent,
enableDrag: false,
useSafeArea: true,
context: context,
builder: (context) {
return Padding(
padding:
MediaQuery.viewInsetsOf(context),
child:
VisitDetailsModalTemplateComponentWidget(
visitStatusStr: getJsonField(
visitHistoryItem,
r'''$.VAW_STATUS ''',
).toString(),
visitStartDateStr: getJsonField(
visitHistoryItem,
r'''$.VAW_DTINICIO''',
).toString(),
visitEndDateStr: getJsonField(
visitHistoryItem,
r'''$.VAW_DTFIM''',
).toString(),
visitReasonStr: getJsonField(
visitHistoryItem,
r'''$.MOT_DESCRICAO''',
).toString(),
visitLevelStr: getJsonField(
visitHistoryItem,
r'''$.NAC_DESCRICAO''',
).toString(),
visitTempStr: getJsonField(
visitHistoryItem,
r'''$.VTE_UNICA ''',
).toString(),
visitObsStr: getJsonField(
visitHistoryItem,
r'''$.VAW_OBS''',
).toString(),
visitorImgPath:
valueOrDefault<String>(
'https://freaccess.com.br/freaccess/getImage.php?devUUID=${FFAppState().devUUID}&userUUID=${FFAppState().userUUID}&cliID=${FFAppState().cliUUID}&atividade=getFoto&Documento=${getJsonField(
visitHistoryItem,
r'''$.VTE_DOCUMENTO''',
).toString()}&tipo=E',
'https://storage.googleapis.com/flutterflow-io-6f20.appspot.com/projects/flutter-freaccess-hub-0xgz9q/assets/7ftdetkzc3s0/360_F_64676383_LdbmhiNM6Ypzb3FM4PPuFP9rHe7ri8Ju.jpg',
),
visitorStrList: getJsonField(
visitHistoryItem,
r'''$.VTE_DOCUMENTO''',
).toString(),
visitIdStr: getJsonField(
visitHistoryItem,
r'''$.VAW_ID''',
).toString(),
visitorJsonList: PhpGroup
.getVisitsCall
.visitasList(
gridViewGetVisitsResponse
.jsonBody,
),
updateToggleIdx: () async {
setState(() {});
},
repeatVisitSchedule: () async {},
),
);
},
).then((value) => safeSetState(() {}));
},
child: ClipRRect(
borderRadius: const BorderRadius.only(
bottomLeft: Radius.circular(25.0),
bottomRight: Radius.circular(25.0),
topLeft: Radius.circular(25.0),
topRight: Radius.circular(25.0),
),
child: CachedNetworkImage(
fadeInDuration:
const Duration(milliseconds: 500),
fadeOutDuration:
const Duration(milliseconds: 500),
imageUrl: valueOrDefault<String>(
'https://freaccess.com.br/freaccess/getImage.php?devUUID=${FFAppState().devUUID}&userUUID=${FFAppState().userUUID}&cliID=${FFAppState().cliUUID}&atividade=getFoto&Documento=${getJsonField(
visitHistoryItem,
r'''$.VTE_DOCUMENTO''',
).toString()}&tipo=E',
'https://storage.googleapis.com/flutterflow-io-6f20.appspot.com/projects/flutter-freaccess-hub-0xgz9q/assets/7ftdetkzc3s0/360_F_64676383_LdbmhiNM6Ypzb3FM4PPuFP9rHe7ri8Ju.jpg',
),
width: double.infinity,
height: double.infinity,
fit: BoxFit.cover,
),
),
),
Align(
alignment: const AlignmentDirectional(0.0, -1.0),
child: Container(
width: 200.0,
height: 20.0,
decoration: BoxDecoration(
color: valueOrDefault<Color>(
() {
if (functions.jsonToStr(getJsonField(
visitHistoryItem,
r'''$.VAW_STATUS''',
)) ==
'\"A\"') {
return FlutterFlowTheme.of(context)
.success;
} else if (functions
.jsonToStr(getJsonField(
visitHistoryItem,
r'''$.VAW_STATUS''',
)) ==
'\"C\"') {
return FlutterFlowTheme.of(context)
.error;
} else if (functions
.jsonToStr(getJsonField(
visitHistoryItem,
r'''$.VAW_STATUS''',
)) ==
'\"I\"') {
return FlutterFlowTheme.of(context)
.warning;
} else {
return FlutterFlowTheme.of(context)
.primary;
}
}(),
FlutterFlowTheme.of(context).primary,
),
borderRadius: const BorderRadius.only(
bottomLeft: Radius.circular(0.0),
bottomRight: Radius.circular(0.0),
topLeft: Radius.circular(25.0),
topRight: Radius.circular(25.0),
),
),
alignment: const AlignmentDirectional(0.0, 0.0),
child: Text(
getJsonField(
visitHistoryItem,
r'''$.VTE_NOME''',
).toString(),
textAlign: TextAlign.center,
style: FlutterFlowTheme.of(context)
.bodyMedium
.override(
fontFamily:
FlutterFlowTheme.of(context)
.bodyMediumFamily,
color: FlutterFlowTheme.of(context)
.info,
fontSize: 12.0,
letterSpacing: 0.0,
useGoogleFonts: GoogleFonts.asMap()
.containsKey(
FlutterFlowTheme.of(context)
.bodyMediumFamily),
),
),
),
),
],
),
);
},
);
},
);
},
),
),
),
],
),
);
}
}

View File

@ -27,11 +27,13 @@ dependencies:
sdk: flutter
auto_size_text: 3.0.0
cached_network_image: 3.3.1
carousel_slider: 4.2.1
cloud_functions: 4.6.7
cloud_functions_platform_interface: 5.5.18
cloud_functions_web: 4.7.1
collection: 1.18.0
crop_your_image: 1.0.0
data_table_2: 2.5.10
device_info_plus: 9.1.2
dropdown_button2: 2.3.9
easy_debounce: 2.0.1
equatable: 2.0.5