You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
80 lines
2.2 KiB
Dart
80 lines
2.2 KiB
Dart
import 'package:firebase_analytics/firebase_analytics.dart';
|
|
import 'package:tangheem/models/authentication_user_model.dart';
|
|
import 'package:tangheem/models/content_info_model.dart';
|
|
import 'package:tangheem/models/member_model.dart';
|
|
import 'package:tangheem/models/navigation_model.dart';
|
|
import 'package:tangheem/models/quick_links_model.dart';
|
|
import 'package:tangheem/models/surah_model.dart';
|
|
|
|
class AppState {
|
|
static final AppState _instance = AppState._internal();
|
|
|
|
AppState._internal();
|
|
|
|
factory AppState() => _instance;
|
|
|
|
SurahModel _surahModel;
|
|
|
|
SurahModel get getSurahModel => _surahModel;
|
|
|
|
void setSurahModel(SurahModel _surahModel) {
|
|
this._surahModel = _surahModel;
|
|
}
|
|
|
|
ContentInfoDataModel _copyRight;
|
|
|
|
ContentInfoDataModel get getContentInfoModel => _copyRight;
|
|
|
|
void setContentInfoModel(ContentInfoDataModel _copyRight) {
|
|
this._copyRight = _copyRight;
|
|
}
|
|
|
|
ContentInfoDataModel _userCopyRight;
|
|
|
|
ContentInfoDataModel get getCopyRightContentInfoModel => _userCopyRight;
|
|
|
|
void setCopyRightContentInfoModel(ContentInfoDataModel _userCopyRight) {
|
|
this._userCopyRight = _userCopyRight;
|
|
}
|
|
|
|
AuthenticationUserModel _authenticationUser;
|
|
|
|
bool get isUserLogin => _authenticationUser != null;
|
|
|
|
String get token => _authenticationUser?.result?.data?.token;
|
|
|
|
String get userId => _authenticationUser?.result?.data?.userId;
|
|
|
|
String get userEmail => _authenticationUser?.result?.data?.email;
|
|
|
|
String get userName => _authenticationUser?.result?.data?.userName;
|
|
|
|
void setAuthenticationModel(AuthenticationUserModel _authenticationUser) {
|
|
this._authenticationUser = _authenticationUser;
|
|
}
|
|
|
|
NavigationModel _navigationModel;
|
|
|
|
NavigationModel get getNavigationModel => _navigationModel;
|
|
|
|
void setNavigationModel(NavigationModel _navigationModel) {
|
|
this._navigationModel = _navigationModel;
|
|
}
|
|
|
|
FirebaseAnalytics _analytics;
|
|
|
|
FirebaseAnalytics get getAnalytics => _analytics;
|
|
|
|
void setAnalytics(FirebaseAnalytics _analytics) {
|
|
this._analytics = _analytics;
|
|
}
|
|
|
|
List<MemberDataModel> membersList;
|
|
List<ContentInfoDataModel> haqooqAlMosasa;
|
|
List<ContentInfoDataModel> tareefAlMosasa;
|
|
|
|
String tangheemDiscription;
|
|
|
|
List<QuickLinksData> quickLinks;
|
|
}
|