Browse Source

fix: bug #317, #319, #322

bugfix/20250501
tranleanhquoc 6 months ago
parent
commit
70dd1e1577
9 changed files with 95 additions and 72 deletions
  1. +50
    -37
      ios/Runner.xcodeproj/project.pbxproj
  2. +21
    -19
      lib/presentation/screens/actions/sc_action.dart
  3. +1
    -1
      lib/presentation/screens/notification/sc_notification.dart
  4. +1
    -1
      lib/presentation/screens/plot_detail/sc_plot_history.dart
  5. +3
    -11
      lib/presentation/screens/plot_detail/sc_plot_information.dart
  6. +1
    -1
      lib/presentation/screens/plot_detail/sc_plot_parameter.dart
  7. +8
    -1
      lib/services/firebase_notification_service.dart
  8. +9
    -0
      lib/utils/formatter.dart
  9. +1
    -1
      pubspec.yaml

+ 50
- 37
ios/Runner.xcodeproj/project.pbxproj View File



/* Begin PBXBuildFile section */ /* Begin PBXBuildFile section */
1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; }; 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; };
28BA40FE80B56A14B0D9CD11 /* Pods_Runner.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = B548275770BC6D3B4CF786E0 /* Pods_Runner.framework */; };
3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; }; 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; };
57039D382BEF24AA002F4393 /* GoogleService-Info.plist in Resources */ = {isa = PBXBuildFile; fileRef = 57039D372BEF24AA002F4393 /* GoogleService-Info.plist */; }; 57039D382BEF24AA002F4393 /* GoogleService-Info.plist in Resources */ = {isa = PBXBuildFile; fileRef = 57039D372BEF24AA002F4393 /* GoogleService-Info.plist */; };
57EDCFFA2BBC55CE005E5B0A /* PrivacyInfo.xcprivacy in Resources */ = {isa = PBXBuildFile; fileRef = 57EDCFF92BBC55CE005E5B0A /* PrivacyInfo.xcprivacy */; }; 57EDCFFA2BBC55CE005E5B0A /* PrivacyInfo.xcprivacy in Resources */ = {isa = PBXBuildFile; fileRef = 57EDCFF92BBC55CE005E5B0A /* PrivacyInfo.xcprivacy */; };
5A19B8D253A88BC5E5EDE8D2 /* Pods_Runner.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9DCE1C984F2603EE87603F8E /* Pods_Runner.framework */; };
74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74858FAE1ED2DC5600515810 /* AppDelegate.swift */; }; 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74858FAE1ED2DC5600515810 /* AppDelegate.swift */; };
97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; }; 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; };
97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; }; 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; };
1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = "<group>"; }; 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = "<group>"; };
1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = "<group>"; }; 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = "<group>"; };
3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = "<group>"; }; 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = "<group>"; };
4A9923954A102F75F089DEB2 /* Pods-Runner.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.profile.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.profile.xcconfig"; sourceTree = "<group>"; };
57039D372BEF24AA002F4393 /* GoogleService-Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = "GoogleService-Info.plist"; sourceTree = "<group>"; }; 57039D372BEF24AA002F4393 /* GoogleService-Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = "GoogleService-Info.plist"; sourceTree = "<group>"; };
57CB5602257E19450029CFCB /* Runner.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = Runner.entitlements; sourceTree = "<group>"; }; 57CB5602257E19450029CFCB /* Runner.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = Runner.entitlements; sourceTree = "<group>"; };
57EDCFF92BBC55CE005E5B0A /* PrivacyInfo.xcprivacy */ = {isa = PBXFileReference; lastKnownFileType = text.xml; path = PrivacyInfo.xcprivacy; sourceTree = "<group>"; }; 57EDCFF92BBC55CE005E5B0A /* PrivacyInfo.xcprivacy */ = {isa = PBXFileReference; lastKnownFileType = text.xml; path = PrivacyInfo.xcprivacy; sourceTree = "<group>"; };
59505A69743F2F8D63E32074 /* 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>"; };
74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Runner-Bridging-Header.h"; sourceTree = "<group>"; }; 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Runner-Bridging-Header.h"; sourceTree = "<group>"; };
74858FAE1ED2DC5600515810 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; }; 74858FAE1ED2DC5600515810 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = "<group>"; }; 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = "<group>"; };
97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; }; 97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = "<group>"; }; 97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = "<group>"; };
97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; }; 97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
9DCE1C984F2603EE87603F8E /* Pods_Runner.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Runner.framework; sourceTree = BUILT_PRODUCTS_DIR; };
CB75B9327ED21CDF069689B1 /* 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>"; };
DC9B91632732EDCE8495DB9E /* Pods-Runner.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.profile.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.profile.xcconfig"; sourceTree = "<group>"; };
FEE7765B87F81514E88B2DA2 /* 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>"; };
A721EE1634DF0272D5F66D0A /* 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>"; };
B548275770BC6D3B4CF786E0 /* Pods_Runner.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Runner.framework; sourceTree = BUILT_PRODUCTS_DIR; };
/* End PBXFileReference section */ /* End PBXFileReference section */


