v3.2.0
This commit is contained in:
parent
f9745a792a
commit
fa0bfd8746
|
|
@ -40,6 +40,9 @@ end
|
||||||
post_install do |installer|
|
post_install do |installer|
|
||||||
installer.pods_project.targets.each do |target|
|
installer.pods_project.targets.each do |target|
|
||||||
flutter_additional_ios_build_settings(target)
|
flutter_additional_ios_build_settings(target)
|
||||||
|
target.build_configurations.each do |config|
|
||||||
|
config.build_settings['BUILD_LIBRARY_FOR_DISTRIBUTION'] = 'NO'
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
# ################ Awesome Notifications pod modification ###################
|
# ################ Awesome Notifications pod modification ###################
|
||||||
|
|
|
||||||
|
|
@ -15,18 +15,33 @@ PODS:
|
||||||
- HLSCachingReverseProxyServer
|
- HLSCachingReverseProxyServer
|
||||||
- PINCache
|
- PINCache
|
||||||
- Cache (6.0.0)
|
- Cache (6.0.0)
|
||||||
|
- Firebase/Auth (10.25.0):
|
||||||
|
- Firebase/CoreOnly
|
||||||
|
- FirebaseAuth (~> 10.25.0)
|
||||||
- Firebase/CoreOnly (10.25.0):
|
- Firebase/CoreOnly (10.25.0):
|
||||||
- FirebaseCore (= 10.25.0)
|
- FirebaseCore (= 10.25.0)
|
||||||
- Firebase/Messaging (10.25.0):
|
- Firebase/Messaging (10.25.0):
|
||||||
- Firebase/CoreOnly
|
- Firebase/CoreOnly
|
||||||
- FirebaseMessaging (~> 10.25.0)
|
- FirebaseMessaging (~> 10.25.0)
|
||||||
- firebase_core (2.31.0):
|
- firebase_auth (4.19.6):
|
||||||
|
- Firebase/Auth (= 10.25.0)
|
||||||
|
- firebase_core
|
||||||
|
- Flutter
|
||||||
|
- firebase_core (2.31.1):
|
||||||
- Firebase/CoreOnly (= 10.25.0)
|
- Firebase/CoreOnly (= 10.25.0)
|
||||||
- Flutter
|
- Flutter
|
||||||
- firebase_messaging (14.9.2):
|
- firebase_messaging (14.9.2):
|
||||||
- Firebase/Messaging (= 10.25.0)
|
- Firebase/Messaging (= 10.25.0)
|
||||||
- firebase_core
|
- firebase_core
|
||||||
- Flutter
|
- Flutter
|
||||||
|
- FirebaseAppCheckInterop (10.25.0)
|
||||||
|
- FirebaseAuth (10.25.0):
|
||||||
|
- FirebaseAppCheckInterop (~> 10.17)
|
||||||
|
- FirebaseCore (~> 10.0)
|
||||||
|
- GoogleUtilities/AppDelegateSwizzler (~> 7.8)
|
||||||
|
- GoogleUtilities/Environment (~> 7.8)
|
||||||
|
- GTMSessionFetcher/Core (< 4.0, >= 2.1)
|
||||||
|
- RecaptchaInterop (~> 100.0)
|
||||||
- FirebaseCore (10.25.0):
|
- FirebaseCore (10.25.0):
|
||||||
- FirebaseCoreInternal (~> 10.0)
|
- FirebaseCoreInternal (~> 10.0)
|
||||||
- GoogleUtilities/Environment (~> 7.12)
|
- GoogleUtilities/Environment (~> 7.12)
|
||||||
|
|
@ -86,6 +101,7 @@ PODS:
|
||||||
- GoogleUtilities/UserDefaults (7.13.3):
|
- GoogleUtilities/UserDefaults (7.13.3):
|
||||||
- GoogleUtilities/Logger
|
- GoogleUtilities/Logger
|
||||||
- GoogleUtilities/Privacy
|
- GoogleUtilities/Privacy
|
||||||
|
- GTMSessionFetcher/Core (3.4.1)
|
||||||
- HLSCachingReverseProxyServer (0.1.0):
|
- HLSCachingReverseProxyServer (0.1.0):
|
||||||
- GCDWebServer (~> 3.5)
|
- GCDWebServer (~> 3.5)
|
||||||
- PINCache (>= 3.0.1-beta.3)
|
- PINCache (>= 3.0.1-beta.3)
|
||||||
|
|
@ -116,6 +132,7 @@ PODS:
|
||||||
- PINOperation (~> 1.2.3)
|
- PINOperation (~> 1.2.3)
|
||||||
- PINOperation (1.2.3)
|
- PINOperation (1.2.3)
|
||||||
- PromisesObjC (2.4.0)
|
- PromisesObjC (2.4.0)
|
||||||
|
- RecaptchaInterop (100.0.0)
|
||||||
- record (0.0.1):
|
- record (0.0.1):
|
||||||
- Flutter
|
- Flutter
|
||||||
- rive_common (0.0.1):
|
- rive_common (0.0.1):
|
||||||
|
|
@ -137,6 +154,7 @@ DEPENDENCIES:
|
||||||
- awesome_notifications (from `.symlinks/plugins/awesome_notifications/ios`)
|
- awesome_notifications (from `.symlinks/plugins/awesome_notifications/ios`)
|
||||||
- awesome_notifications_core (from `.symlinks/plugins/awesome_notifications_core/ios`)
|
- awesome_notifications_core (from `.symlinks/plugins/awesome_notifications_core/ios`)
|
||||||
- better_player (from `.symlinks/plugins/better_player/ios`)
|
- better_player (from `.symlinks/plugins/better_player/ios`)
|
||||||
|
- firebase_auth (from `.symlinks/plugins/firebase_auth/ios`)
|
||||||
- firebase_core (from `.symlinks/plugins/firebase_core/ios`)
|
- firebase_core (from `.symlinks/plugins/firebase_core/ios`)
|
||||||
- firebase_messaging (from `.symlinks/plugins/firebase_messaging/ios`)
|
- firebase_messaging (from `.symlinks/plugins/firebase_messaging/ios`)
|
||||||
- Flutter (from `Flutter`)
|
- Flutter (from `Flutter`)
|
||||||
|
|
@ -159,6 +177,8 @@ SPEC REPOS:
|
||||||
trunk:
|
trunk:
|
||||||
- Cache
|
- Cache
|
||||||
- Firebase
|
- Firebase
|
||||||
|
- FirebaseAppCheckInterop
|
||||||
|
- FirebaseAuth
|
||||||
- FirebaseCore
|
- FirebaseCore
|
||||||
- FirebaseCoreInternal
|
- FirebaseCoreInternal
|
||||||
- FirebaseInstallations
|
- FirebaseInstallations
|
||||||
|
|
@ -166,12 +186,14 @@ SPEC REPOS:
|
||||||
- GCDWebServer
|
- GCDWebServer
|
||||||
- GoogleDataTransport
|
- GoogleDataTransport
|
||||||
- GoogleUtilities
|
- GoogleUtilities
|
||||||
|
- GTMSessionFetcher
|
||||||
- HLSCachingReverseProxyServer
|
- HLSCachingReverseProxyServer
|
||||||
- IosAwnCore
|
- IosAwnCore
|
||||||
- nanopb
|
- nanopb
|
||||||
- PINCache
|
- PINCache
|
||||||
- PINOperation
|
- PINOperation
|
||||||
- PromisesObjC
|
- PromisesObjC
|
||||||
|
- RecaptchaInterop
|
||||||
- TOCropViewController
|
- TOCropViewController
|
||||||
|
|
||||||
EXTERNAL SOURCES:
|
EXTERNAL SOURCES:
|
||||||
|
|
@ -185,6 +207,8 @@ EXTERNAL SOURCES:
|
||||||
:path: ".symlinks/plugins/awesome_notifications_core/ios"
|
:path: ".symlinks/plugins/awesome_notifications_core/ios"
|
||||||
better_player:
|
better_player:
|
||||||
:path: ".symlinks/plugins/better_player/ios"
|
:path: ".symlinks/plugins/better_player/ios"
|
||||||
|
firebase_auth:
|
||||||
|
:path: ".symlinks/plugins/firebase_auth/ios"
|
||||||
firebase_core:
|
firebase_core:
|
||||||
:path: ".symlinks/plugins/firebase_core/ios"
|
:path: ".symlinks/plugins/firebase_core/ios"
|
||||||
firebase_messaging:
|
firebase_messaging:
|
||||||
|
|
@ -228,8 +252,11 @@ SPEC CHECKSUMS:
|
||||||
better_player: 2406bfe8175203c7a46fa15f9d778d73b12e1646
|
better_player: 2406bfe8175203c7a46fa15f9d778d73b12e1646
|
||||||
Cache: 4ca7e00363fca5455f26534e5607634c820ffc2d
|
Cache: 4ca7e00363fca5455f26534e5607634c820ffc2d
|
||||||
Firebase: 0312a2352584f782ea56f66d91606891d4607f06
|
Firebase: 0312a2352584f782ea56f66d91606891d4607f06
|
||||||
firebase_core: 0b39f4f424e02eecabb2356ddf331fa07b772af8
|
firebase_auth: 193301a23be35329120526c6a83672ea40676472
|
||||||
|
firebase_core: 22e117a2e0dec3cb318c8f53f2dd01c140375617
|
||||||
firebase_messaging: 8999827b6efc9c3ab4b1f9dc246deaa7f13dbf88
|
firebase_messaging: 8999827b6efc9c3ab4b1f9dc246deaa7f13dbf88
|
||||||
|
FirebaseAppCheckInterop: 5da5ce93e8797a215e3f677fb0654b74e736c8b8
|
||||||
|
FirebaseAuth: c0f93dcc570c9da2bffb576969d793e95c344fbb
|
||||||
FirebaseCore: 7ec4d0484817f12c3373955bc87762d96842d483
|
FirebaseCore: 7ec4d0484817f12c3373955bc87762d96842d483
|
||||||
FirebaseCoreInternal: 910a81992c33715fec9263ca7381d59ab3a750b7
|
FirebaseCoreInternal: 910a81992c33715fec9263ca7381d59ab3a750b7
|
||||||
FirebaseInstallations: 91950fe859846fff0fbd296180909dd273103b09
|
FirebaseInstallations: 91950fe859846fff0fbd296180909dd273103b09
|
||||||
|
|
@ -241,6 +268,7 @@ SPEC CHECKSUMS:
|
||||||
GCDWebServer: 2c156a56c8226e2d5c0c3f208a3621ccffbe3ce4
|
GCDWebServer: 2c156a56c8226e2d5c0c3f208a3621ccffbe3ce4
|
||||||
GoogleDataTransport: 6c09b596d841063d76d4288cc2d2f42cc36e1e2a
|
GoogleDataTransport: 6c09b596d841063d76d4288cc2d2f42cc36e1e2a
|
||||||
GoogleUtilities: ea963c370a38a8069cc5f7ba4ca849a60b6d7d15
|
GoogleUtilities: ea963c370a38a8069cc5f7ba4ca849a60b6d7d15
|
||||||
|
GTMSessionFetcher: 8000756fc1c19d2e5697b90311f7832d2e33f6cd
|
||||||
HLSCachingReverseProxyServer: 59935e1e0244ad7f3375d75b5ef46e8eb26ab181
|
HLSCachingReverseProxyServer: 59935e1e0244ad7f3375d75b5ef46e8eb26ab181
|
||||||
home_widget: 0434835a4c9a75704264feff6be17ea40e0f0d57
|
home_widget: 0434835a4c9a75704264feff6be17ea40e0f0d57
|
||||||
image_cropper: 60c2789d1f1a78c873235d4319ca0c34a69f2d98
|
image_cropper: 60c2789d1f1a78c873235d4319ca0c34a69f2d98
|
||||||
|
|
@ -252,6 +280,7 @@ SPEC CHECKSUMS:
|
||||||
PINCache: d9a87a0ff397acffe9e2f0db972ac14680441158
|
PINCache: d9a87a0ff397acffe9e2f0db972ac14680441158
|
||||||
PINOperation: fb563bcc9c32c26d6c78aaff967d405aa2ee74a7
|
PINOperation: fb563bcc9c32c26d6c78aaff967d405aa2ee74a7
|
||||||
PromisesObjC: f5707f49cb48b9636751c5b2e7d227e43fba9f47
|
PromisesObjC: f5707f49cb48b9636751c5b2e7d227e43fba9f47
|
||||||
|
RecaptchaInterop: 7d1a4a01a6b2cb1610a47ef3f85f0c411434cb21
|
||||||
record: cae05d8dd3cdb1dea3511b20e5a5811a1ae00d0d
|
record: cae05d8dd3cdb1dea3511b20e5a5811a1ae00d0d
|
||||||
rive_common: c537b4eed761e903a9403d93c347b69bd7a4762f
|
rive_common: c537b4eed761e903a9403d93c347b69bd7a4762f
|
||||||
sqflite: 673a0e54cc04b7d6dba8d24fb8095b31c3a99eec
|
sqflite: 673a0e54cc04b7d6dba8d24fb8095b31c3a99eec
|
||||||
|
|
@ -260,6 +289,6 @@ SPEC CHECKSUMS:
|
||||||
wakelock: d0fc7c864128eac40eba1617cb5264d9c940b46f
|
wakelock: d0fc7c864128eac40eba1617cb5264d9c940b46f
|
||||||
webview_flutter_wkwebview: be0f0d33777f1bfd0c9fdcb594786704dbf65f36
|
webview_flutter_wkwebview: be0f0d33777f1bfd0c9fdcb594786704dbf65f36
|
||||||
|
|
||||||
PODFILE CHECKSUM: 43b7f04e2401bb5f4734fd7bf7644eef34165887
|
PODFILE CHECKSUM: d9825a12b7b9489d4776b9c9434f6b977b656841
|
||||||
|
|
||||||
COCOAPODS: 1.15.2
|
COCOAPODS: 1.15.2
|
||||||
|
|
|
||||||
|
|
@ -61,6 +61,7 @@
|
||||||
98ACB01D5FA5A78DB2686183 /* Pods-Runner.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.release.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"; sourceTree = "<group>"; };
|
98ACB01D5FA5A78DB2686183 /* Pods-Runner.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.release.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"; sourceTree = "<group>"; };
|
||||||
B2EEE8F55C4C405BB5B4B0F1 /* Pods-RunnerTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RunnerTests.release.xcconfig"; path = "Target Support Files/Pods-RunnerTests/Pods-RunnerTests.release.xcconfig"; sourceTree = "<group>"; };
|
B2EEE8F55C4C405BB5B4B0F1 /* Pods-RunnerTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RunnerTests.release.xcconfig"; path = "Target Support Files/Pods-RunnerTests/Pods-RunnerTests.release.xcconfig"; sourceTree = "<group>"; };
|
||||||
C97DED20C4A171F16FB949CD /* Pods-Runner.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.debug.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"; sourceTree = "<group>"; };
|
C97DED20C4A171F16FB949CD /* Pods-Runner.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.debug.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"; sourceTree = "<group>"; };
|
||||||
|
D143FC822BFF1A95002238F7 /* Runner.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = Runner.entitlements; sourceTree = "<group>"; };
|
||||||
D167C7BB2BFE275B0039A883 /* RunnerTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = RunnerTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
|
D167C7BB2BFE275B0039A883 /* RunnerTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = RunnerTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||||
D167C7BD2BFE275B0039A883 /* RunnerTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RunnerTests.swift; sourceTree = "<group>"; };
|
D167C7BD2BFE275B0039A883 /* RunnerTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RunnerTests.swift; sourceTree = "<group>"; };
|
||||||
D194CE3D27D4A4740049AFC7 /* GoogleService-Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = "GoogleService-Info.plist"; sourceTree = "<group>"; };
|
D194CE3D27D4A4740049AFC7 /* GoogleService-Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = "GoogleService-Info.plist"; sourceTree = "<group>"; };
|
||||||
|
|
@ -146,6 +147,7 @@
|
||||||
97C146F01CF9000F007C117D /* Runner */ = {
|
97C146F01CF9000F007C117D /* Runner */ = {
|
||||||
isa = PBXGroup;
|
isa = PBXGroup;
|
||||||
children = (
|
children = (
|
||||||
|
D143FC822BFF1A95002238F7 /* Runner.entitlements */,
|
||||||
D194CE3D27D4A4740049AFC7 /* GoogleService-Info.plist */,
|
D194CE3D27D4A4740049AFC7 /* GoogleService-Info.plist */,
|
||||||
97C146FA1CF9000F007C117D /* Main.storyboard */,
|
97C146FA1CF9000F007C117D /* Main.storyboard */,
|
||||||
97C146FD1CF9000F007C117D /* Assets.xcassets */,
|
97C146FD1CF9000F007C117D /* Assets.xcassets */,
|
||||||
|
|
@ -241,6 +243,8 @@
|
||||||
Base,
|
Base,
|
||||||
);
|
);
|
||||||
mainGroup = 97C146E51CF9000F007C117D;
|
mainGroup = 97C146E51CF9000F007C117D;
|
||||||
|
packageReferences = (
|
||||||
|
);
|
||||||
productRefGroup = 97C146EF1CF9000F007C117D /* Products */;
|
productRefGroup = 97C146EF1CF9000F007C117D /* Products */;
|
||||||
projectDirPath = "";
|
projectDirPath = "";
|
||||||
projectRoot = "";
|
projectRoot = "";
|
||||||
|
|
@ -488,15 +492,18 @@
|
||||||
baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
|
baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
|
||||||
buildSettings = {
|
buildSettings = {
|
||||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||||
|
BUILD_LIBRARY_FOR_DISTRIBUTION = NO;
|
||||||
CLANG_ENABLE_MODULES = YES;
|
CLANG_ENABLE_MODULES = YES;
|
||||||
|
CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
|
||||||
CODE_SIGN_IDENTITY = "Apple Development";
|
CODE_SIGN_IDENTITY = "Apple Development";
|
||||||
CODE_SIGN_STYLE = Automatic;
|
CODE_SIGN_STYLE = Automatic;
|
||||||
CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
|
CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
|
||||||
DEVELOPMENT_TEAM = 9YUQA68P22;
|
DEVELOPMENT_TEAM = MB63F4VV5H;
|
||||||
ENABLE_BITCODE = NO;
|
ENABLE_BITCODE = NO;
|
||||||
INFOPLIST_FILE = Runner/Info.plist;
|
INFOPLIST_FILE = Runner/Info.plist;
|
||||||
INFOPLIST_KEY_CFBundleDisplayName = Didvan;
|
INFOPLIST_KEY_CFBundleDisplayName = Didvan;
|
||||||
INFOPLIST_KEY_LSApplicationCategoryType = "public.app-category.news";
|
INFOPLIST_KEY_LSApplicationCategoryType = "public.app-category.news";
|
||||||
|
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
|
||||||
LD_RUNPATH_SEARCH_PATHS = (
|
LD_RUNPATH_SEARCH_PATHS = (
|
||||||
"$(inherited)",
|
"$(inherited)",
|
||||||
"@executable_path/Frameworks",
|
"@executable_path/Frameworks",
|
||||||
|
|
@ -623,15 +630,18 @@
|
||||||
baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */;
|
baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */;
|
||||||
buildSettings = {
|
buildSettings = {
|
||||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||||
|
BUILD_LIBRARY_FOR_DISTRIBUTION = NO;
|
||||||
CLANG_ENABLE_MODULES = YES;
|
CLANG_ENABLE_MODULES = YES;
|
||||||
|
CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
|
||||||
CODE_SIGN_IDENTITY = "Apple Development";
|
CODE_SIGN_IDENTITY = "Apple Development";
|
||||||
CODE_SIGN_STYLE = Automatic;
|
CODE_SIGN_STYLE = Automatic;
|
||||||
CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
|
CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
|
||||||
DEVELOPMENT_TEAM = 9YUQA68P22;
|
DEVELOPMENT_TEAM = MB63F4VV5H;
|
||||||
ENABLE_BITCODE = NO;
|
ENABLE_BITCODE = NO;
|
||||||
INFOPLIST_FILE = Runner/Info.plist;
|
INFOPLIST_FILE = Runner/Info.plist;
|
||||||
INFOPLIST_KEY_CFBundleDisplayName = Didvan;
|
INFOPLIST_KEY_CFBundleDisplayName = Didvan;
|
||||||
INFOPLIST_KEY_LSApplicationCategoryType = "public.app-category.news";
|
INFOPLIST_KEY_LSApplicationCategoryType = "public.app-category.news";
|
||||||
|
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
|
||||||
LD_RUNPATH_SEARCH_PATHS = (
|
LD_RUNPATH_SEARCH_PATHS = (
|
||||||
"$(inherited)",
|
"$(inherited)",
|
||||||
"@executable_path/Frameworks",
|
"@executable_path/Frameworks",
|
||||||
|
|
@ -652,15 +662,18 @@
|
||||||
baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
|
baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
|
||||||
buildSettings = {
|
buildSettings = {
|
||||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||||
|
BUILD_LIBRARY_FOR_DISTRIBUTION = NO;
|
||||||
CLANG_ENABLE_MODULES = YES;
|
CLANG_ENABLE_MODULES = YES;
|
||||||
|
CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
|
||||||
CODE_SIGN_IDENTITY = "Apple Development";
|
CODE_SIGN_IDENTITY = "Apple Development";
|
||||||
CODE_SIGN_STYLE = Automatic;
|
CODE_SIGN_STYLE = Automatic;
|
||||||
CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
|
CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
|
||||||
DEVELOPMENT_TEAM = 9YUQA68P22;
|
DEVELOPMENT_TEAM = MB63F4VV5H;
|
||||||
ENABLE_BITCODE = NO;
|
ENABLE_BITCODE = NO;
|
||||||
INFOPLIST_FILE = Runner/Info.plist;
|
INFOPLIST_FILE = Runner/Info.plist;
|
||||||
INFOPLIST_KEY_CFBundleDisplayName = Didvan;
|
INFOPLIST_KEY_CFBundleDisplayName = Didvan;
|
||||||
INFOPLIST_KEY_LSApplicationCategoryType = "public.app-category.news";
|
INFOPLIST_KEY_LSApplicationCategoryType = "public.app-category.news";
|
||||||
|
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
|
||||||
LD_RUNPATH_SEARCH_PATHS = (
|
LD_RUNPATH_SEARCH_PATHS = (
|
||||||
"$(inherited)",
|
"$(inherited)",
|
||||||
"@executable_path/Frameworks",
|
"@executable_path/Frameworks",
|
||||||
|
|
@ -680,6 +693,7 @@
|
||||||
baseConfigurationReference = D5C8C888FE458FD90D3E41DB /* Pods-RunnerTests.debug.xcconfig */;
|
baseConfigurationReference = D5C8C888FE458FD90D3E41DB /* Pods-RunnerTests.debug.xcconfig */;
|
||||||
buildSettings = {
|
buildSettings = {
|
||||||
ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES;
|
ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES;
|
||||||
|
BUILD_LIBRARY_FOR_DISTRIBUTION = NO;
|
||||||
BUNDLE_LOADER = "$(TEST_HOST)";
|
BUNDLE_LOADER = "$(TEST_HOST)";
|
||||||
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
|
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
|
||||||
CLANG_CXX_LANGUAGE_STANDARD = "gnu++20";
|
CLANG_CXX_LANGUAGE_STANDARD = "gnu++20";
|
||||||
|
|
@ -714,6 +728,7 @@
|
||||||
baseConfigurationReference = B2EEE8F55C4C405BB5B4B0F1 /* Pods-RunnerTests.release.xcconfig */;
|
baseConfigurationReference = B2EEE8F55C4C405BB5B4B0F1 /* Pods-RunnerTests.release.xcconfig */;
|
||||||
buildSettings = {
|
buildSettings = {
|
||||||
ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES;
|
ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES;
|
||||||
|
BUILD_LIBRARY_FOR_DISTRIBUTION = NO;
|
||||||
BUNDLE_LOADER = "$(TEST_HOST)";
|
BUNDLE_LOADER = "$(TEST_HOST)";
|
||||||
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
|
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
|
||||||
CLANG_CXX_LANGUAGE_STANDARD = "gnu++20";
|
CLANG_CXX_LANGUAGE_STANDARD = "gnu++20";
|
||||||
|
|
@ -746,6 +761,7 @@
|
||||||
baseConfigurationReference = F9A8A938029FFAC4FD6CE33B /* Pods-RunnerTests.profile.xcconfig */;
|
baseConfigurationReference = F9A8A938029FFAC4FD6CE33B /* Pods-RunnerTests.profile.xcconfig */;
|
||||||
buildSettings = {
|
buildSettings = {
|
||||||
ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES;
|
ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES;
|
||||||
|
BUILD_LIBRARY_FOR_DISTRIBUTION = NO;
|
||||||
BUNDLE_LOADER = "$(TEST_HOST)";
|
BUNDLE_LOADER = "$(TEST_HOST)";
|
||||||
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
|
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
|
||||||
CLANG_CXX_LANGUAGE_STANDARD = "gnu++20";
|
CLANG_CXX_LANGUAGE_STANDARD = "gnu++20";
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,123 @@
|
||||||
|
{
|
||||||
|
"originHash" : "c63c63846d9c539229e96de38d6af51417e28c0ee9a0bc48bd0f0f19d923c329",
|
||||||
|
"pins" : [
|
||||||
|
{
|
||||||
|
"identity" : "abseil-cpp-binary",
|
||||||
|
"kind" : "remoteSourceControl",
|
||||||
|
"location" : "https://github.com/google/abseil-cpp-binary.git",
|
||||||
|
"state" : {
|
||||||
|
"revision" : "748c7837511d0e6a507737353af268484e1745e2",
|
||||||
|
"version" : "1.2024011601.1"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"identity" : "app-check",
|
||||||
|
"kind" : "remoteSourceControl",
|
||||||
|
"location" : "https://github.com/google/app-check.git",
|
||||||
|
"state" : {
|
||||||
|
"revision" : "076b241a625e25eac22f8849be256dfb960fcdfe",
|
||||||
|
"version" : "10.19.1"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"identity" : "firebase-ios-sdk",
|
||||||
|
"kind" : "remoteSourceControl",
|
||||||
|
"location" : "https://github.com/firebase/firebase-ios-sdk",
|
||||||
|
"state" : {
|
||||||
|
"revision" : "9d17b500cd98d9a7009751ad62f802e152e97021",
|
||||||
|
"version" : "10.26.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"identity" : "googleappmeasurement",
|
||||||
|
"kind" : "remoteSourceControl",
|
||||||
|
"location" : "https://github.com/google/GoogleAppMeasurement.git",
|
||||||
|
"state" : {
|
||||||
|
"revision" : "16244d177c4e989f87b25e9db1012b382cfedc55",
|
||||||
|
"version" : "10.25.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"identity" : "googledatatransport",
|
||||||
|
"kind" : "remoteSourceControl",
|
||||||
|
"location" : "https://github.com/google/GoogleDataTransport.git",
|
||||||
|
"state" : {
|
||||||
|
"revision" : "a637d318ae7ae246b02d7305121275bc75ed5565",
|
||||||
|
"version" : "9.4.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"identity" : "googleutilities",
|
||||||
|
"kind" : "remoteSourceControl",
|
||||||
|
"location" : "https://github.com/google/GoogleUtilities.git",
|
||||||
|
"state" : {
|
||||||
|
"revision" : "57a1d307f42df690fdef2637f3e5b776da02aad6",
|
||||||
|
"version" : "7.13.3"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"identity" : "grpc-binary",
|
||||||
|
"kind" : "remoteSourceControl",
|
||||||
|
"location" : "https://github.com/google/grpc-binary.git",
|
||||||
|
"state" : {
|
||||||
|
"revision" : "e9fad491d0673bdda7063a0341fb6b47a30c5359",
|
||||||
|
"version" : "1.62.2"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"identity" : "gtm-session-fetcher",
|
||||||
|
"kind" : "remoteSourceControl",
|
||||||
|
"location" : "https://github.com/google/gtm-session-fetcher.git",
|
||||||
|
"state" : {
|
||||||
|
"revision" : "0382ca27f22fb3494cf657d8dc356dc282cd1193",
|
||||||
|
"version" : "3.4.1"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"identity" : "interop-ios-for-google-sdks",
|
||||||
|
"kind" : "remoteSourceControl",
|
||||||
|
"location" : "https://github.com/google/interop-ios-for-google-sdks.git",
|
||||||
|
"state" : {
|
||||||
|
"revision" : "2d12673670417654f08f5f90fdd62926dc3a2648",
|
||||||
|
"version" : "100.0.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"identity" : "leveldb",
|
||||||
|
"kind" : "remoteSourceControl",
|
||||||
|
"location" : "https://github.com/firebase/leveldb.git",
|
||||||
|
"state" : {
|
||||||
|
"revision" : "a0bc79961d7be727d258d33d5a6b2f1023270ba1",
|
||||||
|
"version" : "1.22.5"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"identity" : "nanopb",
|
||||||
|
"kind" : "remoteSourceControl",
|
||||||
|
"location" : "https://github.com/firebase/nanopb.git",
|
||||||
|
"state" : {
|
||||||
|
"revision" : "b7e1104502eca3a213b46303391ca4d3bc8ddec1",
|
||||||
|
"version" : "2.30910.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"identity" : "promises",
|
||||||
|
"kind" : "remoteSourceControl",
|
||||||
|
"location" : "https://github.com/google/promises.git",
|
||||||
|
"state" : {
|
||||||
|
"revision" : "540318ecedd63d883069ae7f1ed811a2df00b6ac",
|
||||||
|
"version" : "2.4.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"identity" : "swift-protobuf",
|
||||||
|
"kind" : "remoteSourceControl",
|
||||||
|
"location" : "https://github.com/apple/swift-protobuf.git",
|
||||||
|
"state" : {
|
||||||
|
"revision" : "9f0c76544701845ad98716f3f6a774a892152bcb",
|
||||||
|
"version" : "1.26.0"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"version" : 3
|
||||||
|
}
|
||||||
|
|
@ -70,6 +70,16 @@
|
||||||
ReferencedContainer = "container:Runner.xcodeproj">
|
ReferencedContainer = "container:Runner.xcodeproj">
|
||||||
</BuildableReference>
|
</BuildableReference>
|
||||||
</BuildableProductRunnable>
|
</BuildableProductRunnable>
|
||||||
|
<CommandLineArguments>
|
||||||
|
<CommandLineArgument
|
||||||
|
argument = "--vm-service-host=0.0.0.0"
|
||||||
|
isEnabled = "YES">
|
||||||
|
</CommandLineArgument>
|
||||||
|
<CommandLineArgument
|
||||||
|
argument = ""
|
||||||
|
isEnabled = "YES">
|
||||||
|
</CommandLineArgument>
|
||||||
|
</CommandLineArguments>
|
||||||
</LaunchAction>
|
</LaunchAction>
|
||||||
<ProfileAction
|
<ProfileAction
|
||||||
buildConfiguration = "Profile"
|
buildConfiguration = "Profile"
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
import UIKit
|
import UIKit
|
||||||
import Flutter
|
import Flutter
|
||||||
import Firebase
|
import Firebase
|
||||||
|
import FirebaseCore
|
||||||
|
|
||||||
@UIApplicationMain
|
@UIApplicationMain
|
||||||
@objc class AppDelegate: FlutterAppDelegate, MessagingDelegate {
|
@objc class AppDelegate: FlutterAppDelegate, MessagingDelegate {
|
||||||
|
|
@ -12,6 +12,7 @@ import Firebase
|
||||||
FirebaseApp.configure()
|
FirebaseApp.configure()
|
||||||
Messaging.messaging().delegate = self
|
Messaging.messaging().delegate = self
|
||||||
GeneratedPluginRegistrant.register(with: self)
|
GeneratedPluginRegistrant.register(with: self)
|
||||||
|
|
||||||
if #available(iOS 10.0, *) {
|
if #available(iOS 10.0, *) {
|
||||||
// For iOS 10 display notification (sent via APNS)
|
// For iOS 10 display notification (sent via APNS)
|
||||||
UNUserNotificationCenter.current().delegate = self
|
UNUserNotificationCenter.current().delegate = self
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||||
<plist version="1.0">
|
<plist version="1.0">
|
||||||
<dict>
|
<dict>
|
||||||
<key>CADisableMinimumFrameDurationOnPhone</key>
|
<key>CADisableMinimumFrameDurationOnPhone</key>
|
||||||
<true/>
|
<true/>
|
||||||
<key>CFBundleDevelopmentRegion</key>
|
<key>CFBundleDevelopmentRegion</key>
|
||||||
|
|
@ -37,6 +37,8 @@
|
||||||
<key>UIBackgroundModes</key>
|
<key>UIBackgroundModes</key>
|
||||||
<array>
|
<array>
|
||||||
<string>audio</string>
|
<string>audio</string>
|
||||||
|
<string>fetch</string>
|
||||||
|
<string>remote-notification</string>
|
||||||
</array>
|
</array>
|
||||||
<key>UILaunchStoryboardName</key>
|
<key>UILaunchStoryboardName</key>
|
||||||
<string>LaunchScreen</string>
|
<string>LaunchScreen</string>
|
||||||
|
|
@ -54,5 +56,5 @@
|
||||||
<array>
|
<array>
|
||||||
<string>$(PRODUCT_BUNDLE_IDENTIFIER).MyNotificationServiceExtension</string>
|
<string>$(PRODUCT_BUNDLE_IDENTIFIER).MyNotificationServiceExtension</string>
|
||||||
</array>
|
</array>
|
||||||
</dict>
|
</dict>
|
||||||
</plist>
|
</plist>
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,8 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||||
|
<plist version="1.0">
|
||||||
|
<dict>
|
||||||
|
<key>aps-environment</key>
|
||||||
|
<string>development</string>
|
||||||
|
</dict>
|
||||||
|
</plist>
|
||||||
|
|
@ -1,12 +1,18 @@
|
||||||
|
import 'dart:io';
|
||||||
|
|
||||||
import 'package:android_intent_plus/android_intent.dart';
|
import 'package:android_intent_plus/android_intent.dart';
|
||||||
|
import 'package:awesome_notifications/awesome_notifications.dart';
|
||||||
import 'package:bot_toast/bot_toast.dart';
|
import 'package:bot_toast/bot_toast.dart';
|
||||||
import 'package:didvan/config/theme_data.dart';
|
import 'package:didvan/config/theme_data.dart';
|
||||||
|
import 'package:didvan/models/notification_message.dart';
|
||||||
import 'package:didvan/providers/media.dart';
|
import 'package:didvan/providers/media.dart';
|
||||||
import 'package:didvan/providers/theme.dart';
|
import 'package:didvan/providers/theme.dart';
|
||||||
import 'package:didvan/providers/user.dart';
|
import 'package:didvan/providers/user.dart';
|
||||||
import 'package:didvan/routes/route_generator.dart';
|
import 'package:didvan/routes/route_generator.dart';
|
||||||
import 'package:didvan/routes/routes.dart';
|
import 'package:didvan/routes/routes.dart';
|
||||||
import 'package:didvan/services/app_home_widget/home_widget_repository.dart';
|
import 'package:didvan/services/app_home_widget/home_widget_repository.dart';
|
||||||
|
import 'package:didvan/services/app_initalizer.dart';
|
||||||
|
import 'package:didvan/services/notification/awsome/awsome_notification_controller.dart';
|
||||||
import 'package:didvan/services/notification/awsome/awsome_notification_handler.dart';
|
import 'package:didvan/services/notification/awsome/awsome_notification_handler.dart';
|
||||||
import 'package:didvan/services/notification/fcm/firebase_notification_handler.dart';
|
import 'package:didvan/services/notification/fcm/firebase_notification_handler.dart';
|
||||||
import 'package:didvan/views/podcasts/podcasts_state.dart';
|
import 'package:didvan/views/podcasts/podcasts_state.dart';
|
||||||
|
|
@ -24,24 +30,10 @@ final GlobalKey<NavigatorState> navigatorKey = GlobalKey<NavigatorState>();
|
||||||
@pragma('vm:entry-point')
|
@pragma('vm:entry-point')
|
||||||
Future<void> _firebaseMessagingBackgroundHandler(RemoteMessage message) async {
|
Future<void> _firebaseMessagingBackgroundHandler(RemoteMessage message) async {
|
||||||
WidgetsFlutterBinding.ensureInitialized();
|
WidgetsFlutterBinding.ensureInitialized();
|
||||||
await Firebase.initializeApp(
|
await AppInitializer.initializeFirebase();
|
||||||
options: kIsWeb
|
await AwsomeNotificationHandler.startListeningNotificationEvents();
|
||||||
? const FirebaseOptions(
|
await AwsomeNotificationHandler().show(message);
|
||||||
apiKey: "AIzaSyA0HZjKpRuPOi1SC3f_EZTvlS3mcj9UVo0",
|
|
||||||
authDomain: "didvan-9b7da.firebaseapp.com",
|
|
||||||
projectId: "didvan-9b7da",
|
|
||||||
storageBucket: "didvan-9b7da.appspot.com",
|
|
||||||
messagingSenderId: "935017686266",
|
|
||||||
appId: "1:935017686266:web:a93f7a19bed23c51d2d543",
|
|
||||||
measurementId: "G-80B4H9E8Y0")
|
|
||||||
: const FirebaseOptions(
|
|
||||||
apiKey: 'AIzaSyBp-UHjWeM0H0UHtX5yguFKG-riMzvvCzw',
|
|
||||||
appId: '1:935017686266:android:f9cbc9aba8e3d65ed2d543',
|
|
||||||
messagingSenderId: '935017686266',
|
|
||||||
projectId: 'didvan-9b7da',
|
|
||||||
),
|
|
||||||
);
|
|
||||||
AwsomeNotificationHandler().show(message);
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -66,8 +58,8 @@ void main() async {
|
||||||
//ignore: deprecated_member_use
|
//ignore: deprecated_member_use
|
||||||
HomeWidget.registerBackgroundCallback(_backgroundCallbackHomeWidget);
|
HomeWidget.registerBackgroundCallback(_backgroundCallbackHomeWidget);
|
||||||
HomeWidget.registerInteractivityCallback(_backgroundCallbackHomeWidget);
|
HomeWidget.registerInteractivityCallback(_backgroundCallbackHomeWidget);
|
||||||
AwsomeNotificationHandler().alarm();
|
await AwsomeNotificationHandler().alarm();
|
||||||
FirebaseNotificationHandler().initial();
|
await AppInitializer.initializeFirebase();
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
debugPrintStack();
|
debugPrintStack();
|
||||||
}
|
}
|
||||||
|
|
@ -90,6 +82,8 @@ class _DidvanState extends State<Didvan> with WidgetsBindingObserver {
|
||||||
|
|
||||||
@override
|
@override
|
||||||
void initState() {
|
void initState() {
|
||||||
|
AwsomeNotificationHandler.startListeningNotificationEvents();
|
||||||
|
|
||||||
super.initState();
|
super.initState();
|
||||||
WidgetsBinding.instance.addObserver(this);
|
WidgetsBinding.instance.addObserver(this);
|
||||||
}
|
}
|
||||||
|
|
@ -108,6 +102,12 @@ class _DidvanState extends State<Didvan> with WidgetsBindingObserver {
|
||||||
var r = await HomeWidget.getWidgetData("cRoute", defaultValue: '');
|
var r = await HomeWidget.getWidgetData("cRoute", defaultValue: '');
|
||||||
if (r!.toString() != Routes.splash) {
|
if (r!.toString() != Routes.splash) {
|
||||||
await HomeWidgetRepository.decideWhereToGo();
|
await HomeWidgetRepository.decideWhereToGo();
|
||||||
|
|
||||||
|
NotificationMessage? data = HomeWidgetRepository.data;
|
||||||
|
print("hhhhshahahjsfghasgfhjgfsahjghgfhgsahfghsag $data");
|
||||||
|
if (data != null) {
|
||||||
|
await HomeWidgetRepository.decideWhereToGoNotif();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,7 @@ import 'news_attachment.dart';
|
||||||
import 'radar_attachment.dart';
|
import 'radar_attachment.dart';
|
||||||
|
|
||||||
class MessageData {
|
class MessageData {
|
||||||
final int id;
|
int id;
|
||||||
final String? text;
|
final String? text;
|
||||||
final String? audio;
|
final String? audio;
|
||||||
final bool writedByAdmin;
|
final bool writedByAdmin;
|
||||||
|
|
@ -16,7 +16,7 @@ class MessageData {
|
||||||
final File? audioFile;
|
final File? audioFile;
|
||||||
final int? audioDuration;
|
final int? audioDuration;
|
||||||
|
|
||||||
const MessageData({
|
MessageData({
|
||||||
required this.id,
|
required this.id,
|
||||||
required this.writedByAdmin,
|
required this.writedByAdmin,
|
||||||
required this.readed,
|
required this.readed,
|
||||||
|
|
|
||||||
|
|
@ -32,12 +32,16 @@ class UserProvider extends CoreProvier {
|
||||||
static final List<Map> _itemMarkQueue = [];
|
static final List<Map> _itemMarkQueue = [];
|
||||||
|
|
||||||
Future<String?> setAndGetToken({String? newToken}) async {
|
Future<String?> setAndGetToken({String? newToken}) async {
|
||||||
|
try {
|
||||||
if (newToken == null) {
|
if (newToken == null) {
|
||||||
final token = await StorageService.getValue(key: 'token');
|
final token = await StorageService.getValue(key: 'token');
|
||||||
return token;
|
return token;
|
||||||
}
|
}
|
||||||
await StorageService.setValue(key: 'token', value: newToken);
|
await StorageService.setValue(key: 'token', value: newToken);
|
||||||
return null;
|
return null;
|
||||||
|
} catch (e) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Future<bool> getUserInfo() async {
|
Future<bool> getUserInfo() async {
|
||||||
|
|
@ -49,6 +53,7 @@ class UserProvider extends CoreProvier {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if (service.isSuccess) {
|
if (service.isSuccess) {
|
||||||
|
try {
|
||||||
user = User.fromJson(service.result['user']);
|
user = User.fromJson(service.result['user']);
|
||||||
await StorageService.setValue(
|
await StorageService.setValue(
|
||||||
key: 'notificationTimeRangeStart',
|
key: 'notificationTimeRangeStart',
|
||||||
|
|
@ -58,9 +63,17 @@ class UserProvider extends CoreProvier {
|
||||||
key: 'notificationTimeRangeEnd',
|
key: 'notificationTimeRangeEnd',
|
||||||
value: service.result['user']['end'],
|
value: service.result['user']['end'],
|
||||||
);
|
);
|
||||||
AppInitializer.initializeFirebase().then((_) => _registerFirebaseToken());
|
|
||||||
|
AppInitializer.initializeFirebase().then((_) {
|
||||||
|
_registerFirebaseToken();
|
||||||
|
}).catchError((err) {});
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
} catch (e) {
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
throw 'Getting user from API failed!';
|
throw 'Getting user from API failed!';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -137,11 +137,16 @@ class RouteGenerator {
|
||||||
);
|
);
|
||||||
case Routes.podcasts:
|
case Routes.podcasts:
|
||||||
return _createRoute(
|
return _createRoute(
|
||||||
const Podcasts(viewPodcasts: true),
|
Podcasts(
|
||||||
|
viewPodcasts: true,
|
||||||
|
pageData: settings.arguments as Map<String, dynamic>?,
|
||||||
|
),
|
||||||
);
|
);
|
||||||
case Routes.videocasts:
|
case Routes.videocasts:
|
||||||
return _createRoute(
|
return _createRoute(
|
||||||
const Podcasts(),
|
Podcasts(
|
||||||
|
pageData: settings.arguments as Map<String, dynamic>?,
|
||||||
|
),
|
||||||
);
|
);
|
||||||
case Routes.radars:
|
case Routes.radars:
|
||||||
return _createRoute(
|
return _createRoute(
|
||||||
|
|
@ -160,7 +165,9 @@ class RouteGenerator {
|
||||||
case Routes.infography:
|
case Routes.infography:
|
||||||
return _createRoute(ChangeNotifierProvider<InfographyScreenState>(
|
return _createRoute(ChangeNotifierProvider<InfographyScreenState>(
|
||||||
create: (context) => InfographyScreenState(),
|
create: (context) => InfographyScreenState(),
|
||||||
child: const InfographyScreen(),
|
child: InfographyScreen(
|
||||||
|
pageData: settings.arguments as Map<String, dynamic>?,
|
||||||
|
),
|
||||||
));
|
));
|
||||||
|
|
||||||
case Routes.radarDetails:
|
case Routes.radarDetails:
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,4 @@
|
||||||
|
import 'package:didvan/models/notification_message.dart';
|
||||||
import 'package:flutter/cupertino.dart';
|
import 'package:flutter/cupertino.dart';
|
||||||
import 'package:home_widget/home_widget.dart';
|
import 'package:home_widget/home_widget.dart';
|
||||||
import 'package:persian_number_utility/persian_number_utility.dart';
|
import 'package:persian_number_utility/persian_number_utility.dart';
|
||||||
|
|
@ -90,9 +91,7 @@ class HomeWidgetRepository {
|
||||||
'${data.link}',
|
'${data.link}',
|
||||||
mode: LaunchMode.inAppWebView,
|
mode: LaunchMode.inAppWebView,
|
||||||
);
|
);
|
||||||
return;
|
} else {
|
||||||
}
|
|
||||||
|
|
||||||
switch (data.type!) {
|
switch (data.type!) {
|
||||||
case "infography":
|
case "infography":
|
||||||
route = Routes.infography;
|
route = Routes.infography;
|
||||||
|
|
@ -140,6 +139,7 @@ class HomeWidgetRepository {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (route.isNotEmpty) {
|
if (route.isNotEmpty) {
|
||||||
Future.delayed(
|
Future.delayed(
|
||||||
|
|
@ -151,4 +151,78 @@ class HomeWidgetRepository {
|
||||||
await HomeWidget.saveWidgetData("uri", "");
|
await HomeWidget.saveWidgetData("uri", "");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static NotificationMessage? data;
|
||||||
|
static Future<void> decideWhereToGoNotif() async {
|
||||||
|
NotificationMessage? data = HomeWidgetRepository.data;
|
||||||
|
// Navigate into pages, avoiding to open the notification details page over another details page already opened
|
||||||
|
String route = "";
|
||||||
|
dynamic args;
|
||||||
|
bool openComments = data!.notificationType.toString() == "2";
|
||||||
|
|
||||||
|
if (data.link.toString().isEmpty) {
|
||||||
|
switch (data.type!) {
|
||||||
|
case "infography":
|
||||||
|
route = Routes.infography;
|
||||||
|
args = {
|
||||||
|
// 'onMarkChanged': (id, value) =>
|
||||||
|
// markChangeHandler(data.type, id, value),
|
||||||
|
'id': int.parse(data.id.toString()),
|
||||||
|
'args': const InfographyRequestArgs(page: 0),
|
||||||
|
'hasUnmarkConfirmation': false,
|
||||||
|
'goToComment': openComments
|
||||||
|
};
|
||||||
|
break;
|
||||||
|
case "news":
|
||||||
|
route = Routes.newsDetails;
|
||||||
|
args = {
|
||||||
|
// 'onMarkChanged': (id, value) =>
|
||||||
|
// markChangeHandler(data.type, id, value),
|
||||||
|
'id': int.parse(data.id.toString()),
|
||||||
|
'args': const NewsRequestArgs(page: 0),
|
||||||
|
'hasUnmarkConfirmation': false,
|
||||||
|
'goToComment': openComments
|
||||||
|
};
|
||||||
|
break;
|
||||||
|
case "radar":
|
||||||
|
route = Routes.radarDetails;
|
||||||
|
args = {
|
||||||
|
// 'onMarkChanged': (id, value) =>
|
||||||
|
// markChangeHandler(data.type, id, value),
|
||||||
|
'id': int.parse(data.id.toString()),
|
||||||
|
'args': const RadarRequestArgs(page: 0),
|
||||||
|
'hasUnmarkConfirmation': false,
|
||||||
|
'goToComment': openComments
|
||||||
|
};
|
||||||
|
break;
|
||||||
|
case "video":
|
||||||
|
route = Routes.studioDetails;
|
||||||
|
args = {
|
||||||
|
'type': 'podcast',
|
||||||
|
'id': int.parse(data.id.toString()),
|
||||||
|
'goToComment': openComments
|
||||||
|
};
|
||||||
|
break;
|
||||||
|
case "podcast":
|
||||||
|
route = Routes.podcasts;
|
||||||
|
args = {
|
||||||
|
'type': 'podcast',
|
||||||
|
'id': int.parse(data.id.toString()),
|
||||||
|
'goToComment': openComments
|
||||||
|
};
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
if (data.link!.startsWith('http')) {
|
||||||
|
launchUrlString(
|
||||||
|
'${data.link}',
|
||||||
|
mode: LaunchMode.inAppWebView,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (route.isNotEmpty) {
|
||||||
|
navigatorKey.currentState!.pushNamed(route, arguments: args);
|
||||||
|
}
|
||||||
|
return;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -43,9 +43,12 @@ class AppInitializer {
|
||||||
}
|
}
|
||||||
|
|
||||||
static Future<SettingsData> initilizeSettings() async {
|
static Future<SettingsData> initilizeSettings() async {
|
||||||
|
try {
|
||||||
final brightness = await StorageService.getValue(key: 'brightness');
|
final brightness = await StorageService.getValue(key: 'brightness');
|
||||||
|
|
||||||
if (brightness != null) {
|
if (brightness != null) {
|
||||||
final themeMode = brightness == 'dark' ? ThemeMode.dark : ThemeMode.light;
|
final themeMode =
|
||||||
|
brightness == 'dark' ? ThemeMode.dark : ThemeMode.light;
|
||||||
final fontFamily = await StorageService.getValue(key: 'fontFamily');
|
final fontFamily = await StorageService.getValue(key: 'fontFamily');
|
||||||
final fontScale = double.parse(
|
final fontScale = double.parse(
|
||||||
await StorageService.getValue(key: 'fontSizeScale'),
|
await StorageService.getValue(key: 'fontSizeScale'),
|
||||||
|
|
@ -82,6 +85,33 @@ class AppInitializer {
|
||||||
themeMode: ThemeMode.light,
|
themeMode: ThemeMode.light,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
} catch (e) {
|
||||||
|
await StorageService.setValue(
|
||||||
|
key: 'notificationTimeRangeStart',
|
||||||
|
value: '0',
|
||||||
|
);
|
||||||
|
await StorageService.setValue(
|
||||||
|
key: 'notificationTimeRangeEnd',
|
||||||
|
value: '24',
|
||||||
|
);
|
||||||
|
await StorageService.setValue(
|
||||||
|
key: 'fontFamily',
|
||||||
|
value: 'Dana-FA',
|
||||||
|
);
|
||||||
|
await StorageService.setValue(
|
||||||
|
key: 'fontSizeScale',
|
||||||
|
value: '1',
|
||||||
|
);
|
||||||
|
await StorageService.setValue(
|
||||||
|
key: 'brightness',
|
||||||
|
value: 'light',
|
||||||
|
);
|
||||||
|
return SettingsData(
|
||||||
|
fontFamily: 'Dana-FA',
|
||||||
|
fontScale: 1,
|
||||||
|
themeMode: ThemeMode.light,
|
||||||
|
);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static Future<void> handleCLick(
|
static Future<void> handleCLick(
|
||||||
|
|
@ -141,18 +171,26 @@ class AppInitializer {
|
||||||
appId: '1:935017686266:ios:de47638bd662463fd2d543',
|
appId: '1:935017686266:ios:de47638bd662463fd2d543',
|
||||||
messagingSenderId: '935017686266',
|
messagingSenderId: '935017686266',
|
||||||
projectId: 'didvan-9b7da',
|
projectId: 'didvan-9b7da',
|
||||||
|
// iosBundleId: "com.didvan.didvanapp",
|
||||||
|
// storageBucket: "didvan-9b7da.appspot.com",
|
||||||
|
// iosClientId:
|
||||||
|
// "935017686266-54hu01v9cc5pqpgofo1gk2n3hegj4r2m.apps.googleusercontent.com"
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
Firebase.app();
|
Firebase.app();
|
||||||
}
|
}
|
||||||
|
|
||||||
final initMsg = await FirebaseMessaging.instance.getInitialMessage();
|
final initMsg = await FirebaseMessaging.instance.getInitialMessage();
|
||||||
|
|
||||||
if (initMsg != null) {
|
if (initMsg != null) {
|
||||||
|
print("aaaaaaaaaa: ${initMsg.data}");
|
||||||
clickAction = initMsg.data['click_action'].replaceAll(
|
clickAction = initMsg.data['click_action'].replaceAll(
|
||||||
'navigate-',
|
'navigate-',
|
||||||
'',
|
'',
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
final FirebaseMessaging fcm = FirebaseMessaging.instance;
|
final FirebaseMessaging fcm = FirebaseMessaging.instance;
|
||||||
fcmToken = await fcm.getToken(
|
fcmToken = await fcm.getToken(
|
||||||
vapidKey: kIsWeb
|
vapidKey: kIsWeb
|
||||||
|
|
|
||||||
|
|
@ -1,12 +1,6 @@
|
||||||
import 'package:awesome_notifications/awesome_notifications.dart';
|
import 'package:awesome_notifications/awesome_notifications.dart';
|
||||||
import 'package:didvan/main.dart';
|
import 'package:didvan/services/app_home_widget/home_widget_repository.dart';
|
||||||
import 'package:url_launcher/url_launcher_string.dart';
|
|
||||||
|
|
||||||
import '../../../models/notification_message.dart';
|
import '../../../models/notification_message.dart';
|
||||||
import '../../../models/requests/infography.dart';
|
|
||||||
import '../../../models/requests/news.dart';
|
|
||||||
import '../../../models/requests/radar.dart';
|
|
||||||
import '../../../routes/routes.dart';
|
|
||||||
|
|
||||||
class NotificationController {
|
class NotificationController {
|
||||||
/// Use this method to detect when a new notification or a schedule is created
|
/// Use this method to detect when a new notification or a schedule is created
|
||||||
|
|
@ -14,7 +8,8 @@ class NotificationController {
|
||||||
static Future<void> onNotificationCreatedMethod(
|
static Future<void> onNotificationCreatedMethod(
|
||||||
ReceivedNotification receivedNotification) async {
|
ReceivedNotification receivedNotification) async {
|
||||||
// Your code goes here
|
// Your code goes here
|
||||||
// print("onNotificationCreatedMethod--------------------------------------------------------------");
|
print(
|
||||||
|
"onNotificationCreatedMethod--------------------------------------------------------------");
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Use this method to detect every time that a new notification is displayed
|
/// Use this method to detect every time that a new notification is displayed
|
||||||
|
|
@ -22,7 +17,8 @@ class NotificationController {
|
||||||
static Future<void> onNotificationDisplayedMethod(
|
static Future<void> onNotificationDisplayedMethod(
|
||||||
ReceivedNotification receivedNotification) async {
|
ReceivedNotification receivedNotification) async {
|
||||||
// Your code goes here
|
// Your code goes here
|
||||||
// print("onNotificationDisplayedMethod--------------------------------------------------------------");
|
print(
|
||||||
|
"onNotificationDisplayedMethod--------------------------------------------------------------");
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Use this method to detect if the user dismissed a notification
|
/// Use this method to detect if the user dismissed a notification
|
||||||
|
|
@ -30,88 +26,25 @@ class NotificationController {
|
||||||
static Future<void> onDismissActionReceivedMethod(
|
static Future<void> onDismissActionReceivedMethod(
|
||||||
ReceivedAction receivedAction) async {
|
ReceivedAction receivedAction) async {
|
||||||
// Your code goes here
|
// Your code goes here
|
||||||
// print("onDismissActionReceivedMethod--------------------------------------------------------------");
|
print(
|
||||||
|
"onDismissActionReceivedMethod--------------------------------------------------------------");
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Use this method to detect when the user taps on a notification or action button
|
/// Use this method to detect when the user taps on a notification or action button
|
||||||
@pragma("vm:entry-point")
|
@pragma("vm:entry-point")
|
||||||
static Future<void> onActionReceivedMethod(
|
static Future<void> onActionReceivedMethod(
|
||||||
ReceivedAction receivedAction) async {
|
ReceivedAction receivedAction) async {
|
||||||
|
print("obiiiiiiiiiiiiiiii $receivedAction");
|
||||||
NotificationMessage data =
|
NotificationMessage data =
|
||||||
NotificationMessage.fromJson(receivedAction.payload!);
|
NotificationMessage.fromJson(receivedAction.payload!);
|
||||||
// Your code goes here
|
// Your code goes here
|
||||||
|
|
||||||
// Navigate into pages, avoiding to open the notification details page over another details page already opened
|
HomeWidgetRepository.data = data;
|
||||||
String route = "";
|
return;
|
||||||
dynamic args;
|
|
||||||
bool openComments = data.notificationType.toString() == "2";
|
|
||||||
|
|
||||||
if (data.link.toString().isEmpty) {
|
|
||||||
switch (data.type!) {
|
|
||||||
case "infography":
|
|
||||||
route = Routes.infography;
|
|
||||||
args = {
|
|
||||||
// 'onMarkChanged': (id, value) =>
|
|
||||||
// markChangeHandler(data.type, id, value),
|
|
||||||
'id': int.parse(data.id.toString()),
|
|
||||||
'args': const InfographyRequestArgs(page: 0),
|
|
||||||
'hasUnmarkConfirmation': false,
|
|
||||||
'goToComment': openComments
|
|
||||||
};
|
|
||||||
break;
|
|
||||||
case "news":
|
|
||||||
route = Routes.newsDetails;
|
|
||||||
args = {
|
|
||||||
// 'onMarkChanged': (id, value) =>
|
|
||||||
// markChangeHandler(data.type, id, value),
|
|
||||||
'id': int.parse(data.id.toString()),
|
|
||||||
'args': const NewsRequestArgs(page: 0),
|
|
||||||
'hasUnmarkConfirmation': false,
|
|
||||||
'goToComment': openComments
|
|
||||||
};
|
|
||||||
break;
|
|
||||||
case "radar":
|
|
||||||
route = Routes.radarDetails;
|
|
||||||
args = {
|
|
||||||
// 'onMarkChanged': (id, value) =>
|
|
||||||
// markChangeHandler(data.type, id, value),
|
|
||||||
'id': int.parse(data.id.toString()),
|
|
||||||
'args': const RadarRequestArgs(page: 0),
|
|
||||||
'hasUnmarkConfirmation': false,
|
|
||||||
'goToComment': openComments
|
|
||||||
};
|
|
||||||
break;
|
|
||||||
case "video":
|
|
||||||
route = Routes.studioDetails;
|
|
||||||
args = {
|
|
||||||
'type': 'podcast',
|
|
||||||
'id': int.parse(data.id.toString()),
|
|
||||||
'goToComment': openComments
|
|
||||||
};
|
|
||||||
break;
|
|
||||||
case "podcast":
|
|
||||||
route = Routes.podcasts;
|
|
||||||
args = {
|
|
||||||
'type': 'podcast',
|
|
||||||
'id': data.id,
|
|
||||||
};
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
if (data.link!.startsWith('http')) {
|
|
||||||
launchUrlString(
|
|
||||||
'${data.link}',
|
|
||||||
mode: LaunchMode.inAppWebView,
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (route.isNotEmpty) {
|
|
||||||
navigatorKey.currentState!.pushNamed(route, arguments: args);
|
|
||||||
}
|
|
||||||
|
|
||||||
// MyApp.navigatorKey.currentState?.pushNamedAndRemoveUntil('/notification-page',
|
// MyApp.navigatorKey.currentState?.pushNamedAndRemoveUntil('/notification-page',
|
||||||
// (route) => (route.settings.name != '/notification-page') || route.isFirst,
|
// (route) => (route.settings.name != '/notification-page') || route.isFirst,
|
||||||
// arguments: receivedAction);
|
// arguments: receivedAction);
|
||||||
// print("onActionReceivedMethod--------------------------------------------------------------");
|
print(
|
||||||
|
"onActionReceivedMethod--------------------------------------------------------------");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,9 @@
|
||||||
|
import 'dart:io';
|
||||||
|
|
||||||
import 'package:awesome_notifications/awesome_notifications.dart';
|
import 'package:awesome_notifications/awesome_notifications.dart';
|
||||||
|
import 'package:didvan/services/storage/storage.dart';
|
||||||
import 'package:firebase_messaging/firebase_messaging.dart';
|
import 'package:firebase_messaging/firebase_messaging.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:home_widget/home_widget.dart';
|
|
||||||
import 'package:intl/intl.dart';
|
import 'package:intl/intl.dart';
|
||||||
|
|
||||||
import '../../../models/notification_message.dart';
|
import '../../../models/notification_message.dart';
|
||||||
|
|
@ -11,8 +13,9 @@ import '../../network/request_helper.dart';
|
||||||
import 'awsome_notification_controller.dart';
|
import 'awsome_notification_controller.dart';
|
||||||
|
|
||||||
class AwsomeNotificationHandler {
|
class AwsomeNotificationHandler {
|
||||||
alarm() async {
|
static ReceivedAction? initialAction;
|
||||||
|
|
||||||
|
alarm() async {
|
||||||
AwesomeNotifications().initialize(
|
AwesomeNotifications().initialize(
|
||||||
// set the icon to null if you want to use the default app icon
|
// set the icon to null if you want to use the default app icon
|
||||||
null,
|
null,
|
||||||
|
|
@ -28,7 +31,8 @@ class AwsomeNotificationHandler {
|
||||||
defaultPrivacy: NotificationPrivacy.Public,
|
defaultPrivacy: NotificationPrivacy.Public,
|
||||||
defaultColor: const Color(0xFF007EA7),
|
defaultColor: const Color(0xFF007EA7),
|
||||||
criticalAlerts: true,
|
criticalAlerts: true,
|
||||||
ledColor: Colors.white)
|
ledColor: Colors.white,
|
||||||
|
)
|
||||||
],
|
],
|
||||||
|
|
||||||
// Channel groups are only visual and are not required
|
// Channel groups are only visual and are not required
|
||||||
|
|
@ -39,15 +43,10 @@ class AwsomeNotificationHandler {
|
||||||
// ],
|
// ],
|
||||||
debug: true);
|
debug: true);
|
||||||
|
|
||||||
|
startListeningNotificationEvents();
|
||||||
AwesomeNotifications().setListeners(
|
// Get initial notification action is optional
|
||||||
onActionReceivedMethod: NotificationController.onActionReceivedMethod,
|
initialAction = await AwesomeNotifications()
|
||||||
onNotificationCreatedMethod:
|
.getInitialNotificationAction(removeFromActionEvents: false);
|
||||||
NotificationController.onNotificationCreatedMethod,
|
|
||||||
onNotificationDisplayedMethod:
|
|
||||||
NotificationController.onNotificationDisplayedMethod,
|
|
||||||
onDismissActionReceivedMethod:
|
|
||||||
NotificationController.onDismissActionReceivedMethod);
|
|
||||||
|
|
||||||
AwesomeNotifications().isNotificationAllowed().then((isAllowed) {
|
AwesomeNotifications().isNotificationAllowed().then((isAllowed) {
|
||||||
//It would be more appropriate if you can show your own dialog
|
//It would be more appropriate if you can show your own dialog
|
||||||
|
|
@ -67,6 +66,19 @@ class AwsomeNotificationHandler {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@pragma("vm:entry-point")
|
||||||
|
static Future<void> startListeningNotificationEvents() async {
|
||||||
|
await AwesomeNotifications().setListeners(
|
||||||
|
onActionReceivedMethod: NotificationController.onActionReceivedMethod,
|
||||||
|
onNotificationCreatedMethod:
|
||||||
|
NotificationController.onNotificationCreatedMethod,
|
||||||
|
onNotificationDisplayedMethod:
|
||||||
|
NotificationController.onNotificationDisplayedMethod,
|
||||||
|
onDismissActionReceivedMethod:
|
||||||
|
NotificationController.onDismissActionReceivedMethod);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
show(RemoteMessage message) async {
|
show(RemoteMessage message) async {
|
||||||
NotificationMessage notificationMessage =
|
NotificationMessage notificationMessage =
|
||||||
NotificationMessage.fromJson(message.data);
|
NotificationMessage.fromJson(message.data);
|
||||||
|
|
@ -103,8 +115,11 @@ class AwsomeNotificationHandler {
|
||||||
actionType: ActionType.Default,
|
actionType: ActionType.Default,
|
||||||
title: "\u200f ${message.title} \u200f",
|
title: "\u200f ${message.title} \u200f",
|
||||||
// body: message.body.toString(),
|
// body: message.body.toString(),
|
||||||
notificationLayout: NotificationLayout.Default,
|
notificationLayout: Platform.isAndroid
|
||||||
|
? NotificationLayout.Default
|
||||||
|
: NotificationLayout.BigPicture,
|
||||||
largeIcon: message.image.toString(),
|
largeIcon: message.image.toString(),
|
||||||
|
bigPicture: Platform.isAndroid ? null : message.image.toString(),
|
||||||
payload: message.toPayload(),
|
payload: message.toPayload(),
|
||||||
color: const Color(0xFF007EA7)),
|
color: const Color(0xFF007EA7)),
|
||||||
);
|
);
|
||||||
|
|
@ -116,8 +131,11 @@ class AwsomeNotificationHandler {
|
||||||
actionType: ActionType.Default,
|
actionType: ActionType.Default,
|
||||||
title: "\u200f ${message.title} \u200f",
|
title: "\u200f ${message.title} \u200f",
|
||||||
// body: message.body.toString(),
|
// body: message.body.toString(),
|
||||||
notificationLayout: NotificationLayout.Default,
|
notificationLayout: Platform.isAndroid
|
||||||
|
? NotificationLayout.Default
|
||||||
|
: NotificationLayout.BigPicture,
|
||||||
largeIcon: message.image.toString(),
|
largeIcon: message.image.toString(),
|
||||||
|
bigPicture: Platform.isAndroid ? null : message.image.toString(),
|
||||||
payload: message.toPayload(),
|
payload: message.toPayload(),
|
||||||
color: const Color(0xFF007EA7)),
|
color: const Color(0xFF007EA7)),
|
||||||
schedule: NotificationCalendar(
|
schedule: NotificationCalendar(
|
||||||
|
|
@ -153,7 +171,9 @@ class AwsomeNotificationHandler {
|
||||||
actionType: ActionType.Default,
|
actionType: ActionType.Default,
|
||||||
body:
|
body:
|
||||||
"<b>${message.title.toString()}</b> ${message.body.toString()}",
|
"<b>${message.title.toString()}</b> ${message.body.toString()}",
|
||||||
largeIcon: message.photo.toString(),
|
largeIcon: Platform.isAndroid
|
||||||
|
? message.photo.toString()
|
||||||
|
: message.image.toString(),
|
||||||
roundedLargeIcon: true,
|
roundedLargeIcon: true,
|
||||||
bigPicture: message.image.toString(),
|
bigPicture: message.image.toString(),
|
||||||
payload: message.toPayload(),
|
payload: message.toPayload(),
|
||||||
|
|
@ -190,7 +210,7 @@ class AwsomeNotificationHandler {
|
||||||
'Simple body with a bunch of Emojis! ${Emojis.transport_police_car} ${Emojis.animals_dog} ${Emojis.flag_UnitedStates} ${Emojis.person_baby}',
|
'Simple body with a bunch of Emojis! ${Emojis.transport_police_car} ${Emojis.animals_dog} ${Emojis.flag_UnitedStates} ${Emojis.person_baby}',
|
||||||
largeIcon:
|
largeIcon:
|
||||||
'https://cdn.britannica.com/72/232772-050-4E3D86CC/mind-blown-emoji-head-exploding-emoticon.jpg',
|
'https://cdn.britannica.com/72/232772-050-4E3D86CC/mind-blown-emoji-head-exploding-emoticon.jpg',
|
||||||
notificationLayout: NotificationLayout.BigPicture,
|
notificationLayout: NotificationLayout.Default,
|
||||||
payload: {
|
payload: {
|
||||||
'title': 'Notification Title',
|
'title': 'Notification Title',
|
||||||
'body': 'Notification Body',
|
'body': 'Notification Body',
|
||||||
|
|
@ -200,14 +220,13 @@ class AwsomeNotificationHandler {
|
||||||
}
|
}
|
||||||
|
|
||||||
Future<DateTime?> _getTime() async {
|
Future<DateTime?> _getTime() async {
|
||||||
await HomeWidget.getWidgetData<String>('token', defaultValue: "")
|
final token = await StorageService.getValue(key: 'token');
|
||||||
.then((value) async {
|
|
||||||
final service = RequestService(RequestHelper.notificationTime(),
|
final service = RequestService(RequestHelper.notificationTime(),
|
||||||
useAutherization: false,
|
useAutherization: false,
|
||||||
requestHeaders: {
|
requestHeaders: {
|
||||||
"accept": "*/*",
|
"accept": "*/*",
|
||||||
"Content-Type": "application/json; charset=UTF-8",
|
"Content-Type": "application/json; charset=UTF-8",
|
||||||
'Authorization': 'Bearer $value'
|
'Authorization': 'Bearer $token'
|
||||||
});
|
});
|
||||||
await service.httpGet();
|
await service.httpGet();
|
||||||
if (service.isSuccess) {
|
if (service.isSuccess) {
|
||||||
|
|
@ -216,12 +235,11 @@ class AwsomeNotificationHandler {
|
||||||
if (time.toString().isNotEmpty) {
|
if (time.toString().isNotEmpty) {
|
||||||
DateFormat format = DateFormat("HH:mm");
|
DateFormat format = DateFormat("HH:mm");
|
||||||
DateTime dateTime = format.parse(time);
|
DateTime dateTime = format.parse(time);
|
||||||
result = DateTime.now().copyWith(hour: dateTime.hour, minute: dateTime.minute);
|
result = DateTime.now()
|
||||||
}
|
.copyWith(hour: dateTime.hour, minute: dateTime.minute);
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
});
|
}
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,5 @@
|
||||||
|
import 'dart:io';
|
||||||
|
|
||||||
import 'package:firebase_core/firebase_core.dart';
|
import 'package:firebase_core/firebase_core.dart';
|
||||||
import 'package:firebase_messaging/firebase_messaging.dart';
|
import 'package:firebase_messaging/firebase_messaging.dart';
|
||||||
import 'package:flutter/cupertino.dart';
|
import 'package:flutter/cupertino.dart';
|
||||||
|
|
@ -20,11 +22,22 @@ class FirebaseNotificationHandler {
|
||||||
messagingSenderId: "935017686266",
|
messagingSenderId: "935017686266",
|
||||||
appId: "1:935017686266:web:a93f7a19bed23c51d2d543",
|
appId: "1:935017686266:web:a93f7a19bed23c51d2d543",
|
||||||
measurementId: "G-80B4H9E8Y0")
|
measurementId: "G-80B4H9E8Y0")
|
||||||
: const FirebaseOptions(
|
: Platform.isAndroid
|
||||||
|
? const FirebaseOptions(
|
||||||
apiKey: 'AIzaSyBp-UHjWeM0H0UHtX5yguFKG-riMzvvCzw',
|
apiKey: 'AIzaSyBp-UHjWeM0H0UHtX5yguFKG-riMzvvCzw',
|
||||||
appId: '1:935017686266:android:f9cbc9aba8e3d65ed2d543',
|
appId: '1:935017686266:android:f9cbc9aba8e3d65ed2d543',
|
||||||
messagingSenderId: '935017686266',
|
messagingSenderId: '935017686266',
|
||||||
projectId: 'didvan-9b7da',
|
projectId: 'didvan-9b7da',
|
||||||
|
)
|
||||||
|
: const FirebaseOptions(
|
||||||
|
apiKey: 'AIzaSyCMa-zg_uVhOfTnea5Klz6aPZlgHwVGj7U',
|
||||||
|
appId: '1:935017686266:ios:de47638bd662463fd2d543',
|
||||||
|
messagingSenderId: '935017686266',
|
||||||
|
projectId: 'didvan-9b7da',
|
||||||
|
// iosBundleId: "com.didvan.didvanapp",
|
||||||
|
// storageBucket: "didvan-9b7da.appspot.com",
|
||||||
|
// iosClientId:
|
||||||
|
// "935017686266-54hu01v9cc5pqpgofo1gk2n3hegj4r2m.apps.googleusercontent.com"
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
final initMsg = await FirebaseMessaging.instance.getInitialMessage();
|
final initMsg = await FirebaseMessaging.instance.getInitialMessage();
|
||||||
|
|
@ -56,5 +69,4 @@ class FirebaseNotificationHandler {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -40,6 +40,7 @@ class _AuthenticationState extends State<Authentication> {
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return Scaffold(
|
return Scaffold(
|
||||||
|
resizeToAvoidBottomInset: false,
|
||||||
body: Consumer<AuthenticationState>(
|
body: Consumer<AuthenticationState>(
|
||||||
builder: (context, state, child) => WillPopScope(
|
builder: (context, state, child) => WillPopScope(
|
||||||
onWillPop: () async {
|
onWillPop: () async {
|
||||||
|
|
|
||||||
|
|
@ -48,11 +48,11 @@ class AuthenticationState extends CoreProvier {
|
||||||
await service.post();
|
await service.post();
|
||||||
if (service.isSuccess && service.result['loggedIn']) {
|
if (service.isSuccess && service.result['loggedIn']) {
|
||||||
final token = service.result['token'];
|
final token = service.result['token'];
|
||||||
appState = AppState.idle;
|
|
||||||
await userProvider.setAndGetToken(newToken: token);
|
await userProvider.setAndGetToken(newToken: token);
|
||||||
RequestService.token = token;
|
RequestService.token = token;
|
||||||
HomeWidget.saveWidgetData("token", token.toString());
|
HomeWidget.saveWidgetData("token", token.toString());
|
||||||
await userProvider.getUserInfo();
|
await userProvider.getUserInfo();
|
||||||
|
appState = AppState.idle;
|
||||||
return token;
|
return token;
|
||||||
} else {
|
} else {
|
||||||
appState = AppState.failed;
|
appState = AppState.failed;
|
||||||
|
|
|
||||||
|
|
@ -76,12 +76,12 @@ class _PasswordInputState extends State<PasswordInput> {
|
||||||
final userProvider = context.read<UserProvider>();
|
final userProvider = context.read<UserProvider>();
|
||||||
final token = await state.login(userProvider);
|
final token = await state.login(userProvider);
|
||||||
if (token != null) {
|
if (token != null) {
|
||||||
ActionSheetUtils.showLogoLoadingIndicator();
|
|
||||||
await ServerDataProvider.getData();
|
await ServerDataProvider.getData();
|
||||||
ActionSheetUtils.pop();
|
|
||||||
if (mounted) {
|
if (mounted) {
|
||||||
Navigator.of(context).pushReplacementNamed(Routes.home);
|
Navigator.of(context).pushReplacementNamed(Routes.home);
|
||||||
}
|
}
|
||||||
|
|
||||||
_showResetPasswordDialog();
|
_showResetPasswordDialog();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -130,6 +130,7 @@ class DirectState extends CoreProvier {
|
||||||
replyRadar = null;
|
replyRadar = null;
|
||||||
replyNews = null;
|
replyNews = null;
|
||||||
notifyListeners();
|
notifyListeners();
|
||||||
|
|
||||||
final service =
|
final service =
|
||||||
RequestService(RequestHelper.sendDirectMessage(typeId), body: body);
|
RequestService(RequestHelper.sendDirectMessage(typeId), body: body);
|
||||||
|
|
||||||
|
|
@ -147,7 +148,30 @@ class DirectState extends CoreProvier {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
service.multipart(
|
messages.insert(
|
||||||
|
0,
|
||||||
|
MessageData(
|
||||||
|
id: 0,
|
||||||
|
writedByAdmin: false,
|
||||||
|
readed: false,
|
||||||
|
createdAt:
|
||||||
|
DateTime.now().subtract(const Duration(minutes: 210)).toString(),
|
||||||
|
text: text,
|
||||||
|
audio: null,
|
||||||
|
audioFile: uploadFile,
|
||||||
|
radar: replyRadar,
|
||||||
|
news: replyNews,
|
||||||
|
audioDuration: audioDuration,
|
||||||
|
),
|
||||||
|
);
|
||||||
|
|
||||||
|
dailyMessages.clear();
|
||||||
|
|
||||||
|
for (var i = 0; i < messages.length; i++) {
|
||||||
|
_addToDailyGrouped(messages[i]);
|
||||||
|
}
|
||||||
|
|
||||||
|
await service.multipart(
|
||||||
file: Platform.isIOS
|
file: Platform.isIOS
|
||||||
? File(uploadFile.path.replaceAll('file://', ''))
|
? File(uploadFile.path.replaceAll('file://', ''))
|
||||||
: uploadFile,
|
: uploadFile,
|
||||||
|
|
@ -157,6 +181,11 @@ class DirectState extends CoreProvier {
|
||||||
mediaExtension: 'm4a',
|
mediaExtension: 'm4a',
|
||||||
mediaFormat: 'audio',
|
mediaFormat: 'audio',
|
||||||
);
|
);
|
||||||
|
|
||||||
|
if (service.isSuccess) {
|
||||||
|
final message = service.result['message'];
|
||||||
|
messages[0].id = MessageData.fromJson(message).id;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -98,7 +98,9 @@ class _AudioControllerButton extends StatelessWidget {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (snapshot.data == null && _nowPlaying) {
|
if (snapshot.data == null &&
|
||||||
|
_nowPlaying &&
|
||||||
|
MediaService.audioPlayer.isPlaying.value) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (audioMetaData != null) {
|
if (audioMetaData != null) {
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,10 @@
|
||||||
|
import 'package:awesome_notifications/awesome_notifications.dart';
|
||||||
import 'package:didvan/config/design_config.dart';
|
import 'package:didvan/config/design_config.dart';
|
||||||
|
import 'package:didvan/models/notification_message.dart';
|
||||||
import 'package:didvan/providers/theme.dart';
|
import 'package:didvan/providers/theme.dart';
|
||||||
import 'package:didvan/services/app_initalizer.dart';
|
import 'package:didvan/services/app_initalizer.dart';
|
||||||
|
import 'package:didvan/services/notification/awsome/awsome_notification_controller.dart';
|
||||||
|
import 'package:didvan/services/notification/awsome/awsome_notification_handler.dart';
|
||||||
import 'package:didvan/views/home/bookmarks/bookmarks.dart';
|
import 'package:didvan/views/home/bookmarks/bookmarks.dart';
|
||||||
import 'package:didvan/views/home/categories/categories_page.dart';
|
import 'package:didvan/views/home/categories/categories_page.dart';
|
||||||
import 'package:didvan/views/home/main/main_page.dart';
|
import 'package:didvan/views/home/main/main_page.dart';
|
||||||
|
|
@ -26,6 +30,8 @@ class _HomeState extends State<Home>
|
||||||
|
|
||||||
@override
|
@override
|
||||||
void initState() {
|
void initState() {
|
||||||
|
AwsomeNotificationHandler.startListeningNotificationEvents();
|
||||||
|
|
||||||
final state = context.read<HomeState>();
|
final state = context.read<HomeState>();
|
||||||
DesignConfig.updateSystemUiOverlayStyle();
|
DesignConfig.updateSystemUiOverlayStyle();
|
||||||
_tabController = TabController(length: 4, vsync: this, initialIndex: 0);
|
_tabController = TabController(length: 4, vsync: this, initialIndex: 0);
|
||||||
|
|
@ -33,9 +39,14 @@ class _HomeState extends State<Home>
|
||||||
_tabController.addListener(() {
|
_tabController.addListener(() {
|
||||||
state.currentPageIndex = _tabController.index;
|
state.currentPageIndex = _tabController.index;
|
||||||
});
|
});
|
||||||
|
|
||||||
Future.delayed(Duration.zero, () {
|
Future.delayed(Duration.zero, () {
|
||||||
HomeWidgetRepository.fetchWidget();
|
HomeWidgetRepository.fetchWidget();
|
||||||
HomeWidgetRepository.decideWhereToGo();
|
HomeWidgetRepository.decideWhereToGo();
|
||||||
|
NotificationMessage? data = HomeWidgetRepository.data;
|
||||||
|
if (data != null) {
|
||||||
|
HomeWidgetRepository.decideWhereToGoNotif();
|
||||||
|
}
|
||||||
AppInitializer.handleCLick(state, _tabController);
|
AppInitializer.handleCLick(state, _tabController);
|
||||||
});
|
});
|
||||||
state.refresh();
|
state.refresh();
|
||||||
|
|
|
||||||
|
|
@ -142,6 +142,11 @@ class HomeState extends CoreProvier {
|
||||||
|
|
||||||
void refresh() async {
|
void refresh() async {
|
||||||
menuItems = [
|
menuItems = [
|
||||||
|
MenuItemType(
|
||||||
|
label: 'آمار و داده',
|
||||||
|
asset: Assets.stats,
|
||||||
|
link: 'tab-0',
|
||||||
|
),
|
||||||
MenuItemType(
|
MenuItemType(
|
||||||
label: 'دنیای فولاد',
|
label: 'دنیای فولاد',
|
||||||
asset: Assets.fooladWorld,
|
asset: Assets.fooladWorld,
|
||||||
|
|
@ -153,19 +158,19 @@ class HomeState extends CoreProvier {
|
||||||
link: Routes.radars,
|
link: Routes.radars,
|
||||||
),
|
),
|
||||||
MenuItemType(
|
MenuItemType(
|
||||||
label: 'آمار و داده',
|
label: 'ویدیوکست',
|
||||||
asset: Assets.stats,
|
asset: Assets.videocast,
|
||||||
link: 'tab-0',
|
link: Routes.videocasts,
|
||||||
),
|
),
|
||||||
MenuItemType(
|
MenuItemType(
|
||||||
label: 'سها',
|
label: 'پادکست',
|
||||||
asset: Assets.saha,
|
asset: Assets.podcast,
|
||||||
link: 'https://saha.didvan.app',
|
link: Routes.podcasts,
|
||||||
),
|
),
|
||||||
MenuItemType(
|
MenuItemType(
|
||||||
label: 'رادار استارتآپ',
|
label: 'اینفوگرافی',
|
||||||
asset: Assets.startup,
|
asset: Assets.infography,
|
||||||
link: 'https://startup.didvan.app/',
|
link: Routes.infography,
|
||||||
),
|
),
|
||||||
MenuItemType(
|
MenuItemType(
|
||||||
label: 'رادار روند',
|
label: 'رادار روند',
|
||||||
|
|
@ -183,19 +188,14 @@ class HomeState extends CoreProvier {
|
||||||
link: 'https://risk.didvan.app/',
|
link: 'https://risk.didvan.app/',
|
||||||
),
|
),
|
||||||
MenuItemType(
|
MenuItemType(
|
||||||
label: 'اینفوگرافی',
|
label: 'رادار استارتآپ',
|
||||||
asset: Assets.infography,
|
asset: Assets.startup,
|
||||||
link: Routes.infography,
|
link: 'https://startup.didvan.app/',
|
||||||
),
|
),
|
||||||
MenuItemType(
|
MenuItemType(
|
||||||
label: 'ویدیوکست',
|
label: 'سها',
|
||||||
asset: Assets.videocast,
|
asset: Assets.saha,
|
||||||
link: Routes.videocasts,
|
link: 'https://saha.didvan.app',
|
||||||
),
|
|
||||||
MenuItemType(
|
|
||||||
label: 'پادکست',
|
|
||||||
asset: Assets.podcast,
|
|
||||||
link: Routes.podcasts,
|
|
||||||
),
|
),
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -3,6 +3,7 @@ import 'dart:async';
|
||||||
import 'package:didvan/constants/app_icons.dart';
|
import 'package:didvan/constants/app_icons.dart';
|
||||||
import 'package:didvan/models/infography/info_tag.dart';
|
import 'package:didvan/models/infography/info_tag.dart';
|
||||||
import 'package:didvan/models/view/action_sheet_data.dart';
|
import 'package:didvan/models/view/action_sheet_data.dart';
|
||||||
|
import 'package:didvan/routes/routes.dart';
|
||||||
import 'package:didvan/utils/action_sheet.dart';
|
import 'package:didvan/utils/action_sheet.dart';
|
||||||
import 'package:didvan/views/home/infography/infography_screen_state.dart';
|
import 'package:didvan/views/home/infography/infography_screen_state.dart';
|
||||||
import 'package:didvan/views/home/main/widgets/infography_item.dart';
|
import 'package:didvan/views/home/main/widgets/infography_item.dart';
|
||||||
|
|
@ -20,7 +21,8 @@ import 'package:provider/provider.dart';
|
||||||
import 'package:animated_custom_dropdown/custom_dropdown.dart';
|
import 'package:animated_custom_dropdown/custom_dropdown.dart';
|
||||||
|
|
||||||
class InfographyScreen extends StatefulWidget {
|
class InfographyScreen extends StatefulWidget {
|
||||||
const InfographyScreen({super.key});
|
final Map<String, dynamic>? pageData;
|
||||||
|
const InfographyScreen({super.key, this.pageData});
|
||||||
|
|
||||||
@override
|
@override
|
||||||
State<InfographyScreen> createState() => _InfographyScreenState();
|
State<InfographyScreen> createState() => _InfographyScreenState();
|
||||||
|
|
@ -36,6 +38,25 @@ class _InfographyScreenState extends State<InfographyScreen> {
|
||||||
void initState() {
|
void initState() {
|
||||||
context.read<InfographyScreenState>().init();
|
context.read<InfographyScreenState>().init();
|
||||||
_scrollController.addListener(_onScroll);
|
_scrollController.addListener(_onScroll);
|
||||||
|
|
||||||
|
if (widget.pageData?['goToComment'] != null) {
|
||||||
|
var openComments = widget.pageData?['goToComment'];
|
||||||
|
|
||||||
|
if (openComments) {
|
||||||
|
Future.delayed(
|
||||||
|
const Duration(seconds: 1),
|
||||||
|
() => Navigator.of(context).pushNamed(
|
||||||
|
Routes.mentions,
|
||||||
|
arguments: {
|
||||||
|
'id': widget.pageData?['id'],
|
||||||
|
'type': 'banner',
|
||||||
|
'title': '',
|
||||||
|
},
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
super.initState();
|
super.initState();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -34,6 +34,7 @@ class Mentions extends StatefulWidget {
|
||||||
|
|
||||||
class _MentionsState extends State<Mentions> {
|
class _MentionsState extends State<Mentions> {
|
||||||
final _focusNode = FocusNode();
|
final _focusNode = FocusNode();
|
||||||
|
final _focusNodeMention = FocusNode();
|
||||||
double _bottomPadding = 0;
|
double _bottomPadding = 0;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
|
|
@ -142,7 +143,7 @@ class _MentionsState extends State<Mentions> {
|
||||||
enableEmptyState: state.users.isEmpty,
|
enableEmptyState: state.users.isEmpty,
|
||||||
emptyState: EmptyState(
|
emptyState: EmptyState(
|
||||||
asset: Assets.emptyBookmark,
|
asset: Assets.emptyBookmark,
|
||||||
title: 'لیست خالی است',
|
title: 'لیست افراد خالی است',
|
||||||
),
|
),
|
||||||
builder: (context, state, index) {
|
builder: (context, state, index) {
|
||||||
return UserMention(
|
return UserMention(
|
||||||
|
|
@ -158,6 +159,7 @@ class _MentionsState extends State<Mentions> {
|
||||||
children: [
|
children: [
|
||||||
Expanded(
|
Expanded(
|
||||||
child: TextField(
|
child: TextField(
|
||||||
|
focusNode: _focusNodeMention,
|
||||||
keyboardType: TextInputType.multiline,
|
keyboardType: TextInputType.multiline,
|
||||||
textInputAction: TextInputAction.send,
|
textInputAction: TextInputAction.send,
|
||||||
style: Theme.of(context).textTheme.bodyMedium,
|
style: Theme.of(context).textTheme.bodyMedium,
|
||||||
|
|
@ -166,7 +168,7 @@ class _MentionsState extends State<Mentions> {
|
||||||
decoration: InputDecoration(
|
decoration: InputDecoration(
|
||||||
icon: const Icon(DidvanIcons.search_regular),
|
icon: const Icon(DidvanIcons.search_regular),
|
||||||
border: InputBorder.none,
|
border: InputBorder.none,
|
||||||
hintText: 'جستجو کنید...',
|
hintText: 'نام فرد مورد نظر را بنویسید...',
|
||||||
hintStyle: Theme.of(context)
|
hintStyle: Theme.of(context)
|
||||||
.textTheme
|
.textTheme
|
||||||
.bodySmall!
|
.bodySmall!
|
||||||
|
|
@ -204,7 +206,10 @@ class _MentionsState extends State<Mentions> {
|
||||||
left: 0,
|
left: 0,
|
||||||
right: 0,
|
right: 0,
|
||||||
bottom: MediaQuery.of(context).viewInsets.bottom,
|
bottom: MediaQuery.of(context).viewInsets.bottom,
|
||||||
child: _MessageBox(focusNode: _focusNode),
|
child: _MessageBox(
|
||||||
|
focusNode: _focusNode,
|
||||||
|
focusNodeMention: _focusNodeMention,
|
||||||
|
),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
|
|
@ -214,8 +219,11 @@ class _MentionsState extends State<Mentions> {
|
||||||
|
|
||||||
class _MessageBox extends StatefulWidget {
|
class _MessageBox extends StatefulWidget {
|
||||||
final FocusNode focusNode;
|
final FocusNode focusNode;
|
||||||
|
final FocusNode focusNodeMention;
|
||||||
|
|
||||||
const _MessageBox({Key? key, required this.focusNode}) : super(key: key);
|
const _MessageBox(
|
||||||
|
{Key? key, required this.focusNode, required this.focusNodeMention})
|
||||||
|
: super(key: key);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
State<_MessageBox> createState() => _MessageBoxState();
|
State<_MessageBox> createState() => _MessageBoxState();
|
||||||
|
|
@ -379,7 +387,18 @@ class _MessageBoxState extends State<_MessageBox> {
|
||||||
),
|
),
|
||||||
child: Row(
|
child: Row(
|
||||||
children: [
|
children: [
|
||||||
DidvanIconButton(
|
state.mentionedUsers.isEmpty
|
||||||
|
? DidvanIconButton(
|
||||||
|
onPressed: () {
|
||||||
|
state.showUsersForMentionsLayout = true;
|
||||||
|
widget.focusNodeMention.requestFocus();
|
||||||
|
state.update();
|
||||||
|
},
|
||||||
|
icon: DidvanIcons.mention_icon,
|
||||||
|
size: 24,
|
||||||
|
color: Theme.of(context).colorScheme.focusedBorder,
|
||||||
|
)
|
||||||
|
: DidvanIconButton(
|
||||||
onPressed: () => _onSend(state),
|
onPressed: () => _onSend(state),
|
||||||
icon: DidvanIcons.send_solid,
|
icon: DidvanIcons.send_solid,
|
||||||
size: 24,
|
size: 24,
|
||||||
|
|
@ -392,21 +411,32 @@ class _MessageBoxState extends State<_MessageBox> {
|
||||||
keyboardType: TextInputType.multiline,
|
keyboardType: TextInputType.multiline,
|
||||||
textInputAction: TextInputAction.send,
|
textInputAction: TextInputAction.send,
|
||||||
style: Theme.of(context).textTheme.bodyMedium,
|
style: Theme.of(context).textTheme.bodyMedium,
|
||||||
|
onTap: () {
|
||||||
|
if (state.mentionedUsers.isEmpty) {
|
||||||
|
state.showUsersForMentionsLayout = true;
|
||||||
|
widget.focusNodeMention.requestFocus();
|
||||||
|
state.update();
|
||||||
|
}
|
||||||
|
},
|
||||||
onEditingComplete: () {},
|
onEditingComplete: () {},
|
||||||
onSubmitted: (value) => _onSend(state),
|
onSubmitted: (value) => _onSend(state),
|
||||||
decoration: InputDecoration(
|
decoration: InputDecoration(
|
||||||
border: InputBorder.none,
|
border: InputBorder.none,
|
||||||
hintText: 'پیام خود را ارسال کنید',
|
hintMaxLines: 2,
|
||||||
|
hintText: state.mentionedUsers.isEmpty
|
||||||
|
? 'همکاران خود را فراخوانی کنید'
|
||||||
|
: 'پیام خود را ارسال کنید',
|
||||||
hintStyle: Theme.of(context).textTheme.bodySmall!.copyWith(
|
hintStyle: Theme.of(context).textTheme.bodySmall!.copyWith(
|
||||||
color: Theme.of(context).colorScheme.disabledText),
|
color: Theme.of(context).colorScheme.disabledText),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
const Spacer(),
|
if (!state.showUsersForMentionsLayout &&
|
||||||
if (!state.showUsersForMentionsLayout)
|
state.mentionedUsers.isNotEmpty)
|
||||||
DidvanIconButton(
|
DidvanIconButton(
|
||||||
onPressed: () {
|
onPressed: () {
|
||||||
state.showUsersForMentionsLayout = true;
|
state.showUsersForMentionsLayout = true;
|
||||||
|
widget.focusNodeMention.requestFocus();
|
||||||
state.update();
|
state.update();
|
||||||
},
|
},
|
||||||
icon: DidvanIcons.mention_icon,
|
icon: DidvanIcons.mention_icon,
|
||||||
|
|
|
||||||
|
|
@ -85,6 +85,8 @@ class MentionState extends State<Mention> {
|
||||||
color: Theme.of(context).colorScheme.caption,
|
color: Theme.of(context).colorScheme.caption,
|
||||||
),
|
),
|
||||||
const SizedBox(width: 4),
|
const SizedBox(width: 4),
|
||||||
|
if (comment.user.id ==
|
||||||
|
context.read<UserProvider>().user.id)
|
||||||
DidvanIconButton(
|
DidvanIconButton(
|
||||||
size: 18,
|
size: 18,
|
||||||
gestureSize: 24,
|
gestureSize: 24,
|
||||||
|
|
|
||||||
|
|
@ -6,6 +6,7 @@ import 'package:didvan/models/enums.dart';
|
||||||
import 'package:didvan/models/requests/studio.dart';
|
import 'package:didvan/models/requests/studio.dart';
|
||||||
import 'package:didvan/models/view/action_sheet_data.dart';
|
import 'package:didvan/models/view/action_sheet_data.dart';
|
||||||
import 'package:didvan/models/view/app_bar_data.dart';
|
import 'package:didvan/models/view/app_bar_data.dart';
|
||||||
|
import 'package:didvan/routes/routes.dart';
|
||||||
import 'package:didvan/utils/action_sheet.dart';
|
import 'package:didvan/utils/action_sheet.dart';
|
||||||
import 'package:didvan/views/podcasts/podcasts_state.dart';
|
import 'package:didvan/views/podcasts/podcasts_state.dart';
|
||||||
import 'package:didvan/views/podcasts/widgets/slider.dart';
|
import 'package:didvan/views/podcasts/widgets/slider.dart';
|
||||||
|
|
@ -26,8 +27,11 @@ import 'package:flutter/material.dart';
|
||||||
import 'package:provider/provider.dart';
|
import 'package:provider/provider.dart';
|
||||||
|
|
||||||
class Podcasts extends StatefulWidget {
|
class Podcasts extends StatefulWidget {
|
||||||
|
final Map<String, dynamic>? pageData;
|
||||||
final bool? viewPodcasts;
|
final bool? viewPodcasts;
|
||||||
const Podcasts({Key? key, this.viewPodcasts}) : super(key: key);
|
|
||||||
|
const Podcasts({Key? key, this.viewPodcasts, this.pageData})
|
||||||
|
: super(key: key);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
State<Podcasts> createState() => _PodcastsState();
|
State<Podcasts> createState() => _PodcastsState();
|
||||||
|
|
@ -40,6 +44,25 @@ class _PodcastsState extends State<Podcasts> {
|
||||||
@override
|
@override
|
||||||
void initState() {
|
void initState() {
|
||||||
context.read<PodcastsState>().init(widget.viewPodcasts);
|
context.read<PodcastsState>().init(widget.viewPodcasts);
|
||||||
|
|
||||||
|
if (widget.pageData?['goToComment'] != null) {
|
||||||
|
var openComments = widget.pageData?['goToComment'];
|
||||||
|
|
||||||
|
if (openComments) {
|
||||||
|
Future.delayed(
|
||||||
|
const Duration(seconds: 1),
|
||||||
|
() => Navigator.of(context).pushNamed(
|
||||||
|
Routes.mentions,
|
||||||
|
arguments: {
|
||||||
|
'id': widget.pageData?['id'],
|
||||||
|
'type': 'studio',
|
||||||
|
'title': '',
|
||||||
|
},
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
super.initState();
|
super.initState();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -10,6 +10,7 @@ import 'package:didvan/views/widgets/didvan/app_bar.dart';
|
||||||
import 'package:didvan/views/widgets/state_handlers/state_handler.dart';
|
import 'package:didvan/views/widgets/state_handlers/state_handler.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:provider/provider.dart';
|
import 'package:provider/provider.dart';
|
||||||
|
import 'package:didvan/routes/routes.dart';
|
||||||
|
|
||||||
class StudioDetails extends StatefulWidget {
|
class StudioDetails extends StatefulWidget {
|
||||||
final Map<String, dynamic> pageData;
|
final Map<String, dynamic> pageData;
|
||||||
|
|
@ -36,14 +37,27 @@ class _StudioDetailsState extends State<StudioDetails> {
|
||||||
);
|
);
|
||||||
final state = context.read<StudioDetailsState>();
|
final state = context.read<StudioDetailsState>();
|
||||||
state.args = widget.pageData['args'];
|
state.args = widget.pageData['args'];
|
||||||
|
|
||||||
Future.delayed(
|
Future.delayed(
|
||||||
Duration.zero,
|
Duration.zero,
|
||||||
() => state.getStudioDetails(widget.pageData['id']),
|
() => state.getStudioDetails(widget.pageData['id']),
|
||||||
);
|
);
|
||||||
|
|
||||||
if (widget.pageData['goToComment'] != null) {
|
if (widget.pageData['goToComment'] != null) {
|
||||||
var openComments = widget.pageData['goToComment'];
|
var openComments = widget.pageData['goToComment'];
|
||||||
|
|
||||||
if (openComments) {
|
if (openComments) {
|
||||||
state.selectedDetailsIndex = 1;
|
Future.delayed(
|
||||||
|
const Duration(seconds: 1),
|
||||||
|
() => Navigator.of(context).pushNamed(
|
||||||
|
Routes.mentions,
|
||||||
|
arguments: {
|
||||||
|
'id': state.studio.id,
|
||||||
|
'type': 'studio',
|
||||||
|
'title': state.studio.title,
|
||||||
|
},
|
||||||
|
),
|
||||||
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
super.initState();
|
super.initState();
|
||||||
|
|
|
||||||
|
|
@ -48,14 +48,15 @@ class _EditProfileState extends State<EditProfile> {
|
||||||
builder: (context, state, child) => Material(
|
builder: (context, state, child) => Material(
|
||||||
child: Stack(
|
child: Stack(
|
||||||
children: [
|
children: [
|
||||||
Form(
|
Container(
|
||||||
|
padding: const EdgeInsets.only(bottom: 80),
|
||||||
|
child: Form(
|
||||||
key: _formKey,
|
key: _formKey,
|
||||||
child: DidvanScaffold(
|
child: DidvanScaffold(
|
||||||
padding: const EdgeInsets.only(
|
padding: const EdgeInsets.only(
|
||||||
top: 16,
|
top: 16,
|
||||||
left: 16,
|
left: 16,
|
||||||
right: 16,
|
right: 16,
|
||||||
bottom: 92,
|
|
||||||
),
|
),
|
||||||
appBarData: AppBarData(title: 'ویرایش پروفایل'),
|
appBarData: AppBarData(title: 'ویرایش پروفایل'),
|
||||||
children: [
|
children: [
|
||||||
|
|
@ -144,6 +145,7 @@ class _EditProfileState extends State<EditProfile> {
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
),
|
||||||
Positioned(
|
Positioned(
|
||||||
left: 20,
|
left: 20,
|
||||||
right: 20,
|
right: 20,
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,3 @@
|
||||||
|
|
||||||
import 'package:didvan/config/design_config.dart';
|
import 'package:didvan/config/design_config.dart';
|
||||||
import 'package:didvan/constants/assets.dart';
|
import 'package:didvan/constants/assets.dart';
|
||||||
import 'package:didvan/main.dart';
|
import 'package:didvan/main.dart';
|
||||||
|
|
@ -19,7 +18,6 @@ import 'package:flutter_svg/flutter_svg.dart';
|
||||||
import 'package:provider/provider.dart';
|
import 'package:provider/provider.dart';
|
||||||
import 'package:universal_html/html.dart' as html;
|
import 'package:universal_html/html.dart' as html;
|
||||||
|
|
||||||
|
|
||||||
class Splash extends StatefulWidget {
|
class Splash extends StatefulWidget {
|
||||||
const Splash({Key? key}) : super(key: key);
|
const Splash({Key? key}) : super(key: key);
|
||||||
|
|
||||||
|
|
@ -28,24 +26,24 @@ class Splash extends StatefulWidget {
|
||||||
}
|
}
|
||||||
|
|
||||||
class _SplashState extends State<Splash> {
|
class _SplashState extends State<Splash> {
|
||||||
bool _isGettingThemeData = true;
|
|
||||||
bool _errorOccured = false;
|
bool _errorOccured = false;
|
||||||
|
late ThemeProvider themeProvider;
|
||||||
|
late UserProvider userProvider;
|
||||||
|
late MediaProvider mediaProvider;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
void initState() {
|
void initState() {
|
||||||
_initialize();
|
|
||||||
super.initState();
|
super.initState();
|
||||||
|
|
||||||
|
themeProvider = context.read<ThemeProvider>();
|
||||||
|
userProvider = context.read<UserProvider>();
|
||||||
|
mediaProvider = context.read<MediaProvider>();
|
||||||
|
|
||||||
|
_initialize(themeProvider, userProvider, mediaProvider);
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
if (_isGettingThemeData) {
|
|
||||||
return Container(
|
|
||||||
color: Colors.transparent,
|
|
||||||
height: double.infinity,
|
|
||||||
width: double.infinity,
|
|
||||||
);
|
|
||||||
}
|
|
||||||
return AnnotatedRegion<SystemUiOverlayStyle>(
|
return AnnotatedRegion<SystemUiOverlayStyle>(
|
||||||
value: DesignConfig.systemUiOverlayStyle.copyWith(
|
value: DesignConfig.systemUiOverlayStyle.copyWith(
|
||||||
systemNavigationBarColor: Theme.of(context).colorScheme.background,
|
systemNavigationBarColor: Theme.of(context).colorScheme.background,
|
||||||
|
|
@ -77,7 +75,7 @@ class _SplashState extends State<Splash> {
|
||||||
setState(() {
|
setState(() {
|
||||||
_errorOccured = false;
|
_errorOccured = false;
|
||||||
});
|
});
|
||||||
_initialize();
|
_initialize(themeProvider, userProvider, mediaProvider);
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
|
|
@ -87,64 +85,62 @@ class _SplashState extends State<Splash> {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
Future<void> _initialize() async {
|
Future<void> _initialize(ThemeProvider themeProvider,
|
||||||
|
UserProvider userProvider, MediaProvider mediaProvider) async {
|
||||||
try {
|
try {
|
||||||
var v = navigatorKey.currentContext;
|
|
||||||
ActionSheetUtils.context = navigatorKey.currentContext!;
|
ActionSheetUtils.context = navigatorKey.currentContext!;
|
||||||
|
|
||||||
if (kIsWeb) {
|
if (kIsWeb) {
|
||||||
html.window.onBeforeUnload.listen((event) {
|
html.window.onBeforeUnload.listen((event) {
|
||||||
StorageService.webStorage
|
StorageService.webStorage
|
||||||
.removeWhere((key, value) => key == 'image-cache');
|
.removeWhere((key, value) => key == 'image-cache');
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
final settingsData = await AppInitializer.initilizeSettings();
|
final settingsData = await AppInitializer.initilizeSettings();
|
||||||
if (!mounted) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
final themeProvider = context.read<ThemeProvider>();
|
|
||||||
themeProvider.themeMode = settingsData.themeMode;
|
themeProvider.themeMode = settingsData.themeMode;
|
||||||
themeProvider.fontFamily = settingsData.fontFamily;
|
themeProvider.fontFamily = settingsData.fontFamily;
|
||||||
themeProvider.fontScale = settingsData.fontScale;
|
themeProvider.fontScale = settingsData.fontScale;
|
||||||
await Future.delayed(
|
|
||||||
const Duration(milliseconds: 200),
|
await AppInitializer.setupServices(navigatorKey.currentContext!);
|
||||||
() => setState(() {
|
|
||||||
_isGettingThemeData = false;
|
|
||||||
}),
|
|
||||||
);
|
|
||||||
if (!mounted) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
await AppInitializer.setupServices(context);
|
|
||||||
if (!mounted) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
final userProvider = context.read<UserProvider>();
|
|
||||||
final String? token = await userProvider.setAndGetToken();
|
final String? token = await userProvider.setAndGetToken();
|
||||||
|
|
||||||
if (token != null) {
|
if (token != null) {
|
||||||
if (!kIsWeb && mounted) {
|
if (!kIsWeb) {
|
||||||
context.read<MediaProvider>().getDownloadsList();
|
await mediaProvider.getDownloadsList();
|
||||||
}
|
}
|
||||||
|
|
||||||
RequestService.token = token;
|
RequestService.token = token;
|
||||||
|
|
||||||
final result = await userProvider.getUserInfo();
|
final result = await userProvider.getUserInfo();
|
||||||
if (!result && mounted) {
|
|
||||||
|
if (!result) {
|
||||||
|
try {
|
||||||
StorageService.delete(key: 'token');
|
StorageService.delete(key: 'token');
|
||||||
Navigator.of(context).pushNamedAndRemoveUntil(
|
} catch (e) {
|
||||||
|
// catch
|
||||||
|
}
|
||||||
|
|
||||||
|
navigatorKey.currentState!.pushNamedAndRemoveUntil(
|
||||||
Routes.splash,
|
Routes.splash,
|
||||||
(_) => false,
|
(_) => false,
|
||||||
);
|
);
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
await ServerDataProvider.getData();
|
await ServerDataProvider.getData();
|
||||||
}
|
}
|
||||||
if (mounted) {
|
|
||||||
Navigator.of(context).pushReplacementNamed(
|
navigatorKey.currentState!.pushReplacementNamed(
|
||||||
token == null ? Routes.authenticaion : Routes.home,
|
token == null ? Routes.authenticaion : Routes.home,
|
||||||
arguments: token == null ? false : null,
|
arguments: token == null ? false : null,
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
return;
|
return;
|
||||||
|
|
||||||
// await HomeWidget.getWidgetData<String>("cRouteGoTo", defaultValue: '')
|
// await HomeWidget.getWidgetData<String>("cRouteGoTo", defaultValue: '')
|
||||||
// .then((cRouteGoTo) async {
|
// .then((cRouteGoTo) async {
|
||||||
// if (cRouteGoTo!.isNotEmpty) {
|
// if (cRouteGoTo!.isNotEmpty) {
|
||||||
|
|
@ -153,7 +149,6 @@ class _SplashState extends State<Splash> {
|
||||||
// HomeWidget.saveWidgetData("cRouteGoTo", '');
|
// HomeWidget.saveWidgetData("cRouteGoTo", '');
|
||||||
// }
|
// }
|
||||||
// });
|
// });
|
||||||
}
|
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
setState(() {
|
setState(() {
|
||||||
_errorOccured = true;
|
_errorOccured = true;
|
||||||
|
|
|
||||||
|
|
@ -51,12 +51,11 @@ class _FloatingNavigationBarState extends State<FloatingNavigationBar> {
|
||||||
Future.delayed(
|
Future.delayed(
|
||||||
const Duration(seconds: 1),
|
const Duration(seconds: 1),
|
||||||
() => Navigator.of(context).pushNamed(
|
() => Navigator.of(context).pushNamed(
|
||||||
Routes.comments,
|
Routes.mentions,
|
||||||
arguments: {
|
arguments: {
|
||||||
'id': widget.item.id,
|
'id': widget.item.id,
|
||||||
'type': widget.isRadar ? 'radar' : 'news',
|
'type': widget.isRadar ? 'radar' : 'news',
|
||||||
'title': widget.item.title,
|
'title': widget.item.title,
|
||||||
'onCommentsChanged': widget.onCommentsChanged,
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
|
@ -77,12 +76,11 @@ class _FloatingNavigationBarState extends State<FloatingNavigationBar> {
|
||||||
Future.delayed(
|
Future.delayed(
|
||||||
const Duration(seconds: 1),
|
const Duration(seconds: 1),
|
||||||
() => Navigator.of(context).pushNamed(
|
() => Navigator.of(context).pushNamed(
|
||||||
Routes.comments,
|
Routes.mentions,
|
||||||
arguments: {
|
arguments: {
|
||||||
'id': widget.item.id,
|
'id': widget.item.id,
|
||||||
'type': widget.isRadar ? 'radar' : 'news',
|
'type': widget.isRadar ? 'radar' : 'news',
|
||||||
'title': widget.item.title,
|
'title': widget.item.title,
|
||||||
'onCommentsChanged': widget.onCommentsChanged,
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
|
|
||||||
|
|
@ -106,7 +106,7 @@ class LogoAppBar extends StatelessWidget implements PreferredSizeWidget {
|
||||||
builder: (context, state, child) => SearchField(
|
builder: (context, state, child) => SearchField(
|
||||||
key: state.search.isEmpty ? ValueKey(state.search) : null,
|
key: state.search.isEmpty ? ValueKey(state.search) : null,
|
||||||
value: state.search,
|
value: state.search,
|
||||||
title: state.currentPageIndex == 3 ? 'رصدهای من' : 'دیدوان',
|
title: 'دیدوان',
|
||||||
onChanged: (value) => _onChanged(value, context),
|
onChanged: (value) => _onChanged(value, context),
|
||||||
focusNode: state.searchFieldFocusNode,
|
focusNode: state.searchFieldFocusNode,
|
||||||
onFilterButtonPressed: () => _showFilterBottomSheet(context),
|
onFilterButtonPressed: () => _showFilterBottomSheet(context),
|
||||||
|
|
|
||||||
36
pubspec.lock
36
pubspec.lock
|
|
@ -5,18 +5,18 @@ packages:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: _flutterfire_internals
|
name: _flutterfire_internals
|
||||||
sha256: "2350805d7afefb0efe7acd325cb19d3ae8ba4039b906eade3807ffb69938a01f"
|
sha256: e4be6711f96d3d4eebe79728897d645b7a5585bbfdd6d534878d202c171266d7
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.3.33"
|
version: "1.3.34"
|
||||||
android_intent_plus:
|
android_intent_plus:
|
||||||
dependency: "direct main"
|
dependency: "direct main"
|
||||||
description:
|
description:
|
||||||
name: android_intent_plus
|
name: android_intent_plus
|
||||||
sha256: "2bfdbee8d65e7c26f88b66f0a91f2863da4d3596d8a658b4162c8de5cf04b074"
|
sha256: bfb29839be3886fa48faa631aa0123cd8531205df1abb80ee804935c75dd3cdb
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "5.0.2"
|
version: "5.0.0"
|
||||||
animated_custom_dropdown:
|
animated_custom_dropdown:
|
||||||
dependency: "direct main"
|
dependency: "direct main"
|
||||||
description:
|
description:
|
||||||
|
|
@ -298,14 +298,38 @@ packages:
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "0.9.3+1"
|
version: "0.9.3+1"
|
||||||
|
firebase_auth:
|
||||||
|
dependency: "direct main"
|
||||||
|
description:
|
||||||
|
name: firebase_auth
|
||||||
|
sha256: ea95cd29e27e8ec1971af263d74b208ce85dbc7df9197d8b5eab2aa7de7cfea8
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "4.19.6"
|
||||||
|
firebase_auth_platform_interface:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: firebase_auth_platform_interface
|
||||||
|
sha256: c252d2c97a02cf03fbf3595c5f7edf2a731062356b09d2c338f0b3d63567239f
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "7.2.7"
|
||||||
|
firebase_auth_web:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: firebase_auth_web
|
||||||
|
sha256: "5db2319d59b4bb08cf0cc26e0f110f9ae1cf9cf775ce516e5cc38cd6704253de"
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "5.11.6"
|
||||||
firebase_core:
|
firebase_core:
|
||||||
dependency: "direct main"
|
dependency: "direct main"
|
||||||
description:
|
description:
|
||||||
name: firebase_core
|
name: firebase_core
|
||||||
sha256: "372d94ced114b9c40cb85e18c50ac94a7e998c8eec630c50d7aec047847d27bf"
|
sha256: "4b5100e2dbc3fe72c2d4241a046d3f01457fe11293283a324f5c52575e3406f8"
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "2.31.0"
|
version: "2.31.1"
|
||||||
firebase_core_platform_interface:
|
firebase_core_platform_interface:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
|
|
|
||||||
|
|
@ -82,8 +82,9 @@ dependencies:
|
||||||
awesome_notifications_core: ^0.9.0
|
awesome_notifications_core: ^0.9.0
|
||||||
awesome_notifications: any
|
awesome_notifications: any
|
||||||
home_widget: ^0.5.0
|
home_widget: ^0.5.0
|
||||||
android_intent_plus: ^5.0.2
|
android_intent_plus: ^5.0.0
|
||||||
get: ^4.6.6
|
get: ^4.6.6
|
||||||
|
firebase_auth: ^4.19.6
|
||||||
|
|
||||||
dev_dependencies:
|
dev_dependencies:
|
||||||
flutter_test:
|
flutter_test:
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue