Comments (3)
Its better to move it to splash screen. In there, if the user is logged in, we can call the get_user_details api then and there. We can use provider to convey the User model object. But then cubit for profile will be useless.
Think what you can do and lemme know.
from ecellapp2021.
I guess as the user logs in we should call the getUserProfile
that's a better approach according to me? What say?
from ecellapp2021.
I guess as the user logs in we should call the
getUserProfile
that's a better approach according to me? What say?
That should be the case when he's not logged in already. See, do this
in splash screen:
If user is logged in
get_user_details
redirect to homescreen
else
redirect to loginscreen:
when user logs in:
get_user_details
redirect to homescreen
ToDo:
- Remove ProfileCubit
- In SplashScreen, handle the api call directly and in LoginScreen, add it to the cubit
- add a
Provider
withUser
model just before the HomeScreen (whenever you redirect to homescreen, as you did for cubits) - Get the User model using
Provider.of<User>(context, listener: false)
in the ProfileScreen
from ecellapp2021.
Related Issues (20)
- Sponsors Screen -> UI and Linking
- AboutUs - Aim -> UI
- AboutUs - Team Screen -> UI
- screen: SplashScreen HOT 2
- Update targetSdkVersion to 30
- Widget: ECellAnimationWidget
- Profile API code bugs HOT 1
- Insecure HTTP is not allowed by platform HOT 3
- Linking Successful Signup and Login Screens HOT 6
- App Icon Pending
- Loading Widget
- Error Screen with Retry Button
- Verify OTP -> Cubit
- Verify OTP -> API Repository
- Verify OTP -> UI
- B-Quiz UI
- Broken Events Cubit 🚨
- BugFix: AimUI Overflow
- ResendOTP API support
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ecellapp2021.