WIP
This commit is contained in:
parent
2028ab996d
commit
939a6291e6
|
@ -186,19 +186,23 @@ class _AppState extends State<App> {
|
|||
Future<void> initDeepLinks() async {
|
||||
_appLinks = AppLinks();
|
||||
_linkSubscription = _appLinks.uriLinkStream.listen((uri) {
|
||||
final bool isRecovered = !StorageUtil().isRecovered;
|
||||
if (isRecovered) openAppLink(uri);
|
||||
final bool isRecovered = StorageUtil().isRecovered;
|
||||
if (!isRecovered) openAppLink(uri);
|
||||
});
|
||||
}
|
||||
void openAppLink(Uri uri) {
|
||||
final bool isRecovered = StorageUtil().isRecovered;
|
||||
log('isRecovered: $isRecovered');
|
||||
if (isRecovered) return;
|
||||
StorageUtil().isRecovered = true;
|
||||
|
||||
final String email = uri.queryParameters['email'] ?? '';
|
||||
final String token = uri.queryParameters['token'] ?? '';
|
||||
|
||||
final bool isNotEmpty = email.isNotEmpty && token.isNotEmpty;
|
||||
|
||||
|
||||
|
||||
|
||||
if (isNotEmpty ) {
|
||||
final BuildContext context = StorageUtil().context!;
|
||||
final MediaQueryData mediaQuery = MediaQuery.of(context);
|
||||
|
@ -206,20 +210,17 @@ class _AppState extends State<App> {
|
|||
final FlutterFlowTheme theme = FlutterFlowTheme.of(context);
|
||||
final Widget screen = ForgotPasswordScreen(email: email, token: token);
|
||||
builder(context) => screen;
|
||||
WidgetsBinding.instance.addPersistentFrameCallback((_) {
|
||||
showModalBottomSheet(
|
||||
context: context,
|
||||
builder: (context) =>
|
||||
SizedBox(height: height, child: builder(context)),
|
||||
builder: (context) => SizedBox(height: height, child: builder(context)),
|
||||
isScrollControlled: true,
|
||||
showDragHandle: true,
|
||||
barrierColor: theme.primaryText.withOpacity(0.2),
|
||||
barrierColor: theme.primaryBackground.withOpacity(0.2),
|
||||
backgroundColor: theme.primaryBackground,
|
||||
useSafeArea: true,
|
||||
enableDrag: true,
|
||||
isDismissible: true,
|
||||
).then((_) => StorageUtil().isRecovered = false);
|
||||
});
|
||||
}
|
||||
}
|
||||
void _setupFirebaseMessaging() async {
|
||||
|
|
|
@ -136,6 +136,8 @@ class _ForgotPasswordScreenState extends State<ForgotPasswordScreen> with Ticker
|
|||
enText: 'What will be your new password? Enter it below and confirm.',
|
||||
);
|
||||
return SafeArea(
|
||||
child: Container(
|
||||
color: FlutterFlowTheme.of(context).primaryBackground,
|
||||
child: SingleChildScrollView(
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.only(bottom: 20.0), // Adiciona espaçamento inferior
|
||||
|
@ -251,17 +253,10 @@ class _ForgotPasswordScreenState extends State<ForgotPasswordScreen> with Ticker
|
|||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
Widget _buildPasswordField(BuildContext context,
|
||||
{
|
||||
required TextEditingController? controller,
|
||||
required FocusNode? focusNode,
|
||||
required bool visibility,
|
||||
required VoidCallback onVisibilityToggle,
|
||||
required String hint,
|
||||
required String label,
|
||||
}){
|
||||
Widget _buildPasswordField(BuildContext context, {required TextEditingController? controller, required FocusNode? focusNode, required bool visibility, required VoidCallback onVisibilityToggle, required String hint, required String label,}) {
|
||||
return Padding(
|
||||
padding: const EdgeInsetsDirectional.fromSTEB(0.0, 0.0, 0.0, 16.0),
|
||||
child: SizedBox(
|
||||
|
@ -331,4 +326,5 @@ class _ForgotPasswordScreenState extends State<ForgotPasswordScreen> with Ticker
|
|||
);
|
||||
}
|
||||
|
||||
|
||||
}
|
Loading…
Reference in New Issue