/* Begin PBXFrameworksBuildPhase section */ /* Begin PBXFrameworksBuildPhase section */
isa = PBXFrameworksBuildPhase; isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647; buildActionMask = 2147483647;
files = ( files = (
5A19B8D253A88BC5E5EDE8D2 /* Pods_Runner.framework in Frameworks */,
28BA40FE80B56A14B0D9CD11 /* Pods_Runner.framework in Frameworks */,
); );
runOnlyForDeploymentPostprocessing = 0; runOnlyForDeploymentPostprocessing = 0;
}; };
/* End PBXFrameworksBuildPhase section */ /* End PBXFrameworksBuildPhase section */


/* Begin PBXGroup section */ /* Begin PBXGroup section */
27A241DF7FF8DCCE69323071 /* Frameworks */ = {
isa = PBXGroup;
children = (
B548275770BC6D3B4CF786E0 /* Pods_Runner.framework */,
);
name = Frameworks;
sourceTree = "<group>";
};
9740EEB11CF90186004384FC /* Flutter */ = { 9740EEB11CF90186004384FC /* Flutter */ = {
isa = PBXGroup; isa = PBXGroup;
children = ( children = (
97C146F01CF9000F007C117D /* Runner */, 97C146F01CF9000F007C117D /* Runner */,
97C146EF1CF9000F007C117D /* Products */, 97C146EF1CF9000F007C117D /* Products */,
DB97C68FAB84AB5AA161781D /* Pods */, DB97C68FAB84AB5AA161781D /* Pods */,
BDBCD4E4EDD972DED4A1A04D /* Frameworks */,
27A241DF7FF8DCCE69323071 /* Frameworks */,
); );
sourceTree = "<group>"; sourceTree = "<group>";
}; };
path = Runner; path = Runner;
sourceTree = "<group>"; sourceTree = "<group>";
}; };
BDBCD4E4EDD972DED4A1A04D /* Frameworks */ = {
isa = PBXGroup;
children = (
9DCE1C984F2603EE87603F8E /* Pods_Runner.framework */,
);
name = Frameworks;
sourceTree = "<group>";
};
DB97C68FAB84AB5AA161781D /* Pods */ = { DB97C68FAB84AB5AA161781D /* Pods */ = {
isa = PBXGroup; isa = PBXGroup;
children = ( children = (
FEE7765B87F81514E88B2DA2 /* Pods-Runner.debug.xcconfig */,
CB75B9327ED21CDF069689B1 /* Pods-Runner.release.xcconfig */,
DC9B91632732EDCE8495DB9E /* Pods-Runner.profile.xcconfig */,
59505A69743F2F8D63E32074 /* Pods-Runner.debug.xcconfig */,
A721EE1634DF0272D5F66D0A /* Pods-Runner.release.xcconfig */,
4A9923954A102F75F089DEB2 /* Pods-Runner.profile.xcconfig */,
); );
path = Pods; path = Pods;
sourceTree = "<group>"; sourceTree = "<group>";
isa = PBXNativeTarget; isa = PBXNativeTarget;
buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */; buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */;
buildPhases = ( buildPhases = (
2F621941790601A10C8F165B /* [CP] Check Pods Manifest.lock */,
B0E181500D99EDAA32A810B2 /* [CP] Check Pods Manifest.lock */,
9740EEB61CF901F6004384FC /* Run Script */, 9740EEB61CF901F6004384FC /* Run Script */,
97C146EA1CF9000F007C117D /* Sources */, 97C146EA1CF9000F007C117D /* Sources */,
97C146EB1CF9000F007C117D /* Frameworks */, 97C146EB1CF9000F007C117D /* Frameworks */,
97C146EC1CF9000F007C117D /* Resources */, 97C146EC1CF9000F007C117D /* Resources */,
9705A1C41CF9048500538489 /* Embed Frameworks */, 9705A1C41CF9048500538489 /* Embed Frameworks */,
3B06AD1E1E4923F5004D2608 /* Thin Binary */, 3B06AD1E1E4923F5004D2608 /* Thin Binary */,
AAEB855F9F40189D2B019299 /* [CP] Embed Pods Frameworks */,
218F0E56B9A2D546B7825C6F /* [CP] Embed Pods Frameworks */,
); );
buildRules = ( buildRules = (
); );
/* End PBXResourcesBuildPhase section */ /* End PBXResourcesBuildPhase section */


/* Begin PBXShellScriptBuildPhase section */ /* Begin PBXShellScriptBuildPhase section */
2F621941790601A10C8F165B /* [CP] Check Pods Manifest.lock */ = {
218F0E56B9A2D546B7825C6F /* [CP] Embed Pods Frameworks */ = {
isa = PBXShellScriptBuildPhase; isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647; buildActionMask = 2147483647;
files = ( files = (
); );
inputFileListPaths = ( inputFileListPaths = (
"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-input-files.xcfilelist",
); );
inputPaths = ( inputPaths = (
"${PODS_PODFILE_DIR_PATH}/Podfile.lock",
"${PODS_ROOT}/Manifest.lock",
); );
name = "[CP] Check Pods Manifest.lock";
name = "[CP] Embed Pods Frameworks";
outputFileListPaths = ( outputFileListPaths = (
"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-output-files.xcfilelist",
); );
outputPaths = ( outputPaths = (
"$(DERIVED_FILE_DIR)/Pods-Runner-checkManifestLockResult.txt",
); );
runOnlyForDeploymentPostprocessing = 0; runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh; shellPath = /bin/sh;
shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh\"\n";
showEnvVarsInLog = 0; showEnvVarsInLog = 0;
}; };
3B06AD1E1E4923F5004D2608 /* Thin Binary */ = { 3B06AD1E1E4923F5004D2608 /* Thin Binary */ = {
shellPath = /bin/sh; shellPath = /bin/sh;
shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build"; shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build";
}; };
AAEB855F9F40189D2B019299 /* [CP] Embed Pods Frameworks */ = {
B0E181500D99EDAA32A810B2 /* [CP] Check Pods Manifest.lock */ = {
isa = PBXShellScriptBuildPhase; isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647; buildActionMask = 2147483647;
files = ( files = (
); );
inputFileListPaths = ( inputFileListPaths = (
"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-input-files.xcfilelist",
); );
name = "[CP] Embed Pods Frameworks";
inputPaths = (
"${PODS_PODFILE_DIR_PATH}/Podfile.lock",
"${PODS_ROOT}/Manifest.lock",
);
name = "[CP] Check Pods Manifest.lock";
outputFileListPaths = ( outputFileListPaths = (
"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-output-files.xcfilelist",
);
outputPaths = (
"$(DERIVED_FILE_DIR)/Pods-Runner-checkManifestLockResult.txt",
); );
runOnlyForDeploymentPostprocessing = 0; runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh; shellPath = /bin/sh;
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh\"\n";
shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
showEnvVarsInLog = 0; showEnvVarsInLog = 0;
}; };
/* End PBXShellScriptBuildPhase section */ /* End PBXShellScriptBuildPhase section */
isa = XCBuildConfiguration; isa = XCBuildConfiguration;
buildSettings = { buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO; ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_ALLOW_NON_MODULAR_INCLUDES_IN_FRAMEWORK_MODULES = YES;
CLANG_ANALYZER_NONNULL = YES; CLANG_ANALYZER_NONNULL = YES;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
CLANG_CXX_LIBRARY = "libc++"; CLANG_CXX_LIBRARY = "libc++";
baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
buildSettings = { buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CLANG_ALLOW_NON_MODULAR_INCLUDES_IN_FRAMEWORK_MODULES = YES;
CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_MODULES = YES;
CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements; 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 = 32;
CURRENT_PROJECT_VERSION = 36;
DEVELOPMENT_TEAM = C3DTD2JH94; DEVELOPMENT_TEAM = C3DTD2JH94;
ENABLE_BITCODE = NO; ENABLE_BITCODE = NO;
FRAMEWORK_SEARCH_PATHS = ( FRAMEWORK_SEARCH_PATHS = (
"$(PROJECT_DIR)/Flutter", "$(PROJECT_DIR)/Flutter",
); );
INFOPLIST_FILE = Runner/Info.plist; INFOPLIST_FILE = Runner/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 13;
LD_RUNPATH_SEARCH_PATHS = ( LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)", "$(inherited)",
"@executable_path/Frameworks", "@executable_path/Frameworks",
"$(inherited)", "$(inherited)",
"$(PROJECT_DIR)/Flutter", "$(PROJECT_DIR)/Flutter",
); );
MARKETING_VERSION = 1.1.12;
MARKETING_VERSION = 1.1.16;
PRODUCT_BUNDLE_IDENTIFIER = vn.azteam.farmdemo; PRODUCT_BUNDLE_IDENTIFIER = vn.azteam.farmdemo;
PRODUCT_NAME = "$(TARGET_NAME)"; PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = ""; PROVISIONING_PROFILE_SPECIFIER = "";
isa = XCBuildConfiguration; isa = XCBuildConfiguration;
buildSettings = { buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO; ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_ALLOW_NON_MODULAR_INCLUDES_IN_FRAMEWORK_MODULES = YES;
CLANG_ANALYZER_NONNULL = YES; CLANG_ANALYZER_NONNULL = YES;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
CLANG_CXX_LIBRARY = "libc++"; CLANG_CXX_LIBRARY = "libc++";
isa = XCBuildConfiguration; isa = XCBuildConfiguration;
buildSettings = { buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO; ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_ALLOW_NON_MODULAR_INCLUDES_IN_FRAMEWORK_MODULES = YES;
CLANG_ANALYZER_NONNULL = YES; CLANG_ANALYZER_NONNULL = YES;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
CLANG_CXX_LIBRARY = "libc++"; CLANG_CXX_LIBRARY = "libc++";
baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */; baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */;
buildSettings = { buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CLANG_ALLOW_NON_MODULAR_INCLUDES_IN_FRAMEWORK_MODULES = YES;
CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_MODULES = YES;
CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements; 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 = 32;
CURRENT_PROJECT_VERSION = 36;
DEVELOPMENT_TEAM = C3DTD2JH94; DEVELOPMENT_TEAM = C3DTD2JH94;
ENABLE_BITCODE = NO; ENABLE_BITCODE = NO;
FRAMEWORK_SEARCH_PATHS = ( FRAMEWORK_SEARCH_PATHS = (
"$(PROJECT_DIR)/Flutter", "$(PROJECT_DIR)/Flutter",
); );
INFOPLIST_FILE = Runner/Info.plist; INFOPLIST_FILE = Runner/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 13;
LD_RUNPATH_SEARCH_PATHS = ( LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)", "$(inherited)",
"@executable_path/Frameworks", "@executable_path/Frameworks",
"$(inherited)", "$(inherited)",
"$(PROJECT_DIR)/Flutter", "$(PROJECT_DIR)/Flutter",
); );
MARKETING_VERSION = 1.1.12;
MARKETING_VERSION = 1.1.16;
PRODUCT_BUNDLE_IDENTIFIER = vn.azteam.farmdemo; PRODUCT_BUNDLE_IDENTIFIER = vn.azteam.farmdemo;
PRODUCT_NAME = "$(TARGET_NAME)"; PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = ""; PROVISIONING_PROFILE_SPECIFIER = "";
baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
buildSettings = { buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CLANG_ALLOW_NON_MODULAR_INCLUDES_IN_FRAMEWORK_MODULES = YES;
CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_MODULES = YES;
CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements; 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 = 32;
CURRENT_PROJECT_VERSION = 36;
DEVELOPMENT_TEAM = C3DTD2JH94; DEVELOPMENT_TEAM = C3DTD2JH94;
ENABLE_BITCODE = NO; ENABLE_BITCODE = NO;
FRAMEWORK_SEARCH_PATHS = ( FRAMEWORK_SEARCH_PATHS = (
"$(PROJECT_DIR)/Flutter", "$(PROJECT_DIR)/Flutter",
); );
INFOPLIST_FILE = Runner/Info.plist; INFOPLIST_FILE = Runner/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 13;
LD_RUNPATH_SEARCH_PATHS = ( LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)", "$(inherited)",
"@executable_path/Frameworks", "@executable_path/Frameworks",
"$(inherited)", "$(inherited)",
"$(PROJECT_DIR)/Flutter", "$(PROJECT_DIR)/Flutter",
); );
MARKETING_VERSION = 1.1.12;
MARKETING_VERSION = 1.1.16;
PRODUCT_BUNDLE_IDENTIFIER = vn.azteam.farmdemo; PRODUCT_BUNDLE_IDENTIFIER = vn.azteam.farmdemo;
PRODUCT_NAME = "$(TARGET_NAME)"; PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = ""; PROVISIONING_PROFILE_SPECIFIER = "";

+ 21
- 19
lib/presentation/screens/actions/sc_action.dart View File

_validateInputs(); _validateInputs();
} }
break; break;
case 'ACTIVE_TYPE_PLANTING':
// case 'ACTIVE_TYPE_PLANTING':
case 'ACTIVE_TYPE_FERTILIZE': case 'ACTIVE_TYPE_FERTILIZE':
case 'ACTIVE_TYPE_SPRAYING_PESTICIDES': case 'ACTIVE_TYPE_SPRAYING_PESTICIDES':
if (Get.find<ChangeFieldFormSupply>().isChanged ?? false) { if (Get.find<ChangeFieldFormSupply>().isChanged ?? false) {
//CHECK NURSERY //CHECK NURSERY
if (widget.activityType == 'ACTIVE_TYPE_NURSERY') { if (widget.activityType == 'ACTIVE_TYPE_NURSERY') {
_requestActivity.tbNurseryDetailsDTOList = _nurseryDetails; _requestActivity.tbNurseryDetailsDTOList = _nurseryDetails;
} else if (widget.activityType == 'ACTIVE_TYPE_PLANTING' ||
} else if (
// widget.activityType == 'ACTIVE_TYPE_PLANTING' ||
widget.activityType == 'ACTIVE_TYPE_FERTILIZE' || widget.activityType == 'ACTIVE_TYPE_FERTILIZE' ||
widget.activityType == 'ACTIVE_TYPE_SPRAYING_PESTICIDES') { widget.activityType == 'ACTIVE_TYPE_SPRAYING_PESTICIDES') {
_requestActivity.tbSuppliesUsingDetailsDTOs = _supplyUsings; _requestActivity.tbSuppliesUsingDetailsDTOs = _supplyUsings;
_nurseryDetails = nurseryDetails; _nurseryDetails = nurseryDetails;
}); });
break; break;
case 'ACTIVE_TYPE_PLANTING':
return Column(
children: [
Container(
width: double.infinity,
height: 16,
color: Colors.grey[200],
),
WidgetPlantSupply(
currentItems: [],
onChangeSupplies: (value) {
_supplyUsings = value;
}),
],
);
break;
// case 'ACTIVE_TYPE_PLANTING':
// return Column(
// children: [
// Container(
// width: double.infinity,
// height: 16,
// color: Colors.grey[200],
// ),
// WidgetPlantSupply(
// currentItems: [],
// onChangeSupplies: (value) {
// _supplyUsings = value;
// }),
// ],
// );
// break;
case 'ACTIVE_TYPE_FERTILIZE': case 'ACTIVE_TYPE_FERTILIZE':
return Column( return Column(
children: [ children: [
} }


SchedulerBinding.instance.addPostFrameCallback((_) { SchedulerBinding.instance.addPostFrameCallback((_) {
if (widget.activityType == 'ACTIVE_TYPE_PLANTING' ||
if (
// widget.activityType == 'ACTIVE_TYPE_PLANTING' ||
widget.activityType == 'ACTIVE_TYPE_FERTILIZE' || widget.activityType == 'ACTIVE_TYPE_FERTILIZE' ||
widget.activityType == 'ACTIVE_TYPE_SPRAYING_PESTICIDES') { widget.activityType == 'ACTIVE_TYPE_SPRAYING_PESTICIDES') {
//list supply //list supply

+ 1
- 1
lib/presentation/screens/notification/sc_notification.dart View File

SizedBox( SizedBox(
width: 4, width: 4,
), ),
Text(item.sendDate?.format_DDMMYY_HHmm() ?? '', style: TextStyle(color: item.isRead == 1 ? Colors.grey : Colors.blue))
Text(item.sendDate?.fromUtcToLocal() ?? '', style: TextStyle(color: item.isRead == 1 ? Colors.grey : Colors.blue))
]), ]),
], ],
), ),

