mirror of
https://github.com/hmalik144/days_left_flutter.git
synced 2025-12-10 03:05:21 +00:00
- Introduction on base view model and stateless widget classes
- Implementation of firebase - Implementation of dependency injection Took 11 hours 26 minutes
This commit is contained in:
14
lib/viewmodels/LoginViewModel.dart
Normal file
14
lib/viewmodels/LoginViewModel.dart
Normal file
@@ -0,0 +1,14 @@
|
||||
import 'package:days_left/data/FirebaseAuthData.dart';
|
||||
import '../base/BaseModel.dart';
|
||||
|
||||
class LoginViewModel extends BaseModel {
|
||||
FirebaseAuthData _firebaseAuthData;
|
||||
LoginViewModel(this._firebaseAuthData);
|
||||
|
||||
void tryLogin(String email, String password) {
|
||||
// Todo: validate username & password
|
||||
handleFuture(_firebaseAuthData.signIn(email, password));
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user