| @@ -1 +1 @@ | |||
| 7c3be5aca7ff709c59cdc638def905a4 | |||
| af5bc8188bfe648f3bf82e3093eb6f6d | |||
| @@ -9,6 +9,8 @@ | |||
| /* Begin PBXBuildFile section */ | |||
| 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; }; | |||
| 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; }; | |||
| 57FD7CA3257CEE3B000E0F78 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 57FD7C9F257CEE3B000E0F78 /* LaunchScreen.storyboard */; }; | |||
| 57FD7CA4257CEE3B000E0F78 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 57FD7CA1257CEE3B000E0F78 /* Main.storyboard */; }; | |||
| 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74858FAE1ED2DC5600515810 /* AppDelegate.swift */; }; | |||
| 97280A7711C46F9F9C83E537 /* Pods_Runner.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4D01659C26BFB65615058BF0 /* Pods_Runner.framework */; }; | |||
| 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; }; | |||
| @@ -37,6 +39,10 @@ | |||
| 1BA1D19EF353DFCE335E0C1F /* 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>"; }; | |||
| 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = "<group>"; }; | |||
| 4D01659C26BFB65615058BF0 /* Pods_Runner.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Runner.framework; sourceTree = BUILT_PRODUCTS_DIR; }; | |||
| 57FD7C99257CEDE2000E0F78 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/Main.strings; sourceTree = "<group>"; }; | |||
| 57FD7C9A257CEDE9000E0F78 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/LaunchScreen.strings; sourceTree = "<group>"; }; | |||
| 57FD7CA0257CEE3B000E0F78 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = "<group>"; }; | |||
| 57FD7CA2257CEE3B000E0F78 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; 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>"; }; | |||
| 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = "<group>"; }; | |||
| @@ -120,6 +126,8 @@ | |||
| FAD6CEB024FC9E250067930A /* GoogleService-Info.plist */, | |||
| FA128B3A24FC9B6100A49ACD /* Runner.entitlements */, | |||
| 97C146FA1CF9000F007C117D /* Main.storyboard */, | |||
| 57FD7C9F257CEE3B000E0F78 /* LaunchScreen.storyboard */, | |||
| 57FD7CA1257CEE3B000E0F78 /* Main.storyboard */, | |||
| 97C146FD1CF9000F007C117D /* Assets.xcassets */, | |||
| 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */, | |||
| 97C147021CF9000F007C117D /* Info.plist */, | |||
| @@ -186,6 +194,7 @@ | |||
| knownRegions = ( | |||
| en, | |||
| vi, | |||
| Base, | |||
| ); | |||
| mainGroup = 97C146E51CF9000F007C117D; | |||
| productRefGroup = 97C146EF1CF9000F007C117D /* Products */; | |||
| @@ -202,9 +211,11 @@ | |||
| isa = PBXResourcesBuildPhase; | |||
| buildActionMask = 2147483647; | |||
| files = ( | |||
| 57FD7CA3257CEE3B000E0F78 /* LaunchScreen.storyboard in Resources */, | |||
| 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */, | |||
| 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */, | |||
| FAD6CEB124FC9E250067930A /* GoogleService-Info.plist in Resources */, | |||
| 57FD7CA4257CEE3B000E0F78 /* Main.storyboard in Resources */, | |||
| 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */, | |||
| 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */, | |||
| ); | |||
| @@ -295,11 +306,28 @@ | |||
| /* End PBXSourcesBuildPhase section */ | |||
| /* Begin PBXVariantGroup section */ | |||
| 57FD7C9F257CEE3B000E0F78 /* LaunchScreen.storyboard */ = { | |||
| isa = PBXVariantGroup; | |||
| children = ( | |||
| 57FD7CA0257CEE3B000E0F78 /* Base */, | |||
| ); | |||
| name = LaunchScreen.storyboard; | |||
| sourceTree = "<group>"; | |||
| }; | |||
| 57FD7CA1257CEE3B000E0F78 /* Main.storyboard */ = { | |||
| isa = PBXVariantGroup; | |||
| children = ( | |||
| 57FD7CA2257CEE3B000E0F78 /* Base */, | |||
| ); | |||
| name = Main.storyboard; | |||
| sourceTree = "<group>"; | |||
| }; | |||
| 97C146FA1CF9000F007C117D /* Main.storyboard */ = { | |||
| isa = PBXVariantGroup; | |||
| children = ( | |||
| FAC381012522E8BF00B28531 /* vi */, | |||
| FAC381032522E8DC00B28531 /* vi */, | |||
| 57FD7C99257CEDE2000E0F78 /* en */, | |||
| ); | |||
| name = Main.storyboard; | |||
| sourceTree = "<group>"; | |||
| @@ -309,6 +337,7 @@ | |||
| children = ( | |||
| FAC381022522E8C000B28531 /* vi */, | |||
| FAC381042522E8DF00B28531 /* vi */, | |||
| 57FD7C9A257CEDE9000E0F78 /* en */, | |||
| ); | |||
| name = LaunchScreen.storyboard; | |||
| sourceTree = "<group>"; | |||
| @@ -0,0 +1,47 @@ | |||
| <?xml version="1.0" encoding="UTF-8"?> | |||
| <document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="17156" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" colorMatched="YES" initialViewController="01J-lp-oVM"> | |||
| <device id="retina4_7" orientation="portrait" appearance="light"/> | |||
| <dependencies> | |||
| <deployment identifier="iOS"/> | |||
| <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="17126"/> | |||
| <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/> | |||
| </dependencies> | |||
| <scenes> | |||
| <!--View Controller--> | |||
| <scene sceneID="EHf-IW-A2E"> | |||
| <objects> | |||
| <viewController id="01J-lp-oVM" sceneMemberID="viewController"> | |||
| <layoutGuides> | |||
| <viewControllerLayoutGuide type="top" id="Ydg-fD-yQy"/> | |||
| <viewControllerLayoutGuide type="bottom" id="xbc-2k-c8Z"/> | |||
| </layoutGuides> | |||
| <view key="view" contentMode="scaleToFill" id="Ze5-6b-2t3"> | |||
| <rect key="frame" x="0.0" y="0.0" width="375" height="667"/> | |||
| <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> | |||
| <subviews> | |||
| <imageView opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleAspectFit" image="LaunchImage" translatesAutoresizingMaskIntoConstraints="NO" id="YRO-k0-Ey4"> | |||
| <rect key="frame" x="62.5" y="208.5" width="250" height="250"/> | |||
| <constraints> | |||
| <constraint firstAttribute="width" constant="250" id="Zdq-OD-Nuz"/> | |||
| <constraint firstAttribute="height" constant="250" id="cFB-83-9uo"/> | |||
| </constraints> | |||
| </imageView> | |||
| </subviews> | |||
| <color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> | |||
| <constraints> | |||
| <constraint firstItem="YRO-k0-Ey4" firstAttribute="centerX" secondItem="Ze5-6b-2t3" secondAttribute="centerX" id="1a2-6s-vTC"/> | |||
| <constraint firstItem="YRO-k0-Ey4" firstAttribute="centerY" secondItem="Ze5-6b-2t3" secondAttribute="centerY" id="4X2-HB-R7a"/> | |||
| <constraint firstItem="YRO-k0-Ey4" firstAttribute="centerY" secondItem="Ze5-6b-2t3" secondAttribute="centerY" id="CSe-DQ-fxx"/> | |||
| <constraint firstItem="YRO-k0-Ey4" firstAttribute="centerX" secondItem="Ze5-6b-2t3" secondAttribute="centerX" id="FcN-RJ-qeG"/> | |||
| </constraints> | |||
| </view> | |||
| </viewController> | |||
| <placeholder placeholderIdentifier="IBFirstResponder" id="iYj-Kq-Ea1" userLabel="First Responder" sceneMemberID="firstResponder"/> | |||
| </objects> | |||
| <point key="canvasLocation" x="76.811594202898561" y="251.11607142857142"/> | |||
| </scene> | |||
| </scenes> | |||
| <resources> | |||
| <image name="LaunchImage" width="452" height="305"/> | |||
| </resources> | |||
| </document> | |||
| @@ -0,0 +1,26 @@ | |||
| <?xml version="1.0" encoding="UTF-8" standalone="no"?> | |||
| <document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="10117" systemVersion="15F34" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" initialViewController="BYZ-38-t0r"> | |||
| <dependencies> | |||
| <deployment identifier="iOS"/> | |||
| <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="10085"/> | |||
| </dependencies> | |||
| <scenes> | |||
| <!--Flutter View Controller--> | |||
| <scene sceneID="tne-QT-ifu"> | |||
| <objects> | |||
| <viewController id="BYZ-38-t0r" customClass="FlutterViewController" sceneMemberID="viewController"> | |||
| <layoutGuides> | |||
| <viewControllerLayoutGuide type="top" id="y3c-jy-aDJ"/> | |||
| <viewControllerLayoutGuide type="bottom" id="wfy-db-euE"/> | |||
| </layoutGuides> | |||
| <view key="view" contentMode="scaleToFill" id="8bC-Xf-vdC"> | |||
| <rect key="frame" x="0.0" y="0.0" width="600" height="600"/> | |||
| <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> | |||
| <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/> | |||
| </view> | |||
| </viewController> | |||
| <placeholder placeholderIdentifier="IBFirstResponder" id="dkx-z0-nzr" sceneMemberID="firstResponder"/> | |||
| </objects> | |||
| </scene> | |||
| </scenes> | |||
| </document> | |||
| @@ -0,0 +1 @@ | |||
| @@ -0,0 +1 @@ | |||
| @@ -24,8 +24,7 @@ class WidgetTextFormFieldNumber extends StatelessWidget { | |||
| keyboardType: TextInputType.numberWithOptions(decimal: true), | |||
| inputFormatters: [ | |||
| FilteringTextInputFormatter.allow(ConstCommon.regExpDecimal), | |||
| ThousandsFormatter( | |||
| formatter: NumberFormat("#,###.####", "es"), allowFraction: true), | |||
| ThousandsFormatter(allowFraction: true), | |||
| ], | |||
| decoration: InputDecoration( | |||
| labelText: hintValue, | |||
| @@ -4,7 +4,7 @@ class ConstCommon { | |||
| static int kMaxAgeCache = 7; // 7days | |||
| static const String baseUrl = "https://tpf.aztrace.vn"; | |||
| static const String baseImageUrl = "https://tpf.aztrace.vn/upload/"; | |||
| static RegExp regExpDecimal = RegExp("[0-9,]"); | |||
| static RegExp regExpDecimal = RegExp("[0-9.]"); | |||
| static const String apiDetailNursery = "api/activity-nursery"; | |||
| static const String apiDetailCropStatus = "api/activity-crop-status"; | |||
| @@ -59,7 +59,7 @@ extension ddMM_HHmm on String { | |||
| String formatStringToStringDecimal() { | |||
| try { | |||
| var numOfString = double.tryParse(this.toString()); | |||
| var numWithLocalSeparator = new NumberFormat.decimalPattern("vi_VN"); | |||
| var numWithLocalSeparator = new NumberFormat.decimalPattern("en_US"); | |||
| final str = numWithLocalSeparator.format(numOfString); | |||
| return str; | |||
| } catch (_) { | |||
| @@ -71,7 +71,7 @@ extension ddMM_HHmm on String { | |||
| extension numToString on num { | |||
| String formatNumtoStringDecimal() { | |||
| try { | |||
| var numWithLocalSeparator = new NumberFormat.decimalPattern("vi_VN"); | |||
| var numWithLocalSeparator = new NumberFormat.decimalPattern("en_US"); | |||
| final str = numWithLocalSeparator.format(this); | |||
| return str; | |||
| } catch (_) { | |||
| @@ -96,14 +96,14 @@ extension HHmm on Duration { | |||
| extension FormatNumber on int { | |||
| String formatDecimalThousand() { | |||
| //1403 -> 1,403 | |||
| var f = new NumberFormat.decimalPattern("vi_VN"); | |||
| var f = new NumberFormat.decimalPattern("en_US"); | |||
| return f.format(this); | |||
| } | |||
| } | |||
| extension FormatNumberToDecimal on double { | |||
| String formatDecimalThousand() { | |||
| var f = new NumberFormat.decimalPattern("vi_VN"); | |||
| var f = new NumberFormat.decimalPattern("en_US"); | |||
| return f.format(this); | |||
| } | |||
| } | |||
| @@ -117,16 +117,14 @@ extension FormatDate on int { | |||
| extension DoubleParsing on String { | |||
| double parseDoubleThousand() { | |||
| var newValue = this.replaceAll(".", ""); | |||
| var changeToServerFormat = newValue.replaceAll(",", "."); | |||
| return double.tryParse(changeToServerFormat); | |||
| var newValue = this.replaceAll(",", ""); | |||
| return double.tryParse(newValue); | |||
| } | |||
| } | |||
| extension IntParsing on String { | |||
| int parseIntThousand() { | |||
| var newValue = this.replaceAll(".", ""); | |||
| var changeToServerFormat = newValue.replaceAll(",", "."); | |||
| return int.tryParse(changeToServerFormat); | |||
| var newValue = this.replaceAll(",", ""); | |||
| return int.tryParse(newValue); | |||
| } | |||
| } | |||