Merge branch 'fix/visitorRegister' into develop
This commit is contained in:
commit
614e55bb99
|
@ -41,6 +41,8 @@
|
||||||
4C588A6A63D12FBFE8C3D586 /* GoogleService-Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; name = "GoogleService-Info.plist"; path = "Runner/GoogleService-Info.plist"; sourceTree = "<group>"; };
|
4C588A6A63D12FBFE8C3D586 /* GoogleService-Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; name = "GoogleService-Info.plist"; path = "Runner/GoogleService-Info.plist"; sourceTree = "<group>"; };
|
||||||
4C7A2C30DCF835BA60FAD235 /* Pods-Runner.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.debug.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"; sourceTree = "<group>"; };
|
4C7A2C30DCF835BA60FAD235 /* Pods-Runner.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.debug.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"; sourceTree = "<group>"; };
|
||||||
50BE974D08F66282C0031620 /* Pods-Runner.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.release.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"; sourceTree = "<group>"; };
|
50BE974D08F66282C0031620 /* Pods-Runner.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.release.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"; sourceTree = "<group>"; };
|
||||||
|
6436409127A31CDB00820AF7 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = "<group>"; };
|
||||||
|
6436409227A31CD800820AF7 /* pt */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = pt; path = pt.lproj/InfoPlist.strings; sourceTree = "<group>"; };
|
||||||
74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Runner-Bridging-Header.h"; sourceTree = "<group>"; };
|
74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Runner-Bridging-Header.h"; sourceTree = "<group>"; };
|
||||||
74858FAE1ED2DC5600515810 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
|
74858FAE1ED2DC5600515810 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
|
||||||
7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = "<group>"; };
|
7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = "<group>"; };
|
||||||
|
|
|
@ -1,8 +1,10 @@
|
||||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="10117" systemVersion="15F34" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" initialViewController="BYZ-38-t0r">
|
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="32700.99.1234" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES" initialViewController="BYZ-38-t0r">
|
||||||
|
<device id="retina6_12" orientation="portrait" appearance="light"/>
|
||||||
<dependencies>
|
<dependencies>
|
||||||
<deployment identifier="iOS"/>
|
<deployment identifier="iOS"/>
|
||||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="10085"/>
|
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="22685"/>
|
||||||
|
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
<scenes>
|
<scenes>
|
||||||
<!--Flutter View Controller-->
|
<!--Flutter View Controller-->
|
||||||
|
@ -14,13 +16,14 @@
|
||||||
<viewControllerLayoutGuide type="bottom" id="wfy-db-euE"/>
|
<viewControllerLayoutGuide type="bottom" id="wfy-db-euE"/>
|
||||||
</layoutGuides>
|
</layoutGuides>
|
||||||
<view key="view" contentMode="scaleToFill" id="8bC-Xf-vdC">
|
<view key="view" contentMode="scaleToFill" id="8bC-Xf-vdC">
|
||||||
<rect key="frame" x="0.0" y="0.0" width="600" height="600"/>
|
<rect key="frame" x="0.0" y="0.0" width="393" height="852"/>
|
||||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||||
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
|
<color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||||
</view>
|
</view>
|
||||||
</viewController>
|
</viewController>
|
||||||
<placeholder placeholderIdentifier="IBFirstResponder" id="dkx-z0-nzr" sceneMemberID="firstResponder"/>
|
<placeholder placeholderIdentifier="IBFirstResponder" id="dkx-z0-nzr" sceneMemberID="firstResponder"/>
|
||||||
</objects>
|
</objects>
|
||||||
|
<point key="canvasLocation" x="-16" y="-40"/>
|
||||||
</scene>
|
</scene>
|
||||||
</scenes>
|
</scenes>
|
||||||
</document>
|
</document>
|
||||||
|
|
|
@ -16,6 +16,8 @@ import 'package:google_fonts/google_fonts.dart';
|
||||||
import 'forgot_password_template_component_model.dart';
|
import 'forgot_password_template_component_model.dart';
|
||||||
export 'forgot_password_template_component_model.dart';
|
export 'forgot_password_template_component_model.dart';
|
||||||
|
|
||||||
|
//
|
||||||
|
|
||||||
class ForgotPasswordTemplateComponentWidget extends StatefulWidget {
|
class ForgotPasswordTemplateComponentWidget extends StatefulWidget {
|
||||||
const ForgotPasswordTemplateComponentWidget({super.key});
|
const ForgotPasswordTemplateComponentWidget({super.key});
|
||||||
|
|
||||||
|
@ -81,7 +83,8 @@ class _ForgotPasswordTemplateComponentWidgetState
|
||||||
tablet: false,
|
tablet: false,
|
||||||
))
|
))
|
||||||
Padding(
|
Padding(
|
||||||
padding: const EdgeInsetsDirectional.fromSTEB(16.0, 0.0, 16.0, 8.0),
|
padding:
|
||||||
|
const EdgeInsetsDirectional.fromSTEB(16.0, 0.0, 16.0, 8.0),
|
||||||
child: InkWell(
|
child: InkWell(
|
||||||
splashColor: Colors.transparent,
|
splashColor: Colors.transparent,
|
||||||
focusColor: Colors.transparent,
|
focusColor: Colors.transparent,
|
||||||
|
@ -103,8 +106,8 @@ class _ForgotPasswordTemplateComponentWidgetState
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
Padding(
|
Padding(
|
||||||
padding:
|
padding: const EdgeInsetsDirectional.fromSTEB(
|
||||||
const EdgeInsetsDirectional.fromSTEB(12.0, 0.0, 0.0, 0.0),
|
12.0, 0.0, 0.0, 0.0),
|
||||||
child: Text(
|
child: Text(
|
||||||
'',
|
'',
|
||||||
style:
|
style:
|
||||||
|
@ -124,7 +127,8 @@ class _ForgotPasswordTemplateComponentWidgetState
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
Padding(
|
Padding(
|
||||||
padding: const EdgeInsetsDirectional.fromSTEB(16.0, 0.0, 0.0, 0.0),
|
padding:
|
||||||
|
const EdgeInsetsDirectional.fromSTEB(16.0, 0.0, 0.0, 0.0),
|
||||||
child: Text(
|
child: Text(
|
||||||
FFLocalizations.of(context).getText(
|
FFLocalizations.of(context).getText(
|
||||||
'xxm3ajsy' /* ESQUECEU SUA SENHA? */,
|
'xxm3ajsy' /* ESQUECEU SUA SENHA? */,
|
||||||
|
@ -140,7 +144,8 @@ class _ForgotPasswordTemplateComponentWidgetState
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
Padding(
|
Padding(
|
||||||
padding: const EdgeInsetsDirectional.fromSTEB(16.0, 4.0, 16.0, 4.0),
|
padding:
|
||||||
|
const EdgeInsetsDirectional.fromSTEB(16.0, 4.0, 16.0, 4.0),
|
||||||
child: Text(
|
child: Text(
|
||||||
FFLocalizations.of(context).getText(
|
FFLocalizations.of(context).getText(
|
||||||
'wu2f7yzo' /* Não se preucupe nós vamos te a... */,
|
'wu2f7yzo' /* Não se preucupe nós vamos te a... */,
|
||||||
|
@ -160,7 +165,8 @@ class _ForgotPasswordTemplateComponentWidgetState
|
||||||
key: _model.formKey,
|
key: _model.formKey,
|
||||||
autovalidateMode: AutovalidateMode.onUserInteraction,
|
autovalidateMode: AutovalidateMode.onUserInteraction,
|
||||||
child: Padding(
|
child: Padding(
|
||||||
padding: const EdgeInsetsDirectional.fromSTEB(16.0, 12.0, 16.0, 0.0),
|
padding:
|
||||||
|
const EdgeInsetsDirectional.fromSTEB(16.0, 12.0, 16.0, 0.0),
|
||||||
child: SizedBox(
|
child: SizedBox(
|
||||||
width: double.infinity,
|
width: double.infinity,
|
||||||
child: TextFormField(
|
child: TextFormField(
|
||||||
|
@ -246,31 +252,43 @@ class _ForgotPasswordTemplateComponentWidgetState
|
||||||
Align(
|
Align(
|
||||||
alignment: const AlignmentDirectional(0.0, 0.0),
|
alignment: const AlignmentDirectional(0.0, 0.0),
|
||||||
child: Padding(
|
child: Padding(
|
||||||
padding: const EdgeInsetsDirectional.fromSTEB(0.0, 24.0, 0.0, 0.0),
|
padding:
|
||||||
|
const EdgeInsetsDirectional.fromSTEB(0.0, 24.0, 0.0, 0.0),
|
||||||
child: FFButtonWidget(
|
child: FFButtonWidget(
|
||||||
onPressed: (_model.emailAddressTextController.text == '' || !ValidatorUtil.isValidEmail(_model.emailAddressTextController.text))
|
onPressed: (_model.emailAddressTextController.text == '' ||
|
||||||
|
!ValidatorUtil.isValidEmail(
|
||||||
|
_model.emailAddressTextController.text))
|
||||||
? null
|
? null
|
||||||
: () async {
|
: () async {
|
||||||
|
|
||||||
try {
|
try {
|
||||||
_model.req = await PhpGroup.forgotPasswordCall.call(
|
_model.req = await PhpGroup.forgotPasswordCall.call(
|
||||||
email: _model.emailAddressTextController.text,
|
email: _model.emailAddressTextController.text,
|
||||||
);
|
);
|
||||||
|
|
||||||
if (PhpGroup.forgotPasswordCall.error((_model.req?.jsonBody ?? '')) == false) {
|
if (PhpGroup.forgotPasswordCall
|
||||||
await DialogUtil.success(context, FFLocalizations.of(context).getVariableText(
|
.error((_model.req?.jsonBody ?? '')) ==
|
||||||
|
false) {
|
||||||
|
await DialogUtil.success(
|
||||||
|
context,
|
||||||
|
FFLocalizations.of(context).getVariableText(
|
||||||
enText: "Send E-mail Successful!",
|
enText: "Send E-mail Successful!",
|
||||||
ptText: "E-mail Enviado com Sucesso!"
|
ptText: "E-mail Enviado com Sucesso!"));
|
||||||
));
|
|
||||||
Navigator.pop(context);
|
Navigator.pop(context);
|
||||||
} else {
|
} else {
|
||||||
await DialogUtil.error(context, PhpGroup.forgotPasswordCall.msg((_model.req?.jsonBody ?? ''))!);
|
await DialogUtil.error(
|
||||||
|
context,
|
||||||
|
PhpGroup.forgotPasswordCall
|
||||||
|
.msg((_model.req?.jsonBody ?? ''))!);
|
||||||
}
|
}
|
||||||
|
|
||||||
setState(() {});
|
setState(() {});
|
||||||
|
|
||||||
} catch (error, stack) {
|
} catch (error, stack) {
|
||||||
LogUtil.requestAPIFailed("iforgot.php", _model.emailAddressTextController.text, "Recuperar Senha", error, stack);
|
LogUtil.requestAPIFailed(
|
||||||
|
"iforgot.php",
|
||||||
|
_model.emailAddressTextController.text,
|
||||||
|
"Recuperar Senha",
|
||||||
|
error,
|
||||||
|
stack);
|
||||||
await DialogUtil.errorDefault(context);
|
await DialogUtil.errorDefault(context);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -280,9 +298,10 @@ class _ForgotPasswordTemplateComponentWidgetState
|
||||||
options: FFButtonOptions(
|
options: FFButtonOptions(
|
||||||
width: 270.0,
|
width: 270.0,
|
||||||
height: 50.0,
|
height: 50.0,
|
||||||
padding: const EdgeInsetsDirectional.fromSTEB(0.0, 0.0, 0.0, 0.0),
|
padding: const EdgeInsetsDirectional.fromSTEB(
|
||||||
iconPadding:
|
0.0, 0.0, 0.0, 0.0),
|
||||||
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,
|
color: FlutterFlowTheme.of(context).primary,
|
||||||
textStyle: FlutterFlowTheme.of(context).titleSmall.override(
|
textStyle: FlutterFlowTheme.of(context).titleSmall.override(
|
||||||
fontFamily: 'Plus Jakarta Sans',
|
fontFamily: 'Plus Jakarta Sans',
|
||||||
|
@ -298,12 +317,8 @@ class _ForgotPasswordTemplateComponentWidgetState
|
||||||
color: Colors.transparent,
|
color: Colors.transparent,
|
||||||
width: 1.0,
|
width: 1.0,
|
||||||
),
|
),
|
||||||
disabledColor:
|
disabledColor: FlutterFlowTheme.of(context).customColor5,
|
||||||
FlutterFlowTheme.of(
|
disabledTextColor: Colors.white,
|
||||||
context)
|
|
||||||
.customColor5,
|
|
||||||
disabledTextColor:
|
|
||||||
Colors.white,
|
|
||||||
),
|
),
|
||||||
showLoadingIndicator: true,
|
showLoadingIndicator: true,
|
||||||
),
|
),
|
||||||
|
|
|
@ -44,6 +44,7 @@ class RegisiterVistorTemplateComponentModel
|
||||||
atividade: 'getVisitante',
|
atividade: 'getVisitante',
|
||||||
documento: document,
|
documento: document,
|
||||||
);
|
);
|
||||||
|
|
||||||
log('${response.jsonBody}');
|
log('${response.jsonBody}');
|
||||||
if (response.jsonBody['visitante']['VTE_ID'] != '0' &&
|
if (response.jsonBody['visitante']['VTE_ID'] != '0' &&
|
||||||
response.jsonBody['error'] != 'false') {
|
response.jsonBody['error'] != 'false') {
|
||||||
|
|
|
@ -38,6 +38,8 @@ class _RegisiterVistorTemplateComponentWidgetState
|
||||||
|
|
||||||
final scaffoldKey = GlobalKey<ScaffoldState>();
|
final scaffoldKey = GlobalKey<ScaffoldState>();
|
||||||
|
|
||||||
|
bool _isVisitorRegistered = false;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
void initState() {
|
void initState() {
|
||||||
super.initState();
|
super.initState();
|
||||||
|
@ -71,6 +73,35 @@ class _RegisiterVistorTemplateComponentWidgetState
|
||||||
setState(() {});
|
setState(() {});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool _isFormValid(BuildContext context) {
|
||||||
|
if (_model.uploadedLocalFile.bytes?.isEmpty ?? true) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (_model.textController1.text.isEmpty ||
|
||||||
|
_model.textController1.text == '') {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (_model.dropDownValue == null ||
|
||||||
|
_model.dropDownValue!.isEmpty ||
|
||||||
|
_model.dropDownValue == '') {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (_model.textController2.text.isEmpty ||
|
||||||
|
_model.textController2.text == '') {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
log("Visitante Já Cadastrado $_isVisitorRegistered");
|
||||||
|
if (_isVisitorRegistered) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
BehaviorSubject<bool> visitorAlreadyRegistered = BehaviorSubject<bool>();
|
BehaviorSubject<bool> visitorAlreadyRegistered = BehaviorSubject<bool>();
|
||||||
|
@ -216,9 +247,12 @@ class _RegisiterVistorTemplateComponentWidgetState
|
||||||
} else if (snapshot.hasError ||
|
} else if (snapshot.hasError ||
|
||||||
snapshot.data == null ||
|
snapshot.data == null ||
|
||||||
snapshot.data == '') {
|
snapshot.data == '') {
|
||||||
|
// safeSetState(() => _isVisitorRegistered = false);
|
||||||
|
_isVisitorRegistered = false;
|
||||||
visitorAlreadyRegistered.add(true);
|
visitorAlreadyRegistered.add(true);
|
||||||
return const SizedBox();
|
return const SizedBox();
|
||||||
} else {
|
} else {
|
||||||
|
_isVisitorRegistered = true;
|
||||||
visitorAlreadyRegistered.add(false);
|
visitorAlreadyRegistered.add(false);
|
||||||
return _model.textController2.text.isEmpty
|
return _model.textController2.text.isEmpty
|
||||||
? const SizedBox()
|
? const SizedBox()
|
||||||
|
@ -334,41 +368,11 @@ class _RegisiterVistorTemplateComponentWidgetState
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
Padding(
|
Padding(
|
||||||
padding:
|
padding: const EdgeInsetsDirectional.fromSTEB(
|
||||||
const EdgeInsetsDirectional.fromSTEB(0.0, 0.0, 0.0, 10.0),
|
24.0, 0.0, 24.0, 10.0),
|
||||||
child: Container(
|
|
||||||
width: MediaQuery.sizeOf(context).width * 0.95,
|
|
||||||
decoration: const BoxDecoration(),
|
|
||||||
child: Column(
|
child: Column(
|
||||||
children: [
|
children: [
|
||||||
Row(
|
FlutterFlowDropDown<String>(
|
||||||
mainAxisSize: MainAxisSize.min,
|
|
||||||
mainAxisAlignment: MainAxisAlignment.start,
|
|
||||||
children: [
|
|
||||||
Padding(
|
|
||||||
padding: const EdgeInsetsDirectional.fromSTEB(
|
|
||||||
0.0, 0.0, 0.0, 7.0),
|
|
||||||
child: Text(
|
|
||||||
FFLocalizations.of(context).getText(
|
|
||||||
'yp23q90m' /* Selecione o tipo: */,
|
|
||||||
),
|
|
||||||
style: FlutterFlowTheme.of(context)
|
|
||||||
.bodyMedium
|
|
||||||
.override(
|
|
||||||
fontFamily: FlutterFlowTheme.of(context)
|
|
||||||
.bodyMediumFamily,
|
|
||||||
letterSpacing: 0.0,
|
|
||||||
useGoogleFonts: GoogleFonts.asMap()
|
|
||||||
.containsKey(
|
|
||||||
FlutterFlowTheme.of(context)
|
|
||||||
.bodyMediumFamily),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
Padding(
|
|
||||||
padding: const EdgeInsetsDirectional.fromSTEB(
|
|
||||||
0.0, 0.0, 0.0, 5.0),
|
|
||||||
child: FlutterFlowDropDown<String>(
|
|
||||||
controller: _model.dropDownValueController ??=
|
controller: _model.dropDownValueController ??=
|
||||||
FormFieldController<String>(null),
|
FormFieldController<String>(null),
|
||||||
options: [
|
options: [
|
||||||
|
@ -381,18 +385,16 @@ class _RegisiterVistorTemplateComponentWidgetState
|
||||||
],
|
],
|
||||||
onChanged: (val) =>
|
onChanged: (val) =>
|
||||||
setState(() => _model.dropDownValue = val),
|
setState(() => _model.dropDownValue = val),
|
||||||
width: 200.0,
|
width: MediaQuery.sizeOf(context).width * 0.9,
|
||||||
height: 44.0,
|
// height: 44.0,
|
||||||
textStyle: FlutterFlowTheme.of(context)
|
textStyle: FlutterFlowTheme.of(context)
|
||||||
.bodyMedium
|
.bodyMedium
|
||||||
.override(
|
.override(
|
||||||
fontFamily: FlutterFlowTheme.of(context)
|
fontFamily:
|
||||||
.bodyMediumFamily,
|
FlutterFlowTheme.of(context).bodyMediumFamily,
|
||||||
color: FlutterFlowTheme.of(context)
|
color: FlutterFlowTheme.of(context).primaryText,
|
||||||
.primaryText,
|
|
||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
useGoogleFonts: GoogleFonts.asMap()
|
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
||||||
.containsKey(
|
|
||||||
FlutterFlowTheme.of(context)
|
FlutterFlowTheme.of(context)
|
||||||
.bodyMediumFamily),
|
.bodyMediumFamily),
|
||||||
),
|
),
|
||||||
|
@ -401,13 +403,11 @@ class _RegisiterVistorTemplateComponentWidgetState
|
||||||
),
|
),
|
||||||
icon: Icon(
|
icon: Icon(
|
||||||
Icons.keyboard_arrow_down_rounded,
|
Icons.keyboard_arrow_down_rounded,
|
||||||
color:
|
color: FlutterFlowTheme.of(context).primaryText,
|
||||||
FlutterFlowTheme.of(context).primaryText,
|
|
||||||
size: 24.0,
|
size: 24.0,
|
||||||
),
|
),
|
||||||
elevation: 2.0,
|
elevation: 2.0,
|
||||||
borderColor:
|
borderColor: FlutterFlowTheme.of(context).customColor6,
|
||||||
FlutterFlowTheme.of(context).customColor6,
|
|
||||||
borderWidth: 0.5,
|
borderWidth: 0.5,
|
||||||
borderRadius: 8.0,
|
borderRadius: 8.0,
|
||||||
margin: const EdgeInsetsDirectional.fromSTEB(
|
margin: const EdgeInsetsDirectional.fromSTEB(
|
||||||
|
@ -417,11 +417,6 @@ class _RegisiterVistorTemplateComponentWidgetState
|
||||||
isSearchable: false,
|
isSearchable: false,
|
||||||
isMultiSelect: false,
|
isMultiSelect: false,
|
||||||
),
|
),
|
||||||
),
|
|
||||||
]
|
|
||||||
.divide(const SizedBox(width: 19.0))
|
|
||||||
.addToStart(const SizedBox(width: 30.0)),
|
|
||||||
),
|
|
||||||
if (_model.dropDownValue == null ||
|
if (_model.dropDownValue == null ||
|
||||||
_model.dropDownValue == '')
|
_model.dropDownValue == '')
|
||||||
Align(
|
Align(
|
||||||
|
@ -448,7 +443,6 @@ class _RegisiterVistorTemplateComponentWidgetState
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
|
||||||
Builder(
|
Builder(
|
||||||
builder: (context) {
|
builder: (context) {
|
||||||
if ((_model.uploadedLocalFile.bytes?.isNotEmpty ?? false)) {
|
if ((_model.uploadedLocalFile.bytes?.isNotEmpty ?? false)) {
|
||||||
|
@ -491,10 +485,11 @@ class _RegisiterVistorTemplateComponentWidgetState
|
||||||
allowPhoto: true,
|
allowPhoto: true,
|
||||||
includeDimensions: true,
|
includeDimensions: true,
|
||||||
);
|
);
|
||||||
if (selectedMedia != null &&
|
if (selectedMedia != null) {
|
||||||
selectedMedia.every((m) =>
|
// &&
|
||||||
validateFileFormat(
|
// selectedMedia.every((m) =>
|
||||||
m.storagePath, context))) {
|
// validateFileFormat(
|
||||||
|
// m.storagePath, context))) {
|
||||||
setState(() => _model.isDataUploading = true);
|
setState(() => _model.isDataUploading = true);
|
||||||
var selectedUploadedFiles =
|
var selectedUploadedFiles =
|
||||||
<FFUploadedFile>[];
|
<FFUploadedFile>[];
|
||||||
|
@ -793,12 +788,7 @@ class _RegisiterVistorTemplateComponentWidgetState
|
||||||
padding:
|
padding:
|
||||||
const EdgeInsetsDirectional.fromSTEB(0.0, 65.0, 0.0, 0.0),
|
const EdgeInsetsDirectional.fromSTEB(0.0, 65.0, 0.0, 0.0),
|
||||||
child: FFButtonWidget(
|
child: FFButtonWidget(
|
||||||
onPressed: (((_model.uploadedLocalFile.bytes?.isNotEmpty ??
|
onPressed: _isFormValid(context)
|
||||||
false)) &&
|
|
||||||
(_model.textController1.text != '') &&
|
|
||||||
(_model.dropDownValue != null &&
|
|
||||||
_model.dropDownValue != '') &&
|
|
||||||
(_model.textController2.text != ''))
|
|
||||||
? () async {
|
? () async {
|
||||||
log(visitorAlreadyRegistered.value.toString());
|
log(visitorAlreadyRegistered.value.toString());
|
||||||
if (visitorAlreadyRegistered.value == true) {
|
if (visitorAlreadyRegistered.value == true) {
|
||||||
|
|
|
@ -100,7 +100,8 @@ class _SignInTemplateComponentWidgetState
|
||||||
}
|
}
|
||||||
|
|
||||||
bool _isFormInvalid() {
|
bool _isFormInvalid() {
|
||||||
if (_model.emailAddressTextController.text == '' || _model.passwordTextController.text == '') {
|
if (_model.emailAddressTextController.text == '' ||
|
||||||
|
_model.passwordTextController.text == '') {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -185,7 +186,8 @@ class _SignInTemplateComponentWidgetState
|
||||||
decoration: const BoxDecoration(),
|
decoration: const BoxDecoration(),
|
||||||
child: ClipRRect(
|
child: ClipRRect(
|
||||||
borderRadius: BorderRadius.circular(8.0),
|
borderRadius: BorderRadius.circular(8.0),
|
||||||
child: const AtomImageSvgTheme(filename: 'login', width: 600, height: 155),
|
child: const AtomImageSvgTheme(
|
||||||
|
filename: 'login', width: 600, height: 155),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
Column(
|
Column(
|
||||||
|
@ -697,7 +699,8 @@ class _SignInTemplateComponentWidgetState
|
||||||
.fromSTEB(0.0, 0.0,
|
.fromSTEB(0.0, 0.0,
|
||||||
0.0, 16.0),
|
0.0, 16.0),
|
||||||
child: FFButtonWidget(
|
child: FFButtonWidget(
|
||||||
onPressed: _isFormInvalid()
|
onPressed:
|
||||||
|
_isFormInvalid()
|
||||||
? null
|
? null
|
||||||
: () async {
|
: () async {
|
||||||
try {
|
try {
|
||||||
|
@ -711,10 +714,20 @@ class _SignInTemplateComponentWidgetState
|
||||||
.passwordTextController
|
.passwordTextController
|
||||||
.text,
|
.text,
|
||||||
);
|
);
|
||||||
setState(() {});
|
setState(
|
||||||
|
() {});
|
||||||
} catch (e, s) {
|
} catch (e, s) {
|
||||||
await DialogUtil.errorDefault(context);
|
await DialogUtil
|
||||||
LogUtil.requestAPIFailed('login.php', _model.emailAddressTextController.text, "Login", e, s);
|
.errorDefault(
|
||||||
|
context);
|
||||||
|
LogUtil.requestAPIFailed(
|
||||||
|
'login.php',
|
||||||
|
_model
|
||||||
|
.emailAddressTextController
|
||||||
|
.text,
|
||||||
|
"Login",
|
||||||
|
e,
|
||||||
|
s);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
text: FFLocalizations.of(
|
text: FFLocalizations.of(
|
||||||
|
@ -773,7 +786,8 @@ class _SignInTemplateComponentWidgetState
|
||||||
const Color(
|
const Color(
|
||||||
0xE81AAB5F),
|
0xE81AAB5F),
|
||||||
),
|
),
|
||||||
showLoadingIndicator: true,
|
showLoadingIndicator:
|
||||||
|
true,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
@ -866,15 +880,20 @@ class _SignInTemplateComponentWidgetState
|
||||||
onTap: () async {
|
onTap: () async {
|
||||||
await showModalBottomSheet(
|
await showModalBottomSheet(
|
||||||
isScrollControlled: true,
|
isScrollControlled: true,
|
||||||
backgroundColor: Colors.transparent,
|
backgroundColor:
|
||||||
|
Colors.transparent,
|
||||||
context: context,
|
context: context,
|
||||||
builder: (context) {
|
builder: (context) {
|
||||||
return Padding(
|
return Padding(
|
||||||
padding: MediaQuery.viewInsetsOf(context),
|
padding:
|
||||||
child: const ForgotPasswordTemplateComponentWidget(),
|
MediaQuery.viewInsetsOf(
|
||||||
|
context),
|
||||||
|
child:
|
||||||
|
const ForgotPasswordTemplateComponentWidget(),
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
).then((value) => safeSetState(() {}));
|
).then(
|
||||||
|
(value) => safeSetState(() {}));
|
||||||
},
|
},
|
||||||
child: RichText(
|
child: RichText(
|
||||||
textScaler: MediaQuery.of(context)
|
textScaler: MediaQuery.of(context)
|
||||||
|
|
|
@ -11,7 +11,7 @@ import 'package:video_player/video_player.dart';
|
||||||
import 'flutter_flow_theme.dart';
|
import 'flutter_flow_theme.dart';
|
||||||
import 'flutter_flow_util.dart';
|
import 'flutter_flow_util.dart';
|
||||||
|
|
||||||
const allowedFormats = {'image/png', 'image/jpeg', 'video/mp4', 'image/gif'};
|
const allowedFormats = {'image/png', 'image/jpeg'};
|
||||||
|
|
||||||
class SelectedFile {
|
class SelectedFile {
|
||||||
const SelectedFile({
|
const SelectedFile({
|
||||||
|
|
Loading…
Reference in New Issue