can you build a flutter mobile app
Loading...
Build a fully responsive dark-themed authentication system using Flutter for a mobile application, following BLoC (Business Logic Component) architecture for clean separation of UI and logic. The app should communicate with a separate backend, and all API calls must be handled through a dedicated service module.
Pages/Components: Login Page
Signup/Register Page
OTP Verification Page (for confirming email/phone during signup or password reset)
Forgot Password Page
Reset Password Page
Features: Sleek and modern dark theme UI using Flutter's ThemeData.dark()
Form validation (email, password, OTP) using Form & TextFormField validators
Password visibility toggle using ObscureText flags
Error/success message display using SnackBars, dialogs, or banners
Loading indicators (e.g., CircularProgressIndicator) during network calls
API Integration: Do not use Firebase for email/password login
Social login (Google, Facebook, Twitter) should be supported using OAuth tokens handled by the backend
Create a separate services module to handle all API calls with a centralized HTTP client (e.g., using the http or Dio package):
Login
Register
Send/verify OTP
Forgot password
Reset password
Social login (OAuth)
Implement global error handling and token management
Social Authentication: Integrate Google, Facebook, and Twitter OAuth via Flutter packages (e.g., google_sign_in, flutter_facebook_auth, twitter_login)
Obtain user credentials via plugins, send tokens to the backend for authentication
State Management: Use Flutter BLoC (flutter_bloc package) to manage state across all authentication flows
Separate logic into Events, States, and Blocs for each screen (e.g., LoginBloc, RegisterBloc)
Routing: Use Navigator 2.0 or GoRouter for handling navigation between pages
Responsiveness: Ensure all pages are fully responsive and adaptive to multiple screen sizes (phones, tablets)
Optional Enhancements: Dark mode toggle (default is dark theme)
Add unit and widget tests for form logic and BLoC states
Implement a “Remember Me” feature using flutter_secure_storage
Loading...
list all the packages i should install in 5the pubspec.yaml to run this