Poetica Flutter Application Architecture and Implementation

0.0(0)
Studied by 0 people
call kaiCall Kai
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
GameKnowt Play
Card Sorting

1/13

flashcard set

Earn XP

Description and Tags

Comprehensive flashcards covering the architecture, routing, Firebase integration, and UI features of the Poetica Flutter application.

14 Terms

1
New cards

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.

2
New cards

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).

3
New cards

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.

4
New cards

What are the three onboarding pages presented in IntroScreen?

  1. 'Welcome to Poetica' ('A simple space where you can write, improve, and explore your words.') with Icons.menu_book_rounded; 2. 'Improve Your Sentences' ('Poetica helps you improve your sentences and make your ideas clearer.') with Icons.edit_rounded; 3. 'Discover New Words' ('Poetica can help you explore definitions for unfamiliar words while you write.') with Icons.auto_stories_rounded.
5
New cards

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.

6
New cards

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.

7
New cards

Which specific FirebaseAuthException error codes are handled in ForgotPasswordScreen?

'invalid-email', 'user-not-found', and 'too-many-requests'.

8
New cards

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.

9
New cards

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().

10
New cards

Where are poem .txt files saved on Android by downloadPoemAsTxt?

Directory('/storage/emulated/0/Download') under the filename pattern '{fileName}_timestamp.txt'.

11
New cards

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).

12
New cards

What endpoint does fetchWordFromApi query to retrieve definitions in CreatePoemScreen?

The Urban Dictionary REST API: 'https://api.urbandictionary.com/v0/define?term=${query.trim()}'.

13
New cards

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).

14
New cards

What data fields are stored in Cloud Firestore when creating a new poem document in CreatePoemScreen?

'userId', 'title', 'content', 'isFavorite', 'updatedAt', and 'createdAt'.