+ 1
- 1
lib/presentation/screens/plot_detail/sc_plot_history.dart View File

child: WidgetRowPlotInfo( child: WidgetRowPlotInfo(
color: index % 2 == 0 ? AppColors.DEFAULT.withOpacity(0.3) : AppColors.DEFAULT.withOpacity(0.1), color: index % 2 == 0 ? AppColors.DEFAULT.withOpacity(0.3) : AppColors.DEFAULT.withOpacity(0.1),
name: '${item.activityTypeDescription ?? ''}', name: '${item.activityTypeDescription ?? ''}',
value: item.executeDate?.format_DDMMYY_HHmm() ?? ''),
value: item.executeDate?.fromUtcToLocal() ?? ''),
onTap: () { onTap: () {
if (item.activityTypeName == 'ACTIVE_TYPE_UPDATE_ENV') { if (item.activityTypeName == 'ACTIVE_TYPE_UPDATE_ENV') {
Get.to(EditActionEnvironmentUpdate( Get.to(EditActionEnvironmentUpdate(

+ 3
- 11
lib/presentation/screens/plot_detail/sc_plot_information.dart View File

WidgetRowPlotInfo( WidgetRowPlotInfo(
color: AppColors.DEFAULT.withOpacity(0.1), color: AppColors.DEFAULT.withOpacity(0.1),
name: 'Ngày gieo trồng', name: 'Ngày gieo trồng',
value: cropPlot.tbCropDTO?.tbCropTypeId == 0 ? '${cropPlot.plantingDate?.format_DDMMYY_HHmm() ?? '--'}' : '--'),
WidgetRowPlotInfo(
color: AppColors.DEFAULT.withOpacity(0.3),
name: 'Ngày vô khây ươm',
value: cropPlot.tbCropDTO?.tbCropTypeId == 1 ? '${cropPlot.sowingDate?.format_DDMMYY_HHmm() ?? '--'}' : '--'),
WidgetRowPlotInfo(
color: AppColors.DEFAULT.withOpacity(0.1),
name: 'Thời gian ngâm hạt',
value: '${cropPlot.seedIncubationTime ?? '--'} ngày'),
value: '${cropPlot.plantingDate?.fromUtcToLocal() ?? '--'}'),
WidgetRowPlotInfo( WidgetRowPlotInfo(
color: AppColors.DEFAULT.withOpacity(0.3), name: 'Số lượng cây trồng', value: '${cropPlot.numberPlants ?? '--'}'), color: AppColors.DEFAULT.withOpacity(0.3), name: 'Số lượng cây trồng', value: '${cropPlot.numberPlants ?? '--'}'),
WidgetRowPlotInfo( WidgetRowPlotInfo(
WidgetRowPlotInfo( WidgetRowPlotInfo(
color: AppColors.DEFAULT.withOpacity(0.3), color: AppColors.DEFAULT.withOpacity(0.3),
name: 'Ngày kết thúc canh tác', name: 'Ngày kết thúc canh tác',
value: '${cropPlot.tbCropDTO?.endDate?.format_DDMMYY_HHmm() ?? '--'}'),
value: '${cropPlot.tbCropDTO?.endDate?.fromUtcToLocal() ?? '--'}'),
WidgetRowPlotInfo(color: AppColors.DEFAULT.withOpacity(0.1), name: 'Kỹ sư trực tiếp', value: '$technicians'), WidgetRowPlotInfo(color: AppColors.DEFAULT.withOpacity(0.1), name: 'Kỹ sư trực tiếp', value: '$technicians'),
WidgetRowPlotInfo( WidgetRowPlotInfo(
color: AppColors.DEFAULT.withOpacity(0.3), color: AppColors.DEFAULT.withOpacity(0.3),
name: 'Diện tích (m\u00B2)', name: 'Diện tích (m\u00B2)',
value: '${cropPlot.tbCropDTO?.areaM2?.formatNumtoStringDecimal()}'),
value: '${cropPlot.tbCropDTO?.areaM2 == null ? '--' : cropPlot.tbCropDTO!.areaM2!.formatNumtoStringDecimal()}'),
SizedBox( SizedBox(
height: 8, height: 8,
), ),

+ 1
- 1
lib/presentation/screens/plot_detail/sc_plot_parameter.dart View File

style: TextStyle(fontWeight: FontWeight.bold, fontSize: 18), style: TextStyle(fontWeight: FontWeight.bold, fontSize: 18),
), ),
), ),
Text(item.executeDate?.format_DDMMYY_HHmm() ?? '', style: TextStyle(fontSize: 13, color: Colors.grey))
Text(item.executeDate?.fromUtcToLocal() ?? '', style: TextStyle(fontSize: 13, color: Colors.grey))
], ],
), ),
); );

