Created
February 21, 2024 20:16
-
-
Save dmslabsbr/31b9fb957d7b815d338d6a622d5ffbc3 to your computer and use it in GitHub Desktop.
Useful Custom Action to help debug Flutterflow code.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Automatic FlutterFlow imports | |
import '/backend/schema/structs/index.dart'; | |
import '/backend/supabase/supabase.dart'; | |
import '/flutter_flow/flutter_flow_theme.dart'; | |
import '/flutter_flow/flutter_flow_util.dart'; | |
import '/custom_code/actions/index.dart'; // Imports other custom actions | |
import '/flutter_flow/custom_functions.dart'; // Imports custom functions | |
import 'package:flutter/material.dart'; | |
// Begin custom action code | |
// DO NOT REMOVE OR MODIFY THE CODE ABOVE! | |
/** | |
imprimime no console o valor de uma váriavel | |
*/ | |
Future printVar(String? valor) async { | |
//TODO: Contar os prints e opção de timestamp | |
print(valor ?? "null"); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Automatic FlutterFlow imports | |
import '/backend/schema/structs/index.dart'; | |
import '/backend/supabase/supabase.dart'; | |
import '/flutter_flow/flutter_flow_theme.dart'; | |
import '/flutter_flow/flutter_flow_util.dart'; | |
import '/custom_code/actions/index.dart'; // Imports other custom actions | |
import '/flutter_flow/custom_functions.dart'; // Imports custom functions | |
import 'package:flutter/material.dart'; | |
// Begin custom action code | |
// DO NOT REMOVE OR MODIFY THE CODE ABOVE! | |
Future printVar2( | |
String? tag, | |
String? varName, | |
String? valor, | |
) async { | |
// Add your function code here! | |
// necessario criar um appState printLogId - Int <====== Atenção | |
String nTag = tag ?? ""; | |
String nVarName = varName ?? ""; | |
String nVal = valor ?? "null"; | |
int logId = FFAppState().printLogId; | |
logId++; | |
FFAppState().update(() { | |
FFAppState().printLogId = logId; | |
}); | |
print('$logId : $nTag, $nVarName => $nVal'); | |
} |
Author
dmslabsbr
commented
Feb 21, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment