Yimaru-Mobile/lib/ui/views/learn/learn_viewmodel.dart
2026-01-23 09:14:07 +03:00

41 lines
1.3 KiB
Dart

import 'package:stacked/stacked.dart';
import 'package:stacked_services/stacked_services.dart';
import 'package:yimaru_app/app/app.router.dart';
import 'package:yimaru_app/models/user_model.dart';
import 'package:yimaru_app/services/authentication_service.dart';
import 'package:yimaru_app/ui/common/enmus.dart';
import '../../../app/app.locator.dart';
class LearnViewModel extends BaseViewModel {
final _navigationService = locator<NavigationService>();
final _authenticationService = locator<AuthenticationService>();
late final UserModel? _user = _authenticationService.user;
UserModel? get user => _user;
final List<Map<String, dynamic>> _learnLevels = [
{
'title': 'Beginner',
'status': ProgressStatuses.completed,
'subtitle': 'Start your journey with the basics of English.',
},
{
'title': 'Intermediate',
'status': ProgressStatuses.started,
'subtitle': 'Practice real conversations and expand vocabulary.',
},
{
'title': 'Advanced',
'status': ProgressStatuses.pending,
'subtitle': 'Achieve fluency and master complex topics.',
},
];
List<Map<String, dynamic>> get learnLevels => _learnLevels;
Future<void> navigateToLearnLevel() async =>
_navigationService.navigateToLearnLevelView();
}