+ 8
- 1
lib/services/firebase_notification_service.dart View File

import 'dart:convert'; import 'dart:convert';
import 'dart:io';


import 'package:farm_tpf/presentation/screens/task/task_detail_page.dart'; import 'package:farm_tpf/presentation/screens/task/task_detail_page.dart';
import 'package:flutter/foundation.dart';
import 'package:flutter_bloc/flutter_bloc.dart'; import 'package:flutter_bloc/flutter_bloc.dart';
import 'package:get/get.dart'; import 'package:get/get.dart';
import '../presentation/screens/plot_detail/sc_plot_detail.dart'; import '../presentation/screens/plot_detail/sc_plot_detail.dart';
static final _pref = LocalPref(); static final _pref = LocalPref();


static void initService() async { static void initService() async {
var token = await messaging.getToken() ?? '';
var token = '';
if (kDebugMode && Platform.isIOS) {
token = await messaging.getAPNSToken() ?? '';
} else {
token = await messaging.getToken() ?? '';
}
await _pref.saveString(PrefKey.push_key, token); await _pref.saveString(PrefKey.push_key, token);
print('pushKey: $token'); print('pushKey: $token');



+ 9
- 0
lib/utils/formatter.dart View File

return ""; return "";
} }
} }

String fromUtcToLocal({String pattern = 'dd/MM/yyyy HH:mm'}) {
try {
final dateTimeConvert = DateTime.parse(this).toLocal();
return DateFormat(pattern).format(dateTimeConvert);
} catch (_) {
return '';
}
}
} }


extension numToString on num { extension numToString on num {

+ 1
- 1
pubspec.yaml View File

description: A new Flutter project. description: A new Flutter project.


publish_to: 'none' publish_to: 'none'
version: 1.1.13+32
version: 1.1.16+36


environment: environment:
sdk: ">=3.0.0 <4.0.0" sdk: ">=3.0.0 <4.0.0"

Loading…
Cancel
Save