-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #644 from bounswe/596-fe-add-review-feature-to-wor…
…kspace-page 596 fe add review feature to workspace page
- Loading branch information
Showing
8 changed files
with
718 additions
and
212 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,11 +7,15 @@ import 'package:collaborative_science_platform/utils/constants.dart'; | |
import 'package:flutter/material.dart'; | ||
import 'package:http/http.dart' as http; | ||
|
||
enum UserType { guest, basicUser, contributor, reviewer, admin } | ||
|
||
class Auth with ChangeNotifier { | ||
User? user; | ||
BasicUser? basicUser; | ||
//User? user = | ||
// User(email: "[email protected]", firstName: "utkan", lastName: "gezer", token: "token"); | ||
UserType userType = UserType.guest; | ||
//User? user = User(email: "[email protected]", firstName: "utkan", lastName: "gezer"); | ||
|
||
|
||
|
||
bool get isSignedIn { | ||
return user != null && user!.token.isNotEmpty; | ||
|
@@ -116,6 +120,7 @@ class Auth with ChangeNotifier { | |
|
||
void logout() { | ||
user = null; | ||
userType = UserType.guest; | ||
notifyListeners(); | ||
} | ||
} |
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
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
Oops, something went wrong.