Merge branch 'fix/visitorRegister' into fix/completeSchedule
This commit is contained in:
commit
ee8591f41d
|
@ -17,9 +17,6 @@ import 'package:hub/pages/home_page/home_page_model.dart';
|
||||||
import 'package:hub/shared/utils/dialog_util.dart';
|
import 'package:hub/shared/utils/dialog_util.dart';
|
||||||
import 'package:qr_flutter/qr_flutter.dart';
|
import 'package:qr_flutter/qr_flutter.dart';
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
import 'package:url_launcher/url_launcher.dart';
|
import 'package:url_launcher/url_launcher.dart';
|
||||||
|
|
||||||
import '../shared/utils/log_util.dart';
|
import '../shared/utils/log_util.dart';
|
||||||
|
@ -111,7 +108,6 @@ Future singInLoginAction(
|
||||||
String? emailAdress,
|
String? emailAdress,
|
||||||
String? password,
|
String? password,
|
||||||
}) async {
|
}) async {
|
||||||
|
|
||||||
try {
|
try {
|
||||||
String? devUUID;
|
String? devUUID;
|
||||||
ApiCallResponse? loginCall;
|
ApiCallResponse? loginCall;
|
||||||
|
@ -144,8 +140,7 @@ Future singInLoginAction(
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
|
||||||
if (PhpGroup.loginCall.error((loginCall.jsonBody ?? '')) == false) {
|
if (PhpGroup.loginCall.error((loginCall.jsonBody ?? '')) == false) {
|
||||||
|
|
||||||
FFAppState().userUUID = PhpGroup.loginCall.userUUID(
|
FFAppState().userUUID = PhpGroup.loginCall.userUUID(
|
||||||
(loginCall.jsonBody ?? ''),
|
(loginCall.jsonBody ?? ''),
|
||||||
)!;
|
)!;
|
||||||
|
@ -158,11 +153,14 @@ Future singInLoginAction(
|
||||||
|
|
||||||
FFAppState().updatedAt = '00/00/0000 00:00:00';
|
FFAppState().updatedAt = '00/00/0000 00:00:00';
|
||||||
|
|
||||||
FFAppState().status = PhpGroup.loginCall.userStatus((loginCall.jsonBody ?? ''))!;
|
FFAppState().status =
|
||||||
|
PhpGroup.loginCall.userStatus((loginCall.jsonBody ?? ''))!;
|
||||||
|
|
||||||
FFAppState().userDevUUID = PhpGroup.loginCall.userDeviceId((loginCall.jsonBody ?? ''))!;
|
FFAppState().userDevUUID =
|
||||||
|
PhpGroup.loginCall.userDeviceId((loginCall.jsonBody ?? ''))!;
|
||||||
|
|
||||||
FFAppState().name = PhpGroup.loginCall.userName((loginCall.jsonBody ?? ''))!;
|
FFAppState().name =
|
||||||
|
PhpGroup.loginCall.userName((loginCall.jsonBody ?? ''))!;
|
||||||
|
|
||||||
FFAppState().serialNumber = await getSerialNumber() ?? '';
|
FFAppState().serialNumber = await getSerialNumber() ?? '';
|
||||||
|
|
||||||
|
@ -170,11 +168,11 @@ Future singInLoginAction(
|
||||||
|
|
||||||
await toggleHomePage(context);
|
await toggleHomePage(context);
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
if (PhpGroup.loginCall.msg((loginCall?.jsonBody ?? '')) == null) {
|
if (PhpGroup.loginCall.msg((loginCall?.jsonBody ?? '')) == null) {
|
||||||
DialogUtil.errorDefault(context);
|
DialogUtil.errorDefault(context);
|
||||||
} else {
|
} else {
|
||||||
DialogUtil.error(context, PhpGroup.loginCall.msg((loginCall?.jsonBody ?? '')).toString());
|
DialogUtil.error(context,
|
||||||
|
PhpGroup.loginCall.msg((loginCall?.jsonBody ?? '')).toString());
|
||||||
}
|
}
|
||||||
|
|
||||||
FFAppState().deleteEmail();
|
FFAppState().deleteEmail();
|
||||||
|
@ -188,12 +186,11 @@ Future singInLoginAction(
|
||||||
}
|
}
|
||||||
|
|
||||||
return;
|
return;
|
||||||
|
|
||||||
} catch (e, s) {
|
} catch (e, s) {
|
||||||
DialogUtil.errorDefault(context);
|
DialogUtil.errorDefault(context);
|
||||||
LogUtil.requestAPIFailed('login.php', emailAdress.toString(), "Login", e, s);
|
LogUtil.requestAPIFailed(
|
||||||
|
'login.php', emailAdress.toString(), "Login", e, s);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Future<bool> signUpRegisterAction(
|
Future<bool> signUpRegisterAction(
|
||||||
|
@ -333,7 +330,6 @@ Future toggleSignInPage(BuildContext context) async {
|
||||||
}
|
}
|
||||||
|
|
||||||
Future toggleSignUpPage(BuildContext context) async {
|
Future toggleSignUpPage(BuildContext context) async {
|
||||||
|
|
||||||
context.pushNamed(
|
context.pushNamed(
|
||||||
'signUpPage',
|
'signUpPage',
|
||||||
extra: <String, dynamic>{
|
extra: <String, dynamic>{
|
||||||
|
@ -468,12 +464,12 @@ Future<bool> checkLocals({
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
safeSetState(() {}); // Chamada otimizada fora do then para evitar encadeamentos desnecessários.
|
safeSetState(
|
||||||
|
() {}); // Chamada otimizada fora do then para evitar encadeamentos desnecessários.
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
Future changeStatusAction(
|
Future changeStatusAction(
|
||||||
BuildContext context,
|
BuildContext context,
|
||||||
String status,
|
String status,
|
||||||
|
@ -523,14 +519,10 @@ Future changeStatusAction(
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/// QR Code
|
/// QR Code
|
||||||
|
|
||||||
|
|
||||||
Uint8List assembleQRPacket(int direction, String identifier, String password) {
|
Uint8List assembleQRPacket(int direction, String identifier, String password) {
|
||||||
List<int> packet = [direction];
|
List<int> packet = [direction];
|
||||||
|
|
||||||
|
@ -569,13 +561,15 @@ Uint8List assembleQRPacket(int direction, String identifier, String password) {
|
||||||
check ^= b;
|
check ^= b;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (check == int.parse('0D', radix: 16) || check == int.parse('0A', radix: 16)) {
|
if (check == int.parse('0D', radix: 16) ||
|
||||||
|
check == int.parse('0A', radix: 16)) {
|
||||||
packet.add(int.parse('FF', radix: 16));
|
packet.add(int.parse('FF', radix: 16));
|
||||||
} else {
|
} else {
|
||||||
packet.add(check);
|
packet.add(check);
|
||||||
}
|
}
|
||||||
|
|
||||||
var bytes = packet.map((byte) => byte.toRadixString(16).padLeft(2, '0')).join((' '));
|
var bytes =
|
||||||
|
packet.map((byte) => byte.toRadixString(16).padLeft(2, '0')).join((' '));
|
||||||
|
|
||||||
log("Pacote: $packet");
|
log("Pacote: $packet");
|
||||||
log("Bytes: $bytes");
|
log("Bytes: $bytes");
|
||||||
|
@ -586,22 +580,24 @@ Uint8List hexStringToByteArray(String s) {
|
||||||
int len = s.length;
|
int len = s.length;
|
||||||
Uint8List data = Uint8List(len ~/ 2);
|
Uint8List data = Uint8List(len ~/ 2);
|
||||||
for (int i = 0; i < len; i += 2) {
|
for (int i = 0; i < len; i += 2) {
|
||||||
data[i ~/ 2] = ((int.parse(s[i], radix: 16) << 4) + int.parse(s[i + 1], radix: 16));
|
data[i ~/ 2] =
|
||||||
|
((int.parse(s[i], radix: 16) << 4) + int.parse(s[i + 1], radix: 16));
|
||||||
}
|
}
|
||||||
return data;
|
return data;
|
||||||
}
|
}
|
||||||
|
|
||||||
String byteToHexa(Uint8List pDados) {
|
String byteToHexa(Uint8List pDados) {
|
||||||
return pDados.map((byte) => byte.toRadixString(16).padLeft(2, '0').toUpperCase()).join();
|
return pDados
|
||||||
|
.map((byte) => byte.toRadixString(16).padLeft(2, '0').toUpperCase())
|
||||||
|
.join();
|
||||||
}
|
}
|
||||||
|
|
||||||
Future<String> byteToString(Uint8List bytes) async {
|
Future<String> byteToString(Uint8List bytes) async {
|
||||||
return String.fromCharCodes(bytes);
|
return String.fromCharCodes(bytes);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
Widget buildQrCode(
|
Widget buildQrCode(
|
||||||
{
|
{
|
||||||
// required String data,
|
// required String data,
|
||||||
// required String type,
|
// required String type,
|
||||||
// required int version,
|
// required int version,
|
||||||
|
@ -610,204 +606,207 @@ Widget buildQrCode(
|
||||||
required double dimension,
|
required double dimension,
|
||||||
required String identifier,
|
required String identifier,
|
||||||
required String pass,
|
required String pass,
|
||||||
required int direction
|
required int direction}) {
|
||||||
}
|
|
||||||
) {
|
|
||||||
try {
|
try {
|
||||||
log("pass: $pass");
|
log("pass: $pass");
|
||||||
const Color backgroundColor = Colors.white;
|
const Color backgroundColor = Colors.white;
|
||||||
const Color foregroundColor = Colors.black;
|
const Color foregroundColor = Colors.black;
|
||||||
return QrImageView.withQr(qr: QrCode.fromUint8List(data: assembleQRPacket(direction, identifier, pass), errorCorrectLevel: errorCorrectLevel), size: dimension, padding: const EdgeInsets.all(10), backgroundColor: backgroundColor, foregroundColor: foregroundColor);
|
return QrImageView.withQr(
|
||||||
|
qr: QrCode.fromUint8List(
|
||||||
|
data: assembleQRPacket(direction, identifier, pass),
|
||||||
|
errorCorrectLevel: errorCorrectLevel),
|
||||||
|
size: dimension,
|
||||||
|
padding: const EdgeInsets.all(10),
|
||||||
|
backgroundColor: backgroundColor,
|
||||||
|
foregroundColor: foregroundColor);
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
return Text("Erro ao gerar QR Code: ${e.toString()}");
|
return Text("Erro ao gerar QR Code: ${e.toString()}");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// // Retorna o conteúdo a ser codificado no QR Code.
|
||||||
|
// String getContents() {
|
||||||
|
// return data;
|
||||||
|
// }
|
||||||
|
|
||||||
// // Retorna o conteúdo a ser codificado no QR Code.
|
// // Retorna uma versão do conteúdo otimizada para exibição.
|
||||||
// String getContents() {
|
// String getDisplayContents() {
|
||||||
// return data;
|
// return data.trim();
|
||||||
// }
|
// }
|
||||||
|
|
||||||
// // Retorna uma versão do conteúdo otimizada para exibição.
|
// // Retorna o título baseado no tipo de conteúdo.
|
||||||
// String getDisplayContents() {
|
// String getTitle() {
|
||||||
// return data.trim();
|
// return type;
|
||||||
// }
|
// }
|
||||||
|
|
||||||
// // Retorna o título baseado no tipo de conteúdo.
|
// // Codifica o conteúdo em uma string adequada para o QR Code.
|
||||||
// String getTitle() {
|
// Future<String> encodeContents() async {
|
||||||
// return type;
|
// // Implementação específica para codificar o conteúdo.
|
||||||
// }
|
// return data; // Exemplo simplificado.
|
||||||
|
// }
|
||||||
|
|
||||||
// // Codifica o conteúdo em uma string adequada para o QR Code.
|
// // Codifica o conteúdo específico do QR Code.
|
||||||
// Future<String> encodeContents() async {
|
// Future<Widget> encodeQRCodeContents() async {
|
||||||
// // Implementação específica para codificar o conteúdo.
|
// return getQrCode();
|
||||||
// return data; // Exemplo simplificado.
|
// }
|
||||||
// }
|
|
||||||
|
|
||||||
// // Codifica o conteúdo específico do QR Code.
|
// // Gera o QR Code como um widget.
|
||||||
// Future<Widget> encodeQRCodeContents() async {
|
|
||||||
// return getQrCode();
|
|
||||||
// }
|
|
||||||
|
|
||||||
// // Gera o QR Code como um widget.
|
// // Codifica o conteúdo como um bitmap (pode ser útil para operações de baixo nível).
|
||||||
|
// // Future<Image> encodeAsBitmap() async {
|
||||||
|
// // // Implementação para codificar como bitmap.
|
||||||
|
// // return Image(image); // Exemplo simplificado.
|
||||||
|
// // }
|
||||||
|
|
||||||
|
// // Adivinha a codificação apropriada para o conteúdo.
|
||||||
|
// String guessAppropriateEncoding(String content) {
|
||||||
|
// // Implementação para adivinhar a codificação.
|
||||||
|
// return "UTF-8"; // Exemplo simplificado.
|
||||||
|
// }
|
||||||
|
|
||||||
// // Codifica o conteúdo como um bitmap (pode ser útil para operações de baixo nível).
|
// // Remove espaços em branco do início e do fim do conteúdo.
|
||||||
// // Future<Image> encodeAsBitmap() async {
|
// String trim(String content) {
|
||||||
// // // Implementação para codificar como bitmap.
|
// return content.trim();
|
||||||
// // return Image(image); // Exemplo simplificado.
|
// }
|
||||||
// // }
|
|
||||||
|
|
||||||
// // Adivinha a codificação apropriada para o conteúdo.
|
// // Escapa caracteres especiais para o formato MECARD.
|
||||||
// String guessAppropriateEncoding(String content) {
|
// String escapeMECARD(String content) {
|
||||||
// // Implementação para adivinhar a codificação.
|
// // Implementação para escapar caracteres.
|
||||||
// return "UTF-8"; // Exemplo simplificado.
|
// return content.replaceAll(':', '\\:'); // Exemplo simplificado.
|
||||||
// }
|
// }
|
||||||
|
|
||||||
// // Remove espaços em branco do início e do fim do conteúdo.
|
/// menu
|
||||||
// String trim(String content) {
|
|
||||||
// return content.trim();
|
|
||||||
// }
|
|
||||||
|
|
||||||
// // Escapa caracteres especiais para o formato MECARD.
|
Future scheduleVisitOptAction(BuildContext context) async {
|
||||||
// String escapeMECARD(String content) {
|
await showAdaptiveDialog(
|
||||||
// // Implementação para escapar caracteres.
|
context: context,
|
||||||
// return content.replaceAll(':', '\\:'); // Exemplo simplificado.
|
builder: (context) {
|
||||||
// }
|
return Padding(
|
||||||
|
padding: MediaQuery.viewInsetsOf(context),
|
||||||
/// menu
|
child: OptionSelectionModalWidget(
|
||||||
|
routesListStr: <String>[
|
||||||
Future scheduleVisitOptAction(BuildContext context) async {
|
'scheduleCompleteVisitPage',
|
||||||
await showAdaptiveDialog(
|
'scheduleProvisionalVisitPage',
|
||||||
context: context,
|
'fastPassPage',
|
||||||
builder: (context) {
|
],
|
||||||
return Padding(
|
iconsListIcon: <IconData>[
|
||||||
padding: MediaQuery.viewInsetsOf(context),
|
Icons.date_range_rounded,
|
||||||
child: OptionSelectionModalWidget(
|
Icons.date_range_rounded,
|
||||||
routesListStr: <String>[
|
Icons.date_range_rounded,
|
||||||
'scheduleCompleteVisitPage',
|
],
|
||||||
'scheduleProvisionalVisitPage',
|
nameListStr: <String>[
|
||||||
'fastPassPage',
|
FFLocalizations.of(context).getVariableText(
|
||||||
],
|
ptText: 'Visita\nCompleta',
|
||||||
iconsListIcon: <IconData>[
|
enText: 'Complete\nSchedule',
|
||||||
Icons.date_range_rounded,
|
),
|
||||||
Icons.date_range_rounded,
|
FFLocalizations.of(context).getVariableText(
|
||||||
Icons.date_range_rounded,
|
ptText: 'Visita\nProvisória',
|
||||||
],
|
enText: 'Provisional\nSchedule',
|
||||||
nameListStr: <String>[
|
),
|
||||||
FFLocalizations.of(context).getVariableText(
|
FFLocalizations.of(context).getVariableText(
|
||||||
ptText: 'Visita\nCompleta',
|
ptText: 'Visita\nRápida',
|
||||||
enText: 'Complete\nSchedule',
|
enText: 'Fast\nSchedule',
|
||||||
),
|
),
|
||||||
FFLocalizations.of(context).getVariableText(
|
],
|
||||||
ptText: 'Visita\nProvisória',
|
|
||||||
enText: 'Provisional\nSchedule',
|
|
||||||
),
|
|
||||||
FFLocalizations.of(context).getVariableText(
|
|
||||||
ptText: 'Visita\nRápida',
|
|
||||||
enText: 'Fast\nSchedule',
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
);
|
|
||||||
},
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
Future registerVisitorOptAction(BuildContext context) async {
|
|
||||||
context.pushNamed(
|
|
||||||
'registerVisitorPage',
|
|
||||||
extra: <String, dynamic>{
|
|
||||||
kTransitionInfoKey: const TransitionInfo(
|
|
||||||
hasTransition: true,
|
|
||||||
transitionType: PageTransitionType.scale,
|
|
||||||
alignment: Alignment.bottomCenter,
|
|
||||||
),
|
),
|
||||||
},
|
);
|
||||||
);
|
},
|
||||||
}
|
);
|
||||||
|
}
|
||||||
|
|
||||||
Future peopleOnThePropertyAction(BuildContext context) async {
|
Future registerVisitorOptAction(BuildContext context) async {
|
||||||
context.pushNamed(
|
context.pushNamed(
|
||||||
'peopleOnThePropertyPage',
|
'registerVisitorPage',
|
||||||
extra: <String, dynamic>{
|
extra: <String, dynamic>{
|
||||||
kTransitionInfoKey: const TransitionInfo(
|
kTransitionInfoKey: const TransitionInfo(
|
||||||
hasTransition: true,
|
hasTransition: true,
|
||||||
transitionType: PageTransitionType.fade,
|
transitionType: PageTransitionType.scale,
|
||||||
|
alignment: Alignment.bottomCenter,
|
||||||
|
),
|
||||||
|
},
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
Future peopleOnThePropertyAction(BuildContext context) async {
|
||||||
|
context.pushNamed(
|
||||||
|
'peopleOnThePropertyPage',
|
||||||
|
extra: <String, dynamic>{
|
||||||
|
kTransitionInfoKey: const TransitionInfo(
|
||||||
|
hasTransition: true,
|
||||||
|
transitionType: PageTransitionType.fade,
|
||||||
|
),
|
||||||
|
},
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
Future preferencesSettings(BuildContext context) async {
|
||||||
|
context.pushNamed(
|
||||||
|
'preferencesSettings',
|
||||||
|
extra: <String, dynamic>{
|
||||||
|
kTransitionInfoKey: const TransitionInfo(
|
||||||
|
hasTransition: true,
|
||||||
|
transitionType: PageTransitionType.scale,
|
||||||
|
alignment: Alignment.bottomCenter,
|
||||||
|
),
|
||||||
|
},
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
Future liberationHistoryOptAction(BuildContext context) async {
|
||||||
|
await showAdaptiveDialog(
|
||||||
|
// isScrollControlled: true,
|
||||||
|
// backgroundColor: Colors.transparent,
|
||||||
|
// enableDrag: false,
|
||||||
|
context: context,
|
||||||
|
builder: (context) {
|
||||||
|
return Padding(
|
||||||
|
padding: MediaQuery.viewInsetsOf(context),
|
||||||
|
child: OptionSelectionModalWidget(
|
||||||
|
routesListStr: <String>[
|
||||||
|
'liberationHistory',
|
||||||
|
'acessHistoryPage',
|
||||||
|
'scheduleCompleteVisitPage',
|
||||||
|
// 'messageHistoryPage',
|
||||||
|
],
|
||||||
|
iconsListIcon: <IconData>[
|
||||||
|
Icons.history_rounded,
|
||||||
|
Icons.history_rounded,
|
||||||
|
Icons.history_rounded,
|
||||||
|
// Icons.history_rounded,
|
||||||
|
],
|
||||||
|
nameListStr: <String>[
|
||||||
|
FFLocalizations.of(context).getVariableText(
|
||||||
|
ptText: 'Histórico\nde Liberação',
|
||||||
|
enText: 'Liberation\nHistory',
|
||||||
|
),
|
||||||
|
FFLocalizations.of(context).getVariableText(
|
||||||
|
ptText: 'Histórico\nde Acesso',
|
||||||
|
enText: 'Access\nHistory',
|
||||||
|
),
|
||||||
|
FFLocalizations.of(context).getVariableText(
|
||||||
|
ptText: 'Histórico\nde Visita',
|
||||||
|
enText: 'Visit\nHistory',
|
||||||
|
),
|
||||||
|
// FFLocalizations.of(context).getVariableText(
|
||||||
|
// ptText: 'Histórico\nde Mensagens',
|
||||||
|
// enText: 'Message\nHistory',
|
||||||
|
// ),
|
||||||
|
],
|
||||||
),
|
),
|
||||||
},
|
);
|
||||||
);
|
},
|
||||||
}
|
);
|
||||||
|
}
|
||||||
|
|
||||||
Future preferencesSettings(BuildContext context) async {
|
Future accessQRCodeOptAction(BuildContext context) async {
|
||||||
context.pushNamed(
|
context.pushNamed(
|
||||||
'preferencesSettings',
|
'qrCodePage',
|
||||||
extra: <String, dynamic>{
|
extra: <String, dynamic>{
|
||||||
kTransitionInfoKey: const TransitionInfo(
|
kTransitionInfoKey: const TransitionInfo(
|
||||||
hasTransition: true,
|
hasTransition: true,
|
||||||
transitionType: PageTransitionType.scale,
|
transitionType: PageTransitionType.scale,
|
||||||
alignment: Alignment.bottomCenter,
|
alignment: Alignment.bottomCenter,
|
||||||
),
|
),
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
Future liberationHistoryOptAction(BuildContext context) async {
|
|
||||||
await showAdaptiveDialog(
|
|
||||||
// isScrollControlled: true,
|
|
||||||
// backgroundColor: Colors.transparent,
|
|
||||||
// enableDrag: false,
|
|
||||||
context: context,
|
|
||||||
builder: (context) {
|
|
||||||
return Padding(
|
|
||||||
padding: MediaQuery.viewInsetsOf(context),
|
|
||||||
child: OptionSelectionModalWidget(
|
|
||||||
routesListStr: <String>[
|
|
||||||
'liberationHistory',
|
|
||||||
'acessHistoryPage',
|
|
||||||
'scheduleCompleteVisitPage',
|
|
||||||
// 'messageHistoryPage',
|
|
||||||
],
|
|
||||||
iconsListIcon: <IconData>[
|
|
||||||
Icons.history_rounded,
|
|
||||||
Icons.history_rounded,
|
|
||||||
Icons.history_rounded,
|
|
||||||
// Icons.history_rounded,
|
|
||||||
],
|
|
||||||
nameListStr: <String>[
|
|
||||||
FFLocalizations.of(context).getVariableText(
|
|
||||||
ptText: 'Histórico\nde Liberação',
|
|
||||||
enText: 'Liberation\nHistory',
|
|
||||||
),
|
|
||||||
FFLocalizations.of(context).getVariableText(
|
|
||||||
ptText: 'Histórico\nde Acesso',
|
|
||||||
enText: 'Access\nHistory',
|
|
||||||
),
|
|
||||||
FFLocalizations.of(context).getVariableText(
|
|
||||||
ptText: 'Histórico\nde Visita',
|
|
||||||
enText: 'Visit\nHistory',
|
|
||||||
),
|
|
||||||
// FFLocalizations.of(context).getVariableText(
|
|
||||||
// ptText: 'Histórico\nde Mensagens',
|
|
||||||
// enText: 'Message\nHistory',
|
|
||||||
// ),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
);
|
|
||||||
},
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
Future accessQRCodeOptAction(BuildContext context) async {
|
|
||||||
context.pushNamed(
|
|
||||||
'qrCodePage',
|
|
||||||
extra: <String, dynamic>{
|
|
||||||
kTransitionInfoKey: const TransitionInfo(
|
|
||||||
hasTransition: true,
|
|
||||||
transitionType: PageTransitionType.scale,
|
|
||||||
alignment: Alignment.bottomCenter,
|
|
||||||
),
|
|
||||||
},
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
|
@ -30,14 +30,13 @@ class FFAppState extends ChangeNotifier {
|
||||||
bool authenticated = false;
|
bool authenticated = false;
|
||||||
try {
|
try {
|
||||||
authenticated = await auth.authenticate(
|
authenticated = await auth.authenticate(
|
||||||
localizedReason: 'Scan your fingerprint to authenticate',
|
localizedReason: 'Scan your fingerprint to authenticate',
|
||||||
options: const AuthenticationOptions(
|
options: const AuthenticationOptions(
|
||||||
biometricOnly: true,
|
biometricOnly: true,
|
||||||
stickyAuth: true,
|
stickyAuth: true,
|
||||||
useErrorDialogs: true,
|
useErrorDialogs: true,
|
||||||
sensitiveTransaction: true,
|
sensitiveTransaction: true,
|
||||||
)
|
));
|
||||||
);
|
|
||||||
if (authenticated) {
|
if (authenticated) {
|
||||||
_isBiometricAuthenticated = true;
|
_isBiometricAuthenticated = true;
|
||||||
notifyListeners();
|
notifyListeners();
|
||||||
|
@ -50,7 +49,8 @@ class FFAppState extends ChangeNotifier {
|
||||||
clearBiometricAuthentication();
|
clearBiometricAuthentication();
|
||||||
return Future.error(e);
|
return Future.error(e);
|
||||||
}
|
}
|
||||||
return Future.error(''); // Add this line to ensure a value is always returned
|
return Future.error(
|
||||||
|
''); // Add this line to ensure a value is always returned
|
||||||
}
|
}
|
||||||
|
|
||||||
// Função para limpar o estado de autenticação biométrica
|
// Função para limpar o estado de autenticação biométrica
|
||||||
|
@ -60,9 +60,6 @@ class FFAppState extends ChangeNotifier {
|
||||||
// Limpar a informação salva, se necessário
|
// Limpar a informação salva, se necessário
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
static FFAppState _instance = FFAppState._internal();
|
static FFAppState _instance = FFAppState._internal();
|
||||||
|
|
||||||
factory FFAppState() {
|
factory FFAppState() {
|
||||||
|
@ -123,13 +120,16 @@ class FFAppState extends ChangeNotifier {
|
||||||
_tokenAPNS = await secureStorage.getString('ff_tokenAPNS') ?? _tokenAPNS;
|
_tokenAPNS = await secureStorage.getString('ff_tokenAPNS') ?? _tokenAPNS;
|
||||||
});
|
});
|
||||||
await _safeInitAsync(() async {
|
await _safeInitAsync(() async {
|
||||||
_userDevUUID = await secureStorage.getString('ff_user_dev_id') ?? _userDevUUID;
|
_userDevUUID =
|
||||||
|
await secureStorage.getString('ff_user_dev_id') ?? _userDevUUID;
|
||||||
});
|
});
|
||||||
await _safeInitAsync(() async {
|
await _safeInitAsync(() async {
|
||||||
_serialNumber = await secureStorage.getString('ff_serialNumber') ?? _serialNumber;
|
_serialNumber =
|
||||||
|
await secureStorage.getString('ff_serialNumber') ?? _serialNumber;
|
||||||
});
|
});
|
||||||
await _safeInitAsync(() async {
|
await _safeInitAsync(() async {
|
||||||
_fingerprintOPT = await secureStorage.getBool('fingerprint') ?? _fingerprintOPT;
|
_fingerprintOPT =
|
||||||
|
await secureStorage.getBool('fingerprint') ?? _fingerprintOPT;
|
||||||
});
|
});
|
||||||
await _safeInitAsync(() async {
|
await _safeInitAsync(() async {
|
||||||
_personOPT = await secureStorage.getBool('person') ?? _personOPT;
|
_personOPT = await secureStorage.getBool('person') ?? _personOPT;
|
||||||
|
@ -137,6 +137,9 @@ class FFAppState extends ChangeNotifier {
|
||||||
await _safeInitAsync(() async {
|
await _safeInitAsync(() async {
|
||||||
_passOPT = await secureStorage.getBool('pass') ?? _passOPT;
|
_passOPT = await secureStorage.getBool('pass') ?? _passOPT;
|
||||||
});
|
});
|
||||||
|
await _safeInitAsync(() async {
|
||||||
|
_panicOPT = await secureStorage.getBool('panic') ?? _panicOPT;
|
||||||
|
});
|
||||||
await _safeInitAsync(() async {
|
await _safeInitAsync(() async {
|
||||||
_notifyOPT = await secureStorage.getBool('notify') ?? _notifyOPT;
|
_notifyOPT = await secureStorage.getBool('notify') ?? _notifyOPT;
|
||||||
});
|
});
|
||||||
|
@ -147,9 +150,9 @@ class FFAppState extends ChangeNotifier {
|
||||||
_panicPass = await secureStorage.getString('panicPass') ?? _panicPass;
|
_panicPass = await secureStorage.getString('panicPass') ?? _panicPass;
|
||||||
});
|
});
|
||||||
await _safeInitAsync(() async {
|
await _safeInitAsync(() async {
|
||||||
_fingerprintPass = await secureStorage.getString('fingerprintPass') ?? _fingerprintPass;
|
_fingerprintPass =
|
||||||
|
await secureStorage.getString('fingerprintPass') ?? _fingerprintPass;
|
||||||
});
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void update(VoidCallback callback) {
|
void update(VoidCallback callback) {
|
||||||
|
@ -159,6 +162,17 @@ class FFAppState extends ChangeNotifier {
|
||||||
|
|
||||||
late FlutterSecureStorage secureStorage;
|
late FlutterSecureStorage secureStorage;
|
||||||
|
|
||||||
|
bool _panicOPT = false;
|
||||||
|
bool get panic => _panicOPT;
|
||||||
|
set panic(bool value) {
|
||||||
|
_panicOPT = value;
|
||||||
|
secureStorage.setBool('panic', value);
|
||||||
|
}
|
||||||
|
|
||||||
|
void deletePanic() {
|
||||||
|
secureStorage.delete(key: 'panic');
|
||||||
|
}
|
||||||
|
|
||||||
String _fingerprintPass = '';
|
String _fingerprintPass = '';
|
||||||
String get fingerprintPass => _fingerprintPass;
|
String get fingerprintPass => _fingerprintPass;
|
||||||
set fingerprintPass(String value) {
|
set fingerprintPass(String value) {
|
||||||
|
@ -185,8 +199,7 @@ class FFAppState extends ChangeNotifier {
|
||||||
String get panicPass => _panicPass;
|
String get panicPass => _panicPass;
|
||||||
set panicPass(String value) {
|
set panicPass(String value) {
|
||||||
_panicPass = value;
|
_panicPass = value;
|
||||||
secureStorage.setString
|
secureStorage.setString('panicPass', value);
|
||||||
('panicPass', value);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void deletePanicPass() {
|
void deletePanicPass() {
|
||||||
|
@ -203,8 +216,7 @@ class FFAppState extends ChangeNotifier {
|
||||||
bool _passOPT = false;
|
bool _passOPT = false;
|
||||||
bool get pass => _passOPT;
|
bool get pass => _passOPT;
|
||||||
set pass(bool value) {
|
set pass(bool value) {
|
||||||
_passOPT =
|
_passOPT = value;
|
||||||
value;
|
|
||||||
secureStorage.setBool('pass', value);
|
secureStorage.setBool('pass', value);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -10,12 +10,8 @@ import 'throw_exception_model.dart';
|
||||||
export 'throw_exception_model.dart';
|
export 'throw_exception_model.dart';
|
||||||
|
|
||||||
class ThrowExceptionWidget extends StatefulWidget {
|
class ThrowExceptionWidget extends StatefulWidget {
|
||||||
|
ThrowExceptionWidget(
|
||||||
ThrowExceptionWidget({
|
{super.key, required this.msg, this.type = EnumThrowException.error});
|
||||||
super.key,
|
|
||||||
required this.msg,
|
|
||||||
this.type = EnumThrowException.error
|
|
||||||
});
|
|
||||||
|
|
||||||
final String? msg;
|
final String? msg;
|
||||||
EnumThrowException type;
|
EnumThrowException type;
|
||||||
|
@ -89,11 +85,15 @@ class _ThrowExceptionWidgetState extends State<ThrowExceptionWidget>
|
||||||
String _getTitleByType(BuildContext context) {
|
String _getTitleByType(BuildContext context) {
|
||||||
switch (widget.type) {
|
switch (widget.type) {
|
||||||
case EnumThrowException.error:
|
case EnumThrowException.error:
|
||||||
return FFLocalizations.of(context).getVariableText(ptText: "Falha :(", enText: "Fail :(");
|
return FFLocalizations.of(context)
|
||||||
|
.getVariableText(ptText: "Falha :(", enText: "Fail :(");
|
||||||
case EnumThrowException.warning:
|
case EnumThrowException.warning:
|
||||||
return FFLocalizations.of(context).getVariableText(ptText: "Aviso :O", enText: "Warning :O");
|
return FFLocalizations.of(context)
|
||||||
|
.getVariableText(ptText: "Aviso :O", enText: "Warning :O");
|
||||||
case EnumThrowException.success:
|
case EnumThrowException.success:
|
||||||
return FFLocalizations.of(context).getVariableText(ptText: "Sucesso ;)", enText: "Success ;)");;
|
return FFLocalizations.of(context)
|
||||||
|
.getVariableText(ptText: "Sucesso ;)", enText: "Success ;)");
|
||||||
|
;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -128,8 +128,7 @@ class _ThrowExceptionWidgetState extends State<ThrowExceptionWidget>
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
).animateOnPageLoad(
|
).animateOnPageLoad(animationsMap['stackOnPageLoadAnimation']!),
|
||||||
animationsMap['stackOnPageLoadAnimation']!),
|
|
||||||
Column(
|
Column(
|
||||||
mainAxisSize: MainAxisSize.max,
|
mainAxisSize: MainAxisSize.max,
|
||||||
mainAxisAlignment: MainAxisAlignment.start,
|
mainAxisAlignment: MainAxisAlignment.start,
|
||||||
|
@ -143,22 +142,20 @@ class _ThrowExceptionWidgetState extends State<ThrowExceptionWidget>
|
||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
fontWeight: FontWeight.bold,
|
fontWeight: FontWeight.bold,
|
||||||
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
||||||
FlutterFlowTheme.of(context)
|
FlutterFlowTheme.of(context).bodyMediumFamily),
|
||||||
.bodyMediumFamily),
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
Padding(
|
Padding(
|
||||||
padding: const EdgeInsetsDirectional.fromSTEB(0.0, 10.0, 0.0, 0.0),
|
padding: const EdgeInsetsDirectional.fromSTEB(
|
||||||
|
0.0, 10.0, 0.0, 0.0),
|
||||||
child: Text(
|
child: Text(
|
||||||
valueOrDefault<String>(
|
valueOrDefault<String>(
|
||||||
widget.msg,
|
widget.msg,
|
||||||
'Message Not Found',
|
'Message Not Found',
|
||||||
),
|
),
|
||||||
style: FlutterFlowTheme.of(context)
|
style: FlutterFlowTheme.of(context).bodyMedium.override(
|
||||||
.bodyMedium
|
fontFamily:
|
||||||
.override(
|
FlutterFlowTheme.of(context).bodyMediumFamily,
|
||||||
fontFamily: FlutterFlowTheme.of(context)
|
|
||||||
.bodyMediumFamily,
|
|
||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
||||||
FlutterFlowTheme.of(context)
|
FlutterFlowTheme.of(context)
|
||||||
|
|
|
@ -1,16 +1,13 @@
|
||||||
|
|
||||||
import 'package:hub/components/molecular_components/visitor_not_found_component/visitor_not_found_component_model.dart';
|
import 'package:hub/components/molecular_components/visitor_not_found_component/visitor_not_found_component_model.dart';
|
||||||
import 'package:hub/components/templates_components/regisiter_vistor_template_component/regisiter_vistor_template_component_widget.dart';
|
import 'package:hub/components/templates_components/regisiter_vistor_template_component/regisiter_vistor_template_component_widget.dart';
|
||||||
import 'package:hub/flutter_flow/flutter_flow_icon_button.dart';
|
import 'package:hub/flutter_flow/flutter_flow_icon_button.dart';
|
||||||
import 'package:hub/flutter_flow/flutter_flow_theme.dart';
|
import 'package:hub/flutter_flow/flutter_flow_theme.dart';
|
||||||
|
|
||||||
|
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:google_fonts/google_fonts.dart';
|
import 'package:google_fonts/google_fonts.dart';
|
||||||
import 'package:hub/flutter_flow/flutter_flow_util.dart';
|
import 'package:hub/flutter_flow/flutter_flow_util.dart';
|
||||||
import 'package:hub/flutter_flow/flutter_flow_widgets.dart';
|
import 'package:hub/flutter_flow/flutter_flow_widgets.dart';
|
||||||
|
|
||||||
|
|
||||||
class VisitorNotFoundComponentWidget extends StatefulWidget {
|
class VisitorNotFoundComponentWidget extends StatefulWidget {
|
||||||
const VisitorNotFoundComponentWidget({super.key});
|
const VisitorNotFoundComponentWidget({super.key});
|
||||||
|
|
||||||
|
@ -65,7 +62,8 @@ class _VisitorNotFoundComponentWidgetState
|
||||||
Align(
|
Align(
|
||||||
alignment: const AlignmentDirectional(1.0, -1.0),
|
alignment: const AlignmentDirectional(1.0, -1.0),
|
||||||
child: Padding(
|
child: Padding(
|
||||||
padding: const EdgeInsetsDirectional.fromSTEB(0.0, 5.0, 5.0, 0.0),
|
padding:
|
||||||
|
const EdgeInsetsDirectional.fromSTEB(0.0, 5.0, 5.0, 0.0),
|
||||||
child: FlutterFlowIconButton(
|
child: FlutterFlowIconButton(
|
||||||
borderRadius: 20.0,
|
borderRadius: 20.0,
|
||||||
borderWidth: 1.0,
|
borderWidth: 1.0,
|
||||||
|
@ -87,7 +85,8 @@ class _VisitorNotFoundComponentWidgetState
|
||||||
size: 72.0,
|
size: 72.0,
|
||||||
),
|
),
|
||||||
Padding(
|
Padding(
|
||||||
padding: const EdgeInsetsDirectional.fromSTEB(0.0, 16.0, 0.0, 0.0),
|
padding:
|
||||||
|
const EdgeInsetsDirectional.fromSTEB(0.0, 16.0, 0.0, 0.0),
|
||||||
child: Text(
|
child: Text(
|
||||||
FFLocalizations.of(context).getText(
|
FFLocalizations.of(context).getText(
|
||||||
'1p9mykbj' /* Usuário não encontrado */,
|
'1p9mykbj' /* Usuário não encontrado */,
|
||||||
|
@ -102,7 +101,8 @@ class _VisitorNotFoundComponentWidgetState
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
Padding(
|
Padding(
|
||||||
padding: const EdgeInsetsDirectional.fromSTEB(10.0, 4.0, 10.0, 0.0),
|
padding:
|
||||||
|
const EdgeInsetsDirectional.fromSTEB(10.0, 4.0, 10.0, 0.0),
|
||||||
child: Text(
|
child: Text(
|
||||||
FFLocalizations.of(context).getText(
|
FFLocalizations.of(context).getText(
|
||||||
'kt937sp6' /* O documento inserido não corre... */,
|
'kt937sp6' /* O documento inserido não corre... */,
|
||||||
|
@ -128,12 +128,19 @@ class _VisitorNotFoundComponentWidgetState
|
||||||
await showModalBottomSheet(
|
await showModalBottomSheet(
|
||||||
isScrollControlled: true,
|
isScrollControlled: true,
|
||||||
backgroundColor: Colors.transparent,
|
backgroundColor: Colors.transparent,
|
||||||
enableDrag: false,
|
enableDrag: true,
|
||||||
|
useSafeArea: true,
|
||||||
context: context,
|
context: context,
|
||||||
builder: (context) {
|
builder: (context) {
|
||||||
return Padding(
|
return Padding(
|
||||||
padding: MediaQuery.viewInsetsOf(context),
|
padding: MediaQuery.viewInsetsOf(context),
|
||||||
child: const RegisiterVistorTemplateComponentWidget(),
|
child: SizedBox(
|
||||||
|
width: double.infinity,
|
||||||
|
height: MediaQuery.of(context).size.height * 0.9,
|
||||||
|
child:
|
||||||
|
const RegisiterVistorTemplateComponentWidget(
|
||||||
|
source: 'VisitorNotFoundComponent',
|
||||||
|
)),
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
).then((value) => safeSetState(() {}));
|
).then((value) => safeSetState(() {}));
|
||||||
|
@ -144,10 +151,10 @@ class _VisitorNotFoundComponentWidgetState
|
||||||
options: FFButtonOptions(
|
options: FFButtonOptions(
|
||||||
width: double.infinity,
|
width: double.infinity,
|
||||||
height: 30.0,
|
height: 30.0,
|
||||||
padding:
|
padding: const EdgeInsetsDirectional.fromSTEB(
|
||||||
const EdgeInsetsDirectional.fromSTEB(24.0, 0.0, 24.0, 0.0),
|
24.0, 0.0, 24.0, 0.0),
|
||||||
iconPadding:
|
iconPadding: const EdgeInsetsDirectional.fromSTEB(
|
||||||
const EdgeInsetsDirectional.fromSTEB(0.0, 0.0, 0.0, 0.0),
|
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:
|
fontFamily:
|
||||||
|
|
|
@ -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,20 +106,20 @@ 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:
|
||||||
FlutterFlowTheme.of(context).bodyMedium.override(
|
FlutterFlowTheme.of(context).bodyMedium.override(
|
||||||
fontFamily: 'Plus Jakarta Sans',
|
fontFamily: 'Plus Jakarta Sans',
|
||||||
color: const Color(0xFF15161E),
|
color: const Color(0xFF15161E),
|
||||||
fontSize: 14.0,
|
fontSize: 14.0,
|
||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
fontWeight: FontWeight.w500,
|
fontWeight: FontWeight.w500,
|
||||||
useGoogleFonts: GoogleFonts.asMap()
|
useGoogleFonts: GoogleFonts.asMap()
|
||||||
.containsKey('Plus Jakarta Sans'),
|
.containsKey('Plus Jakarta Sans'),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
|
@ -124,43 +127,46 @@ 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? */,
|
||||||
),
|
),
|
||||||
style: FlutterFlowTheme.of(context).headlineMedium.override(
|
style: FlutterFlowTheme.of(context).headlineMedium.override(
|
||||||
fontFamily: 'Outfit',
|
fontFamily: 'Outfit',
|
||||||
color: FlutterFlowTheme.of(context).primaryText,
|
color: FlutterFlowTheme.of(context).primaryText,
|
||||||
fontSize: 24.0,
|
fontSize: 24.0,
|
||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
fontWeight: FontWeight.w500,
|
fontWeight: FontWeight.w500,
|
||||||
useGoogleFonts: GoogleFonts.asMap().containsKey('Outfit'),
|
useGoogleFonts: GoogleFonts.asMap().containsKey('Outfit'),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
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... */,
|
||||||
),
|
),
|
||||||
style: FlutterFlowTheme.of(context).labelMedium.override(
|
style: FlutterFlowTheme.of(context).labelMedium.override(
|
||||||
fontFamily: 'Plus Jakarta Sans',
|
fontFamily: 'Plus Jakarta Sans',
|
||||||
color: FlutterFlowTheme.of(context).primaryText,
|
color: FlutterFlowTheme.of(context).primaryText,
|
||||||
fontSize: 14.0,
|
fontSize: 14.0,
|
||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
fontWeight: FontWeight.w500,
|
fontWeight: FontWeight.w500,
|
||||||
useGoogleFonts:
|
useGoogleFonts:
|
||||||
GoogleFonts.asMap().containsKey('Plus Jakarta Sans'),
|
GoogleFonts.asMap().containsKey('Plus Jakarta Sans'),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
Form(
|
Form(
|
||||||
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(
|
||||||
|
@ -169,7 +175,7 @@ class _ForgotPasswordTemplateComponentWidgetState
|
||||||
onChanged: (_) => EasyDebounce.debounce(
|
onChanged: (_) => EasyDebounce.debounce(
|
||||||
'_model.emailAddressTextController',
|
'_model.emailAddressTextController',
|
||||||
const Duration(milliseconds: 500),
|
const Duration(milliseconds: 500),
|
||||||
() => setState(() {}),
|
() => setState(() {}),
|
||||||
),
|
),
|
||||||
autofocus: true,
|
autofocus: true,
|
||||||
autofillHints: const [AutofillHints.email],
|
autofillHints: const [AutofillHints.email],
|
||||||
|
@ -226,14 +232,14 @@ class _ForgotPasswordTemplateComponentWidgetState
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
style: FlutterFlowTheme.of(context).bodyMedium.override(
|
style: FlutterFlowTheme.of(context).bodyMedium.override(
|
||||||
fontFamily: 'Plus Jakarta Sans',
|
fontFamily: 'Plus Jakarta Sans',
|
||||||
color: FlutterFlowTheme.of(context).primaryText,
|
color: FlutterFlowTheme.of(context).primaryText,
|
||||||
fontSize: 14.0,
|
fontSize: 14.0,
|
||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
fontWeight: FontWeight.w500,
|
fontWeight: FontWeight.w500,
|
||||||
useGoogleFonts: GoogleFonts.asMap()
|
useGoogleFonts: GoogleFonts.asMap()
|
||||||
.containsKey('Plus Jakarta Sans'),
|
.containsKey('Plus Jakarta Sans'),
|
||||||
),
|
),
|
||||||
maxLines: null,
|
maxLines: null,
|
||||||
keyboardType: TextInputType.emailAddress,
|
keyboardType: TextInputType.emailAddress,
|
||||||
cursorColor: FlutterFlowTheme.of(context).primary,
|
cursorColor: FlutterFlowTheme.of(context).primary,
|
||||||
|
@ -246,64 +252,73 @@ 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 {
|
||||||
|
_model.req = await PhpGroup.forgotPasswordCall.call(
|
||||||
|
email: _model.emailAddressTextController.text,
|
||||||
|
);
|
||||||
|
|
||||||
try {
|
if (PhpGroup.forgotPasswordCall
|
||||||
_model.req = await PhpGroup.forgotPasswordCall.call(
|
.error((_model.req?.jsonBody ?? '')) ==
|
||||||
email: _model.emailAddressTextController.text,
|
false) {
|
||||||
);
|
await DialogUtil.success(
|
||||||
|
context,
|
||||||
|
FFLocalizations.of(context).getVariableText(
|
||||||
|
enText: "Send E-mail Successful!",
|
||||||
|
ptText: "E-mail Enviado com Sucesso!"));
|
||||||
|
Navigator.pop(context);
|
||||||
|
} else {
|
||||||
|
await DialogUtil.error(
|
||||||
|
context,
|
||||||
|
PhpGroup.forgotPasswordCall
|
||||||
|
.msg((_model.req?.jsonBody ?? ''))!);
|
||||||
|
}
|
||||||
|
|
||||||
if (PhpGroup.forgotPasswordCall.error((_model.req?.jsonBody ?? '')) == false) {
|
setState(() {});
|
||||||
await DialogUtil.success(context, FFLocalizations.of(context).getVariableText(
|
} catch (error, stack) {
|
||||||
enText: "Send E-mail Successful!",
|
LogUtil.requestAPIFailed(
|
||||||
ptText: "E-mail Enviado com Sucesso!"
|
"iforgot.php",
|
||||||
));
|
_model.emailAddressTextController.text,
|
||||||
Navigator.pop(context);
|
"Recuperar Senha",
|
||||||
} else {
|
error,
|
||||||
await DialogUtil.error(context, PhpGroup.forgotPasswordCall.msg((_model.req?.jsonBody ?? ''))!);
|
stack);
|
||||||
}
|
await DialogUtil.errorDefault(context);
|
||||||
|
}
|
||||||
setState(() {});
|
},
|
||||||
|
|
||||||
} catch (error, stack) {
|
|
||||||
LogUtil.requestAPIFailed("iforgot.php", _model.emailAddressTextController.text, "Recuperar Senha", error, stack);
|
|
||||||
await DialogUtil.errorDefault(context);
|
|
||||||
}
|
|
||||||
},
|
|
||||||
text: FFLocalizations.of(context).getText(
|
text: FFLocalizations.of(context).getText(
|
||||||
'74rnd5bu' /* Enviar */,
|
'74rnd5bu' /* Enviar */,
|
||||||
),
|
),
|
||||||
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',
|
||||||
color: Colors.white,
|
color: Colors.white,
|
||||||
fontSize: 16.0,
|
fontSize: 16.0,
|
||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
fontWeight: FontWeight.w500,
|
fontWeight: FontWeight.w500,
|
||||||
useGoogleFonts: GoogleFonts.asMap()
|
useGoogleFonts: GoogleFonts.asMap()
|
||||||
.containsKey('Plus Jakarta Sans'),
|
.containsKey('Plus Jakarta Sans'),
|
||||||
),
|
),
|
||||||
elevation: 3.0,
|
elevation: 3.0,
|
||||||
borderSide: const BorderSide(
|
borderSide: const BorderSide(
|
||||||
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,
|
||||||
),
|
),
|
||||||
|
|
|
@ -1,17 +1,15 @@
|
||||||
|
import '/backend/api_requests/api_calls.dart';
|
||||||
import 'dart:typed_data';
|
import '/flutter_flow/flutter_flow_util.dart';
|
||||||
|
import '/flutter_flow/form_field_controller.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:hub/backend/api_requests/api_manager.dart';
|
|
||||||
import 'package:hub/components/templates_components/regisiter_vistor_template_component/regisiter_vistor_template_component_widget.dart';
|
import 'regisiter_vistor_template_component_widget.dart';
|
||||||
import 'package:hub/flutter_flow/flutter_flow_model.dart';
|
|
||||||
import 'package:hub/flutter_flow/form_field_controller.dart';
|
|
||||||
import 'package:hub/flutter_flow/uploaded_file.dart';
|
|
||||||
|
|
||||||
class RegisiterVistorTemplateComponentModel
|
class RegisiterVistorTemplateComponentModel
|
||||||
extends FlutterFlowModel<RegisiterVistorTemplateComponentWidget> {
|
extends FlutterFlowModel<RegisiterVistorTemplateComponentWidget> {
|
||||||
/// State fields for stateful widgets in this component.
|
/// State fields for stateful widgets in this page.
|
||||||
|
|
||||||
|
final unfocusNode = FocusNode();
|
||||||
bool isDataUploading = false;
|
bool isDataUploading = false;
|
||||||
FFUploadedFile uploadedLocalFile =
|
FFUploadedFile uploadedLocalFile =
|
||||||
FFUploadedFile(bytes: Uint8List.fromList([]));
|
FFUploadedFile(bytes: Uint8List.fromList([]));
|
||||||
|
@ -20,31 +18,98 @@ class RegisiterVistorTemplateComponentModel
|
||||||
FocusNode? textFieldFocusNode1;
|
FocusNode? textFieldFocusNode1;
|
||||||
TextEditingController? textController1;
|
TextEditingController? textController1;
|
||||||
String? Function(BuildContext, String?)? textController1Validator;
|
String? Function(BuildContext, String?)? textController1Validator;
|
||||||
// State field(s) for DropDown widget.
|
String? _textController1Validator(BuildContext context, String? val) {
|
||||||
String? dropDownValue;
|
if (val == null || val.isEmpty) {
|
||||||
FormFieldController<String>? dropDownValueController;
|
return FFLocalizations.of(context).getVariableText(
|
||||||
|
enText: 'This field is required',
|
||||||
|
ptText: 'Este campo é obrigatório',
|
||||||
|
);
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
// State field(s) for TextField widget.
|
// State field(s) for TextField widget.
|
||||||
FocusNode? textFieldFocusNode2;
|
FocusNode? textFieldFocusNode2;
|
||||||
TextEditingController? textController2;
|
TextEditingController? textController2;
|
||||||
String? Function(BuildContext, String?)? textController2Validator;
|
String? Function(BuildContext, String?)? textController2Validator;
|
||||||
|
String? _textController2Validator(BuildContext context, String? val) {
|
||||||
|
if (val == null || val.isEmpty) {
|
||||||
|
return FFLocalizations.of(context).getVariableText(
|
||||||
|
enText: 'This field is required',
|
||||||
|
ptText: 'Este campo é obrigatório',
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
// State field(s) for DropDown widget.
|
||||||
|
String? dropDownValue;
|
||||||
|
FormFieldController<String>? dropDownValueController;
|
||||||
// State field(s) for TextField widget.
|
// State field(s) for TextField widget.
|
||||||
FocusNode? textFieldFocusNode3;
|
FocusNode? textFieldFocusNode3;
|
||||||
TextEditingController? textController3;
|
TextEditingController? textController3;
|
||||||
String? Function(BuildContext, String?)? textController3Validator;
|
String? Function(BuildContext, String?)? textController3Validator;
|
||||||
|
String? _textController3Validator(BuildContext context, String? val) {
|
||||||
|
if (val == null || val.isEmpty) {
|
||||||
|
return FFLocalizations.of(context).getVariableText(
|
||||||
|
enText: 'This field is required',
|
||||||
|
ptText: 'Este campo é obrigatório',
|
||||||
|
);
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
// State field(s) for TextField widget.
|
// State field(s) for TextField widget.
|
||||||
FocusNode? textFieldFocusNode4;
|
FocusNode? textFieldFocusNode4;
|
||||||
TextEditingController? textController4;
|
TextEditingController? textController4;
|
||||||
String? Function(BuildContext, String?)? textController4Validator;
|
String? Function(BuildContext, String?)? textController4Validator;
|
||||||
|
String? _textController4Validator(BuildContext context, String? val) {
|
||||||
|
if (val == null || val.isEmpty) {
|
||||||
|
return FFLocalizations.of(context).getVariableText(
|
||||||
|
enText: 'This field is required',
|
||||||
|
ptText: 'Este campo é obrigatório',
|
||||||
|
);
|
||||||
|
}
|
||||||
|
if (!val.contains('@') || !val.contains('.')) {
|
||||||
|
return FFLocalizations.of(context).getVariableText(
|
||||||
|
enText: 'Invalid email',
|
||||||
|
ptText: 'Email inválido',
|
||||||
|
);
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
// Stores action output result for [Custom Action - convertImageFileToBase64] action in Button widget.
|
// Stores action output result for [Custom Action - convertImageFileToBase64] action in Button widget.
|
||||||
String? imgBase64;
|
String? imgBase64;
|
||||||
// Stores action output result for [Backend Call - API (postScheduleVisitor)] action in Button widget.
|
// Stores action output result for [Backend Call - API (postScheduleVisitor)] action in Button widget.
|
||||||
ApiCallResponse? registerVisitor;
|
ApiCallResponse? scheduleVisitor;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
void initState(BuildContext context) {}
|
void initState(BuildContext context) {
|
||||||
|
textFieldFocusNode1 = FocusNode();
|
||||||
|
textController1 = TextEditingController();
|
||||||
|
textController1Validator = _textController1Validator;
|
||||||
|
|
||||||
|
textFieldFocusNode2 = FocusNode();
|
||||||
|
textController2 = TextEditingController();
|
||||||
|
textController2Validator = _textController2Validator;
|
||||||
|
|
||||||
|
dropDownValue = '';
|
||||||
|
// dropDownValueController = FormFieldController<String>(initialValue: dropDownValue);
|
||||||
|
|
||||||
|
textFieldFocusNode3 = FocusNode();
|
||||||
|
textController3 = TextEditingController();
|
||||||
|
textController3Validator = _textController3Validator;
|
||||||
|
|
||||||
|
textFieldFocusNode4 = FocusNode();
|
||||||
|
textController4 = TextEditingController();
|
||||||
|
textController4Validator = _textController4Validator;
|
||||||
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
void dispose() {
|
void dispose() {
|
||||||
|
unfocusNode.dispose();
|
||||||
textFieldFocusNode1?.dispose();
|
textFieldFocusNode1?.dispose();
|
||||||
textController1?.dispose();
|
textController1?.dispose();
|
||||||
|
|
||||||
|
@ -58,4 +123,3 @@ class RegisiterVistorTemplateComponentModel
|
||||||
textController4?.dispose();
|
textController4?.dispose();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,28 +1,27 @@
|
||||||
|
import 'dart:developer';
|
||||||
|
|
||||||
import 'dart:typed_data';
|
import 'package:flutter/services.dart';
|
||||||
|
|
||||||
|
import '/backend/api_requests/api_calls.dart';
|
||||||
|
import '/components/molecular_components/throw_exception/throw_exception_widget.dart';
|
||||||
|
import '/flutter_flow/flutter_flow_drop_down.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/form_field_controller.dart';
|
||||||
|
import '/flutter_flow/upload_data.dart';
|
||||||
|
import '/custom_code/actions/index.dart' as actions;
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:google_fonts/google_fonts.dart';
|
import 'package:google_fonts/google_fonts.dart';
|
||||||
import 'package:hub/app_state.dart';
|
|
||||||
import 'package:hub/backend/api_requests/api_calls.dart';
|
|
||||||
import 'package:hub/components/molecular_components/throw_exception/throw_exception_widget.dart';
|
|
||||||
import 'package:hub/components/templates_components/regisiter_vistor_template_component/regisiter_vistor_template_component_model.dart';
|
|
||||||
import 'package:hub/custom_code/actions/convert_image_file_to_base64.dart';
|
|
||||||
import 'package:hub/flutter_flow/flutter_flow_drop_down.dart';
|
|
||||||
import 'package:hub/flutter_flow/flutter_flow_model.dart';
|
|
||||||
import 'package:hub/flutter_flow/flutter_flow_theme.dart';
|
|
||||||
import 'package:hub/flutter_flow/flutter_flow_util.dart';
|
|
||||||
import 'package:hub/flutter_flow/flutter_flow_widgets.dart';
|
|
||||||
import 'package:hub/flutter_flow/form_field_controller.dart';
|
|
||||||
import 'package:hub/flutter_flow/internationalization.dart';
|
|
||||||
import 'package:hub/flutter_flow/upload_data.dart';
|
|
||||||
import 'package:hub/flutter_flow/uploaded_file.dart';
|
|
||||||
import 'package:provider/provider.dart';
|
import 'package:provider/provider.dart';
|
||||||
|
import 'regisiter_vistor_template_component_model.dart';
|
||||||
|
export 'regisiter_vistor_template_component_model.dart';
|
||||||
|
|
||||||
class RegisiterVistorTemplateComponentWidget extends StatefulWidget {
|
class RegisiterVistorTemplateComponentWidget extends StatefulWidget {
|
||||||
const RegisiterVistorTemplateComponentWidget({super.key});
|
final String source;
|
||||||
|
|
||||||
|
const RegisiterVistorTemplateComponentWidget(
|
||||||
|
{super.key, required this.source});
|
||||||
|
|
||||||
@override
|
@override
|
||||||
State<RegisiterVistorTemplateComponentWidget> createState() =>
|
State<RegisiterVistorTemplateComponentWidget> createState() =>
|
||||||
|
@ -33,11 +32,7 @@ class _RegisiterVistorTemplateComponentWidgetState
|
||||||
extends State<RegisiterVistorTemplateComponentWidget> {
|
extends State<RegisiterVistorTemplateComponentWidget> {
|
||||||
late RegisiterVistorTemplateComponentModel _model;
|
late RegisiterVistorTemplateComponentModel _model;
|
||||||
|
|
||||||
@override
|
final scaffoldKey = GlobalKey<ScaffoldState>();
|
||||||
void setState(VoidCallback callback) {
|
|
||||||
super.setState(callback);
|
|
||||||
_model.onUpdate();
|
|
||||||
}
|
|
||||||
|
|
||||||
@override
|
@override
|
||||||
void initState() {
|
void initState() {
|
||||||
|
@ -60,7 +55,7 @@ class _RegisiterVistorTemplateComponentWidgetState
|
||||||
|
|
||||||
@override
|
@override
|
||||||
void dispose() {
|
void dispose() {
|
||||||
_model.maybeDispose();
|
_model.dispose();
|
||||||
|
|
||||||
super.dispose();
|
super.dispose();
|
||||||
}
|
}
|
||||||
|
@ -68,10 +63,14 @@ class _RegisiterVistorTemplateComponentWidgetState
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
context.watch<FFAppState>();
|
context.watch<FFAppState>();
|
||||||
|
log(context
|
||||||
|
.describeWidget('RegisiterVistorTemplateComponentWidget')
|
||||||
|
.toString());
|
||||||
return Align(
|
return Align(
|
||||||
alignment: const AlignmentDirectional(0.0, 1.0),
|
alignment: const AlignmentDirectional(0.0, 1.0),
|
||||||
child: Container(
|
child: Container(
|
||||||
|
width: double.infinity,
|
||||||
|
height: double.infinity,
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
color: FlutterFlowTheme.of(context).primaryBackground,
|
color: FlutterFlowTheme.of(context).primaryBackground,
|
||||||
borderRadius: const BorderRadius.only(
|
borderRadius: const BorderRadius.only(
|
||||||
|
@ -81,33 +80,14 @@ class _RegisiterVistorTemplateComponentWidgetState
|
||||||
topRight: Radius.circular(25.0),
|
topRight: Radius.circular(25.0),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
child: Padding(
|
child: SingleChildScrollView(
|
||||||
padding: const EdgeInsetsDirectional.fromSTEB(0.0, 30.0, 0.0, 0.0),
|
child: Form(
|
||||||
child: SingleChildScrollView(
|
// key: UniqueKey(),
|
||||||
|
autovalidateMode: AutovalidateMode.disabled,
|
||||||
child: Column(
|
child: Column(
|
||||||
mainAxisSize: MainAxisSize.min,
|
mainAxisSize: MainAxisSize.min,
|
||||||
mainAxisAlignment: MainAxisAlignment.start,
|
mainAxisAlignment: MainAxisAlignment.start,
|
||||||
children: [
|
children: [
|
||||||
Align(
|
|
||||||
alignment: const AlignmentDirectional(-1.0, -1.0),
|
|
||||||
child: Padding(
|
|
||||||
padding:
|
|
||||||
const EdgeInsetsDirectional.fromSTEB(20.0, 0.0, 0.0, 20.0),
|
|
||||||
child: Text(
|
|
||||||
FFLocalizations.of(context).getText(
|
|
||||||
'wnhkedzt' /* Cadastrar Visitante */,
|
|
||||||
),
|
|
||||||
style: FlutterFlowTheme.of(context).bodyLarge.override(
|
|
||||||
fontFamily: 'Nunito',
|
|
||||||
fontSize: 21.0,
|
|
||||||
letterSpacing: 0.0,
|
|
||||||
fontWeight: FontWeight.w800,
|
|
||||||
useGoogleFonts:
|
|
||||||
GoogleFonts.asMap().containsKey('Nunito'),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
Builder(
|
Builder(
|
||||||
builder: (context) {
|
builder: (context) {
|
||||||
if ((_model.uploadedLocalFile.bytes?.isNotEmpty ?? false)) {
|
if ((_model.uploadedLocalFile.bytes?.isNotEmpty ?? false)) {
|
||||||
|
@ -129,7 +109,7 @@ class _RegisiterVistorTemplateComponentWidgetState
|
||||||
_model.uploadedLocalFile.bytes ??
|
_model.uploadedLocalFile.bytes ??
|
||||||
Uint8List.fromList([]),
|
Uint8List.fromList([]),
|
||||||
width: 300.0,
|
width: 300.0,
|
||||||
height: 100.0,
|
height: 200.0,
|
||||||
fit: BoxFit.cover,
|
fit: BoxFit.cover,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
@ -171,7 +151,7 @@ class _RegisiterVistorTemplateComponentWidgetState
|
||||||
bytes: m.bytes,
|
bytes: m.bytes,
|
||||||
height: m.dimensions?.height,
|
height: m.dimensions?.height,
|
||||||
width: m.dimensions?.width,
|
width: m.dimensions?.width,
|
||||||
blurHash: m.blurHash,
|
// blurHash: m.blurHash,
|
||||||
))
|
))
|
||||||
.toList();
|
.toList();
|
||||||
} finally {
|
} finally {
|
||||||
|
@ -205,8 +185,9 @@ class _RegisiterVistorTemplateComponentWidgetState
|
||||||
height: 80.0,
|
height: 80.0,
|
||||||
padding: const EdgeInsetsDirectional.fromSTEB(
|
padding: const EdgeInsetsDirectional.fromSTEB(
|
||||||
0.0, 0.0, 0.0, 0.0),
|
0.0, 0.0, 0.0, 0.0),
|
||||||
iconPadding: const EdgeInsetsDirectional.fromSTEB(
|
iconPadding:
|
||||||
14.0, 0.0, 0.0, 20.0),
|
const EdgeInsetsDirectional.fromSTEB(
|
||||||
|
14.0, 0.0, 0.0, 20.0),
|
||||||
color: FlutterFlowTheme.of(context)
|
color: FlutterFlowTheme.of(context)
|
||||||
.primaryBackground,
|
.primaryBackground,
|
||||||
textStyle: FlutterFlowTheme.of(context)
|
textStyle: FlutterFlowTheme.of(context)
|
||||||
|
@ -238,7 +219,7 @@ class _RegisiterVistorTemplateComponentWidgetState
|
||||||
0.0, 50.0, 0.0, 0.0),
|
0.0, 50.0, 0.0, 0.0),
|
||||||
child: Text(
|
child: Text(
|
||||||
FFLocalizations.of(context).getText(
|
FFLocalizations.of(context).getText(
|
||||||
'kpd31z4d' /* Clique para adicionar a foto p... */,
|
'p4ftwxcy' /* Clique para adicionar a foto p... */,
|
||||||
),
|
),
|
||||||
style: FlutterFlowTheme.of(context)
|
style: FlutterFlowTheme.of(context)
|
||||||
.bodyMedium
|
.bodyMedium
|
||||||
|
@ -264,11 +245,11 @@ class _RegisiterVistorTemplateComponentWidgetState
|
||||||
Align(
|
Align(
|
||||||
alignment: const AlignmentDirectional(-1.0, 0.0),
|
alignment: const AlignmentDirectional(-1.0, 0.0),
|
||||||
child: Padding(
|
child: Padding(
|
||||||
padding:
|
padding: const EdgeInsetsDirectional.fromSTEB(
|
||||||
const EdgeInsetsDirectional.fromSTEB(20.0, 30.0, 0.0, 30.0),
|
20.0, 30.0, 0.0, 15.0),
|
||||||
child: Text(
|
child: Text(
|
||||||
FFLocalizations.of(context).getText(
|
FFLocalizations.of(context).getText(
|
||||||
'q986vs4m' /* Preencha o formulário com os d... */,
|
'zazj5d8b' /* Preencha o formulário com os d... */,
|
||||||
),
|
),
|
||||||
textAlign: TextAlign.start,
|
textAlign: TextAlign.start,
|
||||||
style: FlutterFlowTheme.of(context).bodyMedium.override(
|
style: FlutterFlowTheme.of(context).bodyMedium.override(
|
||||||
|
@ -282,16 +263,19 @@ class _RegisiterVistorTemplateComponentWidgetState
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
Padding(
|
Padding(
|
||||||
padding: const EdgeInsetsDirectional.fromSTEB(24.0, 0.0, 24.0, 0.0),
|
padding: const EdgeInsetsDirectional.fromSTEB(
|
||||||
|
24.0, 0.0, 24.0, 0.0),
|
||||||
child: TextFormField(
|
child: TextFormField(
|
||||||
controller: _model.textController1,
|
controller: _model.textController1,
|
||||||
|
autovalidateMode: AutovalidateMode.onUserInteraction,
|
||||||
focusNode: _model.textFieldFocusNode1,
|
focusNode: _model.textFieldFocusNode1,
|
||||||
autofocus: false,
|
autofocus: false,
|
||||||
textInputAction: TextInputAction.next,
|
textInputAction: TextInputAction.next,
|
||||||
obscureText: false,
|
obscureText: false,
|
||||||
decoration: InputDecoration(
|
decoration: InputDecoration(
|
||||||
|
isDense: true,
|
||||||
labelText: FFLocalizations.of(context).getText(
|
labelText: FFLocalizations.of(context).getText(
|
||||||
'llcw2tei' /* Nome */,
|
'v7g73yik' /* Nome */,
|
||||||
),
|
),
|
||||||
labelStyle: FlutterFlowTheme.of(context)
|
labelStyle: FlutterFlowTheme.of(context)
|
||||||
.labelMedium
|
.labelMedium
|
||||||
|
@ -315,7 +299,7 @@ class _RegisiterVistorTemplateComponentWidgetState
|
||||||
),
|
),
|
||||||
enabledBorder: OutlineInputBorder(
|
enabledBorder: OutlineInputBorder(
|
||||||
borderSide: BorderSide(
|
borderSide: BorderSide(
|
||||||
color: FlutterFlowTheme.of(context).accent1,
|
color: FlutterFlowTheme.of(context).customColor6,
|
||||||
width: 0.5,
|
width: 0.5,
|
||||||
),
|
),
|
||||||
borderRadius: BorderRadius.circular(10.0),
|
borderRadius: BorderRadius.circular(10.0),
|
||||||
|
@ -360,105 +344,23 @@ class _RegisiterVistorTemplateComponentWidgetState
|
||||||
_model.textController1Validator.asValidator(context),
|
_model.textController1Validator.asValidator(context),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
Align(
|
|
||||||
alignment: const AlignmentDirectional(0.0, 0.0),
|
|
||||||
child: Container(
|
|
||||||
decoration: const BoxDecoration(),
|
|
||||||
child: Padding(
|
|
||||||
padding:
|
|
||||||
const EdgeInsetsDirectional.fromSTEB(0.0, 0.0, 0.0, 20.0),
|
|
||||||
child: Row(
|
|
||||||
mainAxisSize: MainAxisSize.min,
|
|
||||||
mainAxisAlignment: MainAxisAlignment.end,
|
|
||||||
children: [
|
|
||||||
Padding(
|
|
||||||
padding: const EdgeInsetsDirectional.fromSTEB(
|
|
||||||
10.0, 20.0, 10.0, 0.0),
|
|
||||||
child: Text(
|
|
||||||
FFLocalizations.of(context).getText(
|
|
||||||
'67ykbznt' /* 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, 20.0, 0.0, 5.0),
|
|
||||||
child: FlutterFlowDropDown<String>(
|
|
||||||
controller: _model.dropDownValueController ??=
|
|
||||||
FormFieldController<String>(null),
|
|
||||||
options: [
|
|
||||||
FFLocalizations.of(context).getText(
|
|
||||||
'ugjkeiz7' /* Visitante */,
|
|
||||||
),
|
|
||||||
FFLocalizations.of(context).getText(
|
|
||||||
'8nlk5xlk' /* Prestador de Serviço */,
|
|
||||||
)
|
|
||||||
],
|
|
||||||
onChanged: (val) =>
|
|
||||||
setState(() => _model.dropDownValue = val),
|
|
||||||
width: 200.0,
|
|
||||||
height: 48.0,
|
|
||||||
textStyle: 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),
|
|
||||||
),
|
|
||||||
hintText: FFLocalizations.of(context).getText(
|
|
||||||
'kw07i43y' /* Selecione... */,
|
|
||||||
),
|
|
||||||
icon: Icon(
|
|
||||||
Icons.keyboard_arrow_down_rounded,
|
|
||||||
color: FlutterFlowTheme.of(context).primaryText,
|
|
||||||
size: 24.0,
|
|
||||||
),
|
|
||||||
elevation: 2.0,
|
|
||||||
borderColor: FlutterFlowTheme.of(context).accent1,
|
|
||||||
borderWidth: 0.5,
|
|
||||||
borderRadius: 8.0,
|
|
||||||
margin: const EdgeInsetsDirectional.fromSTEB(
|
|
||||||
16.0, 4.0, 16.0, 4.0),
|
|
||||||
hidesUnderline: true,
|
|
||||||
isOverButton: true,
|
|
||||||
isSearchable: false,
|
|
||||||
isMultiSelect: false,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
Padding(
|
Padding(
|
||||||
padding: const EdgeInsetsDirectional.fromSTEB(24.0, 0.0, 24.0, 0.0),
|
padding: const EdgeInsetsDirectional.fromSTEB(
|
||||||
|
24.0, 0.0, 24.0, 0.0),
|
||||||
child: TextFormField(
|
child: TextFormField(
|
||||||
controller: _model.textController2,
|
controller: _model.textController2,
|
||||||
focusNode: _model.textFieldFocusNode2,
|
focusNode: _model.textFieldFocusNode2,
|
||||||
|
autovalidateMode: AutovalidateMode.onUserInteraction,
|
||||||
autofocus: false,
|
autofocus: false,
|
||||||
textCapitalization: TextCapitalization.none,
|
textCapitalization: TextCapitalization.none,
|
||||||
|
autofillHints: const [AutofillHints.password],
|
||||||
|
keyboardType: TextInputType.number,
|
||||||
textInputAction: TextInputAction.next,
|
textInputAction: TextInputAction.next,
|
||||||
obscureText: false,
|
obscureText: false,
|
||||||
decoration: InputDecoration(
|
decoration: InputDecoration(
|
||||||
|
isDense: true,
|
||||||
labelText: FFLocalizations.of(context).getText(
|
labelText: FFLocalizations.of(context).getText(
|
||||||
'96ayre48' /* Documento */,
|
'rl8tvwnr' /* Documento */,
|
||||||
),
|
),
|
||||||
labelStyle: FlutterFlowTheme.of(context)
|
labelStyle: FlutterFlowTheme.of(context)
|
||||||
.labelMedium
|
.labelMedium
|
||||||
|
@ -481,7 +383,7 @@ class _RegisiterVistorTemplateComponentWidgetState
|
||||||
),
|
),
|
||||||
enabledBorder: OutlineInputBorder(
|
enabledBorder: OutlineInputBorder(
|
||||||
borderSide: BorderSide(
|
borderSide: BorderSide(
|
||||||
color: FlutterFlowTheme.of(context).accent1,
|
color: FlutterFlowTheme.of(context).customColor6,
|
||||||
width: 0.5,
|
width: 0.5,
|
||||||
),
|
),
|
||||||
borderRadius: BorderRadius.circular(10.0),
|
borderRadius: BorderRadius.circular(10.0),
|
||||||
|
@ -522,16 +424,135 @@ class _RegisiterVistorTemplateComponentWidgetState
|
||||||
),
|
),
|
||||||
validator:
|
validator:
|
||||||
_model.textController2Validator.asValidator(context),
|
_model.textController2Validator.asValidator(context),
|
||||||
|
inputFormatters: [
|
||||||
|
FilteringTextInputFormatter.allow(RegExp('[0-9]')),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Padding(
|
||||||
|
padding:
|
||||||
|
const EdgeInsetsDirectional.fromSTEB(0.0, 0.0, 0.0, 10.0),
|
||||||
|
child: Container(
|
||||||
|
width: MediaQuery.sizeOf(context).width * 0.95,
|
||||||
|
decoration: const BoxDecoration(),
|
||||||
|
child: Column(
|
||||||
|
children: [
|
||||||
|
Row(
|
||||||
|
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 ??=
|
||||||
|
FormFieldController<String>(null),
|
||||||
|
options: [
|
||||||
|
FFLocalizations.of(context).getText(
|
||||||
|
'n8vddmcq' /* Visitante */,
|
||||||
|
),
|
||||||
|
FFLocalizations.of(context).getText(
|
||||||
|
'9luaa09e' /* Prestador de Serviço */,
|
||||||
|
)
|
||||||
|
],
|
||||||
|
onChanged: (val) =>
|
||||||
|
setState(() => _model.dropDownValue = val),
|
||||||
|
width: 200.0,
|
||||||
|
height: 44.0,
|
||||||
|
textStyle: 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),
|
||||||
|
),
|
||||||
|
hintText: FFLocalizations.of(context).getText(
|
||||||
|
'pmezihb4' /* Selecione... */,
|
||||||
|
),
|
||||||
|
icon: Icon(
|
||||||
|
Icons.keyboard_arrow_down_rounded,
|
||||||
|
color:
|
||||||
|
FlutterFlowTheme.of(context).primaryText,
|
||||||
|
size: 24.0,
|
||||||
|
),
|
||||||
|
elevation: 2.0,
|
||||||
|
borderColor:
|
||||||
|
FlutterFlowTheme.of(context).customColor6,
|
||||||
|
borderWidth: 0.5,
|
||||||
|
borderRadius: 8.0,
|
||||||
|
margin: const EdgeInsetsDirectional.fromSTEB(
|
||||||
|
16.0, 0.0, 16.0, 0.0),
|
||||||
|
hidesUnderline: true,
|
||||||
|
isOverButton: true,
|
||||||
|
isSearchable: false,
|
||||||
|
isMultiSelect: false,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
]
|
||||||
|
.divide(const SizedBox(width: 19.0))
|
||||||
|
.addToStart(const SizedBox(width: 30.0)),
|
||||||
|
),
|
||||||
|
if (_model.dropDownValue == null ||
|
||||||
|
_model.dropDownValue == '')
|
||||||
|
Align(
|
||||||
|
alignment: const AlignmentDirectional(0.4, 0),
|
||||||
|
child: Text(
|
||||||
|
FFLocalizations.of(context).getVariableText(
|
||||||
|
enText: 'This field is required',
|
||||||
|
ptText: 'Este campo é obrigatório',
|
||||||
|
),
|
||||||
|
style: FlutterFlowTheme.of(context)
|
||||||
|
.bodySmall
|
||||||
|
.override(
|
||||||
|
fontFamily: FlutterFlowTheme.of(context)
|
||||||
|
.bodySmallFamily,
|
||||||
|
color: FlutterFlowTheme.of(context)
|
||||||
|
.customColor6,
|
||||||
|
letterSpacing: 0.0,
|
||||||
|
useGoogleFonts: GoogleFonts.asMap()
|
||||||
|
.containsKey(
|
||||||
|
FlutterFlowTheme.of(context)
|
||||||
|
.bodySmallFamily),
|
||||||
|
)),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
Align(
|
Align(
|
||||||
alignment: const AlignmentDirectional(-1.0, 0.0),
|
alignment: const AlignmentDirectional(-1.0, 0.0),
|
||||||
child: Padding(
|
child: Padding(
|
||||||
padding:
|
padding: const EdgeInsetsDirectional.fromSTEB(
|
||||||
const EdgeInsetsDirectional.fromSTEB(20.0, 30.0, 0.0, 30.0),
|
20.0, 0.0, 0.0, 15.0),
|
||||||
child: Text(
|
child: Text(
|
||||||
FFLocalizations.of(context).getText(
|
FFLocalizations.of(context).getText(
|
||||||
'j0g7ggs2' /* Contatos */,
|
'bqpucwh0' /* Contatos */,
|
||||||
),
|
),
|
||||||
textAlign: TextAlign.start,
|
textAlign: TextAlign.start,
|
||||||
style: FlutterFlowTheme.of(context).bodyMedium.override(
|
style: FlutterFlowTheme.of(context).bodyMedium.override(
|
||||||
|
@ -545,16 +566,24 @@ class _RegisiterVistorTemplateComponentWidgetState
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
Padding(
|
Padding(
|
||||||
padding: const EdgeInsetsDirectional.fromSTEB(24.0, 0.0, 24.0, 0.0),
|
padding: const EdgeInsetsDirectional.fromSTEB(
|
||||||
|
24.0, 0.0, 24.0, 0.0),
|
||||||
child: TextFormField(
|
child: TextFormField(
|
||||||
controller: _model.textController3,
|
controller: _model.textController3,
|
||||||
focusNode: _model.textFieldFocusNode3,
|
focusNode: _model.textFieldFocusNode3,
|
||||||
|
autovalidateMode: AutovalidateMode.onUserInteraction,
|
||||||
autofocus: false,
|
autofocus: false,
|
||||||
textInputAction: TextInputAction.next,
|
textInputAction: TextInputAction.next,
|
||||||
|
keyboardType: TextInputType.phone,
|
||||||
|
inputFormatters: [
|
||||||
|
FilteringTextInputFormatter.allow(
|
||||||
|
RegExp('[0-9, +, -, (, )]')),
|
||||||
|
],
|
||||||
obscureText: false,
|
obscureText: false,
|
||||||
decoration: InputDecoration(
|
decoration: InputDecoration(
|
||||||
|
isDense: true,
|
||||||
labelText: FFLocalizations.of(context).getText(
|
labelText: FFLocalizations.of(context).getText(
|
||||||
'ybdjabnd' /* Telefone */,
|
'h84ls2r6' /* Telefone */,
|
||||||
),
|
),
|
||||||
labelStyle: FlutterFlowTheme.of(context)
|
labelStyle: FlutterFlowTheme.of(context)
|
||||||
.labelMedium
|
.labelMedium
|
||||||
|
@ -578,7 +607,7 @@ class _RegisiterVistorTemplateComponentWidgetState
|
||||||
),
|
),
|
||||||
enabledBorder: OutlineInputBorder(
|
enabledBorder: OutlineInputBorder(
|
||||||
borderSide: BorderSide(
|
borderSide: BorderSide(
|
||||||
color: FlutterFlowTheme.of(context).accent1,
|
color: FlutterFlowTheme.of(context).customColor6,
|
||||||
width: 0.5,
|
width: 0.5,
|
||||||
),
|
),
|
||||||
borderRadius: BorderRadius.circular(10.0),
|
borderRadius: BorderRadius.circular(10.0),
|
||||||
|
@ -617,21 +646,24 @@ class _RegisiterVistorTemplateComponentWidgetState
|
||||||
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
||||||
FlutterFlowTheme.of(context).bodyMediumFamily),
|
FlutterFlowTheme.of(context).bodyMediumFamily),
|
||||||
),
|
),
|
||||||
validator:
|
// validator:
|
||||||
_model.textController3Validator.asValidator(context),
|
// _model.textController3Validator.asValidator(context),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
Padding(
|
Padding(
|
||||||
padding: const EdgeInsets.all(24.0),
|
padding: const EdgeInsetsDirectional.fromSTEB(
|
||||||
|
24.0, 0.0, 24.0, 0.0),
|
||||||
child: TextFormField(
|
child: TextFormField(
|
||||||
controller: _model.textController4,
|
controller: _model.textController4,
|
||||||
focusNode: _model.textFieldFocusNode4,
|
focusNode: _model.textFieldFocusNode4,
|
||||||
|
autovalidateMode: AutovalidateMode.onUserInteraction,
|
||||||
autofocus: false,
|
autofocus: false,
|
||||||
textInputAction: TextInputAction.done,
|
textInputAction: TextInputAction.done,
|
||||||
obscureText: false,
|
obscureText: false,
|
||||||
decoration: InputDecoration(
|
decoration: InputDecoration(
|
||||||
|
isDense: true,
|
||||||
labelText: FFLocalizations.of(context).getText(
|
labelText: FFLocalizations.of(context).getText(
|
||||||
'tlr6uxo4' /* Email */,
|
'fqp7qmka' /* Email */,
|
||||||
),
|
),
|
||||||
labelStyle: FlutterFlowTheme.of(context)
|
labelStyle: FlutterFlowTheme.of(context)
|
||||||
.labelMedium
|
.labelMedium
|
||||||
|
@ -655,7 +687,7 @@ class _RegisiterVistorTemplateComponentWidgetState
|
||||||
),
|
),
|
||||||
enabledBorder: OutlineInputBorder(
|
enabledBorder: OutlineInputBorder(
|
||||||
borderSide: BorderSide(
|
borderSide: BorderSide(
|
||||||
color: FlutterFlowTheme.of(context).accent1,
|
color: FlutterFlowTheme.of(context).customColor6,
|
||||||
width: 0.5,
|
width: 0.5,
|
||||||
),
|
),
|
||||||
borderRadius: BorderRadius.circular(10.0),
|
borderRadius: BorderRadius.circular(10.0),
|
||||||
|
@ -695,131 +727,195 @@ class _RegisiterVistorTemplateComponentWidgetState
|
||||||
FlutterFlowTheme.of(context).bodyMediumFamily),
|
FlutterFlowTheme.of(context).bodyMediumFamily),
|
||||||
),
|
),
|
||||||
keyboardType: TextInputType.emailAddress,
|
keyboardType: TextInputType.emailAddress,
|
||||||
validator:
|
// validator:
|
||||||
_model.textController4Validator.asValidator(context),
|
// _model.textController4Validator.asValidator(context),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
Align(
|
Padding(
|
||||||
alignment: const AlignmentDirectional(0.0, 1.0),
|
padding:
|
||||||
child: Padding(
|
const EdgeInsetsDirectional.fromSTEB(0.0, 65.0, 0.0, 0.0),
|
||||||
padding:
|
child: FFButtonWidget(
|
||||||
const EdgeInsetsDirectional.fromSTEB(0.0, 50.0, 0.0, 0.0),
|
onPressed: () async {
|
||||||
child: FFButtonWidget(
|
if (((_model.uploadedLocalFile.bytes?.isNotEmpty ??
|
||||||
onPressed: () async {
|
false)) &&
|
||||||
if (((_model.uploadedLocalFile.bytes?.isNotEmpty ??
|
(_model.textController1.text != '') &&
|
||||||
false)) &&
|
(_model.dropDownValue != null &&
|
||||||
(_model.textController1.text != '') &&
|
_model.dropDownValue != '') &&
|
||||||
(_model.dropDownValue != null &&
|
(_model.textController2.text != '')) {
|
||||||
_model.dropDownValue != '') &&
|
_model.imgBase64 =
|
||||||
(_model.textController2.text != '')) {
|
await actions.convertImageFileToBase64(
|
||||||
_model.imgBase64 =
|
_model.uploadedLocalFile,
|
||||||
await convertImageFileToBase64(
|
);
|
||||||
_model.uploadedLocalFile,
|
_model.scheduleVisitor =
|
||||||
);
|
await PhpGroup.postScheduleVisitorCall
|
||||||
_model.registerVisitor =
|
.call(
|
||||||
await PhpGroup.postScheduleVisitorCall.call(
|
devUUID: FFAppState().devUUID,
|
||||||
devUUID: FFAppState().devUUID,
|
userUUID: FFAppState().userUUID,
|
||||||
userUUID: FFAppState().userUUID,
|
cliID: FFAppState().cliUUID,
|
||||||
cliID: FFAppState().cliUUID,
|
atividade: 'putVisitante',
|
||||||
atividade: 'putVisitante',
|
documento: _model.textController2.text,
|
||||||
documento: _model.textController2.text,
|
nome: _model.textController1.text,
|
||||||
nome: _model.textController1.text,
|
tipo: _model.dropDownValue ==
|
||||||
tipo: (_model.dropDownValue == 'Visitante') ||
|
FFLocalizations.of(context).getText(
|
||||||
(_model.dropDownValue == 'Visitor')
|
'n8vddmcq' /* Visitante */,
|
||||||
? 'V'
|
)
|
||||||
: 'P',
|
? 'V'
|
||||||
foto: 'base64;jpeg,klajsalkjslkajslkajl',
|
: 'P',
|
||||||
);
|
foto: 'base64;jpeg,${_model.imgBase64}',
|
||||||
|
)
|
||||||
if (PhpGroup.postScheduleVisitorCall.error(
|
.onError((e, s) async {
|
||||||
(_model.registerVisitor?.jsonBody ?? ''),
|
return await showAdaptiveDialog(
|
||||||
) ==
|
|
||||||
false) {
|
|
||||||
setState(() {
|
|
||||||
_model.textController1?.clear();
|
|
||||||
_model.textController2?.clear();
|
|
||||||
_model.textController3?.clear();
|
|
||||||
_model.textController4?.clear();
|
|
||||||
});
|
|
||||||
setState(() {
|
|
||||||
_model.dropDownValueController?.reset();
|
|
||||||
});
|
|
||||||
} else {
|
|
||||||
await showModalBottomSheet(
|
|
||||||
isScrollControlled: true,
|
|
||||||
backgroundColor: Colors.transparent,
|
|
||||||
enableDrag: false,
|
|
||||||
context: context,
|
|
||||||
builder: (context) {
|
|
||||||
return Padding(
|
|
||||||
padding: MediaQuery.viewInsetsOf(context),
|
|
||||||
child: ThrowExceptionWidget(
|
|
||||||
msg:
|
|
||||||
'\\devUUID=${FFAppState().devUUID}\\userUUID=${FFAppState().userUUID}\\cliID=${FFAppState().cliUUID}\\Documento=${_model.textController2.text}\\Nome=${_model.textController1.text}\\dropdown${_model.dropDownValue}\\${PhpGroup.postScheduleVisitorCall.errorMsg(
|
|
||||||
(_model.registerVisitor?.jsonBody ?? ''),
|
|
||||||
)}',
|
|
||||||
),
|
|
||||||
);
|
|
||||||
},
|
|
||||||
).then((value) => safeSetState(() {}));
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
await showModalBottomSheet(
|
|
||||||
isScrollControlled: true,
|
|
||||||
backgroundColor: Colors.transparent,
|
|
||||||
enableDrag: false,
|
|
||||||
context: context,
|
context: context,
|
||||||
builder: (context) {
|
builder: (context) {
|
||||||
return Padding(
|
return GestureDetector(
|
||||||
padding: MediaQuery.viewInsetsOf(context),
|
onTap: () => Navigator.pop(context),
|
||||||
child: ThrowExceptionWidget(
|
child: Padding(
|
||||||
msg:
|
padding: MediaQuery.viewInsetsOf(context),
|
||||||
'Você esqueceu de adicionar algum dado obrigatório. Verifique se a imagem, nome, tipo e documento estão foram preenchidos corretamente.- devUUID=${FFAppState().devUUID}- userUUID=${FFAppState().userUUID}- cliID=${FFAppState().cliUUID}- Documento=${_model.textController2.text}- Nome=${_model.textController1.text}- Tipo=${_model.dropDownValue}',
|
child: Dialog(
|
||||||
|
backgroundColor: Colors.transparent,
|
||||||
|
child: ThrowExceptionWidget(
|
||||||
|
msg: FFLocalizations.of(context)
|
||||||
|
.getVariableText(
|
||||||
|
ptText:
|
||||||
|
'Você esqueceu de adicionar algum dado obrigatório. Verifique se a imagem, nome, tipo e documento foram preenchidos corretamente.',
|
||||||
|
enText:
|
||||||
|
'You forgot to add some required data. Check if the image, name, type and document were filled in correctly.',
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
},
|
||||||
|
);
|
||||||
|
});
|
||||||
|
|
||||||
|
if (PhpGroup.postScheduleVisitorCall.error(
|
||||||
|
(_model.scheduleVisitor?.jsonBody ?? ''),
|
||||||
|
) ==
|
||||||
|
false) {
|
||||||
|
setState(() {
|
||||||
|
_model.textController1?.clearComposing();
|
||||||
|
_model.textController2?.clearComposing();
|
||||||
|
_model.textController3?.clearComposing();
|
||||||
|
_model.textController4?.clearComposing();
|
||||||
|
_model.dropDownValueController?.reset();
|
||||||
|
ScaffoldMessenger.of(context).showSnackBar(
|
||||||
|
SnackBar(
|
||||||
|
content: Text(
|
||||||
|
FFLocalizations.of(context).getVariableText(
|
||||||
|
ptText:
|
||||||
|
'Visitante cadastrado com sucesso.',
|
||||||
|
enText:
|
||||||
|
'Visitor successfully registered.'),
|
||||||
|
style: TextStyle(
|
||||||
|
color:
|
||||||
|
FlutterFlowTheme.of(context).info)),
|
||||||
|
backgroundColor:
|
||||||
|
FlutterFlowTheme.of(context).primary,
|
||||||
|
duration: const Duration(seconds: 3),
|
||||||
|
behavior: SnackBarBehavior.floating,
|
||||||
|
shape: RoundedRectangleBorder(
|
||||||
|
borderRadius: BorderRadius.circular(30),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
if (widget.source == 'VisitorNotFoundComponent') {
|
||||||
|
Navigator.pop(context);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
await showAdaptiveDialog(
|
||||||
|
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: Dialog(
|
||||||
|
backgroundColor: Colors.transparent,
|
||||||
|
child: ThrowExceptionWidget(
|
||||||
|
msg: PhpGroup.postScheduleVisitorCall
|
||||||
|
.errorMsg(_model
|
||||||
|
.scheduleVisitor?.jsonBody)
|
||||||
|
.toString()),
|
||||||
|
),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
).then((value) => safeSetState(() {}));
|
).then((value) => safeSetState(() {}));
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
await showAdaptiveDialog(
|
||||||
|
context: context,
|
||||||
|
builder: (context) {
|
||||||
|
return GestureDetector(
|
||||||
|
onTap: () {
|
||||||
|
Form.of(context)?.validate();
|
||||||
|
Navigator.pop(context);
|
||||||
|
},
|
||||||
|
child: Padding(
|
||||||
|
padding: MediaQuery.viewInsetsOf(context),
|
||||||
|
child: Dialog(
|
||||||
|
backgroundColor: Colors.transparent,
|
||||||
|
child: ThrowExceptionWidget(
|
||||||
|
msg: FFLocalizations.of(context)
|
||||||
|
.getVariableText(
|
||||||
|
ptText:
|
||||||
|
'Você esqueceu de adicionar algum dado obrigatório. Verifique se a imagem, nome, tipo e documento foram preenchidos corretamente.',
|
||||||
|
enText:
|
||||||
|
'You forgot to add some required data. Check if the image, name, type and document were filled in correctly.',
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
},
|
||||||
|
).then((value) => safeSetState(() {}));
|
||||||
|
}
|
||||||
|
|
||||||
setState(() {});
|
setState(() {});
|
||||||
},
|
},
|
||||||
text: FFLocalizations.of(context).getText(
|
text: FFLocalizations.of(context).getText(
|
||||||
'65puvap9' /* Cadastrar */,
|
'okbw0aiu' /* Cadastrar */,
|
||||||
|
),
|
||||||
|
options: FFButtonOptions(
|
||||||
|
width: 250.0,
|
||||||
|
height: 36.0,
|
||||||
|
padding: const EdgeInsetsDirectional.fromSTEB(
|
||||||
|
80.0, 0.0, 80.0, 0.0),
|
||||||
|
iconPadding: const EdgeInsetsDirectional.fromSTEB(
|
||||||
|
0.0, 0.0, 0.0, 0.0),
|
||||||
|
color: FlutterFlowTheme.of(context).primary,
|
||||||
|
textStyle: FlutterFlowTheme.of(context)
|
||||||
|
.titleSmall
|
||||||
|
.override(
|
||||||
|
fontFamily:
|
||||||
|
FlutterFlowTheme.of(context).titleSmallFamily,
|
||||||
|
color: FlutterFlowTheme.of(context).info,
|
||||||
|
letterSpacing: 0.0,
|
||||||
|
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
||||||
|
FlutterFlowTheme.of(context).titleSmallFamily),
|
||||||
|
),
|
||||||
|
borderSide: const BorderSide(
|
||||||
|
color: Colors.transparent,
|
||||||
|
width: 30.0,
|
||||||
),
|
),
|
||||||
options: FFButtonOptions(
|
borderRadius: const BorderRadius.only(
|
||||||
width: double.infinity,
|
bottomLeft: Radius.circular(15.0),
|
||||||
height: 36.0,
|
bottomRight: Radius.circular(15.0),
|
||||||
padding: const EdgeInsetsDirectional.fromSTEB(
|
topLeft: Radius.circular(15.0),
|
||||||
80.0, 0.0, 80.0, 0.0),
|
topRight: Radius.circular(15.0),
|
||||||
iconPadding:
|
|
||||||
const EdgeInsetsDirectional.fromSTEB(0.0, 0.0, 0.0, 0.0),
|
|
||||||
color: FlutterFlowTheme.of(context).primary,
|
|
||||||
textStyle: FlutterFlowTheme.of(context)
|
|
||||||
.titleSmall
|
|
||||||
.override(
|
|
||||||
fontFamily:
|
|
||||||
FlutterFlowTheme.of(context).titleSmallFamily,
|
|
||||||
color: FlutterFlowTheme.of(context).info,
|
|
||||||
letterSpacing: 0.0,
|
|
||||||
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
|
||||||
FlutterFlowTheme.of(context)
|
|
||||||
.titleSmallFamily),
|
|
||||||
),
|
|
||||||
borderSide: const BorderSide(
|
|
||||||
color: Colors.transparent,
|
|
||||||
width: 30.0,
|
|
||||||
),
|
|
||||||
borderRadius: const BorderRadius.only(
|
|
||||||
bottomLeft: Radius.circular(0.0),
|
|
||||||
bottomRight: Radius.circular(0.0),
|
|
||||||
topLeft: Radius.circular(15.0),
|
|
||||||
topRight: Radius.circular(15.0),
|
|
||||||
),
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
],
|
]
|
||||||
|
.divide(const SizedBox(height: 10.0))
|
||||||
|
.addToStart(const SizedBox(height: 30.0))
|
||||||
|
.addToEnd(const SizedBox(height: 30.0)),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|
|
@ -8,6 +8,7 @@ class SignInTemplateComponentModel
|
||||||
/// State fields for stateful widgets in this component.
|
/// State fields for stateful widgets in this component.
|
||||||
|
|
||||||
final formKey = GlobalKey<FormState>();
|
final formKey = GlobalKey<FormState>();
|
||||||
|
final unfocusNode = FocusNode();
|
||||||
// State field(s) for emailAddress widget.
|
// State field(s) for emailAddress widget.
|
||||||
FocusNode? emailAddressFocusNode;
|
FocusNode? emailAddressFocusNode;
|
||||||
TextEditingController? emailAddressTextController;
|
TextEditingController? emailAddressTextController;
|
||||||
|
|
|
@ -99,8 +99,9 @@ class _SignInTemplateComponentWidgetState
|
||||||
super.dispose();
|
super.dispose();
|
||||||
}
|
}
|
||||||
|
|
||||||
bool _isFormInvalid() {
|
bool _isFormInvalid() {
|
||||||
if (_model.emailAddressTextController.text == '' || _model.passwordTextController.text == '') {
|
if (_model.emailAddressTextController.text == '' ||
|
||||||
|
_model.passwordTextController.text == '') {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -131,8 +132,8 @@ class _SignInTemplateComponentWidgetState
|
||||||
mainAxisAlignment: MainAxisAlignment.center,
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
children: [
|
children: [
|
||||||
Padding(
|
Padding(
|
||||||
padding:
|
padding: const EdgeInsetsDirectional.fromSTEB(
|
||||||
const EdgeInsetsDirectional.fromSTEB(0.0, 35.0, 0.0, 35.0),
|
0.0, 35.0, 0.0, 35.0),
|
||||||
child: Container(
|
child: Container(
|
||||||
width: 548.0,
|
width: 548.0,
|
||||||
height: 112.0,
|
height: 112.0,
|
||||||
|
@ -148,7 +149,8 @@ class _SignInTemplateComponentWidgetState
|
||||||
children: [
|
children: [
|
||||||
Expanded(
|
Expanded(
|
||||||
child: Align(
|
child: Align(
|
||||||
alignment: const AlignmentDirectional(0.0, 1.0),
|
alignment:
|
||||||
|
const AlignmentDirectional(0.0, 1.0),
|
||||||
child: Padding(
|
child: Padding(
|
||||||
padding: const EdgeInsets.all(3.0),
|
padding: const EdgeInsets.all(3.0),
|
||||||
child: Text(
|
child: Text(
|
||||||
|
@ -184,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(
|
||||||
|
@ -223,8 +226,9 @@ class _SignInTemplateComponentWidgetState
|
||||||
mainAxisSize: MainAxisSize.max,
|
mainAxisSize: MainAxisSize.max,
|
||||||
children: [
|
children: [
|
||||||
Padding(
|
Padding(
|
||||||
padding: const EdgeInsetsDirectional
|
padding:
|
||||||
.fromSTEB(
|
const EdgeInsetsDirectional
|
||||||
|
.fromSTEB(
|
||||||
0.0, 0.0, 0.0, 16.0),
|
0.0, 0.0, 0.0, 16.0),
|
||||||
child: SizedBox(
|
child: SizedBox(
|
||||||
width: double.infinity,
|
width: double.infinity,
|
||||||
|
@ -236,7 +240,8 @@ class _SignInTemplateComponentWidgetState
|
||||||
onChanged: (_) =>
|
onChanged: (_) =>
|
||||||
EasyDebounce.debounce(
|
EasyDebounce.debounce(
|
||||||
'_model.emailAddressTextController',
|
'_model.emailAddressTextController',
|
||||||
const Duration(milliseconds: 500),
|
const Duration(
|
||||||
|
milliseconds: 500),
|
||||||
() => setState(() {}),
|
() => setState(() {}),
|
||||||
),
|
),
|
||||||
autofocus: true,
|
autofocus: true,
|
||||||
|
@ -364,8 +369,9 @@ class _SignInTemplateComponentWidgetState
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
Padding(
|
Padding(
|
||||||
padding: const EdgeInsetsDirectional
|
padding:
|
||||||
.fromSTEB(
|
const EdgeInsetsDirectional
|
||||||
|
.fromSTEB(
|
||||||
0.0, 0.0, 0.0, 16.0),
|
0.0, 0.0, 0.0, 16.0),
|
||||||
child: SizedBox(
|
child: SizedBox(
|
||||||
width: double.infinity,
|
width: double.infinity,
|
||||||
|
@ -377,7 +383,8 @@ class _SignInTemplateComponentWidgetState
|
||||||
onChanged: (_) =>
|
onChanged: (_) =>
|
||||||
EasyDebounce.debounce(
|
EasyDebounce.debounce(
|
||||||
'_model.passwordTextController',
|
'_model.passwordTextController',
|
||||||
const Duration(milliseconds: 500),
|
const Duration(
|
||||||
|
milliseconds: 500),
|
||||||
() => setState(() {}),
|
() => setState(() {}),
|
||||||
),
|
),
|
||||||
autofocus: true,
|
autofocus: true,
|
||||||
|
@ -430,7 +437,8 @@ class _SignInTemplateComponentWidgetState
|
||||||
),
|
),
|
||||||
focusedBorder:
|
focusedBorder:
|
||||||
OutlineInputBorder(
|
OutlineInputBorder(
|
||||||
borderSide: const BorderSide(
|
borderSide:
|
||||||
|
const BorderSide(
|
||||||
color:
|
color:
|
||||||
Color(0xFF1AAB5F),
|
Color(0xFF1AAB5F),
|
||||||
width: 0.25,
|
width: 0.25,
|
||||||
|
@ -441,7 +449,8 @@ class _SignInTemplateComponentWidgetState
|
||||||
),
|
),
|
||||||
errorBorder:
|
errorBorder:
|
||||||
OutlineInputBorder(
|
OutlineInputBorder(
|
||||||
borderSide: const BorderSide(
|
borderSide:
|
||||||
|
const BorderSide(
|
||||||
color:
|
color:
|
||||||
Color(0xFFFF5963),
|
Color(0xFFFF5963),
|
||||||
width: 0.25,
|
width: 0.25,
|
||||||
|
@ -452,7 +461,8 @@ class _SignInTemplateComponentWidgetState
|
||||||
),
|
),
|
||||||
focusedErrorBorder:
|
focusedErrorBorder:
|
||||||
OutlineInputBorder(
|
OutlineInputBorder(
|
||||||
borderSide: const BorderSide(
|
borderSide:
|
||||||
|
const BorderSide(
|
||||||
color:
|
color:
|
||||||
Color(0xFFFF5963),
|
Color(0xFFFF5963),
|
||||||
width: 0.25,
|
width: 0.25,
|
||||||
|
@ -527,8 +537,9 @@ class _SignInTemplateComponentWidgetState
|
||||||
mainAxisSize: MainAxisSize.max,
|
mainAxisSize: MainAxisSize.max,
|
||||||
children: [
|
children: [
|
||||||
Padding(
|
Padding(
|
||||||
padding: const EdgeInsetsDirectional
|
padding:
|
||||||
.fromSTEB(
|
const EdgeInsetsDirectional
|
||||||
|
.fromSTEB(
|
||||||
0.0, 0.0, 0.0, 16.0),
|
0.0, 0.0, 0.0, 16.0),
|
||||||
child: FFButtonWidget(
|
child: FFButtonWidget(
|
||||||
onPressed: _isFormInvalid()
|
onPressed: _isFormInvalid()
|
||||||
|
@ -556,18 +567,12 @@ class _SignInTemplateComponentWidgetState
|
||||||
height: 44.0,
|
height: 44.0,
|
||||||
padding:
|
padding:
|
||||||
const EdgeInsetsDirectional
|
const EdgeInsetsDirectional
|
||||||
.fromSTEB(
|
.fromSTEB(0.0,
|
||||||
0.0,
|
0.0, 0.0, 0.0),
|
||||||
0.0,
|
|
||||||
0.0,
|
|
||||||
0.0),
|
|
||||||
iconPadding:
|
iconPadding:
|
||||||
const EdgeInsetsDirectional
|
const EdgeInsetsDirectional
|
||||||
.fromSTEB(
|
.fromSTEB(0.0,
|
||||||
0.0,
|
0.0, 0.0, 0.0),
|
||||||
0.0,
|
|
||||||
0.0,
|
|
||||||
0.0),
|
|
||||||
color:
|
color:
|
||||||
FlutterFlowTheme.of(
|
FlutterFlowTheme.of(
|
||||||
context)
|
context)
|
||||||
|
@ -594,7 +599,8 @@ class _SignInTemplateComponentWidgetState
|
||||||
'Plus Jakarta Sans'),
|
'Plus Jakarta Sans'),
|
||||||
),
|
),
|
||||||
elevation: 3.0,
|
elevation: 3.0,
|
||||||
borderSide: const BorderSide(
|
borderSide:
|
||||||
|
const BorderSide(
|
||||||
color:
|
color:
|
||||||
Colors.transparent,
|
Colors.transparent,
|
||||||
width: 1.0,
|
width: 1.0,
|
||||||
|
@ -613,8 +619,9 @@ class _SignInTemplateComponentWidgetState
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
Padding(
|
Padding(
|
||||||
padding: const EdgeInsetsDirectional
|
padding:
|
||||||
.fromSTEB(
|
const EdgeInsetsDirectional
|
||||||
|
.fromSTEB(
|
||||||
0.0, 0.0, 0.0, 16.0),
|
0.0, 0.0, 0.0, 16.0),
|
||||||
child: FFButtonWidget(
|
child: FFButtonWidget(
|
||||||
onPressed: () async {
|
onPressed: () async {
|
||||||
|
@ -632,18 +639,12 @@ class _SignInTemplateComponentWidgetState
|
||||||
height: 44.0,
|
height: 44.0,
|
||||||
padding:
|
padding:
|
||||||
const EdgeInsetsDirectional
|
const EdgeInsetsDirectional
|
||||||
.fromSTEB(
|
.fromSTEB(0.0,
|
||||||
0.0,
|
0.0, 0.0, 0.0),
|
||||||
0.0,
|
|
||||||
0.0,
|
|
||||||
0.0),
|
|
||||||
iconPadding:
|
iconPadding:
|
||||||
const EdgeInsetsDirectional
|
const EdgeInsetsDirectional
|
||||||
.fromSTEB(
|
.fromSTEB(0.0,
|
||||||
0.0,
|
0.0, 0.0, 0.0),
|
||||||
0.0,
|
|
||||||
0.0,
|
|
||||||
0.0),
|
|
||||||
color:
|
color:
|
||||||
FlutterFlowTheme.of(
|
FlutterFlowTheme.of(
|
||||||
context)
|
context)
|
||||||
|
@ -670,7 +671,8 @@ class _SignInTemplateComponentWidgetState
|
||||||
'Plus Jakarta Sans'),
|
'Plus Jakarta Sans'),
|
||||||
),
|
),
|
||||||
elevation: 3.0,
|
elevation: 3.0,
|
||||||
borderSide: const BorderSide(
|
borderSide:
|
||||||
|
const BorderSide(
|
||||||
color:
|
color:
|
||||||
Colors.transparent,
|
Colors.transparent,
|
||||||
width: 1.0,
|
width: 1.0,
|
||||||
|
@ -695,28 +697,39 @@ class _SignInTemplateComponentWidgetState
|
||||||
padding:
|
padding:
|
||||||
const EdgeInsetsDirectional
|
const EdgeInsetsDirectional
|
||||||
.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:
|
||||||
? null
|
_isFormInvalid()
|
||||||
: () async {
|
? null
|
||||||
try {
|
: () async {
|
||||||
await action_blocks
|
try {
|
||||||
.singInLoginAction(
|
await action_blocks
|
||||||
context,
|
.singInLoginAction(
|
||||||
emailAdress: _model
|
context,
|
||||||
.emailAddressTextController
|
emailAdress: _model
|
||||||
.text,
|
.emailAddressTextController
|
||||||
password: _model
|
.text,
|
||||||
.passwordTextController
|
password: _model
|
||||||
.text,
|
.passwordTextController
|
||||||
);
|
.text,
|
||||||
setState(() {});
|
);
|
||||||
} catch (e, s) {
|
setState(
|
||||||
await DialogUtil.errorDefault(context);
|
() {});
|
||||||
LogUtil.requestAPIFailed('login.php', _model.emailAddressTextController.text, "Login", e, s);
|
} catch (e, s) {
|
||||||
}
|
await DialogUtil
|
||||||
},
|
.errorDefault(
|
||||||
|
context);
|
||||||
|
LogUtil.requestAPIFailed(
|
||||||
|
'login.php',
|
||||||
|
_model
|
||||||
|
.emailAddressTextController
|
||||||
|
.text,
|
||||||
|
"Login",
|
||||||
|
e,
|
||||||
|
s);
|
||||||
|
}
|
||||||
|
},
|
||||||
text: FFLocalizations.of(
|
text: FFLocalizations.of(
|
||||||
context)
|
context)
|
||||||
.getText(
|
.getText(
|
||||||
|
@ -727,18 +740,12 @@ class _SignInTemplateComponentWidgetState
|
||||||
height: 44.0,
|
height: 44.0,
|
||||||
padding:
|
padding:
|
||||||
const EdgeInsetsDirectional
|
const EdgeInsetsDirectional
|
||||||
.fromSTEB(
|
.fromSTEB(0.0,
|
||||||
0.0,
|
0.0, 0.0, 0.0),
|
||||||
0.0,
|
|
||||||
0.0,
|
|
||||||
0.0),
|
|
||||||
iconPadding:
|
iconPadding:
|
||||||
const EdgeInsetsDirectional
|
const EdgeInsetsDirectional
|
||||||
.fromSTEB(
|
.fromSTEB(0.0,
|
||||||
0.0,
|
0.0, 0.0, 0.0),
|
||||||
0.0,
|
|
||||||
0.0,
|
|
||||||
0.0),
|
|
||||||
color:
|
color:
|
||||||
FlutterFlowTheme.of(
|
FlutterFlowTheme.of(
|
||||||
context)
|
context)
|
||||||
|
@ -766,7 +773,8 @@ class _SignInTemplateComponentWidgetState
|
||||||
'Plus Jakarta Sans'),
|
'Plus Jakarta Sans'),
|
||||||
),
|
),
|
||||||
elevation: 3.0,
|
elevation: 3.0,
|
||||||
borderSide: const BorderSide(
|
borderSide:
|
||||||
|
const BorderSide(
|
||||||
color: Colors
|
color: Colors
|
||||||
.transparent,
|
.transparent,
|
||||||
width: 1.0,
|
width: 1.0,
|
||||||
|
@ -775,9 +783,11 @@ class _SignInTemplateComponentWidgetState
|
||||||
BorderRadius
|
BorderRadius
|
||||||
.circular(12.0),
|
.circular(12.0),
|
||||||
disabledColor:
|
disabledColor:
|
||||||
const Color(0xE81AAB5F),
|
const Color(
|
||||||
|
0xE81AAB5F),
|
||||||
),
|
),
|
||||||
showLoadingIndicator: true,
|
showLoadingIndicator:
|
||||||
|
true,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
@ -786,7 +796,7 @@ class _SignInTemplateComponentWidgetState
|
||||||
padding:
|
padding:
|
||||||
const EdgeInsetsDirectional
|
const EdgeInsetsDirectional
|
||||||
.fromSTEB(0.0, 0.0,
|
.fromSTEB(0.0, 0.0,
|
||||||
0.0, 16.0),
|
0.0, 16.0),
|
||||||
child: FFButtonWidget(
|
child: FFButtonWidget(
|
||||||
onPressed: () async {
|
onPressed: () async {
|
||||||
await widget
|
await widget
|
||||||
|
@ -803,18 +813,12 @@ class _SignInTemplateComponentWidgetState
|
||||||
height: 44.0,
|
height: 44.0,
|
||||||
padding:
|
padding:
|
||||||
const EdgeInsetsDirectional
|
const EdgeInsetsDirectional
|
||||||
.fromSTEB(
|
.fromSTEB(0.0,
|
||||||
0.0,
|
0.0, 0.0, 0.0),
|
||||||
0.0,
|
|
||||||
0.0,
|
|
||||||
0.0),
|
|
||||||
iconPadding:
|
iconPadding:
|
||||||
const EdgeInsetsDirectional
|
const EdgeInsetsDirectional
|
||||||
.fromSTEB(
|
.fromSTEB(0.0,
|
||||||
0.0,
|
0.0, 0.0, 0.0),
|
||||||
0.0,
|
|
||||||
0.0,
|
|
||||||
0.0),
|
|
||||||
color:
|
color:
|
||||||
FlutterFlowTheme.of(
|
FlutterFlowTheme.of(
|
||||||
context)
|
context)
|
||||||
|
@ -842,7 +846,8 @@ class _SignInTemplateComponentWidgetState
|
||||||
'Plus Jakarta Sans'),
|
'Plus Jakarta Sans'),
|
||||||
),
|
),
|
||||||
elevation: 3.0,
|
elevation: 3.0,
|
||||||
borderSide: const BorderSide(
|
borderSide:
|
||||||
|
const BorderSide(
|
||||||
color: Colors
|
color: Colors
|
||||||
.transparent,
|
.transparent,
|
||||||
width: 1.0,
|
width: 1.0,
|
||||||
|
@ -856,7 +861,8 @@ class _SignInTemplateComponentWidgetState
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
].divide(const SizedBox(width: 7.0)),
|
].divide(
|
||||||
|
const SizedBox(width: 7.0)),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -864,8 +870,8 @@ class _SignInTemplateComponentWidgetState
|
||||||
|
|
||||||
// You will have to add an action on this rich text to go to your login page.
|
// You will have to add an action on this rich text to go to your login page.
|
||||||
Padding(
|
Padding(
|
||||||
padding: const EdgeInsetsDirectional.fromSTEB(
|
padding: const EdgeInsetsDirectional
|
||||||
0.0, 12.0, 0.0, 12.0),
|
.fromSTEB(0.0, 12.0, 0.0, 12.0),
|
||||||
child: InkWell(
|
child: InkWell(
|
||||||
splashColor: Colors.transparent,
|
splashColor: Colors.transparent,
|
||||||
focusColor: Colors.transparent,
|
focusColor: Colors.transparent,
|
||||||
|
@ -874,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)
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
|
|
||||||
import 'package:hub/backend/api_requests/api_calls.dart';
|
import 'package:hub/backend/api_requests/api_calls.dart';
|
||||||
import 'package:hub/components/molecular_components/visitor_not_found_component/visitor_not_found_component_widget.dart';
|
import 'package:hub/components/molecular_components/visitor_not_found_component/visitor_not_found_component_widget.dart';
|
||||||
import 'package:hub/components/templates_components/visitor_details_modal_template_component/visitor_details_modal_template_component_widget.dart';
|
import 'package:hub/components/templates_components/visitor_details_modal_template_component/visitor_details_modal_template_component_widget.dart';
|
||||||
|
@ -9,8 +8,6 @@ import 'package:hub/flutter_flow/flutter_flow_util.dart';
|
||||||
import 'package:hub/flutter_flow/flutter_flow_widgets.dart';
|
import 'package:hub/flutter_flow/flutter_flow_widgets.dart';
|
||||||
import 'package:hub/flutter_flow/internationalization.dart';
|
import 'package:hub/flutter_flow/internationalization.dart';
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
import 'package:cached_network_image/cached_network_image.dart';
|
import 'package:cached_network_image/cached_network_image.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:google_fonts/google_fonts.dart';
|
import 'package:google_fonts/google_fonts.dart';
|
||||||
|
@ -69,171 +66,167 @@ class _VisitorSearchModalTemplateComponentWidgetState
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
context.watch<FFAppState>();
|
context.watch<FFAppState>();
|
||||||
|
|
||||||
return Align(
|
return Padding(
|
||||||
alignment: const AlignmentDirectional(0.0, 0.0),
|
padding: const EdgeInsetsDirectional.fromSTEB(0.0, 50.0, 0.0, 0.0),
|
||||||
child: Padding(
|
child: Container(
|
||||||
padding: const EdgeInsetsDirectional.fromSTEB(0.0, 300.0, 0.0, 0.0),
|
width: MediaQuery.of(context).size.width,
|
||||||
child: Container(
|
decoration: BoxDecoration(
|
||||||
width: double.infinity,
|
color: FlutterFlowTheme.of(context).primaryBackground,
|
||||||
decoration: BoxDecoration(
|
borderRadius: const BorderRadius.only(
|
||||||
color: FlutterFlowTheme.of(context).primaryBackground,
|
bottomLeft: Radius.circular(0.0),
|
||||||
borderRadius: const BorderRadius.only(
|
bottomRight: Radius.circular(0.0),
|
||||||
bottomLeft: Radius.circular(0.0),
|
topLeft: Radius.circular(15.0),
|
||||||
bottomRight: Radius.circular(0.0),
|
topRight: Radius.circular(15.0),
|
||||||
topLeft: Radius.circular(15.0),
|
|
||||||
topRight: Radius.circular(15.0),
|
|
||||||
),
|
|
||||||
),
|
),
|
||||||
child: Column(
|
),
|
||||||
mainAxisSize: MainAxisSize.max,
|
child: Column(
|
||||||
crossAxisAlignment: CrossAxisAlignment.end,
|
mainAxisSize: MainAxisSize.max,
|
||||||
children: [
|
crossAxisAlignment: CrossAxisAlignment.end,
|
||||||
Padding(
|
children: [
|
||||||
padding: const EdgeInsetsDirectional.fromSTEB(16.0, 10.0, 16.0, 0.0),
|
Padding(
|
||||||
child: TextFormField(
|
padding:
|
||||||
controller: _model.textController,
|
const EdgeInsetsDirectional.fromSTEB(16.0, 10.0, 16.0, 0.0),
|
||||||
focusNode: _model.textFieldFocusNode,
|
child: TextFormField(
|
||||||
onFieldSubmitted: (_) async {
|
controller: _model.textController,
|
||||||
setState(() {
|
focusNode: _model.textFieldFocusNode,
|
||||||
_model.textController?.text = valueOrDefault<String>(
|
onFieldSubmitted: (_) async {
|
||||||
_model.textController.text,
|
setState(() {
|
||||||
'69696777',
|
_model.textController?.text = valueOrDefault<String>(
|
||||||
);
|
_model.textController.text,
|
||||||
_model.textController?.selection =
|
'69696777',
|
||||||
TextSelection.collapsed(
|
|
||||||
offset: _model.textController!.text.length);
|
|
||||||
});
|
|
||||||
_model.getVisitorByDoc =
|
|
||||||
await PhpGroup.getVisitorByDocCall.call(
|
|
||||||
devUUID: FFAppState().devUUID,
|
|
||||||
userUUID: FFAppState().userUUID,
|
|
||||||
cliID: FFAppState().cliUUID,
|
|
||||||
atividade: 'getVisitante',
|
|
||||||
documento: _model.textController.text,
|
|
||||||
);
|
);
|
||||||
|
_model.textController?.selection = TextSelection.collapsed(
|
||||||
|
offset: _model.textController!.text.length);
|
||||||
|
});
|
||||||
|
_model.getVisitorByDoc =
|
||||||
|
await PhpGroup.getVisitorByDocCall.call(
|
||||||
|
devUUID: FFAppState().devUUID,
|
||||||
|
userUUID: FFAppState().userUUID,
|
||||||
|
cliID: FFAppState().cliUUID,
|
||||||
|
atividade: 'getVisitante',
|
||||||
|
documento: _model.textController.text,
|
||||||
|
);
|
||||||
|
|
||||||
if (PhpGroup.getVisitorByDocCall.vistanteId(
|
if (PhpGroup.getVisitorByDocCall.vistanteId(
|
||||||
(_model.getVisitorByDoc?.jsonBody ?? ''),
|
|
||||||
) !=
|
|
||||||
'0') {
|
|
||||||
_model
|
|
||||||
.addToVisitors(PhpGroup.getVisitorByDocCall.visitante(
|
|
||||||
(_model.getVisitorByDoc?.jsonBody ?? ''),
|
(_model.getVisitorByDoc?.jsonBody ?? ''),
|
||||||
));
|
) !=
|
||||||
setState(() {});
|
'0') {
|
||||||
_model.addToDocs(_model.textController.text);
|
_model.addToVisitors(PhpGroup.getVisitorByDocCall.visitante(
|
||||||
setState(() {});
|
(_model.getVisitorByDoc?.jsonBody ?? ''),
|
||||||
} else {
|
));
|
||||||
await showModalBottomSheet(
|
|
||||||
isScrollControlled: true,
|
|
||||||
backgroundColor: Colors.transparent,
|
|
||||||
context: context,
|
|
||||||
builder: (context) {
|
|
||||||
return Padding(
|
|
||||||
padding: MediaQuery.viewInsetsOf(context),
|
|
||||||
child: const VisitorNotFoundComponentWidget(),
|
|
||||||
);
|
|
||||||
},
|
|
||||||
).then((value) => safeSetState(() {}));
|
|
||||||
}
|
|
||||||
|
|
||||||
setState(() {});
|
setState(() {});
|
||||||
},
|
_model.addToDocs(_model.textController.text);
|
||||||
autofocus: false,
|
setState(() {});
|
||||||
textInputAction: TextInputAction.done,
|
} else {
|
||||||
obscureText: false,
|
await showModalBottomSheet(
|
||||||
decoration: InputDecoration(
|
isScrollControlled: true,
|
||||||
isDense: false,
|
enableDrag: true,
|
||||||
labelText: FFLocalizations.of(context).getText(
|
isDismissible: true,
|
||||||
'cjlpru1m' /* Procure pelo documento do visi... */,
|
backgroundColor: Colors.transparent,
|
||||||
),
|
context: context,
|
||||||
labelStyle: FlutterFlowTheme.of(context)
|
builder: (context) {
|
||||||
.labelMedium
|
return Padding(
|
||||||
.override(
|
padding: MediaQuery.viewInsetsOf(context),
|
||||||
fontFamily:
|
child: const VisitorNotFoundComponentWidget(),
|
||||||
FlutterFlowTheme.of(context).labelMediumFamily,
|
);
|
||||||
color: FlutterFlowTheme.of(context).primaryText,
|
},
|
||||||
letterSpacing: 0.0,
|
).then((value) => safeSetState(() {}));
|
||||||
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
}
|
||||||
FlutterFlowTheme.of(context).labelMediumFamily),
|
|
||||||
),
|
setState(() {});
|
||||||
hintText: FFLocalizations.of(context).getText(
|
},
|
||||||
'8i1qszba' /* test */,
|
autofocus: false,
|
||||||
),
|
textInputAction: TextInputAction.done,
|
||||||
enabledBorder: OutlineInputBorder(
|
obscureText: false,
|
||||||
borderSide: BorderSide(
|
decoration: InputDecoration(
|
||||||
color: FlutterFlowTheme.of(context).accent1,
|
isDense: false,
|
||||||
width: 0.5,
|
labelText: FFLocalizations.of(context).getText(
|
||||||
),
|
'cjlpru1m' /* Procure pelo documento do visi... */,
|
||||||
borderRadius: const BorderRadius.only(
|
|
||||||
bottomLeft: Radius.circular(15.0),
|
|
||||||
bottomRight: Radius.circular(15.0),
|
|
||||||
topLeft: Radius.circular(15.0),
|
|
||||||
topRight: Radius.circular(15.0),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
focusedBorder: OutlineInputBorder(
|
|
||||||
borderSide: BorderSide(
|
|
||||||
color: FlutterFlowTheme.of(context).primary,
|
|
||||||
width: 0.5,
|
|
||||||
),
|
|
||||||
borderRadius: const BorderRadius.only(
|
|
||||||
bottomLeft: Radius.circular(15.0),
|
|
||||||
bottomRight: Radius.circular(15.0),
|
|
||||||
topLeft: Radius.circular(15.0),
|
|
||||||
topRight: Radius.circular(15.0),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
errorBorder: OutlineInputBorder(
|
|
||||||
borderSide: BorderSide(
|
|
||||||
color: FlutterFlowTheme.of(context).error,
|
|
||||||
width: 0.5,
|
|
||||||
),
|
|
||||||
borderRadius: const BorderRadius.only(
|
|
||||||
bottomLeft: Radius.circular(15.0),
|
|
||||||
bottomRight: Radius.circular(15.0),
|
|
||||||
topLeft: Radius.circular(15.0),
|
|
||||||
topRight: Radius.circular(15.0),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
focusedErrorBorder: OutlineInputBorder(
|
|
||||||
borderSide: BorderSide(
|
|
||||||
color: FlutterFlowTheme.of(context).error,
|
|
||||||
width: 0.5,
|
|
||||||
),
|
|
||||||
borderRadius: const BorderRadius.only(
|
|
||||||
bottomLeft: Radius.circular(15.0),
|
|
||||||
bottomRight: Radius.circular(15.0),
|
|
||||||
topLeft: Radius.circular(15.0),
|
|
||||||
topRight: Radius.circular(15.0),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
filled: true,
|
|
||||||
fillColor: FlutterFlowTheme.of(context).primaryBackground,
|
|
||||||
prefixIcon: Icon(
|
|
||||||
Icons.search_outlined,
|
|
||||||
color: FlutterFlowTheme.of(context).accent1,
|
|
||||||
),
|
|
||||||
),
|
),
|
||||||
style: FlutterFlowTheme.of(context).bodyMedium.override(
|
labelStyle: FlutterFlowTheme.of(context).labelMedium.override(
|
||||||
fontFamily:
|
fontFamily:
|
||||||
FlutterFlowTheme.of(context).bodyMediumFamily,
|
FlutterFlowTheme.of(context).labelMediumFamily,
|
||||||
|
color: FlutterFlowTheme.of(context).primaryText,
|
||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
||||||
FlutterFlowTheme.of(context).bodyMediumFamily),
|
FlutterFlowTheme.of(context).labelMediumFamily),
|
||||||
),
|
),
|
||||||
keyboardType: TextInputType.number,
|
hintText: FFLocalizations.of(context).getText(
|
||||||
validator:
|
'8i1qszba' /* test */,
|
||||||
_model.textControllerValidator.asValidator(context),
|
),
|
||||||
|
enabledBorder: OutlineInputBorder(
|
||||||
|
borderSide: BorderSide(
|
||||||
|
color: FlutterFlowTheme.of(context).accent1,
|
||||||
|
width: 0.5,
|
||||||
|
),
|
||||||
|
borderRadius: const BorderRadius.only(
|
||||||
|
bottomLeft: Radius.circular(15.0),
|
||||||
|
bottomRight: Radius.circular(15.0),
|
||||||
|
topLeft: Radius.circular(15.0),
|
||||||
|
topRight: Radius.circular(15.0),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
focusedBorder: OutlineInputBorder(
|
||||||
|
borderSide: BorderSide(
|
||||||
|
color: FlutterFlowTheme.of(context).primary,
|
||||||
|
width: 0.5,
|
||||||
|
),
|
||||||
|
borderRadius: const BorderRadius.only(
|
||||||
|
bottomLeft: Radius.circular(15.0),
|
||||||
|
bottomRight: Radius.circular(15.0),
|
||||||
|
topLeft: Radius.circular(15.0),
|
||||||
|
topRight: Radius.circular(15.0),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
errorBorder: OutlineInputBorder(
|
||||||
|
borderSide: BorderSide(
|
||||||
|
color: FlutterFlowTheme.of(context).error,
|
||||||
|
width: 0.5,
|
||||||
|
),
|
||||||
|
borderRadius: const BorderRadius.only(
|
||||||
|
bottomLeft: Radius.circular(15.0),
|
||||||
|
bottomRight: Radius.circular(15.0),
|
||||||
|
topLeft: Radius.circular(15.0),
|
||||||
|
topRight: Radius.circular(15.0),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
focusedErrorBorder: OutlineInputBorder(
|
||||||
|
borderSide: BorderSide(
|
||||||
|
color: FlutterFlowTheme.of(context).error,
|
||||||
|
width: 0.5,
|
||||||
|
),
|
||||||
|
borderRadius: const BorderRadius.only(
|
||||||
|
bottomLeft: Radius.circular(15.0),
|
||||||
|
bottomRight: Radius.circular(15.0),
|
||||||
|
topLeft: Radius.circular(15.0),
|
||||||
|
topRight: Radius.circular(15.0),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
filled: true,
|
||||||
|
fillColor: FlutterFlowTheme.of(context).primaryBackground,
|
||||||
|
prefixIcon: Icon(
|
||||||
|
Icons.search_outlined,
|
||||||
|
color: FlutterFlowTheme.of(context).accent1,
|
||||||
|
),
|
||||||
),
|
),
|
||||||
|
style: FlutterFlowTheme.of(context).bodyMedium.override(
|
||||||
|
fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily,
|
||||||
|
letterSpacing: 0.0,
|
||||||
|
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
||||||
|
FlutterFlowTheme.of(context).bodyMediumFamily),
|
||||||
|
),
|
||||||
|
keyboardType: TextInputType.number,
|
||||||
|
validator: _model.textControllerValidator.asValidator(context),
|
||||||
),
|
),
|
||||||
|
),
|
||||||
|
if (_model.visitors.isNotEmpty && _model.visitors.length > 0)
|
||||||
Row(
|
Row(
|
||||||
mainAxisSize: MainAxisSize.max,
|
mainAxisSize: MainAxisSize.max,
|
||||||
mainAxisAlignment: MainAxisAlignment.start,
|
mainAxisAlignment: MainAxisAlignment.start,
|
||||||
children: [
|
children: [
|
||||||
Padding(
|
Padding(
|
||||||
padding:
|
padding: const EdgeInsetsDirectional.fromSTEB(
|
||||||
const EdgeInsetsDirectional.fromSTEB(16.0, 12.0, 0.0, 0.0),
|
16.0, 12.0, 0.0, 0.0),
|
||||||
child: Text(
|
child: Text(
|
||||||
FFLocalizations.of(context).getText(
|
FFLocalizations.of(context).getText(
|
||||||
'9coywebh' /* Visitantes encontrados */,
|
'9coywebh' /* Visitantes encontrados */,
|
||||||
|
@ -249,12 +242,10 @@ class _VisitorSearchModalTemplateComponentWidgetState
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
Padding(
|
Padding(
|
||||||
padding:
|
padding: const EdgeInsetsDirectional.fromSTEB(
|
||||||
const EdgeInsetsDirectional.fromSTEB(4.0, 12.0, 16.0, 0.0),
|
4.0, 12.0, 16.0, 0.0),
|
||||||
child: Text(
|
child: Text(
|
||||||
FFLocalizations.of(context).getText(
|
_model.visitors.length.toString(),
|
||||||
'6f5p0fv6' /* 24 */,
|
|
||||||
),
|
|
||||||
style: FlutterFlowTheme.of(context).bodyMedium.override(
|
style: FlutterFlowTheme.of(context).bodyMedium.override(
|
||||||
fontFamily:
|
fontFamily:
|
||||||
FlutterFlowTheme.of(context).bodyMediumFamily,
|
FlutterFlowTheme.of(context).bodyMediumFamily,
|
||||||
|
@ -266,271 +257,268 @@ class _VisitorSearchModalTemplateComponentWidgetState
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
Expanded(
|
Expanded(
|
||||||
child: Builder(
|
child: Builder(
|
||||||
builder: (context) {
|
builder: (context) {
|
||||||
if (_model.visitors.isNotEmpty) {
|
if (_model.visitors.isNotEmpty) {
|
||||||
return Padding(
|
return Padding(
|
||||||
padding:
|
padding: const EdgeInsetsDirectional.fromSTEB(
|
||||||
const EdgeInsetsDirectional.fromSTEB(8.0, 8.0, 8.0, 0.0),
|
8.0, 8.0, 8.0, 0.0),
|
||||||
child: Builder(
|
child: Builder(
|
||||||
builder: (context) {
|
builder: (context) {
|
||||||
final visitor =
|
final visitor =
|
||||||
_model.visitors.map((e) => e).toList();
|
_model.visitors.map((e) => e).toList();
|
||||||
|
|
||||||
return ListView.builder(
|
return ListView.builder(
|
||||||
padding: EdgeInsets.zero,
|
padding: EdgeInsets.zero,
|
||||||
scrollDirection: Axis.vertical,
|
scrollDirection: Axis.vertical,
|
||||||
itemCount: visitor.length,
|
itemCount: visitor.length,
|
||||||
itemBuilder: (context, visitorIndex) {
|
itemBuilder: (context, visitorIndex) {
|
||||||
final visitorItem = visitor[visitorIndex];
|
final visitorItem = visitor[visitorIndex];
|
||||||
return Padding(
|
return Padding(
|
||||||
padding: const EdgeInsetsDirectional.fromSTEB(
|
padding: const EdgeInsetsDirectional.fromSTEB(
|
||||||
0.0, 0.0, 0.0, 1.0),
|
0.0, 0.0, 0.0, 1.0),
|
||||||
child: InkWell(
|
child: InkWell(
|
||||||
splashColor: Colors.transparent,
|
splashColor: Colors.transparent,
|
||||||
focusColor: Colors.transparent,
|
focusColor: Colors.transparent,
|
||||||
hoverColor: Colors.transparent,
|
hoverColor: Colors.transparent,
|
||||||
highlightColor: Colors.transparent,
|
highlightColor: Colors.transparent,
|
||||||
onTap: () async {
|
onTap: () async {
|
||||||
await showModalBottomSheet(
|
await showModalBottomSheet(
|
||||||
isScrollControlled: true,
|
isScrollControlled: true,
|
||||||
enableDrag: false,
|
enableDrag: false,
|
||||||
context: context,
|
context: context,
|
||||||
builder: (context) {
|
builder: (context) {
|
||||||
return Padding(
|
return Padding(
|
||||||
padding: MediaQuery.viewInsetsOf(
|
padding:
|
||||||
context),
|
MediaQuery.viewInsetsOf(context),
|
||||||
child: const SizedBox(
|
child: const SizedBox(
|
||||||
height: 610.0,
|
height: 610.0,
|
||||||
child:
|
child:
|
||||||
VisitorDetailsModalTemplateComponentWidget(),
|
VisitorDetailsModalTemplateComponentWidget(),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
).then((value) => safeSetState(() {}));
|
).then((value) => safeSetState(() {}));
|
||||||
},
|
},
|
||||||
child: Container(
|
child: Container(
|
||||||
width: 100.0,
|
width: 100.0,
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
color: FlutterFlowTheme.of(context)
|
color: FlutterFlowTheme.of(context)
|
||||||
.secondaryBackground,
|
.secondaryBackground,
|
||||||
boxShadow: [
|
boxShadow: [
|
||||||
BoxShadow(
|
BoxShadow(
|
||||||
blurRadius: 0.0,
|
blurRadius: 0.0,
|
||||||
color: FlutterFlowTheme.of(context)
|
color: FlutterFlowTheme.of(context)
|
||||||
.alternate,
|
.alternate,
|
||||||
offset: const Offset(
|
offset: const Offset(
|
||||||
0.0,
|
0.0,
|
||||||
1.0,
|
1.0,
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
child: Padding(
|
child: Padding(
|
||||||
padding: const EdgeInsets.all(8.0),
|
padding: const EdgeInsets.all(8.0),
|
||||||
child: Row(
|
child: Row(
|
||||||
mainAxisSize: MainAxisSize.min,
|
mainAxisSize: MainAxisSize.min,
|
||||||
crossAxisAlignment:
|
crossAxisAlignment:
|
||||||
CrossAxisAlignment.center,
|
CrossAxisAlignment.center,
|
||||||
children: [
|
children: [
|
||||||
ClipRRect(
|
ClipRRect(
|
||||||
borderRadius:
|
borderRadius:
|
||||||
BorderRadius.circular(40.0),
|
BorderRadius.circular(40.0),
|
||||||
child: CachedNetworkImage(
|
child: CachedNetworkImage(
|
||||||
fadeInDuration:
|
fadeInDuration: const Duration(
|
||||||
const Duration(milliseconds: 500),
|
milliseconds: 500),
|
||||||
fadeOutDuration:
|
fadeOutDuration: const Duration(
|
||||||
const Duration(milliseconds: 500),
|
milliseconds: 500),
|
||||||
imageUrl:
|
imageUrl: valueOrDefault<String>(
|
||||||
valueOrDefault<String>(
|
"https://freaccess.com.br/freaccess/getImage.php?devUUID=${FFAppState().devUUID}&userUUID=${FFAppState().userUUID}&cliID=${FFAppState().cliUUID}&atividade=getFoto&Documento=${getJsonField(
|
||||||
'https://freaccess.com.br/freaccess/getImage.php?devUUID=${FFAppState().devUUID}&userUUID=${FFAppState().userUUID}&cliID=${FFAppState().cliUUID}&atividade=getFoto&Documento=${getJsonField(
|
visitorItem,
|
||||||
visitorItem,
|
r'''$.VTE_DOCUMENTO''',
|
||||||
r'''$.VTE_DOCUMENTO''',
|
).toString()}&tipo=E",
|
||||||
).toString()}&tipo=E',
|
'https://storage.googleapis.com/flutterflow-io-6f20.appspot.com/projects/flutter-freaccess-hub-0xgz9q/assets/7ftdetkzc3s0/360_F_64676383_LdbmhiNM6Ypzb3FM4PPuFP9rHe7ri8Ju.jpg',
|
||||||
'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,
|
|
||||||
),
|
),
|
||||||
|
width: 60.0,
|
||||||
|
height: 60.0,
|
||||||
|
fit: BoxFit.cover,
|
||||||
),
|
),
|
||||||
Expanded(
|
),
|
||||||
child: Column(
|
Expanded(
|
||||||
mainAxisSize: MainAxisSize.max,
|
child: Column(
|
||||||
crossAxisAlignment:
|
mainAxisSize: MainAxisSize.max,
|
||||||
CrossAxisAlignment.start,
|
crossAxisAlignment:
|
||||||
children: [
|
CrossAxisAlignment.start,
|
||||||
Padding(
|
children: [
|
||||||
padding:
|
Padding(
|
||||||
const EdgeInsetsDirectional
|
padding:
|
||||||
.fromSTEB(12.0, 0.0,
|
const EdgeInsetsDirectional
|
||||||
0.0, 0.0),
|
.fromSTEB(
|
||||||
child: Text(
|
12.0, 0.0, 0.0, 0.0),
|
||||||
valueOrDefault<String>(
|
child: Text(
|
||||||
getJsonField(
|
valueOrDefault<String>(
|
||||||
visitorItem,
|
getJsonField(
|
||||||
r'''$.VTE_NOME''',
|
visitorItem,
|
||||||
)?.toString(),
|
r'''$.VTE_NOME''',
|
||||||
'NOT FOUND',
|
)?.toString(),
|
||||||
),
|
'NOT FOUND',
|
||||||
style:
|
|
||||||
FlutterFlowTheme.of(
|
|
||||||
context)
|
|
||||||
.bodyLarge
|
|
||||||
.override(
|
|
||||||
fontFamily: FlutterFlowTheme.of(
|
|
||||||
context)
|
|
||||||
.bodyLargeFamily,
|
|
||||||
letterSpacing:
|
|
||||||
0.0,
|
|
||||||
useGoogleFonts: GoogleFonts
|
|
||||||
.asMap()
|
|
||||||
.containsKey(
|
|
||||||
FlutterFlowTheme.of(context)
|
|
||||||
.bodyLargeFamily),
|
|
||||||
),
|
|
||||||
),
|
),
|
||||||
|
style: FlutterFlowTheme.of(
|
||||||
|
context)
|
||||||
|
.bodyLarge
|
||||||
|
.override(
|
||||||
|
fontFamily:
|
||||||
|
FlutterFlowTheme.of(
|
||||||
|
context)
|
||||||
|
.bodyLargeFamily,
|
||||||
|
letterSpacing: 0.0,
|
||||||
|
useGoogleFonts: GoogleFonts
|
||||||
|
.asMap()
|
||||||
|
.containsKey(
|
||||||
|
FlutterFlowTheme.of(
|
||||||
|
context)
|
||||||
|
.bodyLargeFamily),
|
||||||
|
),
|
||||||
),
|
),
|
||||||
Padding(
|
),
|
||||||
padding:
|
Padding(
|
||||||
const EdgeInsetsDirectional
|
padding:
|
||||||
.fromSTEB(4.0, 4.0,
|
const EdgeInsetsDirectional
|
||||||
0.0, 0.0),
|
.fromSTEB(
|
||||||
child: Row(
|
4.0, 4.0, 0.0, 0.0),
|
||||||
mainAxisSize:
|
child: Row(
|
||||||
MainAxisSize.max,
|
mainAxisSize:
|
||||||
mainAxisAlignment:
|
MainAxisSize.max,
|
||||||
MainAxisAlignment
|
mainAxisAlignment:
|
||||||
.start,
|
MainAxisAlignment.start,
|
||||||
children: [
|
children: [
|
||||||
Align(
|
Align(
|
||||||
alignment:
|
alignment:
|
||||||
const AlignmentDirectional(
|
const AlignmentDirectional(
|
||||||
0.0, -1.0),
|
0.0, -1.0),
|
||||||
child: Padding(
|
child: Padding(
|
||||||
padding:
|
padding:
|
||||||
const EdgeInsetsDirectional
|
const EdgeInsetsDirectional
|
||||||
.fromSTEB(
|
.fromSTEB(
|
||||||
10.0,
|
10.0,
|
||||||
0.0,
|
0.0,
|
||||||
0.0,
|
0.0,
|
||||||
0.0),
|
0.0),
|
||||||
child: Text(
|
child: Text(
|
||||||
getJsonField(
|
getJsonField(
|
||||||
visitorItem,
|
visitorItem,
|
||||||
r'''$.VTE_TELEFONE''',
|
r'''$.VTE_TELEFONE''',
|
||||||
).toString(),
|
).toString(),
|
||||||
style: FlutterFlowTheme
|
style: FlutterFlowTheme
|
||||||
.of(context)
|
.of(context)
|
||||||
.bodyMedium
|
.bodyMedium
|
||||||
.override(
|
.override(
|
||||||
fontFamily:
|
fontFamily: FlutterFlowTheme.of(
|
||||||
FlutterFlowTheme.of(context)
|
context)
|
||||||
.bodyMediumFamily,
|
.bodyMediumFamily,
|
||||||
color: FlutterFlowTheme.of(
|
color: FlutterFlowTheme.of(
|
||||||
context)
|
context)
|
||||||
.primary,
|
.primary,
|
||||||
letterSpacing:
|
letterSpacing:
|
||||||
0.0,
|
0.0,
|
||||||
useGoogleFonts: GoogleFonts
|
useGoogleFonts: GoogleFonts
|
||||||
.asMap()
|
.asMap()
|
||||||
.containsKey(
|
.containsKey(
|
||||||
FlutterFlowTheme.of(context).bodyMediumFamily),
|
FlutterFlowTheme.of(context)
|
||||||
),
|
.bodyMediumFamily),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
],
|
),
|
||||||
),
|
],
|
||||||
),
|
),
|
||||||
],
|
),
|
||||||
),
|
],
|
||||||
),
|
),
|
||||||
FlutterFlowIconButton(
|
),
|
||||||
borderRadius: 20.0,
|
FlutterFlowIconButton(
|
||||||
borderWidth: 1.0,
|
borderRadius: 20.0,
|
||||||
buttonSize: 40.0,
|
borderWidth: 1.0,
|
||||||
icon: Icon(
|
buttonSize: 40.0,
|
||||||
Icons.restore_from_trash,
|
icon: Icon(
|
||||||
color:
|
Icons.restore_from_trash,
|
||||||
FlutterFlowTheme.of(context)
|
color:
|
||||||
.primary,
|
FlutterFlowTheme.of(context)
|
||||||
size: 20.0,
|
.primary,
|
||||||
),
|
size: 20.0,
|
||||||
onPressed: () async {
|
|
||||||
_model.removeFromVisitors(
|
|
||||||
visitorItem);
|
|
||||||
setState(() {});
|
|
||||||
},
|
|
||||||
),
|
),
|
||||||
],
|
onPressed: () async {
|
||||||
),
|
_model.removeFromVisitors(
|
||||||
|
visitorItem);
|
||||||
|
setState(() {});
|
||||||
|
},
|
||||||
|
),
|
||||||
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
);
|
),
|
||||||
},
|
);
|
||||||
);
|
},
|
||||||
},
|
);
|
||||||
),
|
},
|
||||||
);
|
|
||||||
} else {
|
|
||||||
return Container(
|
|
||||||
width: 100.0,
|
|
||||||
height: 100.0,
|
|
||||||
decoration: BoxDecoration(
|
|
||||||
color:
|
|
||||||
FlutterFlowTheme.of(context).secondaryBackground,
|
|
||||||
),
|
|
||||||
);
|
|
||||||
}
|
|
||||||
},
|
|
||||||
),
|
|
||||||
),
|
|
||||||
FFButtonWidget(
|
|
||||||
onPressed: () async {
|
|
||||||
await widget.getVisitors?.call(
|
|
||||||
_model.visitors,
|
|
||||||
);
|
|
||||||
await widget.getDocs?.call(
|
|
||||||
_model.docs,
|
|
||||||
);
|
|
||||||
Navigator.pop(context);
|
|
||||||
},
|
|
||||||
text: FFLocalizations.of(context).getText(
|
|
||||||
'ug6qzyla' /* Adicionar */,
|
|
||||||
),
|
|
||||||
options: FFButtonOptions(
|
|
||||||
width: double.infinity,
|
|
||||||
height: 30.0,
|
|
||||||
padding: const EdgeInsetsDirectional.fromSTEB(24.0, 0.0, 24.0, 0.0),
|
|
||||||
iconPadding:
|
|
||||||
const EdgeInsetsDirectional.fromSTEB(0.0, 0.0, 0.0, 0.0),
|
|
||||||
color: FlutterFlowTheme.of(context).primary,
|
|
||||||
textStyle: FlutterFlowTheme.of(context).titleSmall.override(
|
|
||||||
fontFamily:
|
|
||||||
FlutterFlowTheme.of(context).titleSmallFamily,
|
|
||||||
color: Colors.white,
|
|
||||||
letterSpacing: 0.0,
|
|
||||||
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
|
||||||
FlutterFlowTheme.of(context).titleSmallFamily),
|
|
||||||
),
|
),
|
||||||
elevation: 3.0,
|
);
|
||||||
borderSide: const BorderSide(
|
} else {
|
||||||
color: Colors.transparent,
|
return Container(
|
||||||
width: 1.0,
|
width: 100.0,
|
||||||
),
|
height: 100.0,
|
||||||
borderRadius: const BorderRadius.only(
|
decoration: BoxDecoration(
|
||||||
bottomLeft: Radius.circular(0.0),
|
color: FlutterFlowTheme.of(context).secondaryBackground,
|
||||||
bottomRight: Radius.circular(0.0),
|
),
|
||||||
topLeft: Radius.circular(0.0),
|
);
|
||||||
topRight: Radius.circular(0.0),
|
}
|
||||||
),
|
},
|
||||||
|
),
|
||||||
|
),
|
||||||
|
FFButtonWidget(
|
||||||
|
onPressed: () async {
|
||||||
|
await widget.getVisitors?.call(
|
||||||
|
_model.visitors,
|
||||||
|
);
|
||||||
|
await widget.getDocs?.call(
|
||||||
|
_model.docs,
|
||||||
|
);
|
||||||
|
Navigator.pop(context);
|
||||||
|
},
|
||||||
|
text: FFLocalizations.of(context).getText(
|
||||||
|
'ug6qzyla' /* Adicionar */,
|
||||||
|
),
|
||||||
|
options: FFButtonOptions(
|
||||||
|
width: double.infinity,
|
||||||
|
height: 30.0,
|
||||||
|
padding:
|
||||||
|
const EdgeInsetsDirectional.fromSTEB(24.0, 0.0, 24.0, 0.0),
|
||||||
|
iconPadding:
|
||||||
|
const EdgeInsetsDirectional.fromSTEB(0.0, 0.0, 0.0, 0.0),
|
||||||
|
color: FlutterFlowTheme.of(context).primary,
|
||||||
|
textStyle: FlutterFlowTheme.of(context).titleSmall.override(
|
||||||
|
fontFamily: FlutterFlowTheme.of(context).titleSmallFamily,
|
||||||
|
color: Colors.white,
|
||||||
|
letterSpacing: 0.0,
|
||||||
|
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
||||||
|
FlutterFlowTheme.of(context).titleSmallFamily),
|
||||||
|
),
|
||||||
|
elevation: 3.0,
|
||||||
|
borderSide: const BorderSide(
|
||||||
|
color: Colors.transparent,
|
||||||
|
width: 1.0,
|
||||||
|
),
|
||||||
|
borderRadius: const BorderRadius.only(
|
||||||
|
bottomLeft: Radius.circular(0.0),
|
||||||
|
bottomRight: Radius.circular(0.0),
|
||||||
|
topLeft: Radius.circular(0.0),
|
||||||
|
topRight: Radius.circular(0.0),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
],
|
),
|
||||||
),
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
|
|
@ -13,7 +13,6 @@ import 'package:url_launcher/url_launcher.dart';
|
||||||
|
|
||||||
import '../main.dart';
|
import '../main.dart';
|
||||||
|
|
||||||
|
|
||||||
export 'keep_alive_wrapper.dart';
|
export 'keep_alive_wrapper.dart';
|
||||||
export 'lat_lng.dart';
|
export 'lat_lng.dart';
|
||||||
export 'place.dart';
|
export 'place.dart';
|
||||||
|
@ -87,6 +86,46 @@ Theme wrapInMaterialDatePickerTheme(
|
||||||
|
|
||||||
return Theme(
|
return Theme(
|
||||||
data: baseTheme.copyWith(
|
data: baseTheme.copyWith(
|
||||||
|
textSelectionTheme: baseTheme.textSelectionTheme.copyWith(
|
||||||
|
cursorColor: headerBackgroundColor,
|
||||||
|
selectionColor: headerBackgroundColor.withOpacity(0.4),
|
||||||
|
selectionHandleColor: headerBackgroundColor,
|
||||||
|
),
|
||||||
|
inputDecorationTheme: baseTheme.inputDecorationTheme.copyWith(
|
||||||
|
isDense: true,
|
||||||
|
hoverColor: headerBackgroundColor.withOpacity(0.04),
|
||||||
|
floatingLabelStyle: baseTheme.textTheme.labelMedium!.copyWith(
|
||||||
|
color: headerBackgroundColor,
|
||||||
|
),
|
||||||
|
labelStyle: baseTheme.textTheme.labelMedium!.copyWith(
|
||||||
|
color: headerBackgroundColor,
|
||||||
|
),
|
||||||
|
border: OutlineInputBorder(
|
||||||
|
borderSide: BorderSide(
|
||||||
|
color: headerBackgroundColor,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
focusedBorder: OutlineInputBorder(
|
||||||
|
borderSide: BorderSide(
|
||||||
|
color: headerBackgroundColor,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
enabledBorder: OutlineInputBorder(
|
||||||
|
borderSide: BorderSide(
|
||||||
|
color: headerBackgroundColor.withOpacity(0.6),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
errorBorder: OutlineInputBorder(
|
||||||
|
borderSide: BorderSide(
|
||||||
|
color: headerBackgroundColor,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
focusedErrorBorder: OutlineInputBorder(
|
||||||
|
borderSide: BorderSide(
|
||||||
|
color: headerBackgroundColor,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
colorScheme: baseTheme.colorScheme.copyWith(
|
colorScheme: baseTheme.colorScheme.copyWith(
|
||||||
onSurface: pickerForegroundColor,
|
onSurface: pickerForegroundColor,
|
||||||
),
|
),
|
||||||
|
@ -149,9 +188,54 @@ Theme wrapInMaterialTimePickerTheme(
|
||||||
final baseTheme = Theme.of(context);
|
final baseTheme = Theme.of(context);
|
||||||
return Theme(
|
return Theme(
|
||||||
data: baseTheme.copyWith(
|
data: baseTheme.copyWith(
|
||||||
|
focusColor: headerBackgroundColor,
|
||||||
iconTheme: baseTheme.iconTheme.copyWith(
|
iconTheme: baseTheme.iconTheme.copyWith(
|
||||||
size: iconSize,
|
size: iconSize,
|
||||||
),
|
),
|
||||||
|
textSelectionTheme: baseTheme.textSelectionTheme.copyWith(
|
||||||
|
cursorColor: headerBackgroundColor,
|
||||||
|
selectionColor: headerBackgroundColor.withOpacity(0.4),
|
||||||
|
selectionHandleColor: headerBackgroundColor,
|
||||||
|
),
|
||||||
|
inputDecorationTheme: baseTheme.inputDecorationTheme.copyWith(
|
||||||
|
isDense: true,
|
||||||
|
focusColor: headerBackgroundColor,
|
||||||
|
hoverColor: headerBackgroundColor.withOpacity(0.04),
|
||||||
|
floatingLabelStyle: baseTheme.textTheme.labelMedium!.copyWith(
|
||||||
|
color: headerBackgroundColor,
|
||||||
|
),
|
||||||
|
labelStyle: baseTheme.textTheme.labelMedium!.copyWith(
|
||||||
|
color: headerBackgroundColor,
|
||||||
|
),
|
||||||
|
outlineBorder: BorderSide(
|
||||||
|
color: headerBackgroundColor,
|
||||||
|
),
|
||||||
|
border: OutlineInputBorder(
|
||||||
|
borderSide: BorderSide(
|
||||||
|
color: headerBackgroundColor,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
focusedBorder: OutlineInputBorder(
|
||||||
|
borderSide: BorderSide(
|
||||||
|
color: headerBackgroundColor,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
enabledBorder: OutlineInputBorder(
|
||||||
|
borderSide: BorderSide(
|
||||||
|
color: headerBackgroundColor.withOpacity(0.6),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
errorBorder: OutlineInputBorder(
|
||||||
|
borderSide: BorderSide(
|
||||||
|
color: headerBackgroundColor,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
focusedErrorBorder: OutlineInputBorder(
|
||||||
|
borderSide: BorderSide(
|
||||||
|
color: headerBackgroundColor,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
textButtonTheme: TextButtonThemeData(
|
textButtonTheme: TextButtonThemeData(
|
||||||
style: ButtonStyle(
|
style: ButtonStyle(
|
||||||
foregroundColor: WidgetStatePropertyAll(
|
foregroundColor: WidgetStatePropertyAll(
|
||||||
|
@ -169,6 +253,7 @@ Theme wrapInMaterialTimePickerTheme(
|
||||||
})),
|
})),
|
||||||
),
|
),
|
||||||
timePickerTheme: baseTheme.timePickerTheme.copyWith(
|
timePickerTheme: baseTheme.timePickerTheme.copyWith(
|
||||||
|
hourMinuteColor: selectedDateTimeBackgroundColor,
|
||||||
backgroundColor: pickerBackgroundColor,
|
backgroundColor: pickerBackgroundColor,
|
||||||
hourMinuteTextColor: pickerForegroundColor,
|
hourMinuteTextColor: pickerForegroundColor,
|
||||||
dialHandColor: selectedDateTimeBackgroundColor,
|
dialHandColor: selectedDateTimeBackgroundColor,
|
||||||
|
|
|
@ -52,8 +52,8 @@ Future<List<SelectedFile>?> selectMediaWithSourceBottomSheet({
|
||||||
required bool allowPhoto,
|
required bool allowPhoto,
|
||||||
bool allowVideo = false,
|
bool allowVideo = false,
|
||||||
String pickerFontFamily = 'Roboto',
|
String pickerFontFamily = 'Roboto',
|
||||||
Color textColor = const Color(0xFF111417),
|
// Color textColor = const Color(0xFF111417),
|
||||||
Color backgroundColor = const Color(0xFFF5F5F5),
|
// Color backgroundColor = const Color(0xFFF5F5F5),
|
||||||
bool includeDimensions = false,
|
bool includeDimensions = false,
|
||||||
bool includeBlurHash = false,
|
bool includeBlurHash = false,
|
||||||
}) async {
|
}) async {
|
||||||
|
@ -63,12 +63,12 @@ Future<List<SelectedFile>?> selectMediaWithSourceBottomSheet({
|
||||||
textAlign: TextAlign.center,
|
textAlign: TextAlign.center,
|
||||||
style: GoogleFonts.getFont(
|
style: GoogleFonts.getFont(
|
||||||
pickerFontFamily,
|
pickerFontFamily,
|
||||||
color: textColor,
|
color: FlutterFlowTheme.of(context).primaryText,
|
||||||
fontWeight: FontWeight.w600,
|
fontWeight: FontWeight.w600,
|
||||||
fontSize: 20,
|
fontSize: 20,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
tileColor: backgroundColor,
|
tileColor: FlutterFlowTheme.of(context).primaryBackground,
|
||||||
dense: false,
|
dense: false,
|
||||||
onTap: () => Navigator.pop(
|
onTap: () => Navigator.pop(
|
||||||
context,
|
context,
|
||||||
|
@ -77,7 +77,7 @@ Future<List<SelectedFile>?> selectMediaWithSourceBottomSheet({
|
||||||
);
|
);
|
||||||
final mediaSource = await showModalBottomSheet<MediaSource>(
|
final mediaSource = await showModalBottomSheet<MediaSource>(
|
||||||
context: context,
|
context: context,
|
||||||
backgroundColor: backgroundColor,
|
backgroundColor: FlutterFlowTheme.of(context).primaryBackground,
|
||||||
builder: (context) {
|
builder: (context) {
|
||||||
return Column(
|
return Column(
|
||||||
mainAxisSize: MainAxisSize.min,
|
mainAxisSize: MainAxisSize.min,
|
||||||
|
@ -91,13 +91,13 @@ Future<List<SelectedFile>?> selectMediaWithSourceBottomSheet({
|
||||||
textAlign: TextAlign.center,
|
textAlign: TextAlign.center,
|
||||||
style: GoogleFonts.getFont(
|
style: GoogleFonts.getFont(
|
||||||
pickerFontFamily,
|
pickerFontFamily,
|
||||||
color: textColor.withOpacity(0.65),
|
color: FlutterFlowTheme.of(context).primaryText.withOpacity(0.65),
|
||||||
fontWeight: FontWeight.w500,
|
fontWeight: FontWeight.w500,
|
||||||
fontSize: 20,
|
fontSize: 20,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
tileColor: backgroundColor,
|
tileColor: FlutterFlowTheme.of(context).primaryBackground,
|
||||||
dense: false,
|
dense: true,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
const Divider(),
|
const Divider(),
|
||||||
|
|
|
@ -22,17 +22,11 @@ import 'package:hub/flutter_flow/internationalization.dart';
|
||||||
import 'package:hub/flutter_flow/nav/nav.dart';
|
import 'package:hub/flutter_flow/nav/nav.dart';
|
||||||
import 'package:hub/pages/home_page/home_page_model.dart';
|
import 'package:hub/pages/home_page/home_page_model.dart';
|
||||||
|
|
||||||
|
|
||||||
import 'package:provider/provider.dart';
|
import 'package:provider/provider.dart';
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
class HomePageWidget extends StatefulWidget {
|
class HomePageWidget extends StatefulWidget {
|
||||||
const HomePageWidget({super.key});
|
const HomePageWidget({super.key});
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@override
|
@override
|
||||||
State<HomePageWidget> createState() => _HomePageWidgetState();
|
State<HomePageWidget> createState() => _HomePageWidgetState();
|
||||||
}
|
}
|
||||||
|
@ -42,7 +36,6 @@ class _HomePageWidgetState extends State<HomePageWidget> {
|
||||||
bool localStatus = false;
|
bool localStatus = false;
|
||||||
final scaffoldKey = GlobalKey<ScaffoldState>();
|
final scaffoldKey = GlobalKey<ScaffoldState>();
|
||||||
|
|
||||||
|
|
||||||
Future<void> checkLocalStatus() async {
|
Future<void> checkLocalStatus() async {
|
||||||
localStatus = await checkLocals(
|
localStatus = await checkLocals(
|
||||||
context: context,
|
context: context,
|
||||||
|
@ -58,9 +51,6 @@ class _HomePageWidgetState extends State<HomePageWidget> {
|
||||||
SchedulerBinding.instance.addPostFrameCallback((_) async {
|
SchedulerBinding.instance.addPostFrameCallback((_) async {
|
||||||
await PushNotificationService().initialize(context);
|
await PushNotificationService().initialize(context);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@override
|
@override
|
||||||
void initState() {
|
void initState() {
|
||||||
super.initState();
|
super.initState();
|
||||||
|
@ -105,7 +95,6 @@ class _HomePageWidgetState extends State<HomePageWidget> {
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
|
|
||||||
context.watch<FFAppState>();
|
context.watch<FFAppState>();
|
||||||
return GestureDetector(
|
return GestureDetector(
|
||||||
onTap: () => _model.unfocusNode.canRequestFocus
|
onTap: () => _model.unfocusNode.canRequestFocus
|
||||||
|
@ -122,523 +111,485 @@ class _HomePageWidgetState extends State<HomePageWidget> {
|
||||||
|
|
||||||
Container buildPage(BuildContext context, bool localStatus) {
|
Container buildPage(BuildContext context, bool localStatus) {
|
||||||
return Container(
|
return Container(
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
color: FlutterFlowTheme.of(context).primaryBackground,
|
color: FlutterFlowTheme.of(context).primaryBackground,
|
||||||
|
),
|
||||||
|
child: SingleChildScrollView(
|
||||||
|
child: Column(
|
||||||
|
mainAxisSize: MainAxisSize.max,
|
||||||
|
mainAxisAlignment: MainAxisAlignment.start,
|
||||||
|
children: [
|
||||||
|
Wrap(
|
||||||
|
spacing: 0.0,
|
||||||
|
runSpacing: 0.0,
|
||||||
|
alignment: WrapAlignment.start,
|
||||||
|
crossAxisAlignment: WrapCrossAlignment.start,
|
||||||
|
direction: Axis.horizontal,
|
||||||
|
runAlignment: WrapAlignment.start,
|
||||||
|
verticalDirection: VerticalDirection.down,
|
||||||
|
clipBehavior: Clip.none,
|
||||||
|
children: [
|
||||||
|
createHeader(context),
|
||||||
|
createLocal(localStatus),
|
||||||
|
createBody(),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
],
|
||||||
),
|
),
|
||||||
child: SingleChildScrollView(
|
),
|
||||||
child: Column(
|
);
|
||||||
mainAxisSize: MainAxisSize.max,
|
|
||||||
mainAxisAlignment: MainAxisAlignment.start,
|
|
||||||
children: [
|
|
||||||
Wrap(
|
|
||||||
spacing: 0.0,
|
|
||||||
runSpacing: 0.0,
|
|
||||||
alignment: WrapAlignment.start,
|
|
||||||
crossAxisAlignment: WrapCrossAlignment.start,
|
|
||||||
direction: Axis.horizontal,
|
|
||||||
runAlignment: WrapAlignment.start,
|
|
||||||
verticalDirection: VerticalDirection.down,
|
|
||||||
clipBehavior: Clip.none,
|
|
||||||
children: [
|
|
||||||
createHeader(context),
|
|
||||||
createLocal(localStatus),
|
|
||||||
createBody(),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Wrap createBody() {
|
Wrap createBody() {
|
||||||
return Wrap(
|
return Wrap(
|
||||||
spacing: 0.0,
|
spacing: 0.0,
|
||||||
runSpacing: 0.0,
|
runSpacing: 0.0,
|
||||||
alignment: WrapAlignment.start,
|
alignment: WrapAlignment.start,
|
||||||
crossAxisAlignment: WrapCrossAlignment.start,
|
crossAxisAlignment: WrapCrossAlignment.start,
|
||||||
direction: Axis.horizontal,
|
direction: Axis.horizontal,
|
||||||
runAlignment: WrapAlignment.start,
|
runAlignment: WrapAlignment.start,
|
||||||
verticalDirection: VerticalDirection.down,
|
verticalDirection: VerticalDirection.down,
|
||||||
clipBehavior: Clip.none,
|
clipBehavior: Clip.none,
|
||||||
children: [
|
children: [
|
||||||
wrapWithModel(
|
wrapWithModel(
|
||||||
model: _model.menuComponentModel,
|
model: _model.menuComponentModel,
|
||||||
updateCallback: () => setState(() {}),
|
updateCallback: () => setState(() {}),
|
||||||
child: const MenuComponentWidget(
|
child: const MenuComponentWidget(
|
||||||
expandable: true,
|
expandable: true,
|
||||||
style: MenuView.list_grid,
|
style: MenuView.list_grid,
|
||||||
item: MenuItem.button,
|
item: MenuItem.button,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
Align(
|
Align(
|
||||||
alignment: const AlignmentDirectional(0.0, 0.0),
|
alignment: const AlignmentDirectional(0.0, 0.0),
|
||||||
child: Provider<MessageWellNotifier>(
|
child: Provider<MessageWellNotifier>(
|
||||||
create: (_) => MessageWellNotifier(),
|
create: (_) => MessageWellNotifier(),
|
||||||
child: wrapWithModel(
|
child: wrapWithModel(
|
||||||
model: _model.messageWellComponentModel,
|
model: _model.messageWellComponentModel,
|
||||||
updateCallback: () => setState(() {}),
|
updateCallback: () => setState(() {}),
|
||||||
child: const MessageWellComponentWidget(),
|
child: const MessageWellComponentWidget(),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
//footer
|
//footer
|
||||||
const SizedBox(
|
const SizedBox(
|
||||||
height: 100,
|
height: 100,
|
||||||
width: double.infinity,
|
width: double.infinity,
|
||||||
)
|
)
|
||||||
],
|
],
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
Widget createLocal(bool localStatus) {
|
Widget createLocal(bool localStatus) {
|
||||||
return wrapWithModel(
|
return wrapWithModel(
|
||||||
model: _model.localComponentModel,
|
model: _model.localComponentModel,
|
||||||
updateCallback: () => setState(() {}),
|
updateCallback: () => setState(() {}),
|
||||||
child: LocalProfileComponentWidget(
|
child: LocalProfileComponentWidget(
|
||||||
localStatus: localStatus,
|
localStatus: localStatus,
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
Row createHeader(BuildContext context) {
|
Row createHeader(BuildContext context) {
|
||||||
return Row(
|
return Row(
|
||||||
mainAxisSize: MainAxisSize.max,
|
mainAxisSize: MainAxisSize.max,
|
||||||
children: [
|
children: [
|
||||||
Expanded(
|
Expanded(
|
||||||
child: Container(
|
child: Container(
|
||||||
width: 100.0,
|
width: 100.0,
|
||||||
height: 100.0,
|
height: 100.0,
|
||||||
decoration: const BoxDecoration(
|
decoration: const BoxDecoration(
|
||||||
color: Color(0xFF1AAB5F),
|
color: Color(0xFF1AAB5F),
|
||||||
),
|
),
|
||||||
child: Row(
|
child: Row(
|
||||||
mainAxisSize: MainAxisSize.min,
|
mainAxisSize: MainAxisSize.min,
|
||||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||||
children: [
|
children: [
|
||||||
Align(
|
Align(
|
||||||
alignment:
|
alignment: const AlignmentDirectional(0.0, 1.0),
|
||||||
const AlignmentDirectional(0.0, 1.0),
|
child: Container(
|
||||||
child: Container(
|
height: 50.0,
|
||||||
height: 50.0,
|
decoration: const BoxDecoration(),
|
||||||
decoration: const BoxDecoration(),
|
child: Align(
|
||||||
child: Align(
|
alignment: const AlignmentDirectional(0.0, 0.0),
|
||||||
alignment:
|
child: Row(
|
||||||
const AlignmentDirectional(0.0, 0.0),
|
mainAxisSize: MainAxisSize.max,
|
||||||
child: Row(
|
children: [
|
||||||
mainAxisSize: MainAxisSize.max,
|
Align(
|
||||||
children: [
|
alignment: const AlignmentDirectional(-1.0, 0.0),
|
||||||
Align(
|
child: Padding(
|
||||||
alignment:
|
padding: const EdgeInsetsDirectional.fromSTEB(
|
||||||
const AlignmentDirectional(
|
10.0, 0.0, 0.0, 0.0),
|
||||||
-1.0, 0.0),
|
child: FlutterFlowIconButton(
|
||||||
child: Padding(
|
borderRadius: 20.0,
|
||||||
padding:
|
borderWidth: 1.0,
|
||||||
const EdgeInsetsDirectional
|
buttonSize: 40.0,
|
||||||
.fromSTEB(
|
fillColor: FlutterFlowTheme.of(context).primary,
|
||||||
10.0, 0.0, 0.0, 0.0),
|
icon: const Icon(
|
||||||
child: FlutterFlowIconButton(
|
Icons.menu_rounded,
|
||||||
borderRadius: 20.0,
|
color: Colors.white,
|
||||||
borderWidth: 1.0,
|
size: 28.0,
|
||||||
buttonSize: 40.0,
|
),
|
||||||
fillColor:
|
onPressed: () async {
|
||||||
FlutterFlowTheme.of(context)
|
scaffoldKey.currentState!.openDrawer();
|
||||||
.primary,
|
},
|
||||||
icon: const Icon(
|
),
|
||||||
Icons.menu_rounded,
|
),
|
||||||
color: Colors.white,
|
),
|
||||||
size: 28.0,
|
Align(
|
||||||
),
|
alignment: const AlignmentDirectional(-1.0, 0.0),
|
||||||
onPressed: () async {
|
child: Padding(
|
||||||
scaffoldKey.currentState!
|
padding: const EdgeInsetsDirectional.fromSTEB(
|
||||||
.openDrawer();
|
60.0, 15.0, 0.0, 0.0),
|
||||||
},
|
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/8r2vsbd9i03k/logo.png',
|
||||||
Align(
|
width: 50.0,
|
||||||
alignment:
|
height: 200.0,
|
||||||
const AlignmentDirectional(
|
fit: BoxFit.none,
|
||||||
-1.0, 0.0),
|
|
||||||
child: Padding(
|
|
||||||
padding:
|
|
||||||
const EdgeInsetsDirectional
|
|
||||||
.fromSTEB(
|
|
||||||
60.0, 15.0, 0.0, 0.0),
|
|
||||||
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/8r2vsbd9i03k/logo.png',
|
|
||||||
width: 50.0,
|
|
||||||
height: 200.0,
|
|
||||||
fit: BoxFit.none,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
Align(
|
|
||||||
alignment:
|
|
||||||
const AlignmentDirectional(
|
|
||||||
0.0, 0.0),
|
|
||||||
child: Padding(
|
|
||||||
padding:
|
|
||||||
const EdgeInsetsDirectional
|
|
||||||
.fromSTEB(
|
|
||||||
0.0, 15.0, 0.0, 0.0),
|
|
||||||
child: Text(
|
|
||||||
FFLocalizations.of(context)
|
|
||||||
.getText(
|
|
||||||
'rg9pzkpz' /* FRE ACCESS */,
|
|
||||||
),
|
|
||||||
style:
|
|
||||||
FlutterFlowTheme.of(context)
|
|
||||||
.bodyMedium
|
|
||||||
.override(
|
|
||||||
fontFamily:
|
|
||||||
FlutterFlowTheme.of(
|
|
||||||
context)
|
|
||||||
.bodyMediumFamily,
|
|
||||||
color: FlutterFlowTheme
|
|
||||||
.of(context)
|
|
||||||
.info,
|
|
||||||
letterSpacing: 0.0,
|
|
||||||
useGoogleFonts: GoogleFonts
|
|
||||||
.asMap()
|
|
||||||
.containsKey(
|
|
||||||
FlutterFlowTheme.of(
|
|
||||||
context)
|
|
||||||
.bodyMediumFamily),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
Align(
|
),
|
||||||
alignment:
|
Align(
|
||||||
const AlignmentDirectional(0.0, 1.0),
|
alignment: const AlignmentDirectional(0.0, 0.0),
|
||||||
child: Container(
|
child: Padding(
|
||||||
width: 100.0,
|
padding: const EdgeInsetsDirectional.fromSTEB(
|
||||||
height: 50.0,
|
0.0, 15.0, 0.0, 0.0),
|
||||||
decoration: const BoxDecoration(),
|
child: Text(
|
||||||
child: Align(
|
FFLocalizations.of(context).getText(
|
||||||
alignment:
|
'rg9pzkpz' /* FRE ACCESS */,
|
||||||
const AlignmentDirectional(1.0, 1.0),
|
),
|
||||||
child: FlutterFlowIconButton(
|
style: FlutterFlowTheme.of(context)
|
||||||
borderRadius: 20.0,
|
.bodyMedium
|
||||||
borderWidth: 1.0,
|
.override(
|
||||||
buttonSize: 40.0,
|
fontFamily: FlutterFlowTheme.of(context)
|
||||||
icon: Icon(
|
.bodyMediumFamily,
|
||||||
Icons.notifications_sharp,
|
color: FlutterFlowTheme.of(context).info,
|
||||||
color:
|
letterSpacing: 0.0,
|
||||||
FlutterFlowTheme.of(context).info,
|
useGoogleFonts: GoogleFonts.asMap()
|
||||||
size: 24.0,
|
.containsKey(
|
||||||
|
FlutterFlowTheme.of(context)
|
||||||
|
.bodyMediumFamily),
|
||||||
),
|
),
|
||||||
onPressed: () {
|
|
||||||
log('IconButton pressed ...');
|
|
||||||
},
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
],
|
),
|
||||||
),
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
],
|
),
|
||||||
);
|
),
|
||||||
|
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: () {
|
||||||
|
log('IconButton pressed ...');
|
||||||
|
},
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
SizedBox buildDrawer(BuildContext context) {
|
SizedBox buildDrawer(BuildContext context) {
|
||||||
return SizedBox(
|
return SizedBox(
|
||||||
width: 750.0,
|
width: 750.0,
|
||||||
child: Drawer(
|
child: Drawer(
|
||||||
elevation: 16.0,
|
elevation: 16.0,
|
||||||
child: Container(
|
child: Container(
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
color: FlutterFlowTheme.of(context).primaryBackground,
|
color: FlutterFlowTheme.of(context).primaryBackground,
|
||||||
shape: BoxShape.rectangle,
|
shape: BoxShape.rectangle,
|
||||||
),
|
),
|
||||||
child: Column(
|
child: Column(
|
||||||
mainAxisSize: MainAxisSize.max,
|
mainAxisSize: MainAxisSize.max,
|
||||||
crossAxisAlignment: CrossAxisAlignment.center,
|
crossAxisAlignment: CrossAxisAlignment.center,
|
||||||
children: [
|
children: [
|
||||||
Container(
|
Container(
|
||||||
width: double.infinity,
|
width: double.infinity,
|
||||||
decoration: const BoxDecoration(
|
decoration: const BoxDecoration(
|
||||||
borderRadius: BorderRadius.only(
|
borderRadius: BorderRadius.only(
|
||||||
bottomLeft: Radius.circular(5.0),
|
bottomLeft: Radius.circular(5.0),
|
||||||
bottomRight: Radius.circular(5.0),
|
bottomRight: Radius.circular(5.0),
|
||||||
topLeft: Radius.circular(0.0),
|
topLeft: Radius.circular(0.0),
|
||||||
topRight: Radius.circular(0.0),
|
topRight: Radius.circular(0.0),
|
||||||
),
|
|
||||||
shape: BoxShape.rectangle,
|
|
||||||
),
|
),
|
||||||
child: Column(
|
shape: BoxShape.rectangle,
|
||||||
mainAxisSize: MainAxisSize.max,
|
),
|
||||||
children: [
|
child: Column(
|
||||||
Padding(
|
mainAxisSize: MainAxisSize.max,
|
||||||
padding: const EdgeInsets.fromLTRB(30, 30, 10, 0),
|
children: [
|
||||||
child: Row(
|
Padding(
|
||||||
mainAxisSize: MainAxisSize.max,
|
padding: const EdgeInsets.fromLTRB(30, 30, 10, 0),
|
||||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
child: Row(
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
mainAxisSize: MainAxisSize.max,
|
||||||
children: [
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||||
Flexible(
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
child: Container(
|
children: [
|
||||||
width: double.infinity,
|
Flexible(
|
||||||
decoration: const BoxDecoration(),
|
child: Container(
|
||||||
child: Row(
|
width: double.infinity,
|
||||||
mainAxisSize: MainAxisSize.max,
|
decoration: const BoxDecoration(),
|
||||||
mainAxisAlignment: MainAxisAlignment.start,
|
child: Row(
|
||||||
children: [
|
mainAxisSize: MainAxisSize.max,
|
||||||
Container(
|
mainAxisAlignment: MainAxisAlignment.start,
|
||||||
width: 50.0,
|
children: [
|
||||||
height: 50.0,
|
Container(
|
||||||
clipBehavior: Clip.antiAlias,
|
width: 50.0,
|
||||||
decoration: const BoxDecoration(
|
height: 50.0,
|
||||||
shape: BoxShape.circle,
|
clipBehavior: Clip.antiAlias,
|
||||||
),
|
decoration: const BoxDecoration(
|
||||||
child: Image.network(
|
shape: BoxShape.circle,
|
||||||
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,
|
|
||||||
),
|
|
||||||
),
|
),
|
||||||
Container(
|
child: Image.network(
|
||||||
width: 150.0,
|
valueOrDefault<String>(
|
||||||
child: Text(
|
'https://freaccess.com.br/freaccess/Images/Clients/${FFAppState().cliUUID}.png',
|
||||||
valueOrDefault<String>(
|
'https://storage.googleapis.com/flutterflow-io-6f20.appspot.com/projects/flutter-freaccess-hub-0xgz9q/assets/7ftdetkzc3s0/360_F_64676383_LdbmhiNM6Ypzb3FM4PPuFP9rHe7ri8Ju.jpg',
|
||||||
convertToUppercase(
|
|
||||||
FFAppState().local),
|
|
||||||
'NOME DO LOCAL',
|
|
||||||
),
|
|
||||||
style: FlutterFlowTheme.of(context)
|
|
||||||
.bodyLarge
|
|
||||||
.override(
|
|
||||||
fontFamily: 'Nunito Sans',
|
|
||||||
color:
|
|
||||||
FlutterFlowTheme.of(context)
|
|
||||||
.primaryText,
|
|
||||||
fontSize: 14.0,
|
|
||||||
letterSpacing: 0.0,
|
|
||||||
fontWeight: FontWeight.normal,
|
|
||||||
useGoogleFonts:
|
|
||||||
GoogleFonts.asMap()
|
|
||||||
.containsKey(
|
|
||||||
'Nunito Sans'),
|
|
||||||
),
|
|
||||||
),
|
),
|
||||||
|
fit: BoxFit.cover,
|
||||||
),
|
),
|
||||||
].divide(const SizedBox(width: 20.0)),
|
),
|
||||||
),
|
Container(
|
||||||
|
width: 150.0,
|
||||||
|
child: Text(
|
||||||
|
valueOrDefault<String>(
|
||||||
|
convertToUppercase(FFAppState().local),
|
||||||
|
'NOME DO LOCAL',
|
||||||
|
),
|
||||||
|
style: FlutterFlowTheme.of(context)
|
||||||
|
.bodyLarge
|
||||||
|
.override(
|
||||||
|
fontFamily: 'Nunito Sans',
|
||||||
|
color: FlutterFlowTheme.of(context)
|
||||||
|
.primaryText,
|
||||||
|
fontSize: 14.0,
|
||||||
|
letterSpacing: 0.0,
|
||||||
|
fontWeight: FontWeight.normal,
|
||||||
|
useGoogleFonts: GoogleFonts.asMap()
|
||||||
|
.containsKey('Nunito Sans'),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
].divide(const SizedBox(width: 20.0)),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
Container(
|
),
|
||||||
width: 50.0,
|
Container(
|
||||||
child: Container(
|
width: 50.0,
|
||||||
height: 30.0,
|
child: Container(
|
||||||
decoration: const BoxDecoration(),
|
height: 30.0,
|
||||||
child: Row(
|
decoration: const BoxDecoration(),
|
||||||
mainAxisSize: MainAxisSize.min,
|
child: Row(
|
||||||
mainAxisAlignment: MainAxisAlignment.end,
|
mainAxisSize: MainAxisSize.min,
|
||||||
children: [
|
mainAxisAlignment: MainAxisAlignment.end,
|
||||||
Flexible(
|
children: [
|
||||||
child: FlutterFlowIconButton(
|
Flexible(
|
||||||
borderRadius: 100.0,
|
child: FlutterFlowIconButton(
|
||||||
borderWidth: 1.0,
|
borderRadius: 100.0,
|
||||||
buttonSize: 40.0,
|
borderWidth: 1.0,
|
||||||
icon: Icon(
|
buttonSize: 40.0,
|
||||||
Icons.close_sharp,
|
icon: Icon(
|
||||||
color: FlutterFlowTheme.of(context)
|
Icons.close_sharp,
|
||||||
.primary,
|
color: FlutterFlowTheme.of(context)
|
||||||
size: 20.0,
|
.primary,
|
||||||
),
|
size: 20.0,
|
||||||
onPressed: () async {
|
|
||||||
if (scaffoldKey.currentState!
|
|
||||||
.isDrawerOpen ||
|
|
||||||
scaffoldKey.currentState!
|
|
||||||
.isEndDrawerOpen) {
|
|
||||||
Navigator.pop(context);
|
|
||||||
}
|
|
||||||
},
|
|
||||||
),
|
),
|
||||||
|
onPressed: () async {
|
||||||
|
if (scaffoldKey
|
||||||
|
.currentState!.isDrawerOpen ||
|
||||||
|
scaffoldKey.currentState!
|
||||||
|
.isEndDrawerOpen) {
|
||||||
|
Navigator.pop(context);
|
||||||
|
}
|
||||||
|
},
|
||||||
),
|
),
|
||||||
],
|
),
|
||||||
),
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
]
|
),
|
||||||
.divide(const SizedBox(width: 0.0))
|
]
|
||||||
.around(const SizedBox(width: 0.0)),
|
.divide(const SizedBox(width: 0.0))
|
||||||
),
|
.around(const SizedBox(width: 0.0)),
|
||||||
),
|
),
|
||||||
].addToStart(const SizedBox(height: 30.0)),
|
|
||||||
),
|
),
|
||||||
),
|
].addToStart(const SizedBox(height: 30.0)),
|
||||||
Padding(
|
),
|
||||||
padding:
|
),
|
||||||
const EdgeInsetsDirectional.fromSTEB(0.0, 10.0, 0.0, 0.0),
|
Padding(
|
||||||
child: Row(
|
padding:
|
||||||
mainAxisSize: MainAxisSize.min,
|
const EdgeInsetsDirectional.fromSTEB(0.0, 10.0, 0.0, 0.0),
|
||||||
mainAxisAlignment: MainAxisAlignment.start,
|
child: Row(
|
||||||
children: [
|
mainAxisSize: MainAxisSize.min,
|
||||||
Flexible(
|
mainAxisAlignment: MainAxisAlignment.start,
|
||||||
child: Padding(
|
children: [
|
||||||
padding: const EdgeInsetsDirectional.fromSTEB(
|
Flexible(
|
||||||
8.0, 0.0, 8.0, 0.0),
|
child: Padding(
|
||||||
child: TextFormField(
|
padding: const EdgeInsetsDirectional.fromSTEB(
|
||||||
controller: _model.textController,
|
8.0, 0.0, 8.0, 0.0),
|
||||||
focusNode: _model.textFieldFocusNode,
|
child: TextFormField(
|
||||||
autofocus: false,
|
controller: _model.textController,
|
||||||
obscureText: false,
|
focusNode: _model.textFieldFocusNode,
|
||||||
decoration: InputDecoration(
|
autofocus: false,
|
||||||
isDense: true,
|
obscureText: false,
|
||||||
labelStyle: FlutterFlowTheme.of(context)
|
decoration: InputDecoration(
|
||||||
.labelMedium
|
isDense: true,
|
||||||
.override(
|
labelStyle: FlutterFlowTheme.of(context)
|
||||||
fontFamily: FlutterFlowTheme.of(context)
|
.labelMedium
|
||||||
.labelMediumFamily,
|
|
||||||
color: FlutterFlowTheme.of(context)
|
|
||||||
.primaryText,
|
|
||||||
letterSpacing: 0.0,
|
|
||||||
useGoogleFonts: GoogleFonts.asMap()
|
|
||||||
.containsKey(
|
|
||||||
FlutterFlowTheme.of(context)
|
|
||||||
.labelMediumFamily),
|
|
||||||
),
|
|
||||||
alignLabelWithHint: false,
|
|
||||||
hintStyle: FlutterFlowTheme.of(context)
|
|
||||||
.labelMedium
|
|
||||||
.override(
|
|
||||||
fontFamily: FlutterFlowTheme.of(context)
|
|
||||||
.labelMediumFamily,
|
|
||||||
letterSpacing: 0.0,
|
|
||||||
useGoogleFonts: GoogleFonts.asMap()
|
|
||||||
.containsKey(
|
|
||||||
FlutterFlowTheme.of(context)
|
|
||||||
.labelMediumFamily),
|
|
||||||
),
|
|
||||||
enabledBorder: UnderlineInputBorder(
|
|
||||||
borderSide: BorderSide(
|
|
||||||
color: FlutterFlowTheme.of(context)
|
|
||||||
.customColor1,
|
|
||||||
width: 0.5,
|
|
||||||
),
|
|
||||||
borderRadius: BorderRadius.circular(2.0),
|
|
||||||
),
|
|
||||||
focusedBorder: UnderlineInputBorder(
|
|
||||||
borderSide: BorderSide(
|
|
||||||
color: FlutterFlowTheme.of(context).primary,
|
|
||||||
width: 0.5,
|
|
||||||
),
|
|
||||||
borderRadius: BorderRadius.circular(2.0),
|
|
||||||
),
|
|
||||||
errorBorder: UnderlineInputBorder(
|
|
||||||
borderSide: BorderSide(
|
|
||||||
color: FlutterFlowTheme.of(context).error,
|
|
||||||
width: 0.5,
|
|
||||||
),
|
|
||||||
borderRadius: BorderRadius.circular(2.0),
|
|
||||||
),
|
|
||||||
focusedErrorBorder: UnderlineInputBorder(
|
|
||||||
borderSide: BorderSide(
|
|
||||||
color: FlutterFlowTheme.of(context).error,
|
|
||||||
width: 0.5,
|
|
||||||
),
|
|
||||||
borderRadius: BorderRadius.circular(2.0),
|
|
||||||
),
|
|
||||||
prefixIcon: const Icon(
|
|
||||||
Icons.search_sharp,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
style: FlutterFlowTheme.of(context)
|
|
||||||
.bodyMedium
|
|
||||||
.override(
|
.override(
|
||||||
fontFamily: FlutterFlowTheme.of(context)
|
fontFamily: FlutterFlowTheme.of(context)
|
||||||
.bodyMediumFamily,
|
.labelMediumFamily,
|
||||||
|
color:
|
||||||
|
FlutterFlowTheme.of(context).primaryText,
|
||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
useGoogleFonts: GoogleFonts.asMap()
|
useGoogleFonts: GoogleFonts.asMap()
|
||||||
.containsKey(
|
.containsKey(FlutterFlowTheme.of(context)
|
||||||
FlutterFlowTheme.of(context)
|
.labelMediumFamily),
|
||||||
.bodyMediumFamily),
|
|
||||||
),
|
),
|
||||||
validator: _model.textControllerValidator
|
alignLabelWithHint: false,
|
||||||
.asValidator(context),
|
hintStyle: FlutterFlowTheme.of(context)
|
||||||
|
.labelMedium
|
||||||
|
.override(
|
||||||
|
fontFamily: FlutterFlowTheme.of(context)
|
||||||
|
.labelMediumFamily,
|
||||||
|
letterSpacing: 0.0,
|
||||||
|
useGoogleFonts: GoogleFonts.asMap()
|
||||||
|
.containsKey(FlutterFlowTheme.of(context)
|
||||||
|
.labelMediumFamily),
|
||||||
|
),
|
||||||
|
enabledBorder: UnderlineInputBorder(
|
||||||
|
borderSide: BorderSide(
|
||||||
|
color:
|
||||||
|
FlutterFlowTheme.of(context).customColor1,
|
||||||
|
width: 0.5,
|
||||||
|
),
|
||||||
|
borderRadius: BorderRadius.circular(2.0),
|
||||||
|
),
|
||||||
|
focusedBorder: UnderlineInputBorder(
|
||||||
|
borderSide: BorderSide(
|
||||||
|
color: FlutterFlowTheme.of(context).primary,
|
||||||
|
width: 0.5,
|
||||||
|
),
|
||||||
|
borderRadius: BorderRadius.circular(2.0),
|
||||||
|
),
|
||||||
|
errorBorder: UnderlineInputBorder(
|
||||||
|
borderSide: BorderSide(
|
||||||
|
color: FlutterFlowTheme.of(context).error,
|
||||||
|
width: 0.5,
|
||||||
|
),
|
||||||
|
borderRadius: BorderRadius.circular(2.0),
|
||||||
|
),
|
||||||
|
focusedErrorBorder: UnderlineInputBorder(
|
||||||
|
borderSide: BorderSide(
|
||||||
|
color: FlutterFlowTheme.of(context).error,
|
||||||
|
width: 0.5,
|
||||||
|
),
|
||||||
|
borderRadius: BorderRadius.circular(2.0),
|
||||||
|
),
|
||||||
|
prefixIcon: const Icon(
|
||||||
|
Icons.search_sharp,
|
||||||
|
),
|
||||||
),
|
),
|
||||||
|
style: FlutterFlowTheme.of(context)
|
||||||
|
.bodyMedium
|
||||||
|
.override(
|
||||||
|
fontFamily: FlutterFlowTheme.of(context)
|
||||||
|
.bodyMediumFamily,
|
||||||
|
letterSpacing: 0.0,
|
||||||
|
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
||||||
|
FlutterFlowTheme.of(context)
|
||||||
|
.bodyMediumFamily),
|
||||||
|
),
|
||||||
|
validator: _model.textControllerValidator
|
||||||
|
.asValidator(context),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
]
|
|
||||||
.addToStart(const SizedBox(width: 30.0))
|
|
||||||
.addToEnd(const SizedBox(width: 30.0)),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
Expanded(
|
|
||||||
child: wrapWithModel(
|
|
||||||
model: _model.menuComponentModel,
|
|
||||||
updateCallback: () => setState(() {}),
|
|
||||||
child: MenuComponentWidget(
|
|
||||||
expandable: false,
|
|
||||||
style: MenuView.list,
|
|
||||||
item: MenuItem.card,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
FFButtonWidget(
|
|
||||||
onPressed: () async {
|
|
||||||
FFAppState().isLogged = false;
|
|
||||||
setState(() {});
|
|
||||||
|
|
||||||
context.goNamed(
|
|
||||||
'welcomePage',
|
|
||||||
extra: <String, dynamic>{
|
|
||||||
kTransitionInfoKey: const TransitionInfo(
|
|
||||||
hasTransition: true,
|
|
||||||
transitionType: PageTransitionType.scale,
|
|
||||||
alignment: Alignment.bottomCenter,
|
|
||||||
),
|
|
||||||
},
|
|
||||||
);
|
|
||||||
},
|
|
||||||
text: FFLocalizations.of(context).getText(
|
|
||||||
'xx0db4wi' /* Sair */,
|
|
||||||
),
|
|
||||||
options: FFButtonOptions(
|
|
||||||
height: 40.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(0x00D70000),
|
|
||||||
textStyle:
|
|
||||||
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'),
|
|
||||||
),
|
|
||||||
elevation: 0.0,
|
|
||||||
borderSide: const BorderSide(
|
|
||||||
width: 0.0,
|
|
||||||
),
|
),
|
||||||
borderRadius: BorderRadius.circular(50.0),
|
]
|
||||||
|
.addToStart(const SizedBox(width: 30.0))
|
||||||
|
.addToEnd(const SizedBox(width: 30.0)),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Expanded(
|
||||||
|
child: wrapWithModel(
|
||||||
|
model: _model.menuComponentModel,
|
||||||
|
updateCallback: () => setState(() {}),
|
||||||
|
child: MenuComponentWidget(
|
||||||
|
expandable: false,
|
||||||
|
style: MenuView.list,
|
||||||
|
item: MenuItem.card,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|
||||||
].addToEnd(const SizedBox(height: 64.0)),
|
|
||||||
),
|
),
|
||||||
),
|
FFButtonWidget(
|
||||||
|
onPressed: () async {
|
||||||
|
FFAppState().isLogged = false;
|
||||||
|
setState(() {});
|
||||||
|
|
||||||
|
context.goNamed(
|
||||||
|
'welcomePage',
|
||||||
|
extra: <String, dynamic>{
|
||||||
|
kTransitionInfoKey: const TransitionInfo(
|
||||||
|
hasTransition: true,
|
||||||
|
transitionType: PageTransitionType.scale,
|
||||||
|
alignment: Alignment.bottomCenter,
|
||||||
|
),
|
||||||
|
},
|
||||||
|
);
|
||||||
|
},
|
||||||
|
text: FFLocalizations.of(context).getText(
|
||||||
|
'xx0db4wi' /* Sair */,
|
||||||
|
),
|
||||||
|
options: FFButtonOptions(
|
||||||
|
height: 40.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(0x00D70000),
|
||||||
|
textStyle: 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'),
|
||||||
|
),
|
||||||
|
elevation: 0.0,
|
||||||
|
borderSide: const BorderSide(
|
||||||
|
width: 0.0,
|
||||||
|
),
|
||||||
|
borderRadius: BorderRadius.circular(50.0),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
].addToEnd(const SizedBox(height: 64.0)),
|
||||||
),
|
),
|
||||||
);
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
|
||||||
// body: Container(
|
// body: Container(
|
||||||
// decoration: BoxDecoration(
|
// decoration: BoxDecoration(
|
||||||
|
@ -836,6 +787,5 @@ class _HomePageWidgetState extends State<HomePageWidget> {
|
||||||
// ),
|
// ),
|
||||||
// ),
|
// ),
|
||||||
// );
|
// );
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,23 +1,20 @@
|
||||||
|
|
||||||
import 'dart:developer';
|
import 'dart:developer';
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
import 'package:hub/app_state.dart';
|
import 'package:hub/app_state.dart';
|
||||||
import 'package:hub/backend/api_requests/api_calls.dart';
|
import 'package:hub/backend/api_requests/api_calls.dart';
|
||||||
|
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:hub/components/templates_components/change_passs_qr_code_pass_key_template_component/change_pass_widget.dart';
|
import 'package:hub/components/templates_components/change_passs_qr_code_pass_key_template_component/change_pass_widget.dart';
|
||||||
|
import 'package:hub/flutter_flow/flutter_flow_icon_button.dart';
|
||||||
import 'package:hub/flutter_flow/flutter_flow_theme.dart';
|
import 'package:hub/flutter_flow/flutter_flow_theme.dart';
|
||||||
import 'package:hub/flutter_flow/flutter_flow_util.dart';
|
import 'package:hub/flutter_flow/flutter_flow_util.dart';
|
||||||
import 'package:hub/flutter_flow/nav/nav.dart';
|
import 'package:hub/flutter_flow/nav/nav.dart';
|
||||||
|
import 'package:share_plus/share_plus.dart';
|
||||||
|
|
||||||
class PreferencesPageModel with ChangeNotifier {
|
class PreferencesPageModel with ChangeNotifier {
|
||||||
final unfocusNode = FocusNode();
|
final unfocusNode = FocusNode();
|
||||||
|
|
||||||
|
|
||||||
Future<void> toggleFingerprint(BuildContext context) async {
|
Future<void> toggleFingerprint(BuildContext context) async {
|
||||||
|
|
||||||
// FFAppState().checkBiometrics()
|
// FFAppState().checkBiometrics()
|
||||||
// .then((value) => FFAppState().authenticateBiometric()
|
// .then((value) => FFAppState().authenticateBiometric()
|
||||||
// .then( (value) {
|
// .then( (value) {
|
||||||
|
@ -26,41 +23,62 @@ class PreferencesPageModel with ChangeNotifier {
|
||||||
// })
|
// })
|
||||||
// .whenComplete(() => notifyListeners()));
|
// .whenComplete(() => notifyListeners()));
|
||||||
|
|
||||||
if(FFAppState().fingerprint) {
|
if (FFAppState().fingerprint) {
|
||||||
FFAppState().fingerprint = false;
|
FFAppState().fingerprint = false;
|
||||||
FFAppState().deleteFingerprintPass();
|
FFAppState().deleteFingerprintPass();
|
||||||
notifyListeners();
|
notifyListeners();
|
||||||
} else {
|
} else {
|
||||||
await showModalBottomSheet(
|
await showModalBottomSheet(
|
||||||
isScrollControlled: true,
|
isScrollControlled: true,
|
||||||
backgroundColor: Colors.transparent,
|
backgroundColor: Colors.transparent,
|
||||||
useSafeArea: true,
|
useSafeArea: true,
|
||||||
context: context,
|
context: context,
|
||||||
builder: (context) {
|
builder: (context) {
|
||||||
return Padding(
|
return Padding(
|
||||||
padding:
|
padding: MediaQuery.viewInsetsOf(context),
|
||||||
MediaQuery.viewInsetsOf(context),
|
child: PassKeyTemplateWidget(
|
||||||
child:
|
toggleActionStatus: (key) async {
|
||||||
PassKeyTemplateWidget(
|
log(key);
|
||||||
toggleActionStatus: (key) async {
|
FFAppState().fingerprintPass = key;
|
||||||
log(key);
|
FFAppState().fingerprint = true;
|
||||||
FFAppState().fingerprintPass = key;
|
},
|
||||||
FFAppState().fingerprint = true;
|
),
|
||||||
},
|
);
|
||||||
),
|
},
|
||||||
);
|
).whenComplete(() => notifyListeners());
|
||||||
},
|
|
||||||
).whenComplete(() => notifyListeners());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void enablePerson(BuildContext context) {
|
void enablePerson(BuildContext context) {
|
||||||
|
|
||||||
notifyListeners();
|
notifyListeners();
|
||||||
ScaffoldMessenger.of(context).showSnackBar(
|
ScaffoldMessenger.of(context).showSnackBar(
|
||||||
SnackBar(
|
SnackBar(
|
||||||
content: Text(FFAppState().userDevUUID, style: TextStyle(color: FlutterFlowTheme.of(context).info) ),
|
content: Row(
|
||||||
|
mainAxisSize: MainAxisSize.max,
|
||||||
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||||
|
children: [
|
||||||
|
Text(FFAppState().userDevUUID,
|
||||||
|
style: TextStyle(color: FlutterFlowTheme.of(context).info)),
|
||||||
|
FlutterFlowIconButton(
|
||||||
|
borderColor: Colors.transparent,
|
||||||
|
borderRadius: 20.0,
|
||||||
|
borderWidth: 1.0,
|
||||||
|
buttonSize: 40.0,
|
||||||
|
icon: Icon(
|
||||||
|
Icons.share,
|
||||||
|
color: FlutterFlowTheme.of(context).info,
|
||||||
|
size: 24.0,
|
||||||
|
),
|
||||||
|
onPressed: () {
|
||||||
|
log('IconButton pressed ...');
|
||||||
|
// Implement share functionality here
|
||||||
|
Share.share(
|
||||||
|
FFAppState().userDevUUID,
|
||||||
|
);
|
||||||
|
},
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
backgroundColor: FlutterFlowTheme.of(context).primary,
|
backgroundColor: FlutterFlowTheme.of(context).primary,
|
||||||
duration: const Duration(seconds: 1),
|
duration: const Duration(seconds: 1),
|
||||||
behavior: SnackBarBehavior.floating,
|
behavior: SnackBarBehavior.floating,
|
||||||
|
@ -71,24 +89,71 @@ class PreferencesPageModel with ChangeNotifier {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
void toggleNotify() {
|
void toggleNotify(BuildContext context) {
|
||||||
FFAppState().notify = !FFAppState().notify;
|
FFAppState().notify = !FFAppState().notify;
|
||||||
PhpGroup.changeNotifica.call(
|
PhpGroup.changeNotifica
|
||||||
|
.call(
|
||||||
userUUID: FFAppState().userUUID,
|
userUUID: FFAppState().userUUID,
|
||||||
devUUID: FFAppState().devUUID,
|
devUUID: FFAppState().devUUID,
|
||||||
cliID: FFAppState().cliUUID,
|
cliID: FFAppState().cliUUID,
|
||||||
atividade: 'updVisitado',
|
atividade: 'updVisitado',
|
||||||
notifica: FFAppState().notify ? 'S' : 'N',
|
notifica: FFAppState().notify ? 'S' : 'N',
|
||||||
);
|
)
|
||||||
|
.catchError((err) {
|
||||||
|
log(err.toString());
|
||||||
|
ScaffoldMessenger.of(context).showSnackBar(
|
||||||
|
SnackBar(
|
||||||
|
content: Text(
|
||||||
|
FFLocalizations.of(context).getVariableText(
|
||||||
|
enText: 'Error changing notification',
|
||||||
|
ptText: 'Erro ao alterar notificação',
|
||||||
|
),
|
||||||
|
style: TextStyle(color: FlutterFlowTheme.of(context).info)),
|
||||||
|
backgroundColor: FlutterFlowTheme.of(context).error,
|
||||||
|
duration: const Duration(seconds: 3),
|
||||||
|
behavior: SnackBarBehavior.floating,
|
||||||
|
shape: RoundedRectangleBorder(
|
||||||
|
borderRadius: BorderRadius.circular(30),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
});
|
||||||
notifyListeners();
|
notifyListeners();
|
||||||
}
|
}
|
||||||
|
|
||||||
void localLogout(){
|
void localUnlink(BuildContext context) {
|
||||||
PhpGroup.resopndeVinculo.call(
|
PhpGroup.resopndeVinculo
|
||||||
|
.call(
|
||||||
userUUID: FFAppState().userUUID,
|
userUUID: FFAppState().userUUID,
|
||||||
devUUID: FFAppState().devUUID,
|
devUUID: FFAppState().devUUID,
|
||||||
cliID: FFAppState().cliUUID,
|
cliID: FFAppState().cliUUID,
|
||||||
tarefa: 'I',
|
tarefa: 'I',
|
||||||
|
)
|
||||||
|
.catchError((err) {
|
||||||
|
log(err.toString());
|
||||||
|
ScaffoldMessenger.of(context).showSnackBar(
|
||||||
|
SnackBar(
|
||||||
|
content: Text(
|
||||||
|
FFLocalizations.of(context).getVariableText(
|
||||||
|
enText: 'Error unlinking device',
|
||||||
|
ptText: 'Erro ao desvincular dispositivo',
|
||||||
|
),
|
||||||
|
style: TextStyle(color: FlutterFlowTheme.of(context).info)),
|
||||||
|
backgroundColor: FlutterFlowTheme.of(context).error,
|
||||||
|
duration: const Duration(seconds: 3),
|
||||||
|
behavior: SnackBarBehavior.floating,
|
||||||
|
shape: RoundedRectangleBorder(
|
||||||
|
borderRadius: BorderRadius.circular(30),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}).then(
|
||||||
|
(value) {
|
||||||
|
FFAppState().deleteCliUUID();
|
||||||
|
FFAppState().deleteLocal();
|
||||||
|
FFAppState().deleteOwnerUUID();
|
||||||
|
Navigator.pop(context);
|
||||||
|
},
|
||||||
);
|
);
|
||||||
notifyListeners();
|
notifyListeners();
|
||||||
}
|
}
|
||||||
|
@ -108,57 +173,99 @@ class PreferencesPageModel with ChangeNotifier {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Future<void> togglePass(BuildContext context) async {
|
||||||
Future<void> togglePass(BuildContext context) async {
|
|
||||||
debugPrint('pass: ${FFAppState().pass}');
|
debugPrint('pass: ${FFAppState().pass}');
|
||||||
if(FFAppState().pass) {
|
if (FFAppState().pass) {
|
||||||
FFAppState().pass = false;
|
FFAppState().pass = false;
|
||||||
FFAppState().deleteAccessPass();
|
FFAppState().deleteAccessPass();
|
||||||
notifyListeners();
|
notifyListeners();
|
||||||
} else {
|
} else {
|
||||||
await showModalBottomSheet(
|
await showModalBottomSheet(
|
||||||
isScrollControlled: true,
|
isScrollControlled: true,
|
||||||
backgroundColor: Colors.transparent,
|
backgroundColor: Colors.transparent,
|
||||||
useSafeArea: true,
|
useSafeArea: true,
|
||||||
context: context,
|
context: context,
|
||||||
builder: (context) {
|
builder: (context) {
|
||||||
return Padding(
|
return Padding(
|
||||||
padding:
|
padding: MediaQuery.viewInsetsOf(context),
|
||||||
MediaQuery.viewInsetsOf(context),
|
child: PassKeyTemplateWidget(
|
||||||
child:
|
toggleActionStatus: (key) async {
|
||||||
PassKeyTemplateWidget(
|
FFAppState().accessPass = key;
|
||||||
toggleActionStatus: (key) async {
|
|
||||||
FFAppState().accessPass = key;
|
|
||||||
notifyListeners();
|
notifyListeners();
|
||||||
debugPrint('key: $key');
|
debugPrint('key: $key');
|
||||||
await PhpGroup.changePass.call(
|
await PhpGroup.changePass
|
||||||
|
.call(
|
||||||
userUUID: FFAppState().userUUID,
|
userUUID: FFAppState().userUUID,
|
||||||
devUUID: FFAppState().devUUID,
|
devUUID: FFAppState().devUUID,
|
||||||
cliID: FFAppState().cliUUID,
|
cliID: FFAppState().cliUUID,
|
||||||
atividade: 'updVisitado',
|
atividade: 'updVisitado',
|
||||||
newSenha: FFAppState().accessPass,
|
newSenha: FFAppState().accessPass,
|
||||||
)
|
)
|
||||||
.then((value) {
|
.then((value) {
|
||||||
FFAppState().pass = true;
|
FFAppState().pass = true;
|
||||||
// var error = jsonDecode(value.jsonBody['error'].toString());
|
// var error = jsonDecode(value.jsonBody['error'].toString());
|
||||||
// log('${jsonDecode(value.jsonBody['error'].toString())}');
|
// log('${jsonDecode(value.jsonBody['error'].toString())}');
|
||||||
if(jsonDecode(value.jsonBody['error'].toString()) == false) {
|
if (jsonDecode(value.jsonBody['error'].toString()) == false) {
|
||||||
FFAppState().pass = true;
|
FFAppState().pass = true;
|
||||||
} else {
|
} else {
|
||||||
FFAppState().pass = false;
|
FFAppState().pass = false;
|
||||||
}
|
}
|
||||||
})
|
}).onError((error, StackTrace) {
|
||||||
.onError((error, StackTrace) {
|
FFAppState().pass = false;
|
||||||
FFAppState().pass = false;
|
log(error.toString());
|
||||||
log(error.toString());
|
log(StackTrace.toString());
|
||||||
log(StackTrace.toString());
|
}).whenComplete(() => notifyListeners());
|
||||||
})
|
},
|
||||||
.whenComplete(() => notifyListeners());
|
),
|
||||||
},
|
);
|
||||||
),
|
},
|
||||||
);
|
);
|
||||||
},
|
}
|
||||||
);
|
}
|
||||||
|
|
||||||
|
Future<void> togglePanic(BuildContext context) async {
|
||||||
|
if (FFAppState().panic) {
|
||||||
|
FFAppState().panic = false;
|
||||||
|
FFAppState().deletePanicPass();
|
||||||
|
notifyListeners();
|
||||||
|
} else {
|
||||||
|
await showModalBottomSheet(
|
||||||
|
isScrollControlled: true,
|
||||||
|
backgroundColor: Colors.transparent,
|
||||||
|
useSafeArea: true,
|
||||||
|
context: context,
|
||||||
|
builder: (context) {
|
||||||
|
return Padding(
|
||||||
|
padding: MediaQuery.viewInsetsOf(context),
|
||||||
|
child: PassKeyTemplateWidget(
|
||||||
|
toggleActionStatus: (key) async {
|
||||||
|
FFAppState().panicPass = key;
|
||||||
|
notifyListeners();
|
||||||
|
await PhpGroup.changePass
|
||||||
|
.call(
|
||||||
|
userUUID: FFAppState().userUUID,
|
||||||
|
devUUID: FFAppState().devUUID,
|
||||||
|
cliID: FFAppState().cliUUID,
|
||||||
|
atividade: 'updVisitado',
|
||||||
|
newSenha: FFAppState().panicPass,
|
||||||
|
)
|
||||||
|
.then((value) {
|
||||||
|
FFAppState().panic = true;
|
||||||
|
if (jsonDecode(value.jsonBody['error'].toString()) == false) {
|
||||||
|
FFAppState().panic = true;
|
||||||
|
} else {
|
||||||
|
FFAppState().panic = false;
|
||||||
|
}
|
||||||
|
}).onError((e, s) {
|
||||||
|
FFAppState().panic = false;
|
||||||
|
log(e.toString());
|
||||||
|
log(s.toString());
|
||||||
|
}).whenComplete(() => notifyListeners());
|
||||||
|
},
|
||||||
|
),
|
||||||
|
);
|
||||||
|
},
|
||||||
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -9,7 +9,6 @@ import 'package:hub/flutter_flow/nav/nav.dart';
|
||||||
import 'package:hub/pages/preferences_settings_page/preferences_settings_model.dart';
|
import 'package:hub/pages/preferences_settings_page/preferences_settings_model.dart';
|
||||||
import 'package:provider/provider.dart';
|
import 'package:provider/provider.dart';
|
||||||
|
|
||||||
|
|
||||||
class PreferencesPageWidget extends StatelessWidget {
|
class PreferencesPageWidget extends StatelessWidget {
|
||||||
const PreferencesPageWidget({super.key});
|
const PreferencesPageWidget({super.key});
|
||||||
|
|
||||||
|
@ -46,7 +45,7 @@ class PreferencesPageWidget extends StatelessWidget {
|
||||||
FFLocalizations.of(context).getVariableText(
|
FFLocalizations.of(context).getVariableText(
|
||||||
enText: 'Preferences',
|
enText: 'Preferences',
|
||||||
ptText: 'Preferências',
|
ptText: 'Preferências',
|
||||||
),
|
),
|
||||||
style: FlutterFlowTheme.of(context).headlineMedium.override(
|
style: FlutterFlowTheme.of(context).headlineMedium.override(
|
||||||
fontFamily: 'Nunito',
|
fontFamily: 'Nunito',
|
||||||
color: FlutterFlowTheme.of(context).primaryText,
|
color: FlutterFlowTheme.of(context).primaryText,
|
||||||
|
@ -74,7 +73,7 @@ class PreferencesPageWidget extends StatelessWidget {
|
||||||
// childAspectRatio: 1.0,
|
// childAspectRatio: 1.0,
|
||||||
// mainAxisExtent: 100.0,
|
// mainAxisExtent: 100.0,
|
||||||
// ),
|
// ),
|
||||||
itemCount: 6, // Assuming 4 items for simplicity
|
itemCount: 7, // Assuming 4 items for simplicity
|
||||||
padding: const EdgeInsets.symmetric(horizontal: 20.0),
|
padding: const EdgeInsets.symmetric(horizontal: 20.0),
|
||||||
physics: const AlwaysScrollableScrollPhysics(),
|
physics: const AlwaysScrollableScrollPhysics(),
|
||||||
itemBuilder: (BuildContext context, int index) {
|
itemBuilder: (BuildContext context, int index) {
|
||||||
|
@ -90,82 +89,110 @@ class PreferencesPageWidget extends StatelessWidget {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
Widget _buildIconButton(BuildContext context, int index, PreferencesPageModel model) {
|
Widget _buildIconButton(
|
||||||
|
BuildContext context, int index, PreferencesPageModel model) {
|
||||||
IconData icon;
|
IconData icon;
|
||||||
Function() onPressed =() => {};
|
Function() onPressed = () => {};
|
||||||
bool isEnabled;
|
bool isEnabled;
|
||||||
String content;
|
String content;
|
||||||
|
|
||||||
switch (index) {
|
switch (index) {
|
||||||
case 0:
|
case 0:
|
||||||
icon = Icons.fingerprint;
|
icon = Icons.fingerprint;
|
||||||
onPressed = () => model.toggleFingerprint(context); // Disable if fingerprint is false
|
onPressed = () =>
|
||||||
|
model.toggleFingerprint(context); // Disable if fingerprint is false
|
||||||
isEnabled = FFAppState().fingerprint;
|
isEnabled = FFAppState().fingerprint;
|
||||||
content = FFLocalizations.of(context).getVariableText(
|
content = FFLocalizations.of(context).getVariableText(
|
||||||
ptText: 'Ative a autenticação por impressão digital para login seguro.',
|
ptText:
|
||||||
|
'Ative a autenticação por impressão digital para login seguro.',
|
||||||
enText: 'Enable fingerprint authentication for secure login.',
|
enText: 'Enable fingerprint authentication for secure login.',
|
||||||
);
|
);
|
||||||
break;
|
break;
|
||||||
case 1:
|
case 1:
|
||||||
icon = Icons.person;
|
icon = Icons.person;
|
||||||
onPressed = () => model.enablePerson(context);
|
onPressed = () => model.enablePerson(context);
|
||||||
isEnabled = FFAppState().person;
|
isEnabled = FFAppState().person;
|
||||||
content = FFLocalizations.of(context).getVariableText(
|
content = FFLocalizations.of(context).getVariableText(
|
||||||
ptText: 'Exibir código de identificação remota',
|
ptText: 'Exibir código de identificação remota',
|
||||||
enText: 'Display remote identification code',
|
enText: 'Display remote identification code',
|
||||||
);
|
);
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
icon = Icons.notifications;
|
icon = Icons.notifications;
|
||||||
onPressed = model.toggleNotify;
|
onPressed = () => model.toggleNotify(context);
|
||||||
isEnabled = FFAppState().notify;
|
isEnabled = FFAppState().notify;
|
||||||
content = FFLocalizations.of(context).getVariableText(
|
content = FFLocalizations.of(context).getVariableText(
|
||||||
ptText: 'Ative para receber sua notificação de acesso',
|
ptText: 'Ative para receber sua notificação de acesso',
|
||||||
enText: 'Enable to receive your access notification',
|
enText: 'Enable to receive your access notification',
|
||||||
);
|
);
|
||||||
break;
|
break;
|
||||||
case 3:
|
case 3:
|
||||||
icon = Icons.lock_clock_sharp;
|
icon = Icons.lock;
|
||||||
// onLongPress = model.togglePass(context, model);
|
// onLongPress = model.togglePass(context, model);
|
||||||
isEnabled = FFAppState().pass;
|
isEnabled = FFAppState().pass;
|
||||||
content = FFLocalizations.of(context).getVariableText(
|
content = FFLocalizations.of(context).getVariableText(
|
||||||
ptText: 'Ative para inserir uma credencial de acesso para o QRCode',
|
ptText: 'Ative para inserir uma credencial de acesso para o QRCode',
|
||||||
enText: 'Enable to enter an access credential for the QRCode',
|
enText: 'Enable to enter an access credential for the QRCode',
|
||||||
);
|
);
|
||||||
break;
|
break;
|
||||||
case 4:
|
case 4:
|
||||||
icon = Icons.landscape;
|
icon = Icons.lock_clock_sharp;
|
||||||
onPressed = model.localLogout;
|
// onLongPress = model.togglePass(context, model);
|
||||||
isEnabled = false;
|
isEnabled = FFAppState().panic;
|
||||||
content = FFLocalizations.of(context).getVariableText(
|
content = FFLocalizations.of(context).getVariableText(
|
||||||
ptText: 'Ative para se desvincular do local selecionado',
|
ptText: 'Ative para inserir uma credencial de pânico para o QRCode',
|
||||||
enText: 'Enable to unlink from the selected location',
|
enText: 'Enable to enter an panic credential for the QRCode',
|
||||||
);
|
);
|
||||||
break;
|
break;
|
||||||
case 5:
|
case 5:
|
||||||
|
icon = Icons.landscape;
|
||||||
|
onPressed = () => model.localUnlink(context);
|
||||||
|
isEnabled = true;
|
||||||
|
content = FFLocalizations.of(context).getVariableText(
|
||||||
|
ptText: 'Desative para se desvincular do local selecionado',
|
||||||
|
enText: 'Enable to unlink from the selected location',
|
||||||
|
);
|
||||||
|
break;
|
||||||
|
case 6:
|
||||||
icon = Icons.delete;
|
icon = Icons.delete;
|
||||||
onPressed = () => model.deleteAccount(context);
|
onPressed = () => model.deleteAccount(context);
|
||||||
isEnabled = false;
|
isEnabled = true;
|
||||||
content = FFLocalizations.of(context).getVariableText(
|
content = FFLocalizations.of(context).getVariableText(
|
||||||
ptText: 'Delete sua conta e todos os dados associados permanentemente.',
|
ptText:
|
||||||
|
'Delete sua conta e todos os dados associados permanentemente.',
|
||||||
enText: 'Delete your account and all associated data permanently.',
|
enText: 'Delete your account and all associated data permanently.',
|
||||||
);
|
);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
throw Exception('Invalid index: $index');
|
throw Exception('Invalid index: $index');
|
||||||
}
|
}
|
||||||
|
|
||||||
return Container(
|
return SizedBox(
|
||||||
height: 100,
|
height: 100,
|
||||||
child: GestureDetector(
|
child: GestureDetector(
|
||||||
onTap: index != 3 ? onPressed : () {model.togglePass(context);},
|
onTap: () {
|
||||||
|
switch (index) {
|
||||||
|
case 3:
|
||||||
|
model.togglePass(context);
|
||||||
|
break;
|
||||||
|
case 4:
|
||||||
|
model.togglePanic(context);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
onPressed();
|
||||||
|
}
|
||||||
|
},
|
||||||
child: Row(
|
child: Row(
|
||||||
children: [
|
children: [
|
||||||
CircleAvatar(
|
CircleAvatar(
|
||||||
backgroundColor: isEnabled ? FlutterFlowTheme.of(context).primary : FlutterFlowTheme.of(context).alternate,
|
backgroundColor: isEnabled
|
||||||
|
? FlutterFlowTheme.of(context).primary
|
||||||
|
: FlutterFlowTheme.of(context).alternate,
|
||||||
child: Icon(
|
child: Icon(
|
||||||
icon,
|
icon,
|
||||||
color: isEnabled ? FlutterFlowTheme.of(context).primaryBackground : FlutterFlowTheme.of(context).primary,
|
color: isEnabled
|
||||||
|
? FlutterFlowTheme.of(context).primaryBackground
|
||||||
|
: FlutterFlowTheme.of(context).primary,
|
||||||
// icon: Icon(icon, color: isEnabled ? FlutterFlowTheme.of(context).primaryBackground : FlutterFlowTheme.of(context).primary, size: 40.0),
|
// icon: Icon(icon, color: isEnabled ? FlutterFlowTheme.of(context).primaryBackground : FlutterFlowTheme.of(context).primary, size: 40.0),
|
||||||
// onPressed: index != 3 ? onPressed : () {model.togglePass(context);},
|
// onPressed: index != 3 ? onPressed : () {model.togglePass(context);},
|
||||||
// borderRadius: 20.0,
|
// borderRadius: 20.0,
|
||||||
|
@ -181,13 +208,13 @@ class PreferencesPageWidget extends StatelessWidget {
|
||||||
child: Text(
|
child: Text(
|
||||||
content,
|
content,
|
||||||
style: FlutterFlowTheme.of(context).bodySmall.override(
|
style: FlutterFlowTheme.of(context).bodySmall.override(
|
||||||
fontFamily: 'Nunito',
|
fontFamily: 'Nunito',
|
||||||
color: FlutterFlowTheme.of(context).primaryText,
|
color: FlutterFlowTheme.of(context).primaryText,
|
||||||
fontSize: 14.0,
|
fontSize: 14.0,
|
||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
fontWeight: FontWeight.normal,
|
fontWeight: FontWeight.normal,
|
||||||
fontStyle: FontStyle.normal,
|
fontStyle: FontStyle.normal,
|
||||||
),
|
),
|
||||||
overflow: TextOverflow.clip,
|
overflow: TextOverflow.clip,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
import 'package:hub/components/templates_components/regisiter_vistor_template_component/regisiter_vistor_template_component_widget.dart';
|
||||||
|
|
||||||
import '/backend/api_requests/api_calls.dart';
|
import '/backend/api_requests/api_calls.dart';
|
||||||
import '/flutter_flow/flutter_flow_util.dart';
|
import '/flutter_flow/flutter_flow_util.dart';
|
||||||
import '/flutter_flow/form_field_controller.dart';
|
import '/flutter_flow/form_field_controller.dart';
|
||||||
|
@ -8,51 +10,12 @@ class RegisterVisitorPageModel
|
||||||
extends FlutterFlowModel<RegisterVisitorPageWidget> {
|
extends FlutterFlowModel<RegisterVisitorPageWidget> {
|
||||||
/// State fields for stateful widgets in this page.
|
/// State fields for stateful widgets in this page.
|
||||||
|
|
||||||
final unfocusNode = FocusNode();
|
late RegisiterVistorTemplateComponentModel
|
||||||
bool isDataUploading = false;
|
regisiterVistorTemplateComponentModel;
|
||||||
FFUploadedFile uploadedLocalFile =
|
|
||||||
FFUploadedFile(bytes: Uint8List.fromList([]));
|
|
||||||
|
|
||||||
// State field(s) for TextField widget.
|
|
||||||
FocusNode? textFieldFocusNode1;
|
|
||||||
TextEditingController? textController1;
|
|
||||||
String? Function(BuildContext, String?)? textController1Validator;
|
|
||||||
// State field(s) for TextField widget.
|
|
||||||
FocusNode? textFieldFocusNode2;
|
|
||||||
TextEditingController? textController2;
|
|
||||||
String? Function(BuildContext, String?)? textController2Validator;
|
|
||||||
// State field(s) for DropDown widget.
|
|
||||||
String? dropDownValue;
|
|
||||||
FormFieldController<String>? dropDownValueController;
|
|
||||||
// State field(s) for TextField widget.
|
|
||||||
FocusNode? textFieldFocusNode3;
|
|
||||||
TextEditingController? textController3;
|
|
||||||
String? Function(BuildContext, String?)? textController3Validator;
|
|
||||||
// State field(s) for TextField widget.
|
|
||||||
FocusNode? textFieldFocusNode4;
|
|
||||||
TextEditingController? textController4;
|
|
||||||
String? Function(BuildContext, String?)? textController4Validator;
|
|
||||||
// Stores action output result for [Custom Action - convertImageFileToBase64] action in Button widget.
|
|
||||||
String? imgBase64;
|
|
||||||
// Stores action output result for [Backend Call - API (postScheduleVisitor)] action in Button widget.
|
|
||||||
ApiCallResponse? scheduleVisitor;
|
|
||||||
|
|
||||||
@override
|
@override
|
||||||
void initState(BuildContext context) {}
|
void initState(BuildContext context) {}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
void dispose() {
|
void dispose() {}
|
||||||
unfocusNode.dispose();
|
|
||||||
textFieldFocusNode1?.dispose();
|
|
||||||
textController1?.dispose();
|
|
||||||
|
|
||||||
textFieldFocusNode2?.dispose();
|
|
||||||
textController2?.dispose();
|
|
||||||
|
|
||||||
textFieldFocusNode3?.dispose();
|
|
||||||
textController3?.dispose();
|
|
||||||
|
|
||||||
textFieldFocusNode4?.dispose();
|
|
||||||
textController4?.dispose();
|
|
||||||
}
|
|
||||||
}
|
}
|
|
@ -1,17 +1,10 @@
|
||||||
import 'package:hub/flutter_flow/nav/nav.dart';
|
|
||||||
|
|
||||||
import '/backend/api_requests/api_calls.dart';
|
|
||||||
import '/components/molecular_components/throw_exception/throw_exception_widget.dart';
|
|
||||||
import '/flutter_flow/flutter_flow_drop_down.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 '/flutter_flow/form_field_controller.dart';
|
|
||||||
import '/flutter_flow/upload_data.dart';
|
|
||||||
import '/custom_code/actions/index.dart' as actions;
|
|
||||||
import 'package:flutter/material.dart';
|
|
||||||
import 'package:google_fonts/google_fonts.dart';
|
import 'package:google_fonts/google_fonts.dart';
|
||||||
|
import 'package:hub/components/templates_components/regisiter_vistor_template_component/regisiter_vistor_template_component_widget.dart';
|
||||||
|
import 'package:hub/flutter_flow/flutter_flow_icon_button.dart';
|
||||||
|
import 'package:hub/flutter_flow/flutter_flow_theme.dart';
|
||||||
|
import 'package:hub/flutter_flow/nav/nav.dart';
|
||||||
|
import '/flutter_flow/flutter_flow_util.dart';
|
||||||
|
import 'package:flutter/material.dart';
|
||||||
import 'package:provider/provider.dart';
|
import 'package:provider/provider.dart';
|
||||||
import 'register_visitor_page_model.dart';
|
import 'register_visitor_page_model.dart';
|
||||||
export 'register_visitor_page_model.dart';
|
export 'register_visitor_page_model.dart';
|
||||||
|
@ -33,18 +26,6 @@ class _RegisterVisitorPageWidgetState extends State<RegisterVisitorPageWidget> {
|
||||||
void initState() {
|
void initState() {
|
||||||
super.initState();
|
super.initState();
|
||||||
_model = createModel(context, () => RegisterVisitorPageModel());
|
_model = createModel(context, () => RegisterVisitorPageModel());
|
||||||
|
|
||||||
_model.textController1 ??= TextEditingController();
|
|
||||||
_model.textFieldFocusNode1 ??= FocusNode();
|
|
||||||
|
|
||||||
_model.textController2 ??= TextEditingController();
|
|
||||||
_model.textFieldFocusNode2 ??= FocusNode();
|
|
||||||
|
|
||||||
_model.textController3 ??= TextEditingController();
|
|
||||||
_model.textFieldFocusNode3 ??= FocusNode();
|
|
||||||
|
|
||||||
_model.textController4 ??= TextEditingController();
|
|
||||||
_model.textFieldFocusNode4 ??= FocusNode();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
|
@ -57,837 +38,46 @@ class _RegisterVisitorPageWidgetState extends State<RegisterVisitorPageWidget> {
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
context.watch<FFAppState>();
|
context.watch<FFAppState>();
|
||||||
|
return Scaffold(
|
||||||
return GestureDetector(
|
appBar: AppBar(
|
||||||
onTap: () => _model.unfocusNode.canRequestFocus
|
|
||||||
? FocusScope.of(context).requestFocus(_model.unfocusNode)
|
|
||||||
: FocusScope.of(context).unfocus(),
|
|
||||||
child: Scaffold(
|
|
||||||
key: scaffoldKey,
|
|
||||||
backgroundColor: FlutterFlowTheme.of(context).primaryBackground,
|
backgroundColor: FlutterFlowTheme.of(context).primaryBackground,
|
||||||
appBar: AppBar(
|
automaticallyImplyLeading: false,
|
||||||
backgroundColor: FlutterFlowTheme.of(context).primaryBackground,
|
leading: FlutterFlowIconButton(
|
||||||
automaticallyImplyLeading: false,
|
borderColor: Colors.transparent,
|
||||||
leading: FlutterFlowIconButton(
|
borderRadius: 30.0,
|
||||||
borderColor: Colors.transparent,
|
borderWidth: 1.0,
|
||||||
borderRadius: 30.0,
|
buttonSize: 60.0,
|
||||||
borderWidth: 1.0,
|
icon: Icon(
|
||||||
buttonSize: 60.0,
|
Icons.keyboard_arrow_left,
|
||||||
icon: Icon(
|
color: FlutterFlowTheme.of(context).primaryText,
|
||||||
Icons.keyboard_arrow_left,
|
size: 30.0,
|
||||||
color: FlutterFlowTheme.of(context).primaryText,
|
|
||||||
size: 30.0,
|
|
||||||
),
|
|
||||||
onPressed: () async {
|
|
||||||
context.pop();
|
|
||||||
},
|
|
||||||
),
|
),
|
||||||
title: Text(
|
onPressed: () async {
|
||||||
FFLocalizations.of(context).getText(
|
context.pop();
|
||||||
'megskb6s' /* Cadastro Visitante */,
|
},
|
||||||
),
|
|
||||||
style: FlutterFlowTheme.of(context).headlineMedium.override(
|
|
||||||
fontFamily: FlutterFlowTheme.of(context).headlineMediumFamily,
|
|
||||||
color: FlutterFlowTheme.of(context).primaryText,
|
|
||||||
fontSize: 15.0,
|
|
||||||
letterSpacing: 0.0,
|
|
||||||
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
|
||||||
FlutterFlowTheme.of(context).headlineMediumFamily),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
actions: const [],
|
|
||||||
centerTitle: true,
|
|
||||||
elevation: 0.0,
|
|
||||||
),
|
),
|
||||||
body: SafeArea(
|
title: Text(
|
||||||
top: true,
|
FFLocalizations.of(context).getText(
|
||||||
child: Align(
|
'megskb6s' /* Cadastro Visitante */,
|
||||||
alignment: const AlignmentDirectional(0.0, 1.0),
|
|
||||||
child: Container(
|
|
||||||
width: double.infinity,
|
|
||||||
height: double.infinity,
|
|
||||||
decoration: BoxDecoration(
|
|
||||||
color: FlutterFlowTheme.of(context).primaryBackground,
|
|
||||||
borderRadius: const BorderRadius.only(
|
|
||||||
bottomLeft: Radius.circular(0.0),
|
|
||||||
bottomRight: Radius.circular(0.0),
|
|
||||||
topLeft: Radius.circular(25.0),
|
|
||||||
topRight: Radius.circular(25.0),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
child: SingleChildScrollView(
|
|
||||||
child: Column(
|
|
||||||
mainAxisSize: MainAxisSize.min,
|
|
||||||
mainAxisAlignment: MainAxisAlignment.start,
|
|
||||||
children: [
|
|
||||||
Builder(
|
|
||||||
builder: (context) {
|
|
||||||
if ((_model.uploadedLocalFile.bytes?.isNotEmpty ??
|
|
||||||
false)) {
|
|
||||||
return InkWell(
|
|
||||||
splashColor: Colors.transparent,
|
|
||||||
focusColor: Colors.transparent,
|
|
||||||
hoverColor: Colors.transparent,
|
|
||||||
highlightColor: Colors.transparent,
|
|
||||||
onTap: () async {
|
|
||||||
setState(() {
|
|
||||||
_model.isDataUploading = false;
|
|
||||||
_model.uploadedLocalFile = FFUploadedFile(
|
|
||||||
bytes: Uint8List.fromList([]));
|
|
||||||
});
|
|
||||||
},
|
|
||||||
child: ClipRRect(
|
|
||||||
borderRadius: BorderRadius.circular(8.0),
|
|
||||||
child: Image.memory(
|
|
||||||
_model.uploadedLocalFile.bytes ??
|
|
||||||
Uint8List.fromList([]),
|
|
||||||
width: 300.0,
|
|
||||||
height: 200.0,
|
|
||||||
fit: BoxFit.cover,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
);
|
|
||||||
} else {
|
|
||||||
return Stack(
|
|
||||||
children: [
|
|
||||||
Align(
|
|
||||||
alignment: const AlignmentDirectional(0.01, 0.0),
|
|
||||||
child: FFButtonWidget(
|
|
||||||
onPressed: () async {
|
|
||||||
final selectedMedia =
|
|
||||||
await selectMediaWithSourceBottomSheet(
|
|
||||||
context: context,
|
|
||||||
maxWidth: 300.00,
|
|
||||||
maxHeight: 300.00,
|
|
||||||
imageQuality: 0,
|
|
||||||
allowPhoto: true,
|
|
||||||
includeDimensions: true,
|
|
||||||
);
|
|
||||||
if (selectedMedia != null &&
|
|
||||||
selectedMedia.every((m) =>
|
|
||||||
validateFileFormat(
|
|
||||||
m.storagePath, context))) {
|
|
||||||
setState(
|
|
||||||
() => _model.isDataUploading = true);
|
|
||||||
var selectedUploadedFiles =
|
|
||||||
<FFUploadedFile>[];
|
|
||||||
|
|
||||||
try {
|
|
||||||
showUploadMessage(
|
|
||||||
context,
|
|
||||||
'Uploading file...',
|
|
||||||
showLoading: true,
|
|
||||||
);
|
|
||||||
selectedUploadedFiles = selectedMedia
|
|
||||||
.map((m) => FFUploadedFile(
|
|
||||||
name: m.storagePath
|
|
||||||
.split('/')
|
|
||||||
.last,
|
|
||||||
bytes: m.bytes,
|
|
||||||
height: m.dimensions?.height,
|
|
||||||
width: m.dimensions?.width,
|
|
||||||
blurHash: m.blurHash,
|
|
||||||
))
|
|
||||||
.toList();
|
|
||||||
} finally {
|
|
||||||
ScaffoldMessenger.of(context)
|
|
||||||
.hideCurrentSnackBar();
|
|
||||||
_model.isDataUploading = false;
|
|
||||||
}
|
|
||||||
if (selectedUploadedFiles.length ==
|
|
||||||
selectedMedia.length) {
|
|
||||||
setState(() {
|
|
||||||
_model.uploadedLocalFile =
|
|
||||||
selectedUploadedFiles.first;
|
|
||||||
});
|
|
||||||
showUploadMessage(context, 'Success!');
|
|
||||||
} else {
|
|
||||||
setState(() {});
|
|
||||||
showUploadMessage(
|
|
||||||
context, 'Failed to upload data');
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
text: '',
|
|
||||||
icon: Icon(
|
|
||||||
Icons.photo_camera,
|
|
||||||
color: FlutterFlowTheme.of(context).accent1,
|
|
||||||
size: 30.0,
|
|
||||||
),
|
|
||||||
options: FFButtonOptions(
|
|
||||||
width: 300.0,
|
|
||||||
height: 80.0,
|
|
||||||
padding: const EdgeInsetsDirectional.fromSTEB(
|
|
||||||
0.0, 0.0, 0.0, 0.0),
|
|
||||||
iconPadding: const EdgeInsetsDirectional.fromSTEB(
|
|
||||||
14.0, 0.0, 0.0, 20.0),
|
|
||||||
color: FlutterFlowTheme.of(context)
|
|
||||||
.primaryBackground,
|
|
||||||
textStyle: FlutterFlowTheme.of(context)
|
|
||||||
.titleSmall
|
|
||||||
.override(
|
|
||||||
fontFamily:
|
|
||||||
FlutterFlowTheme.of(context)
|
|
||||||
.titleSmallFamily,
|
|
||||||
color: FlutterFlowTheme.of(context)
|
|
||||||
.primaryText,
|
|
||||||
fontSize: 16.0,
|
|
||||||
letterSpacing: 0.0,
|
|
||||||
useGoogleFonts: GoogleFonts.asMap()
|
|
||||||
.containsKey(
|
|
||||||
FlutterFlowTheme.of(context)
|
|
||||||
.titleSmallFamily),
|
|
||||||
),
|
|
||||||
borderSide: BorderSide(
|
|
||||||
color:
|
|
||||||
FlutterFlowTheme.of(context).accent1,
|
|
||||||
width: 0.5,
|
|
||||||
),
|
|
||||||
borderRadius: BorderRadius.circular(8.0),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
Align(
|
|
||||||
alignment: const AlignmentDirectional(0.0, 0.0),
|
|
||||||
child: Padding(
|
|
||||||
padding: const EdgeInsetsDirectional.fromSTEB(
|
|
||||||
0.0, 50.0, 0.0, 0.0),
|
|
||||||
child: Text(
|
|
||||||
FFLocalizations.of(context).getText(
|
|
||||||
'p4ftwxcy' /* Clique para adicionar a foto p... */,
|
|
||||||
),
|
|
||||||
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),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
);
|
|
||||||
}
|
|
||||||
},
|
|
||||||
),
|
|
||||||
Align(
|
|
||||||
alignment: const AlignmentDirectional(-1.0, 0.0),
|
|
||||||
child: Padding(
|
|
||||||
padding: const EdgeInsetsDirectional.fromSTEB(
|
|
||||||
20.0, 30.0, 0.0, 15.0),
|
|
||||||
child: Text(
|
|
||||||
FFLocalizations.of(context).getText(
|
|
||||||
'zazj5d8b' /* Preencha o formulário com os d... */,
|
|
||||||
),
|
|
||||||
textAlign: TextAlign.start,
|
|
||||||
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(24.0, 0.0, 24.0, 0.0),
|
|
||||||
child: TextFormField(
|
|
||||||
controller: _model.textController1,
|
|
||||||
focusNode: _model.textFieldFocusNode1,
|
|
||||||
autofocus: false,
|
|
||||||
textInputAction: TextInputAction.next,
|
|
||||||
obscureText: false,
|
|
||||||
decoration: InputDecoration(
|
|
||||||
isDense: true,
|
|
||||||
labelText: FFLocalizations.of(context).getText(
|
|
||||||
'v7g73yik' /* Nome */,
|
|
||||||
),
|
|
||||||
labelStyle: FlutterFlowTheme.of(context)
|
|
||||||
.labelMedium
|
|
||||||
.override(
|
|
||||||
fontFamily: FlutterFlowTheme.of(context)
|
|
||||||
.labelMediumFamily,
|
|
||||||
color: FlutterFlowTheme.of(context).primaryText,
|
|
||||||
letterSpacing: 0.0,
|
|
||||||
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
|
||||||
FlutterFlowTheme.of(context)
|
|
||||||
.labelMediumFamily),
|
|
||||||
),
|
|
||||||
hintStyle: FlutterFlowTheme.of(context)
|
|
||||||
.labelMedium
|
|
||||||
.override(
|
|
||||||
fontFamily: FlutterFlowTheme.of(context)
|
|
||||||
.labelMediumFamily,
|
|
||||||
color: FlutterFlowTheme.of(context).primaryText,
|
|
||||||
letterSpacing: 0.0,
|
|
||||||
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
|
||||||
FlutterFlowTheme.of(context)
|
|
||||||
.labelMediumFamily),
|
|
||||||
),
|
|
||||||
enabledBorder: OutlineInputBorder(
|
|
||||||
borderSide: BorderSide(
|
|
||||||
color: FlutterFlowTheme.of(context).customColor6,
|
|
||||||
width: 0.5,
|
|
||||||
),
|
|
||||||
borderRadius: BorderRadius.circular(10.0),
|
|
||||||
),
|
|
||||||
focusedBorder: OutlineInputBorder(
|
|
||||||
borderSide: BorderSide(
|
|
||||||
color: FlutterFlowTheme.of(context).primary,
|
|
||||||
width: 0.5,
|
|
||||||
),
|
|
||||||
borderRadius: BorderRadius.circular(10.0),
|
|
||||||
),
|
|
||||||
errorBorder: OutlineInputBorder(
|
|
||||||
borderSide: BorderSide(
|
|
||||||
color: FlutterFlowTheme.of(context).error,
|
|
||||||
width: 0.5,
|
|
||||||
),
|
|
||||||
borderRadius: BorderRadius.circular(10.0),
|
|
||||||
),
|
|
||||||
focusedErrorBorder: OutlineInputBorder(
|
|
||||||
borderSide: BorderSide(
|
|
||||||
color: FlutterFlowTheme.of(context).error,
|
|
||||||
width: 0.5,
|
|
||||||
),
|
|
||||||
borderRadius: BorderRadius.circular(10.0),
|
|
||||||
),
|
|
||||||
suffixIcon: Icon(
|
|
||||||
Icons.person,
|
|
||||||
color: FlutterFlowTheme.of(context).accent1,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
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),
|
|
||||||
),
|
|
||||||
maxLines: null,
|
|
||||||
keyboardType: TextInputType.name,
|
|
||||||
validator: _model.textController1Validator
|
|
||||||
.asValidator(context),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
Padding(
|
|
||||||
padding:
|
|
||||||
const EdgeInsetsDirectional.fromSTEB(24.0, 0.0, 24.0, 0.0),
|
|
||||||
child: TextFormField(
|
|
||||||
controller: _model.textController2,
|
|
||||||
focusNode: _model.textFieldFocusNode2,
|
|
||||||
autofocus: false,
|
|
||||||
textCapitalization: TextCapitalization.none,
|
|
||||||
textInputAction: TextInputAction.next,
|
|
||||||
obscureText: false,
|
|
||||||
decoration: InputDecoration(
|
|
||||||
isDense: true,
|
|
||||||
labelText: FFLocalizations.of(context).getText(
|
|
||||||
'rl8tvwnr' /* Documento */,
|
|
||||||
),
|
|
||||||
labelStyle: FlutterFlowTheme.of(context)
|
|
||||||
.labelMedium
|
|
||||||
.override(
|
|
||||||
fontFamily: FlutterFlowTheme.of(context)
|
|
||||||
.labelMediumFamily,
|
|
||||||
color: FlutterFlowTheme.of(context).primaryText,
|
|
||||||
letterSpacing: 0.0,
|
|
||||||
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
|
||||||
FlutterFlowTheme.of(context)
|
|
||||||
.labelMediumFamily),
|
|
||||||
),
|
|
||||||
hintStyle: FlutterFlowTheme.of(context)
|
|
||||||
.labelMedium
|
|
||||||
.override(
|
|
||||||
fontFamily: FlutterFlowTheme.of(context)
|
|
||||||
.labelMediumFamily,
|
|
||||||
letterSpacing: 0.0,
|
|
||||||
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
|
||||||
FlutterFlowTheme.of(context)
|
|
||||||
.labelMediumFamily),
|
|
||||||
),
|
|
||||||
enabledBorder: OutlineInputBorder(
|
|
||||||
borderSide: BorderSide(
|
|
||||||
color: FlutterFlowTheme.of(context).customColor6,
|
|
||||||
width: 0.5,
|
|
||||||
),
|
|
||||||
borderRadius: BorderRadius.circular(10.0),
|
|
||||||
),
|
|
||||||
focusedBorder: OutlineInputBorder(
|
|
||||||
borderSide: BorderSide(
|
|
||||||
color: FlutterFlowTheme.of(context).primary,
|
|
||||||
width: 0.5,
|
|
||||||
),
|
|
||||||
borderRadius: BorderRadius.circular(10.0),
|
|
||||||
),
|
|
||||||
errorBorder: OutlineInputBorder(
|
|
||||||
borderSide: BorderSide(
|
|
||||||
color: FlutterFlowTheme.of(context).error,
|
|
||||||
width: 0.5,
|
|
||||||
),
|
|
||||||
borderRadius: BorderRadius.circular(10.0),
|
|
||||||
),
|
|
||||||
focusedErrorBorder: OutlineInputBorder(
|
|
||||||
borderSide: BorderSide(
|
|
||||||
color: FlutterFlowTheme.of(context).error,
|
|
||||||
width: 0.5,
|
|
||||||
),
|
|
||||||
borderRadius: BorderRadius.circular(10.0),
|
|
||||||
),
|
|
||||||
suffixIcon: Icon(
|
|
||||||
Icons.document_scanner,
|
|
||||||
color: FlutterFlowTheme.of(context).accent1,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
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),
|
|
||||||
),
|
|
||||||
validator: _model.textController2Validator
|
|
||||||
.asValidator(context),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
Padding(
|
|
||||||
padding:
|
|
||||||
const EdgeInsetsDirectional.fromSTEB(0.0, 0.0, 0.0, 10.0),
|
|
||||||
child: Container(
|
|
||||||
width: MediaQuery.sizeOf(context).width * 0.95,
|
|
||||||
decoration: const BoxDecoration(),
|
|
||||||
child: Row(
|
|
||||||
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 ??=
|
|
||||||
FormFieldController<String>(null),
|
|
||||||
options: [
|
|
||||||
FFLocalizations.of(context).getText(
|
|
||||||
'n8vddmcq' /* Visitante */,
|
|
||||||
),
|
|
||||||
FFLocalizations.of(context).getText(
|
|
||||||
'9luaa09e' /* Prestador de Serviço */,
|
|
||||||
)
|
|
||||||
],
|
|
||||||
onChanged: (val) =>
|
|
||||||
setState(() => _model.dropDownValue = val),
|
|
||||||
width: 200.0,
|
|
||||||
height: 44.0,
|
|
||||||
textStyle: 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),
|
|
||||||
),
|
|
||||||
hintText: FFLocalizations.of(context).getText(
|
|
||||||
'pmezihb4' /* Selecione... */,
|
|
||||||
),
|
|
||||||
icon: Icon(
|
|
||||||
Icons.keyboard_arrow_down_rounded,
|
|
||||||
color:
|
|
||||||
FlutterFlowTheme.of(context).primaryText,
|
|
||||||
size: 24.0,
|
|
||||||
),
|
|
||||||
elevation: 2.0,
|
|
||||||
borderColor:
|
|
||||||
FlutterFlowTheme.of(context).customColor6,
|
|
||||||
borderWidth: 0.5,
|
|
||||||
borderRadius: 8.0,
|
|
||||||
margin: const EdgeInsetsDirectional.fromSTEB(
|
|
||||||
16.0, 0.0, 16.0, 0.0),
|
|
||||||
hidesUnderline: true,
|
|
||||||
isOverButton: true,
|
|
||||||
isSearchable: false,
|
|
||||||
isMultiSelect: false,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
]
|
|
||||||
.divide(const SizedBox(width: 19.0))
|
|
||||||
.addToStart(const SizedBox(width: 30.0)),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
Align(
|
|
||||||
alignment: const AlignmentDirectional(-1.0, 0.0),
|
|
||||||
child: Padding(
|
|
||||||
padding: const EdgeInsetsDirectional.fromSTEB(
|
|
||||||
20.0, 0.0, 0.0, 15.0),
|
|
||||||
child: Text(
|
|
||||||
FFLocalizations.of(context).getText(
|
|
||||||
'bqpucwh0' /* Contatos */,
|
|
||||||
),
|
|
||||||
textAlign: TextAlign.start,
|
|
||||||
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(24.0, 0.0, 24.0, 0.0),
|
|
||||||
child: TextFormField(
|
|
||||||
controller: _model.textController3,
|
|
||||||
focusNode: _model.textFieldFocusNode3,
|
|
||||||
autofocus: false,
|
|
||||||
textInputAction: TextInputAction.next,
|
|
||||||
obscureText: false,
|
|
||||||
decoration: InputDecoration(
|
|
||||||
isDense: true,
|
|
||||||
labelText: FFLocalizations.of(context).getText(
|
|
||||||
'h84ls2r6' /* Telefone */,
|
|
||||||
),
|
|
||||||
labelStyle: FlutterFlowTheme.of(context)
|
|
||||||
.labelMedium
|
|
||||||
.override(
|
|
||||||
fontFamily: FlutterFlowTheme.of(context)
|
|
||||||
.labelMediumFamily,
|
|
||||||
color: FlutterFlowTheme.of(context).primaryText,
|
|
||||||
letterSpacing: 0.0,
|
|
||||||
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
|
||||||
FlutterFlowTheme.of(context)
|
|
||||||
.labelMediumFamily),
|
|
||||||
),
|
|
||||||
hintStyle: FlutterFlowTheme.of(context)
|
|
||||||
.labelMedium
|
|
||||||
.override(
|
|
||||||
fontFamily: FlutterFlowTheme.of(context)
|
|
||||||
.labelMediumFamily,
|
|
||||||
color: FlutterFlowTheme.of(context).primaryText,
|
|
||||||
letterSpacing: 0.0,
|
|
||||||
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
|
||||||
FlutterFlowTheme.of(context)
|
|
||||||
.labelMediumFamily),
|
|
||||||
),
|
|
||||||
enabledBorder: OutlineInputBorder(
|
|
||||||
borderSide: BorderSide(
|
|
||||||
color: FlutterFlowTheme.of(context).customColor6,
|
|
||||||
width: 0.5,
|
|
||||||
),
|
|
||||||
borderRadius: BorderRadius.circular(10.0),
|
|
||||||
),
|
|
||||||
focusedBorder: OutlineInputBorder(
|
|
||||||
borderSide: BorderSide(
|
|
||||||
color: FlutterFlowTheme.of(context).primary,
|
|
||||||
width: 0.5,
|
|
||||||
),
|
|
||||||
borderRadius: BorderRadius.circular(10.0),
|
|
||||||
),
|
|
||||||
errorBorder: OutlineInputBorder(
|
|
||||||
borderSide: BorderSide(
|
|
||||||
color: FlutterFlowTheme.of(context).error,
|
|
||||||
width: 0.5,
|
|
||||||
),
|
|
||||||
borderRadius: BorderRadius.circular(10.0),
|
|
||||||
),
|
|
||||||
focusedErrorBorder: OutlineInputBorder(
|
|
||||||
borderSide: BorderSide(
|
|
||||||
color: FlutterFlowTheme.of(context).error,
|
|
||||||
width: 0.5,
|
|
||||||
),
|
|
||||||
borderRadius: BorderRadius.circular(10.0),
|
|
||||||
),
|
|
||||||
suffixIcon: Icon(
|
|
||||||
Icons.phone,
|
|
||||||
color: FlutterFlowTheme.of(context).accent1,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
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),
|
|
||||||
),
|
|
||||||
validator: _model.textController3Validator
|
|
||||||
.asValidator(context),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
Padding(
|
|
||||||
padding:
|
|
||||||
const EdgeInsetsDirectional.fromSTEB(24.0, 0.0, 24.0, 0.0),
|
|
||||||
child: TextFormField(
|
|
||||||
controller: _model.textController4,
|
|
||||||
focusNode: _model.textFieldFocusNode4,
|
|
||||||
autofocus: false,
|
|
||||||
textInputAction: TextInputAction.done,
|
|
||||||
obscureText: false,
|
|
||||||
decoration: InputDecoration(
|
|
||||||
isDense: true,
|
|
||||||
labelText: FFLocalizations.of(context).getText(
|
|
||||||
'fqp7qmka' /* Email */,
|
|
||||||
),
|
|
||||||
labelStyle: FlutterFlowTheme.of(context)
|
|
||||||
.labelMedium
|
|
||||||
.override(
|
|
||||||
fontFamily: FlutterFlowTheme.of(context)
|
|
||||||
.labelMediumFamily,
|
|
||||||
color: FlutterFlowTheme.of(context).primaryText,
|
|
||||||
letterSpacing: 0.0,
|
|
||||||
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
|
||||||
FlutterFlowTheme.of(context)
|
|
||||||
.labelMediumFamily),
|
|
||||||
),
|
|
||||||
hintStyle: FlutterFlowTheme.of(context)
|
|
||||||
.labelMedium
|
|
||||||
.override(
|
|
||||||
fontFamily: FlutterFlowTheme.of(context)
|
|
||||||
.labelMediumFamily,
|
|
||||||
color: FlutterFlowTheme.of(context).primaryText,
|
|
||||||
letterSpacing: 0.0,
|
|
||||||
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
|
||||||
FlutterFlowTheme.of(context)
|
|
||||||
.labelMediumFamily),
|
|
||||||
),
|
|
||||||
enabledBorder: OutlineInputBorder(
|
|
||||||
borderSide: BorderSide(
|
|
||||||
color: FlutterFlowTheme.of(context).customColor6,
|
|
||||||
width: 0.5,
|
|
||||||
),
|
|
||||||
borderRadius: BorderRadius.circular(10.0),
|
|
||||||
),
|
|
||||||
focusedBorder: OutlineInputBorder(
|
|
||||||
borderSide: BorderSide(
|
|
||||||
color: FlutterFlowTheme.of(context).primary,
|
|
||||||
width: 0.5,
|
|
||||||
),
|
|
||||||
borderRadius: BorderRadius.circular(10.0),
|
|
||||||
),
|
|
||||||
errorBorder: OutlineInputBorder(
|
|
||||||
borderSide: BorderSide(
|
|
||||||
color: FlutterFlowTheme.of(context).error,
|
|
||||||
width: 0.5,
|
|
||||||
),
|
|
||||||
borderRadius: BorderRadius.circular(10.0),
|
|
||||||
),
|
|
||||||
focusedErrorBorder: OutlineInputBorder(
|
|
||||||
borderSide: BorderSide(
|
|
||||||
color: FlutterFlowTheme.of(context).error,
|
|
||||||
width: 0.5,
|
|
||||||
),
|
|
||||||
borderRadius: BorderRadius.circular(10.0),
|
|
||||||
),
|
|
||||||
suffixIcon: Icon(
|
|
||||||
Icons.email,
|
|
||||||
color: FlutterFlowTheme.of(context).accent1,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
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),
|
|
||||||
),
|
|
||||||
keyboardType: TextInputType.emailAddress,
|
|
||||||
validator: _model.textController4Validator
|
|
||||||
.asValidator(context),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
Align(
|
|
||||||
alignment: const AlignmentDirectional(0.0, 1.0),
|
|
||||||
child: Padding(
|
|
||||||
padding:
|
|
||||||
const EdgeInsetsDirectional.fromSTEB(0.0, 65.0, 0.0, 0.0),
|
|
||||||
child: FFButtonWidget(
|
|
||||||
onPressed: () async {
|
|
||||||
if (((_model.uploadedLocalFile.bytes
|
|
||||||
?.isNotEmpty ??
|
|
||||||
false)) &&
|
|
||||||
(_model.textController1.text != '') &&
|
|
||||||
(_model.dropDownValue != null &&
|
|
||||||
_model.dropDownValue != '') &&
|
|
||||||
(_model.textController2.text != '')) {
|
|
||||||
_model.imgBase64 =
|
|
||||||
await actions.convertImageFileToBase64(
|
|
||||||
_model.uploadedLocalFile,
|
|
||||||
);
|
|
||||||
_model.scheduleVisitor =
|
|
||||||
await PhpGroup.postScheduleVisitorCall.call(
|
|
||||||
devUUID: FFAppState().devUUID,
|
|
||||||
userUUID: FFAppState().userUUID,
|
|
||||||
cliID: FFAppState().cliUUID,
|
|
||||||
atividade: 'putVisitante',
|
|
||||||
documento: '7654553234232342',
|
|
||||||
nome: 'Test',
|
|
||||||
tipo: 'V',
|
|
||||||
foto: 'base64;jpeg,klajsalkjslkajslkajl',
|
|
||||||
);
|
|
||||||
|
|
||||||
if (PhpGroup.postScheduleVisitorCall.error(
|
|
||||||
(_model.scheduleVisitor?.jsonBody ?? ''),
|
|
||||||
) ==
|
|
||||||
false) {
|
|
||||||
setState(() {
|
|
||||||
_model.textController1?.clear();
|
|
||||||
_model.textController2?.clear();
|
|
||||||
_model.textController3?.clear();
|
|
||||||
_model.textController4?.clear();
|
|
||||||
});
|
|
||||||
setState(() {
|
|
||||||
_model.dropDownValueController?.reset();
|
|
||||||
});
|
|
||||||
} 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:
|
|
||||||
'\\devUUID=${FFAppState().devUUID}\\userUUID=${FFAppState().userUUID}\\cliID=${FFAppState().cliUUID}\\Documento=${_model.textController2.text}\\Nome=${_model.textController1.text}\\dropdown${_model.dropDownValue}\\${PhpGroup.postScheduleVisitorCall.errorMsg(
|
|
||||||
(_model.scheduleVisitor?.jsonBody ??
|
|
||||||
''),
|
|
||||||
)}',
|
|
||||||
),
|
|
||||||
),
|
|
||||||
);
|
|
||||||
},
|
|
||||||
).then((value) => safeSetState(() {}));
|
|
||||||
}
|
|
||||||
} 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:
|
|
||||||
'Você esqueceu de adicionar algum dado obrigatório. Verifique se a imagem, nome, tipo e documento estão foram preenchidos corretamente.- devUUID=${FFAppState().devUUID}- userUUID=${FFAppState().userUUID}- cliID=${FFAppState().cliUUID}- Documento=${_model.textController2.text}- Nome=${_model.textController1.text}- Tipo=${_model.dropDownValue}',
|
|
||||||
),
|
|
||||||
),
|
|
||||||
);
|
|
||||||
},
|
|
||||||
).then((value) => safeSetState(() {}));
|
|
||||||
}
|
|
||||||
|
|
||||||
setState(() {});
|
|
||||||
},
|
|
||||||
text: FFLocalizations.of(context).getText(
|
|
||||||
'okbw0aiu' /* Cadastrar */,
|
|
||||||
),
|
|
||||||
options: FFButtonOptions(
|
|
||||||
width: 250.0,
|
|
||||||
height: 36.0,
|
|
||||||
padding: const EdgeInsetsDirectional.fromSTEB(
|
|
||||||
80.0, 0.0, 80.0, 0.0),
|
|
||||||
iconPadding: const EdgeInsetsDirectional.fromSTEB(
|
|
||||||
0.0, 0.0, 0.0, 0.0),
|
|
||||||
color: FlutterFlowTheme.of(context).primary,
|
|
||||||
textStyle: FlutterFlowTheme.of(context)
|
|
||||||
.titleSmall
|
|
||||||
.override(
|
|
||||||
fontFamily: FlutterFlowTheme.of(context)
|
|
||||||
.titleSmallFamily,
|
|
||||||
color: FlutterFlowTheme.of(context).info,
|
|
||||||
letterSpacing: 0.0,
|
|
||||||
useGoogleFonts: GoogleFonts.asMap()
|
|
||||||
.containsKey(FlutterFlowTheme.of(context)
|
|
||||||
.titleSmallFamily),
|
|
||||||
),
|
|
||||||
borderSide: const BorderSide(
|
|
||||||
color: Colors.transparent,
|
|
||||||
width: 30.0,
|
|
||||||
),
|
|
||||||
borderRadius: const BorderRadius.only(
|
|
||||||
bottomLeft: Radius.circular(15.0),
|
|
||||||
bottomRight: Radius.circular(15.0),
|
|
||||||
topLeft: Radius.circular(15.0),
|
|
||||||
topRight: Radius.circular(15.0),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
]
|
|
||||||
.divide(const SizedBox(height: 10.0))
|
|
||||||
.addToStart(const SizedBox(height: 30.0)),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
),
|
||||||
|
style: FlutterFlowTheme.of(context).headlineMedium.override(
|
||||||
|
fontFamily: FlutterFlowTheme.of(context).headlineMediumFamily,
|
||||||
|
color: FlutterFlowTheme.of(context).primaryText,
|
||||||
|
fontSize: 15.0,
|
||||||
|
letterSpacing: 0.0,
|
||||||
|
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
||||||
|
FlutterFlowTheme.of(context).headlineMediumFamily),
|
||||||
|
),
|
||||||
),
|
),
|
||||||
|
actions: const [],
|
||||||
|
centerTitle: true,
|
||||||
|
elevation: 0.0,
|
||||||
),
|
),
|
||||||
|
body: const SafeArea(
|
||||||
|
top: true,
|
||||||
|
child: RegisiterVistorTemplateComponentWidget(
|
||||||
|
source: 'RegisterVisitorPage',
|
||||||
|
)),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -4,7 +4,6 @@ import 'package:hub/flutter_flow/flutter_flow_model.dart';
|
||||||
import 'package:hub/flutter_flow/form_field_controller.dart';
|
import 'package:hub/flutter_flow/form_field_controller.dart';
|
||||||
import 'package:hub/flutter_flow/request_manager.dart';
|
import 'package:hub/flutter_flow/request_manager.dart';
|
||||||
|
|
||||||
|
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:hub/pages/schedule_complete_visit_page/schedule_complete_visit_page_widget.dart';
|
import 'package:hub/pages/schedule_complete_visit_page/schedule_complete_visit_page_widget.dart';
|
||||||
|
|
||||||
|
@ -51,6 +50,7 @@ class ScheduleCompleteVisitPageModel
|
||||||
FocusNode? textFieldFocusNode1;
|
FocusNode? textFieldFocusNode1;
|
||||||
TextEditingController? textController1;
|
TextEditingController? textController1;
|
||||||
String? Function(BuildContext, String?)? textController1Validator;
|
String? Function(BuildContext, String?)? textController1Validator;
|
||||||
|
|
||||||
DateTime? datePicked1;
|
DateTime? datePicked1;
|
||||||
// State field(s) for TextField widget.
|
// State field(s) for TextField widget.
|
||||||
FocusNode? textFieldFocusNode2;
|
FocusNode? textFieldFocusNode2;
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
import 'dart:developer';
|
import 'dart:developer';
|
||||||
|
|
||||||
|
|
||||||
import 'package:auto_size_text/auto_size_text.dart';
|
import 'package:auto_size_text/auto_size_text.dart';
|
||||||
import 'package:cached_network_image/cached_network_image.dart';
|
import 'package:cached_network_image/cached_network_image.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
@ -24,7 +23,6 @@ import 'package:hub/flutter_flow/nav/nav.dart';
|
||||||
import 'package:hub/pages/schedule_complete_visit_page/schedule_complete_visit_page_model.dart';
|
import 'package:hub/pages/schedule_complete_visit_page/schedule_complete_visit_page_model.dart';
|
||||||
import 'package:provider/provider.dart';
|
import 'package:provider/provider.dart';
|
||||||
|
|
||||||
|
|
||||||
class ScheduleCompleteVisitPageWidget extends StatefulWidget {
|
class ScheduleCompleteVisitPageWidget extends StatefulWidget {
|
||||||
const ScheduleCompleteVisitPageWidget({
|
const ScheduleCompleteVisitPageWidget({
|
||||||
super.key,
|
super.key,
|
||||||
|
@ -111,7 +109,7 @@ class _ScheduleCompleteVisitPageWidgetState
|
||||||
// Simulate fetching data from an API or database
|
// Simulate fetching data from an API or database
|
||||||
Future<List<String>> fetchVisitHistory(int start, int limit) async {
|
Future<List<String>> fetchVisitHistory(int start, int limit) async {
|
||||||
// Simulate network delay
|
// Simulate network delay
|
||||||
await Future.delayed(Duration(seconds: 1));
|
await Future.delayed(const Duration(seconds: 1));
|
||||||
// Generate a list of visit history items
|
// Generate a list of visit history items
|
||||||
return List.generate(limit, (index) => "Item ${start + index}");
|
return List.generate(limit, (index) => "Item ${start + index}");
|
||||||
}
|
}
|
||||||
|
@ -163,7 +161,6 @@ class _ScheduleCompleteVisitPageWidgetState
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
PreferredSizeWidget appBarScheduleCompleteVisit(BuildContext context) {
|
PreferredSizeWidget appBarScheduleCompleteVisit(BuildContext context) {
|
||||||
return AppBar(
|
return AppBar(
|
||||||
backgroundColor: FlutterFlowTheme.of(context).primaryBackground,
|
backgroundColor: FlutterFlowTheme.of(context).primaryBackground,
|
||||||
|
@ -315,8 +312,8 @@ Widget scheduleVisit(
|
||||||
padding: const EdgeInsets.fromLTRB(
|
padding: const EdgeInsets.fromLTRB(
|
||||||
0,
|
0,
|
||||||
0,
|
0,
|
||||||
0,
|
20,
|
||||||
20.0,
|
20,
|
||||||
),
|
),
|
||||||
shrinkWrap: true,
|
shrinkWrap: true,
|
||||||
scrollDirection: Axis.vertical,
|
scrollDirection: Axis.vertical,
|
||||||
|
@ -362,14 +359,16 @@ Widget scheduleVisit(
|
||||||
setState(() {});
|
setState(() {});
|
||||||
},
|
},
|
||||||
child: Container(
|
child: Container(
|
||||||
width: 100.0,
|
width: MediaQuery.of(context).size.width,
|
||||||
height: 70.0,
|
height: 70.0,
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
color: FlutterFlowTheme.of(context)
|
color: FlutterFlowTheme.of(context)
|
||||||
.secondaryBackground,
|
.primaryBackground,
|
||||||
),
|
),
|
||||||
child: Row(
|
child: Row(
|
||||||
mainAxisSize: MainAxisSize.max,
|
mainAxisSize: MainAxisSize.max,
|
||||||
|
mainAxisAlignment:
|
||||||
|
MainAxisAlignment.spaceBetween,
|
||||||
children: [
|
children: [
|
||||||
Container(
|
Container(
|
||||||
width: 50.0,
|
width: 50.0,
|
||||||
|
@ -393,57 +392,35 @@ Widget scheduleVisit(
|
||||||
fit: BoxFit.cover,
|
fit: BoxFit.cover,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
Column(
|
Text(
|
||||||
mainAxisSize: MainAxisSize.max,
|
getJsonField(
|
||||||
mainAxisAlignment:
|
visitorListViewItem,
|
||||||
MainAxisAlignment.center,
|
r'''$.VTE_NOME''',
|
||||||
children: [
|
).toString(),
|
||||||
Text(
|
style: FlutterFlowTheme.of(context)
|
||||||
getJsonField(
|
.bodyMedium
|
||||||
visitorListViewItem,
|
.override(
|
||||||
r'''$.VTE_NOME''',
|
fontFamily:
|
||||||
).toString(),
|
FlutterFlowTheme.of(
|
||||||
style:
|
context)
|
||||||
FlutterFlowTheme.of(context)
|
.bodyMediumFamily,
|
||||||
.bodyMedium
|
letterSpacing: 0.0,
|
||||||
.override(
|
useGoogleFonts: GoogleFonts
|
||||||
fontFamily:
|
.asMap()
|
||||||
FlutterFlowTheme.of(
|
.containsKey(
|
||||||
context)
|
FlutterFlowTheme.of(
|
||||||
.bodyMediumFamily,
|
context)
|
||||||
letterSpacing: 0.0,
|
.bodyMediumFamily),
|
||||||
useGoogleFonts: GoogleFonts
|
),
|
||||||
.asMap()
|
|
||||||
.containsKey(
|
|
||||||
FlutterFlowTheme.of(
|
|
||||||
context)
|
|
||||||
.bodyMediumFamily),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
Text(
|
|
||||||
getJsonField(
|
|
||||||
visitorListViewItem,
|
|
||||||
r'''$.VTE_TIPO''',
|
|
||||||
).toString(),
|
|
||||||
style:
|
|
||||||
FlutterFlowTheme.of(context)
|
|
||||||
.bodyMedium
|
|
||||||
.override(
|
|
||||||
fontFamily:
|
|
||||||
FlutterFlowTheme.of(
|
|
||||||
context)
|
|
||||||
.bodyMediumFamily,
|
|
||||||
letterSpacing: 0.0,
|
|
||||||
useGoogleFonts: GoogleFonts
|
|
||||||
.asMap()
|
|
||||||
.containsKey(
|
|
||||||
FlutterFlowTheme.of(
|
|
||||||
context)
|
|
||||||
.bodyMediumFamily),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
),
|
||||||
|
IconButton(
|
||||||
|
onPressed: () async {
|
||||||
|
_model
|
||||||
|
.removeFromVisitorJsonList(
|
||||||
|
visitorListViewItem);
|
||||||
|
setState(() {});
|
||||||
|
},
|
||||||
|
icon: const Icon(Icons.close)),
|
||||||
]
|
]
|
||||||
.divide(const SizedBox(width: 30.0))
|
.divide(const SizedBox(width: 30.0))
|
||||||
.addToStart(
|
.addToStart(
|
||||||
|
@ -466,10 +443,11 @@ Widget scheduleVisit(
|
||||||
onPressed: () async {
|
onPressed: () async {
|
||||||
await showModalBottomSheet(
|
await showModalBottomSheet(
|
||||||
isScrollControlled: true,
|
isScrollControlled: true,
|
||||||
|
isDismissible: true,
|
||||||
backgroundColor:
|
backgroundColor:
|
||||||
FlutterFlowTheme.of(context)
|
FlutterFlowTheme.of(context)
|
||||||
.primaryBackground,
|
.primaryBackground,
|
||||||
enableDrag: false,
|
enableDrag: true,
|
||||||
context: context,
|
context: context,
|
||||||
builder: (context) {
|
builder: (context) {
|
||||||
return GestureDetector(
|
return GestureDetector(
|
||||||
|
@ -480,25 +458,34 @@ Widget scheduleVisit(
|
||||||
_model.unfocusNode)
|
_model.unfocusNode)
|
||||||
: FocusScope.of(context)
|
: FocusScope.of(context)
|
||||||
.unfocus(),
|
.unfocus(),
|
||||||
child: Padding(
|
child: SizedBox(
|
||||||
padding: MediaQuery.viewInsetsOf(
|
height: MediaQuery.of(context)
|
||||||
context),
|
.size
|
||||||
child:
|
.height *
|
||||||
VisitorSearchModalTemplateComponentWidget(
|
0.9,
|
||||||
getVisitors:
|
width: MediaQuery.of(context)
|
||||||
(visitorsParam) async {
|
.size
|
||||||
_model.visitorJsonList =
|
.width,
|
||||||
visitorsParam!
|
child: Padding(
|
||||||
.toList()
|
padding: MediaQuery.viewInsetsOf(
|
||||||
.cast<dynamic>();
|
context),
|
||||||
setState(() {});
|
child:
|
||||||
},
|
VisitorSearchModalTemplateComponentWidget(
|
||||||
getDocs: (docsParam) async {
|
getVisitors:
|
||||||
_model.visitorStrList =
|
(visitorsParam) async {
|
||||||
strListToStr(
|
_model.visitorJsonList =
|
||||||
docsParam!.toList());
|
visitorsParam!
|
||||||
setState(() {});
|
.toList()
|
||||||
},
|
.cast<dynamic>();
|
||||||
|
setState(() {});
|
||||||
|
},
|
||||||
|
getDocs: (docsParam) async {
|
||||||
|
_model.visitorStrList =
|
||||||
|
strListToStr(
|
||||||
|
docsParam!.toList());
|
||||||
|
setState(() {});
|
||||||
|
},
|
||||||
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
@ -801,7 +788,7 @@ Widget scheduleVisit(
|
||||||
pickerBackgroundColor:
|
pickerBackgroundColor:
|
||||||
FlutterFlowTheme.of(
|
FlutterFlowTheme.of(
|
||||||
context)
|
context)
|
||||||
.secondaryBackground,
|
.primaryBackground,
|
||||||
pickerForegroundColor:
|
pickerForegroundColor:
|
||||||
FlutterFlowTheme.of(
|
FlutterFlowTheme.of(
|
||||||
context)
|
context)
|
||||||
|
@ -868,7 +855,7 @@ Widget scheduleVisit(
|
||||||
pickerBackgroundColor:
|
pickerBackgroundColor:
|
||||||
FlutterFlowTheme.of(
|
FlutterFlowTheme.of(
|
||||||
context)
|
context)
|
||||||
.secondaryBackground,
|
.primaryBackground,
|
||||||
pickerForegroundColor:
|
pickerForegroundColor:
|
||||||
FlutterFlowTheme.of(
|
FlutterFlowTheme.of(
|
||||||
context)
|
context)
|
||||||
|
@ -1125,7 +1112,7 @@ Widget scheduleVisit(
|
||||||
pickerBackgroundColor:
|
pickerBackgroundColor:
|
||||||
FlutterFlowTheme.of(
|
FlutterFlowTheme.of(
|
||||||
context)
|
context)
|
||||||
.secondaryBackground,
|
.primaryBackground,
|
||||||
pickerForegroundColor:
|
pickerForegroundColor:
|
||||||
FlutterFlowTheme.of(
|
FlutterFlowTheme.of(
|
||||||
context)
|
context)
|
||||||
|
@ -1192,7 +1179,7 @@ Widget scheduleVisit(
|
||||||
pickerBackgroundColor:
|
pickerBackgroundColor:
|
||||||
FlutterFlowTheme.of(
|
FlutterFlowTheme.of(
|
||||||
context)
|
context)
|
||||||
.secondaryBackground,
|
.primaryBackground,
|
||||||
pickerForegroundColor:
|
pickerForegroundColor:
|
||||||
FlutterFlowTheme.of(
|
FlutterFlowTheme.of(
|
||||||
context)
|
context)
|
||||||
|
@ -1563,12 +1550,58 @@ Widget scheduleVisit(
|
||||||
onChanged: (newValue) async {
|
onChanged: (newValue) async {
|
||||||
setState(() => _model.switchValue = newValue);
|
setState(() => _model.switchValue = newValue);
|
||||||
},
|
},
|
||||||
|
applyCupertinoTheme: false,
|
||||||
|
focusColor:
|
||||||
|
FlutterFlowTheme.of(context).primary,
|
||||||
|
trackColor: WidgetStateProperty.resolveWith(
|
||||||
|
(states) {
|
||||||
|
if (states.contains(WidgetState.disabled)) {
|
||||||
|
return FlutterFlowTheme.of(context)
|
||||||
|
.alternate;
|
||||||
|
}
|
||||||
|
return FlutterFlowTheme.of(context)
|
||||||
|
.alternate;
|
||||||
|
},
|
||||||
|
),
|
||||||
|
hoverColor: FlutterFlowTheme.of(context)
|
||||||
|
.primaryBackground,
|
||||||
|
// thumbColor: WidgetStateColor.resolveWith(
|
||||||
|
// (states) {
|
||||||
|
// if (states.contains(WidgetState.disabled)) {
|
||||||
|
// return FlutterFlowTheme.of(context)
|
||||||
|
// .alternate;
|
||||||
|
// }
|
||||||
|
// return FlutterFlowTheme.of(context)
|
||||||
|
// .alternate;
|
||||||
|
// },
|
||||||
|
// ),
|
||||||
|
overlayColor: WidgetStateProperty.resolveWith(
|
||||||
|
(states) {
|
||||||
|
if (states.contains(WidgetState.disabled)) {
|
||||||
|
return FlutterFlowTheme.of(context)
|
||||||
|
.accent4;
|
||||||
|
}
|
||||||
|
return FlutterFlowTheme.of(context)
|
||||||
|
.primaryBackground;
|
||||||
|
},
|
||||||
|
),
|
||||||
|
trackOutlineColor:
|
||||||
|
WidgetStateProperty.resolveWith(
|
||||||
|
(states) {
|
||||||
|
if (states.contains(WidgetState.disabled)) {
|
||||||
|
return FlutterFlowTheme.of(context)
|
||||||
|
.accent4;
|
||||||
|
}
|
||||||
|
return FlutterFlowTheme.of(context)
|
||||||
|
.primaryBackground;
|
||||||
|
},
|
||||||
|
),
|
||||||
activeColor:
|
activeColor:
|
||||||
FlutterFlowTheme.of(context).success,
|
FlutterFlowTheme.of(context).success,
|
||||||
activeTrackColor:
|
activeTrackColor: FlutterFlowTheme.of(context)
|
||||||
FlutterFlowTheme.of(context).customColor4,
|
.primaryBackground,
|
||||||
inactiveTrackColor:
|
inactiveTrackColor: FlutterFlowTheme.of(context)
|
||||||
FlutterFlowTheme.of(context).customColor4,
|
.primaryBackground,
|
||||||
inactiveThumbColor:
|
inactiveThumbColor:
|
||||||
FlutterFlowTheme.of(context).error,
|
FlutterFlowTheme.of(context).error,
|
||||||
),
|
),
|
||||||
|
@ -1792,11 +1825,10 @@ Widget scheduleVisit(
|
||||||
alignment: const AlignmentDirectional(0.0, 1.0),
|
alignment: const AlignmentDirectional(0.0, 1.0),
|
||||||
child: Align(
|
child: Align(
|
||||||
alignment: const AlignmentDirectional(0.0, 0.0),
|
alignment: const AlignmentDirectional(0.0, 0.0),
|
||||||
child: Icon(
|
child: Text(FFLocalizations.of(context).getVariableText(
|
||||||
Icons.save_alt,
|
enText: 'Schedule',
|
||||||
color: FlutterFlowTheme.of(context).info,
|
ptText: 'Agendar',
|
||||||
size: 24.0,
|
)),
|
||||||
),
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
@ -1937,10 +1969,10 @@ Widget visitHistory(
|
||||||
r'''$.VAW_OBS''',
|
r'''$.VAW_OBS''',
|
||||||
).toString(),
|
).toString(),
|
||||||
visitorImgPath: valueOrDefault<String>(
|
visitorImgPath: valueOrDefault<String>(
|
||||||
'https://freaccess.com.br/freaccess/getImage.php?devUUID=${FFAppState().devUUID}&userUUID=${FFAppState().userUUID}&cliID=${FFAppState().cliUUID}&atividade=getFoto&Documento=${getJsonField(
|
"https://freaccess.com.br/freaccess/getImage.php?devUUID=${FFAppState().devUUID}&userUUID=${FFAppState().userUUID}&cliID=${FFAppState().cliUUID}&atividade=getFoto&Documento=${getJsonField(
|
||||||
visitaWrapItem,
|
visitaWrapItem,
|
||||||
r'''$.VTE_DOCUMENTO''',
|
r'''$.VTE_DOCUMENTO''',
|
||||||
).toString()}&tipo=E',
|
).toString()}&tipo=E",
|
||||||
'https://storage.googleapis.com/flutterflow-io-6f20.appspot.com/projects/flutter-freaccess-hub-0xgz9q/assets/7ftdetkzc3s0/360_F_64676383_LdbmhiNM6Ypzb3FM4PPuFP9rHe7ri8Ju.jpg',
|
'https://storage.googleapis.com/flutterflow-io-6f20.appspot.com/projects/flutter-freaccess-hub-0xgz9q/assets/7ftdetkzc3s0/360_F_64676383_LdbmhiNM6Ypzb3FM4PPuFP9rHe7ri8Ju.jpg',
|
||||||
),
|
),
|
||||||
visitorStrList: getJsonField(
|
visitorStrList: getJsonField(
|
||||||
|
@ -1972,8 +2004,8 @@ Widget visitHistory(
|
||||||
},
|
},
|
||||||
child: Card(
|
child: Card(
|
||||||
clipBehavior: Clip.antiAliasWithSaveLayer,
|
clipBehavior: Clip.antiAliasWithSaveLayer,
|
||||||
color: FlutterFlowTheme.of(context)
|
color:
|
||||||
.secondaryBackground,
|
FlutterFlowTheme.of(context).primaryBackground,
|
||||||
elevation: 5.0,
|
elevation: 5.0,
|
||||||
shape: RoundedRectangleBorder(
|
shape: RoundedRectangleBorder(
|
||||||
borderRadius: BorderRadius.circular(8.0),
|
borderRadius: BorderRadius.circular(8.0),
|
||||||
|
@ -1983,7 +2015,7 @@ Widget visitHistory(
|
||||||
height: 115.0,
|
height: 115.0,
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
color: FlutterFlowTheme.of(context)
|
color: FlutterFlowTheme.of(context)
|
||||||
.secondaryBackground,
|
.primaryBackground,
|
||||||
),
|
),
|
||||||
child: Row(
|
child: Row(
|
||||||
mainAxisSize: MainAxisSize.max,
|
mainAxisSize: MainAxisSize.max,
|
||||||
|
@ -2193,8 +2225,8 @@ Widget visitHistory(
|
||||||
return FlutterFlowTheme
|
return FlutterFlowTheme
|
||||||
.of(context)
|
.of(context)
|
||||||
.success;
|
.success;
|
||||||
} else if (( jsonToStr(
|
} else if ((jsonToStr(
|
||||||
getJsonField(
|
getJsonField(
|
||||||
visitaWrapItem,
|
visitaWrapItem,
|
||||||
r'''$.VAW_STATUS''',
|
r'''$.VAW_STATUS''',
|
||||||
)) ==
|
)) ==
|
||||||
|
@ -2220,9 +2252,8 @@ Widget visitHistory(
|
||||||
return FlutterFlowTheme
|
return FlutterFlowTheme
|
||||||
.of(context)
|
.of(context)
|
||||||
.error;
|
.error;
|
||||||
} else if (
|
} else if (jsonToStr(
|
||||||
jsonToStr(
|
getJsonField(
|
||||||
getJsonField(
|
|
||||||
visitaWrapItem,
|
visitaWrapItem,
|
||||||
r'''$.VAW_STATUS''',
|
r'''$.VAW_STATUS''',
|
||||||
)) ==
|
)) ==
|
||||||
|
@ -2261,9 +2292,8 @@ Widget visitHistory(
|
||||||
ptText: 'Ativo',
|
ptText: 'Ativo',
|
||||||
enText: 'Active',
|
enText: 'Active',
|
||||||
);
|
);
|
||||||
} else if ((
|
} else if ((jsonToStr(
|
||||||
jsonToStr(
|
getJsonField(
|
||||||
getJsonField(
|
|
||||||
visitaWrapItem,
|
visitaWrapItem,
|
||||||
r'''$.VAW_STATUS''',
|
r'''$.VAW_STATUS''',
|
||||||
)) ==
|
)) ==
|
||||||
|
@ -2360,6 +2390,4 @@ Widget visitHistory(
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
Loading…
Reference in New Issue