1/13
Comprehensive flashcards covering the architecture, routing, Firebase integration, and UI features of the Poetica Flutter application.
What is the role of the PoeticaApp class in the Poetica application?
It is the root application widget that configures the global theme (such as seedColor: AppColors.green and useMaterial3: true) and sets the initial navigation route to SplashScreen.
What are the defined static colors in the AppColors class?
cream: Color(0xFFFBF3E3), sage: Color(0xFFB9C6AC), green: Color(0xFF4F6C4F), dark: Color(0xFF1F2A1F), muted: Color(0xFF5B5B4F), and border: Color(0xFF3A3A30).
How does SplashScreen handle user routing upon launch?
It waits for a 2-second delay (Duration(seconds: 2)) and checks FirebaseAuth.instance.currentUser; if the user is logged in, it routes to Library, and if not, it routes to IntroScreen.
What are the three onboarding pages presented in IntroScreen?
How do the navigation buttons on WelcomeScreen route the user?
The 'Login' button navigates to AuthScreen with isSignUp: false, while the 'Sign-up' button navigates to AuthScreen with isSignUp: true.
Which Firebase Auth methods are called in continueToLibrary within AuthScreen?
FirebaseAuth.instance.createUserWithEmailAndPassword() when isSignUp is true, and FirebaseAuth.instance.signInWithEmailAndPassword() when isSignUp is false.
Which specific FirebaseAuthException error codes are handled in ForgotPasswordScreen?
'invalid-email', 'user-not-found', and 'too-many-requests'.
What options are available in the ProfileBar widget's PopupMenuButton, and what action do they trigger?
'switch' ('Switch account') and 'logout' ('Log out'); both prompt an AlertDialog confirmation, call FirebaseAuth.instance.signOut(), and redirect to WelcomeScreen.
How does the Library widget query Cloud Firestore for poems?
It queries the 'poems' collection filtered by the current user's ID: FirebaseFirestore.instance.collection('poems').where('userId', isEqualTo: user.uid).snapshots().
Where are poem .txt files saved on Android by downloadPoemAsTxt?
Directory('/storage/emulated/0/Download') under the filename pattern '{fileName}_timestamp.txt'.
How is word count computed in CreatePoemScreen?
By trimming poemController.text and running text.split(RegExp(r'\s+')).length (returning 0 if the text is empty).
What endpoint does fetchWordFromApi query to retrieve definitions in CreatePoemScreen?
The Urban Dictionary REST API: 'https://api.urbandictionary.com/v0/define?term=${query.trim()}'.
What general words does showWritingTips suggest replacing in CreatePoemScreen?
Words matching the regular expression RegExp(r'\b(very|really|good|bad|nice)\b', caseSensitive: false).
What data fields are stored in Cloud Firestore when creating a new poem document in CreatePoemScreen?
'userId', 'title', 'content', 'isFavorite', 'updatedAt', and 'createdAt'.