modify reservation table page, add socket io client for real time data update, modify makanan list page
This commit is contained in:
12
.env
12
.env
@ -2,6 +2,12 @@
|
|||||||
# api_url = 'https://panti-asuhan.s-keytech.com/api/'
|
# api_url = 'https://panti-asuhan.s-keytech.com/api/'
|
||||||
# # url = 'http://172.29.85.181/panti_asuhan2/'
|
# # url = 'http://172.29.85.181/panti_asuhan2/'
|
||||||
# # api_url = 'http://172.29.85.181/panti_asuhan2/api/'
|
# # api_url = 'http://172.29.85.181/panti_asuhan2/api/'
|
||||||
url = 'http://20.20.20.25:3001/'
|
# url = 'http://20.20.20.25:3001/'
|
||||||
table_url = 'http://20.20.20.25:3001/table'
|
# table_url = 'http://20.20.20.25:3001/table'
|
||||||
api_url = 'http://20.20.20.25:3001/table'
|
# api_url = 'http://20.20.20.25:3001/table'
|
||||||
|
# url = 'http://192.168.20.232:3001/'
|
||||||
|
# table_url = 'http://192.168.20.232:3001/table'
|
||||||
|
# api_url = 'http://192.168.20.232:3001/table'
|
||||||
|
url = 'https://reza_backend.kicap-karan.com/'
|
||||||
|
table_url = 'https://reza_backend.kicap-karan.com/table'
|
||||||
|
api_url = 'https://reza_backend.kicap-karan.com/table'
|
||||||
@ -1,10 +1,12 @@
|
|||||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
|
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
<uses-permission android:name="android.permission.INTERNET" />
|
||||||
<application
|
<application
|
||||||
android:label="reza_app"
|
android:label="reza_app"
|
||||||
android:name="${applicationName}"
|
android:name="${applicationName}"
|
||||||
android:icon="@mipmap/ic_launcher"
|
android:icon="@mipmap/ic_launcher"
|
||||||
android:usesCleartextTraffic="true"
|
android:usesCleartextTraffic="true"
|
||||||
>
|
>
|
||||||
|
|
||||||
<activity
|
<activity
|
||||||
android:name=".MainActivity"
|
android:name=".MainActivity"
|
||||||
android:exported="true"
|
android:exported="true"
|
||||||
|
|||||||
BIN
assets/nasi_goreng.jpg
Normal file
BIN
assets/nasi_goreng.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 127 KiB |
41
ios/Podfile.lock
Normal file
41
ios/Podfile.lock
Normal file
@ -0,0 +1,41 @@
|
|||||||
|
PODS:
|
||||||
|
- Flutter (1.0.0)
|
||||||
|
- image_picker_ios (0.0.1):
|
||||||
|
- Flutter
|
||||||
|
- location (0.0.1):
|
||||||
|
- Flutter
|
||||||
|
- path_provider_foundation (0.0.1):
|
||||||
|
- Flutter
|
||||||
|
- FlutterMacOS
|
||||||
|
- webview_flutter_wkwebview (0.0.1):
|
||||||
|
- Flutter
|
||||||
|
|
||||||
|
DEPENDENCIES:
|
||||||
|
- Flutter (from `Flutter`)
|
||||||
|
- image_picker_ios (from `.symlinks/plugins/image_picker_ios/ios`)
|
||||||
|
- location (from `.symlinks/plugins/location/ios`)
|
||||||
|
- path_provider_foundation (from `.symlinks/plugins/path_provider_foundation/darwin`)
|
||||||
|
- webview_flutter_wkwebview (from `.symlinks/plugins/webview_flutter_wkwebview/ios`)
|
||||||
|
|
||||||
|
EXTERNAL SOURCES:
|
||||||
|
Flutter:
|
||||||
|
:path: Flutter
|
||||||
|
image_picker_ios:
|
||||||
|
:path: ".symlinks/plugins/image_picker_ios/ios"
|
||||||
|
location:
|
||||||
|
:path: ".symlinks/plugins/location/ios"
|
||||||
|
path_provider_foundation:
|
||||||
|
:path: ".symlinks/plugins/path_provider_foundation/darwin"
|
||||||
|
webview_flutter_wkwebview:
|
||||||
|
:path: ".symlinks/plugins/webview_flutter_wkwebview/ios"
|
||||||
|
|
||||||
|
SPEC CHECKSUMS:
|
||||||
|
Flutter: f04841e97a9d0b0a8025694d0796dd46242b2854
|
||||||
|
image_picker_ios: 4a8aadfbb6dc30ad5141a2ce3832af9214a705b5
|
||||||
|
location: 3a2eed4dd2fab25e7b7baf2a9efefe82b512d740
|
||||||
|
path_provider_foundation: 29f094ae23ebbca9d3d0cec13889cd9060c0e943
|
||||||
|
webview_flutter_wkwebview: b7e70ef1ddded7e69c796c7390ee74180182971f
|
||||||
|
|
||||||
|
PODFILE CHECKSUM: 70d9d25280d0dd177a5f637cdb0f0b0b12c6a189
|
||||||
|
|
||||||
|
COCOAPODS: 1.12.0
|
||||||
@ -8,12 +8,14 @@
|
|||||||
|
|
||||||
/* 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 */; };
|
||||||
|
331C808B294A63AB00263BE5 /* RunnerTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 331C807B294A618700263BE5 /* RunnerTests.swift */; };
|
||||||
3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; };
|
3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; };
|
||||||
|
46A50AB673A3FA30E28D30EE /* Pods_RunnerTests.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C810AF883DDE01037D0B6FB1 /* Pods_RunnerTests.framework */; };
|
||||||
74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74858FAE1ED2DC5600515810 /* AppDelegate.swift */; };
|
74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74858FAE1ED2DC5600515810 /* AppDelegate.swift */; };
|
||||||
|
7E7CA39802D6BEB16C59C81F /* Pods_Runner.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 449BDE333A61A27FDEC834DB /* Pods_Runner.framework */; };
|
||||||
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 */; };
|
||||||
97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; };
|
97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; };
|
||||||
331C808B294A63AB00263BE5 /* RunnerTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 331C807B294A618700263BE5 /* RunnerTests.swift */; };
|
|
||||||
/* End PBXBuildFile section */
|
/* End PBXBuildFile section */
|
||||||
|
|
||||||
/* Begin PBXContainerItemProxy section */
|
/* Begin PBXContainerItemProxy section */
|
||||||
@ -42,7 +44,14 @@
|
|||||||
/* Begin PBXFileReference section */
|
/* Begin PBXFileReference section */
|
||||||
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>"; };
|
||||||
|
16C152C985B9E738893E8BED /* 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>"; };
|
||||||
|
23611B18881F577059B36B7D /* 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>"; };
|
||||||
|
331C807B294A618700263BE5 /* RunnerTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RunnerTests.swift; sourceTree = "<group>"; };
|
||||||
|
331C8081294A63A400263BE5 /* RunnerTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = RunnerTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||||
|
3621C893DBE36C6D8BEDC23F /* 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>"; };
|
||||||
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>"; };
|
||||||
|
3DF12121EEB44DBE3768B830 /* 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>"; };
|
||||||
|
449BDE333A61A27FDEC834DB /* Pods_Runner.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Runner.framework; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||||
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>"; };
|
||||||
@ -53,21 +62,39 @@
|
|||||||
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>"; };
|
||||||
331C807B294A618700263BE5 /* RunnerTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RunnerTests.swift; sourceTree = "<group>"; };
|
B3221495538A4944BB75F94E /* Pods-RunnerTests.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RunnerTests.profile.xcconfig"; path = "Target Support Files/Pods-RunnerTests/Pods-RunnerTests.profile.xcconfig"; sourceTree = "<group>"; };
|
||||||
331C8081294A63A400263BE5 /* RunnerTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = RunnerTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
|
B8FC2E1A7DB3F10ADFD9BF5B /* Pods-RunnerTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RunnerTests.debug.xcconfig"; path = "Target Support Files/Pods-RunnerTests/Pods-RunnerTests.debug.xcconfig"; sourceTree = "<group>"; };
|
||||||
|
C810AF883DDE01037D0B6FB1 /* Pods_RunnerTests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_RunnerTests.framework; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||||
/* End PBXFileReference section */
|
/* End PBXFileReference section */
|
||||||
|
|
||||||
/* Begin PBXFrameworksBuildPhase section */
|
/* Begin PBXFrameworksBuildPhase section */
|
||||||
|
24D3C06A9CBCD7F76631D720 /* Frameworks */ = {
|
||||||
|
isa = PBXFrameworksBuildPhase;
|
||||||
|
buildActionMask = 2147483647;
|
||||||
|
files = (
|
||||||
|
46A50AB673A3FA30E28D30EE /* Pods_RunnerTests.framework in Frameworks */,
|
||||||
|
);
|
||||||
|
runOnlyForDeploymentPostprocessing = 0;
|
||||||
|
};
|
||||||
97C146EB1CF9000F007C117D /* Frameworks */ = {
|
97C146EB1CF9000F007C117D /* Frameworks */ = {
|
||||||
isa = PBXFrameworksBuildPhase;
|
isa = PBXFrameworksBuildPhase;
|
||||||
buildActionMask = 2147483647;
|
buildActionMask = 2147483647;
|
||||||
files = (
|
files = (
|
||||||
|
7E7CA39802D6BEB16C59C81F /* Pods_Runner.framework in Frameworks */,
|
||||||
);
|
);
|
||||||
runOnlyForDeploymentPostprocessing = 0;
|
runOnlyForDeploymentPostprocessing = 0;
|
||||||
};
|
};
|
||||||
/* End PBXFrameworksBuildPhase section */
|
/* End PBXFrameworksBuildPhase section */
|
||||||
|
|
||||||
/* Begin PBXGroup section */
|
/* Begin PBXGroup section */
|
||||||
|
331C8082294A63A400263BE5 /* RunnerTests */ = {
|
||||||
|
isa = PBXGroup;
|
||||||
|
children = (
|
||||||
|
331C807B294A618700263BE5 /* RunnerTests.swift */,
|
||||||
|
);
|
||||||
|
path = RunnerTests;
|
||||||
|
sourceTree = "<group>";
|
||||||
|
};
|
||||||
9740EEB11CF90186004384FC /* Flutter */ = {
|
9740EEB11CF90186004384FC /* Flutter */ = {
|
||||||
isa = PBXGroup;
|
isa = PBXGroup;
|
||||||
children = (
|
children = (
|
||||||
@ -79,14 +106,6 @@
|
|||||||
name = Flutter;
|
name = Flutter;
|
||||||
sourceTree = "<group>";
|
sourceTree = "<group>";
|
||||||
};
|
};
|
||||||
331C8082294A63A400263BE5 /* RunnerTests */ = {
|
|
||||||
isa = PBXGroup;
|
|
||||||
children = (
|
|
||||||
331C807B294A618700263BE5 /* RunnerTests.swift */,
|
|
||||||
);
|
|
||||||
path = RunnerTests;
|
|
||||||
sourceTree = "<group>";
|
|
||||||
};
|
|
||||||
97C146E51CF9000F007C117D = {
|
97C146E51CF9000F007C117D = {
|
||||||
isa = PBXGroup;
|
isa = PBXGroup;
|
||||||
children = (
|
children = (
|
||||||
@ -94,6 +113,8 @@
|
|||||||
97C146F01CF9000F007C117D /* Runner */,
|
97C146F01CF9000F007C117D /* Runner */,
|
||||||
97C146EF1CF9000F007C117D /* Products */,
|
97C146EF1CF9000F007C117D /* Products */,
|
||||||
331C8082294A63A400263BE5 /* RunnerTests */,
|
331C8082294A63A400263BE5 /* RunnerTests */,
|
||||||
|
C24F722BDAF3023825CB05EF /* Pods */,
|
||||||
|
D96AB792AA51E1D3BEEA1089 /* Frameworks */,
|
||||||
);
|
);
|
||||||
sourceTree = "<group>";
|
sourceTree = "<group>";
|
||||||
};
|
};
|
||||||
@ -121,6 +142,28 @@
|
|||||||
path = Runner;
|
path = Runner;
|
||||||
sourceTree = "<group>";
|
sourceTree = "<group>";
|
||||||
};
|
};
|
||||||
|
C24F722BDAF3023825CB05EF /* Pods */ = {
|
||||||
|
isa = PBXGroup;
|
||||||
|
children = (
|
||||||
|
23611B18881F577059B36B7D /* Pods-Runner.debug.xcconfig */,
|
||||||
|
16C152C985B9E738893E8BED /* Pods-Runner.release.xcconfig */,
|
||||||
|
3DF12121EEB44DBE3768B830 /* Pods-Runner.profile.xcconfig */,
|
||||||
|
B8FC2E1A7DB3F10ADFD9BF5B /* Pods-RunnerTests.debug.xcconfig */,
|
||||||
|
3621C893DBE36C6D8BEDC23F /* Pods-RunnerTests.release.xcconfig */,
|
||||||
|
B3221495538A4944BB75F94E /* Pods-RunnerTests.profile.xcconfig */,
|
||||||
|
);
|
||||||
|
path = Pods;
|
||||||
|
sourceTree = "<group>";
|
||||||
|
};
|
||||||
|
D96AB792AA51E1D3BEEA1089 /* Frameworks */ = {
|
||||||
|
isa = PBXGroup;
|
||||||
|
children = (
|
||||||
|
449BDE333A61A27FDEC834DB /* Pods_Runner.framework */,
|
||||||
|
C810AF883DDE01037D0B6FB1 /* Pods_RunnerTests.framework */,
|
||||||
|
);
|
||||||
|
name = Frameworks;
|
||||||
|
sourceTree = "<group>";
|
||||||
|
};
|
||||||
/* End PBXGroup section */
|
/* End PBXGroup section */
|
||||||
|
|
||||||
/* Begin PBXNativeTarget section */
|
/* Begin PBXNativeTarget section */
|
||||||
@ -128,9 +171,10 @@
|
|||||||
isa = PBXNativeTarget;
|
isa = PBXNativeTarget;
|
||||||
buildConfigurationList = 331C8087294A63A400263BE5 /* Build configuration list for PBXNativeTarget "RunnerTests" */;
|
buildConfigurationList = 331C8087294A63A400263BE5 /* Build configuration list for PBXNativeTarget "RunnerTests" */;
|
||||||
buildPhases = (
|
buildPhases = (
|
||||||
|
96E4D1C3D943726A59BDB12D /* [CP] Check Pods Manifest.lock */,
|
||||||
331C807D294A63A400263BE5 /* Sources */,
|
331C807D294A63A400263BE5 /* Sources */,
|
||||||
331C807E294A63A400263BE5 /* Frameworks */,
|
|
||||||
331C807F294A63A400263BE5 /* Resources */,
|
331C807F294A63A400263BE5 /* Resources */,
|
||||||
|
24D3C06A9CBCD7F76631D720 /* Frameworks */,
|
||||||
);
|
);
|
||||||
buildRules = (
|
buildRules = (
|
||||||
);
|
);
|
||||||
@ -146,12 +190,14 @@
|
|||||||
isa = PBXNativeTarget;
|
isa = PBXNativeTarget;
|
||||||
buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */;
|
buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */;
|
||||||
buildPhases = (
|
buildPhases = (
|
||||||
|
9D81C40ECFD927F0DCE6AAF9 /* [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 */,
|
||||||
|
1D268AED80E21895A3E8CE7B /* [CP] Embed Pods Frameworks */,
|
||||||
);
|
);
|
||||||
buildRules = (
|
buildRules = (
|
||||||
);
|
);
|
||||||
@ -223,6 +269,23 @@
|
|||||||
/* End PBXResourcesBuildPhase section */
|
/* End PBXResourcesBuildPhase section */
|
||||||
|
|
||||||
/* Begin PBXShellScriptBuildPhase section */
|
/* Begin PBXShellScriptBuildPhase section */
|
||||||
|
1D268AED80E21895A3E8CE7B /* [CP] Embed Pods Frameworks */ = {
|
||||||
|
isa = PBXShellScriptBuildPhase;
|
||||||
|
buildActionMask = 2147483647;
|
||||||
|
files = (
|
||||||
|
);
|
||||||
|
inputFileListPaths = (
|
||||||
|
"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-input-files.xcfilelist",
|
||||||
|
);
|
||||||
|
name = "[CP] Embed Pods Frameworks";
|
||||||
|
outputFileListPaths = (
|
||||||
|
"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-output-files.xcfilelist",
|
||||||
|
);
|
||||||
|
runOnlyForDeploymentPostprocessing = 0;
|
||||||
|
shellPath = /bin/sh;
|
||||||
|
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh\"\n";
|
||||||
|
showEnvVarsInLog = 0;
|
||||||
|
};
|
||||||
3B06AD1E1E4923F5004D2608 /* Thin Binary */ = {
|
3B06AD1E1E4923F5004D2608 /* Thin Binary */ = {
|
||||||
isa = PBXShellScriptBuildPhase;
|
isa = PBXShellScriptBuildPhase;
|
||||||
alwaysOutOfDate = 1;
|
alwaysOutOfDate = 1;
|
||||||
@ -239,6 +302,28 @@
|
|||||||
shellPath = /bin/sh;
|
shellPath = /bin/sh;
|
||||||
shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" embed_and_thin";
|
shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" embed_and_thin";
|
||||||
};
|
};
|
||||||
|
96E4D1C3D943726A59BDB12D /* [CP] Check Pods Manifest.lock */ = {
|
||||||
|
isa = PBXShellScriptBuildPhase;
|
||||||
|
buildActionMask = 2147483647;
|
||||||
|
files = (
|
||||||
|
);
|
||||||
|
inputFileListPaths = (
|
||||||
|
);
|
||||||
|
inputPaths = (
|
||||||
|
"${PODS_PODFILE_DIR_PATH}/Podfile.lock",
|
||||||
|
"${PODS_ROOT}/Manifest.lock",
|
||||||
|
);
|
||||||
|
name = "[CP] Check Pods Manifest.lock";
|
||||||
|
outputFileListPaths = (
|
||||||
|
);
|
||||||
|
outputPaths = (
|
||||||
|
"$(DERIVED_FILE_DIR)/Pods-RunnerTests-checkManifestLockResult.txt",
|
||||||
|
);
|
||||||
|
runOnlyForDeploymentPostprocessing = 0;
|
||||||
|
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";
|
||||||
|
showEnvVarsInLog = 0;
|
||||||
|
};
|
||||||
9740EEB61CF901F6004384FC /* Run Script */ = {
|
9740EEB61CF901F6004384FC /* Run Script */ = {
|
||||||
isa = PBXShellScriptBuildPhase;
|
isa = PBXShellScriptBuildPhase;
|
||||||
alwaysOutOfDate = 1;
|
alwaysOutOfDate = 1;
|
||||||
@ -254,6 +339,28 @@
|
|||||||
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";
|
||||||
};
|
};
|
||||||
|
9D81C40ECFD927F0DCE6AAF9 /* [CP] Check Pods Manifest.lock */ = {
|
||||||
|
isa = PBXShellScriptBuildPhase;
|
||||||
|
buildActionMask = 2147483647;
|
||||||
|
files = (
|
||||||
|
);
|
||||||
|
inputFileListPaths = (
|
||||||
|
);
|
||||||
|
inputPaths = (
|
||||||
|
"${PODS_PODFILE_DIR_PATH}/Podfile.lock",
|
||||||
|
"${PODS_ROOT}/Manifest.lock",
|
||||||
|
);
|
||||||
|
name = "[CP] Check Pods Manifest.lock";
|
||||||
|
outputFileListPaths = (
|
||||||
|
);
|
||||||
|
outputPaths = (
|
||||||
|
"$(DERIVED_FILE_DIR)/Pods-Runner-checkManifestLockResult.txt",
|
||||||
|
);
|
||||||
|
runOnlyForDeploymentPostprocessing = 0;
|
||||||
|
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";
|
||||||
|
showEnvVarsInLog = 0;
|
||||||
|
};
|
||||||
/* End PBXShellScriptBuildPhase section */
|
/* End PBXShellScriptBuildPhase section */
|
||||||
|
|
||||||
/* Begin PBXSourcesBuildPhase section */
|
/* Begin PBXSourcesBuildPhase section */
|
||||||
@ -361,6 +468,7 @@
|
|||||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||||
CLANG_ENABLE_MODULES = YES;
|
CLANG_ENABLE_MODULES = YES;
|
||||||
CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
|
CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
|
||||||
|
DEVELOPMENT_TEAM = F4SG2JTPHZ;
|
||||||
ENABLE_BITCODE = NO;
|
ENABLE_BITCODE = NO;
|
||||||
INFOPLIST_FILE = Runner/Info.plist;
|
INFOPLIST_FILE = Runner/Info.plist;
|
||||||
LD_RUNPATH_SEARCH_PATHS = (
|
LD_RUNPATH_SEARCH_PATHS = (
|
||||||
@ -377,7 +485,7 @@
|
|||||||
};
|
};
|
||||||
331C8088294A63A400263BE5 /* Debug */ = {
|
331C8088294A63A400263BE5 /* Debug */ = {
|
||||||
isa = XCBuildConfiguration;
|
isa = XCBuildConfiguration;
|
||||||
baseConfigurationReference = AE0B7B92F70575B8D7E0D07E /* Pods-RunnerTests.debug.xcconfig */;
|
baseConfigurationReference = B8FC2E1A7DB3F10ADFD9BF5B /* Pods-RunnerTests.debug.xcconfig */;
|
||||||
buildSettings = {
|
buildSettings = {
|
||||||
BUNDLE_LOADER = "$(TEST_HOST)";
|
BUNDLE_LOADER = "$(TEST_HOST)";
|
||||||
CODE_SIGN_STYLE = Automatic;
|
CODE_SIGN_STYLE = Automatic;
|
||||||
@ -395,7 +503,7 @@
|
|||||||
};
|
};
|
||||||
331C8089294A63A400263BE5 /* Release */ = {
|
331C8089294A63A400263BE5 /* Release */ = {
|
||||||
isa = XCBuildConfiguration;
|
isa = XCBuildConfiguration;
|
||||||
baseConfigurationReference = 89B67EB44CE7B6631473024E /* Pods-RunnerTests.release.xcconfig */;
|
baseConfigurationReference = 3621C893DBE36C6D8BEDC23F /* Pods-RunnerTests.release.xcconfig */;
|
||||||
buildSettings = {
|
buildSettings = {
|
||||||
BUNDLE_LOADER = "$(TEST_HOST)";
|
BUNDLE_LOADER = "$(TEST_HOST)";
|
||||||
CODE_SIGN_STYLE = Automatic;
|
CODE_SIGN_STYLE = Automatic;
|
||||||
@ -411,7 +519,7 @@
|
|||||||
};
|
};
|
||||||
331C808A294A63A400263BE5 /* Profile */ = {
|
331C808A294A63A400263BE5 /* Profile */ = {
|
||||||
isa = XCBuildConfiguration;
|
isa = XCBuildConfiguration;
|
||||||
baseConfigurationReference = 640959BDD8F10B91D80A66BE /* Pods-RunnerTests.profile.xcconfig */;
|
baseConfigurationReference = B3221495538A4944BB75F94E /* Pods-RunnerTests.profile.xcconfig */;
|
||||||
buildSettings = {
|
buildSettings = {
|
||||||
BUNDLE_LOADER = "$(TEST_HOST)";
|
BUNDLE_LOADER = "$(TEST_HOST)";
|
||||||
CODE_SIGN_STYLE = Automatic;
|
CODE_SIGN_STYLE = Automatic;
|
||||||
@ -539,6 +647,7 @@
|
|||||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||||
CLANG_ENABLE_MODULES = YES;
|
CLANG_ENABLE_MODULES = YES;
|
||||||
CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
|
CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
|
||||||
|
DEVELOPMENT_TEAM = F4SG2JTPHZ;
|
||||||
ENABLE_BITCODE = NO;
|
ENABLE_BITCODE = NO;
|
||||||
INFOPLIST_FILE = Runner/Info.plist;
|
INFOPLIST_FILE = Runner/Info.plist;
|
||||||
LD_RUNPATH_SEARCH_PATHS = (
|
LD_RUNPATH_SEARCH_PATHS = (
|
||||||
@ -561,6 +670,7 @@
|
|||||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||||
CLANG_ENABLE_MODULES = YES;
|
CLANG_ENABLE_MODULES = YES;
|
||||||
CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
|
CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
|
||||||
|
DEVELOPMENT_TEAM = F4SG2JTPHZ;
|
||||||
ENABLE_BITCODE = NO;
|
ENABLE_BITCODE = NO;
|
||||||
INFOPLIST_FILE = Runner/Info.plist;
|
INFOPLIST_FILE = Runner/Info.plist;
|
||||||
LD_RUNPATH_SEARCH_PATHS = (
|
LD_RUNPATH_SEARCH_PATHS = (
|
||||||
|
|||||||
3
ios/Runner.xcworkspace/contents.xcworkspacedata
generated
3
ios/Runner.xcworkspace/contents.xcworkspacedata
generated
@ -4,4 +4,7 @@
|
|||||||
<FileRef
|
<FileRef
|
||||||
location = "group:Runner.xcodeproj">
|
location = "group:Runner.xcodeproj">
|
||||||
</FileRef>
|
</FileRef>
|
||||||
|
<FileRef
|
||||||
|
location = "group:Pods/Pods.xcodeproj">
|
||||||
|
</FileRef>
|
||||||
</Workspace>
|
</Workspace>
|
||||||
|
|||||||
@ -1,8 +1,10 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<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">
|
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="21507" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES" initialViewController="BYZ-38-t0r">
|
||||||
|
<device id="retina6_12" orientation="portrait" appearance="light"/>
|
||||||
<dependencies>
|
<dependencies>
|
||||||
<deployment identifier="iOS"/>
|
<deployment identifier="iOS"/>
|
||||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="10085"/>
|
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="21505"/>
|
||||||
|
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
<scenes>
|
<scenes>
|
||||||
<!--Flutter View Controller-->
|
<!--Flutter View Controller-->
|
||||||
@ -14,13 +16,14 @@
|
|||||||
<viewControllerLayoutGuide type="bottom" id="wfy-db-euE"/>
|
<viewControllerLayoutGuide type="bottom" id="wfy-db-euE"/>
|
||||||
</layoutGuides>
|
</layoutGuides>
|
||||||
<view key="view" contentMode="scaleToFill" id="8bC-Xf-vdC">
|
<view key="view" contentMode="scaleToFill" id="8bC-Xf-vdC">
|
||||||
<rect key="frame" x="0.0" y="0.0" width="600" height="600"/>
|
<rect key="frame" x="0.0" y="0.0" width="393" height="852"/>
|
||||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||||
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
|
<color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||||
</view>
|
</view>
|
||||||
</viewController>
|
</viewController>
|
||||||
<placeholder placeholderIdentifier="IBFirstResponder" id="dkx-z0-nzr" sceneMemberID="firstResponder"/>
|
<placeholder placeholderIdentifier="IBFirstResponder" id="dkx-z0-nzr" sceneMemberID="firstResponder"/>
|
||||||
</objects>
|
</objects>
|
||||||
|
<point key="canvasLocation" x="-26" y="-76"/>
|
||||||
</scene>
|
</scene>
|
||||||
</scenes>
|
</scenes>
|
||||||
</document>
|
</document>
|
||||||
|
|||||||
@ -5,6 +5,7 @@ import 'package:stacked/stacked_annotations.dart';
|
|||||||
|
|
||||||
import '../services/http_services.dart';
|
import '../services/http_services.dart';
|
||||||
import '../services/my_easyloading.dart';
|
import '../services/my_easyloading.dart';
|
||||||
|
import '../services/my_socket_io_client.dart';
|
||||||
import '../ui/views/daftar_user_ui/input_informasi_diri/input_informasi_diri_view.dart';
|
import '../ui/views/daftar_user_ui/input_informasi_diri/input_informasi_diri_view.dart';
|
||||||
import '../ui/views/daftar_user_ui/masukan_no_hp/masukan_no_hp_view.dart';
|
import '../ui/views/daftar_user_ui/masukan_no_hp/masukan_no_hp_view.dart';
|
||||||
import '../ui/views/daftar_user_ui/verifikasi_no_hp/verifikasi_no_hp_view.dart';
|
import '../ui/views/daftar_user_ui/verifikasi_no_hp/verifikasi_no_hp_view.dart';
|
||||||
@ -54,6 +55,7 @@ import '../ui/views/user_ui/user_index_tracking/user_index_tracking_view.dart';
|
|||||||
LazySingleton(classType: MyHttpServices),
|
LazySingleton(classType: MyHttpServices),
|
||||||
LazySingleton(classType: OtherFunction),
|
LazySingleton(classType: OtherFunction),
|
||||||
LazySingleton(classType: GlobalVar),
|
LazySingleton(classType: GlobalVar),
|
||||||
|
LazySingleton(classType: MySocketIoClient),
|
||||||
],
|
],
|
||||||
logger: StackedLogger(),
|
logger: StackedLogger(),
|
||||||
)
|
)
|
||||||
|
|||||||
@ -15,6 +15,7 @@ import 'package:stacked_shared/stacked_shared.dart';
|
|||||||
import '../services/global_var.dart';
|
import '../services/global_var.dart';
|
||||||
import '../services/http_services.dart';
|
import '../services/http_services.dart';
|
||||||
import '../services/my_easyloading.dart';
|
import '../services/my_easyloading.dart';
|
||||||
|
import '../services/my_socket_io_client.dart';
|
||||||
import '../services/other_function.dart';
|
import '../services/other_function.dart';
|
||||||
|
|
||||||
final locator = StackedLocator.instance;
|
final locator = StackedLocator.instance;
|
||||||
@ -36,4 +37,5 @@ Future<void> setupLocator({
|
|||||||
locator.registerLazySingleton(() => MyHttpServices());
|
locator.registerLazySingleton(() => MyHttpServices());
|
||||||
locator.registerLazySingleton(() => OtherFunction());
|
locator.registerLazySingleton(() => OtherFunction());
|
||||||
locator.registerLazySingleton(() => GlobalVar());
|
locator.registerLazySingleton(() => GlobalVar());
|
||||||
|
locator.registerLazySingleton(() => MySocketIoClient());
|
||||||
}
|
}
|
||||||
|
|||||||
@ -7,6 +7,7 @@
|
|||||||
// ignore_for_file: no_leading_underscores_for_library_prefixes
|
// ignore_for_file: no_leading_underscores_for_library_prefixes
|
||||||
import 'package:flutter/material.dart' as _i11;
|
import 'package:flutter/material.dart' as _i11;
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:reza_app/model/makanan_model.dart' as _i12;
|
||||||
import 'package:reza_app/ui/views/daftar_user_ui/input_informasi_diri/input_informasi_diri_view.dart'
|
import 'package:reza_app/ui/views/daftar_user_ui/input_informasi_diri/input_informasi_diri_view.dart'
|
||||||
as _i6;
|
as _i6;
|
||||||
import 'package:reza_app/ui/views/daftar_user_ui/masukan_no_hp/masukan_no_hp_view.dart'
|
import 'package:reza_app/ui/views/daftar_user_ui/masukan_no_hp/masukan_no_hp_view.dart'
|
||||||
@ -17,21 +18,21 @@ import 'package:reza_app/ui/views/login_user/login_user_view.dart' as _i3;
|
|||||||
import 'package:reza_app/ui/views/meja_detail/meja_detail_view.dart' as _i9;
|
import 'package:reza_app/ui/views/meja_detail/meja_detail_view.dart' as _i9;
|
||||||
import 'package:reza_app/ui/views/splash_screen/splash_screen_view.dart' as _i2;
|
import 'package:reza_app/ui/views/splash_screen/splash_screen_view.dart' as _i2;
|
||||||
import 'package:reza_app/ui/views/user_ui/akun_user/akun_user_view.dart'
|
import 'package:reza_app/ui/views/user_ui/akun_user/akun_user_view.dart'
|
||||||
as _i15;
|
as _i16;
|
||||||
import 'package:reza_app/ui/views/user_ui/makanan_list/detail_makanan/detail_makanan_view.dart'
|
import 'package:reza_app/ui/views/user_ui/makanan_list/detail_makanan/detail_makanan_view.dart'
|
||||||
as _i8;
|
as _i8;
|
||||||
import 'package:reza_app/ui/views/user_ui/makanan_list/makanan_list_view.dart'
|
import 'package:reza_app/ui/views/user_ui/makanan_list/makanan_list_view.dart'
|
||||||
as _i13;
|
as _i14;
|
||||||
import 'package:reza_app/ui/views/user_ui/pesanan_list/keranjang_saya/keranjang_saya_view.dart'
|
import 'package:reza_app/ui/views/user_ui/pesanan_list/keranjang_saya/keranjang_saya_view.dart'
|
||||||
as _i10;
|
as _i10;
|
||||||
import 'package:reza_app/ui/views/user_ui/pesanan_list/pesanan_list_view.dart'
|
import 'package:reza_app/ui/views/user_ui/pesanan_list/pesanan_list_view.dart'
|
||||||
as _i14;
|
as _i15;
|
||||||
import 'package:reza_app/ui/views/user_ui/reservasi_meja/reservasi_meja_view.dart'
|
import 'package:reza_app/ui/views/user_ui/reservasi_meja/reservasi_meja_view.dart'
|
||||||
as _i12;
|
as _i13;
|
||||||
import 'package:reza_app/ui/views/user_ui/user_index_tracking/user_index_tracking_view.dart'
|
import 'package:reza_app/ui/views/user_ui/user_index_tracking/user_index_tracking_view.dart'
|
||||||
as _i7;
|
as _i7;
|
||||||
import 'package:stacked/stacked.dart' as _i1;
|
import 'package:stacked/stacked.dart' as _i1;
|
||||||
import 'package:stacked_services/stacked_services.dart' as _i16;
|
import 'package:stacked_services/stacked_services.dart' as _i17;
|
||||||
|
|
||||||
class Routes {
|
class Routes {
|
||||||
static const splashScreenView = '/';
|
static const splashScreenView = '/';
|
||||||
@ -146,8 +147,10 @@ class StackedRouter extends _i1.RouterBase {
|
|||||||
);
|
);
|
||||||
},
|
},
|
||||||
_i8.DetailMakananView: (data) {
|
_i8.DetailMakananView: (data) {
|
||||||
|
final args = data.getArgs<DetailMakananViewArguments>(nullOk: false);
|
||||||
return _i11.MaterialPageRoute<dynamic>(
|
return _i11.MaterialPageRoute<dynamic>(
|
||||||
builder: (context) => const _i8.DetailMakananView(),
|
builder: (context) => _i8.DetailMakananView(
|
||||||
|
key: args.key, makananModel: args.makananModel),
|
||||||
settings: data,
|
settings: data,
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
@ -200,6 +203,33 @@ class InputInformasiDiriViewArguments {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
class DetailMakananViewArguments {
|
||||||
|
const DetailMakananViewArguments({
|
||||||
|
this.key,
|
||||||
|
required this.makananModel,
|
||||||
|
});
|
||||||
|
|
||||||
|
final _i11.Key? key;
|
||||||
|
|
||||||
|
final _i12.MakananModel makananModel;
|
||||||
|
|
||||||
|
@override
|
||||||
|
String toString() {
|
||||||
|
return '{"key": "$key", "makananModel": "$makananModel"}';
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
bool operator ==(covariant DetailMakananViewArguments other) {
|
||||||
|
if (identical(this, other)) return true;
|
||||||
|
return other.key == key && other.makananModel == makananModel;
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
int get hashCode {
|
||||||
|
return key.hashCode ^ makananModel.hashCode;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
class MejaDetailViewArguments {
|
class MejaDetailViewArguments {
|
||||||
const MejaDetailViewArguments({
|
const MejaDetailViewArguments({
|
||||||
this.key,
|
this.key,
|
||||||
@ -248,44 +278,44 @@ class UserIndexTrackingViewRouter extends _i1.RouterBase {
|
|||||||
final _routes = <_i1.RouteDef>[
|
final _routes = <_i1.RouteDef>[
|
||||||
_i1.RouteDef(
|
_i1.RouteDef(
|
||||||
UserIndexTrackingViewRoutes.reservasiMejaView,
|
UserIndexTrackingViewRoutes.reservasiMejaView,
|
||||||
page: _i12.ReservasiMejaView,
|
page: _i13.ReservasiMejaView,
|
||||||
),
|
),
|
||||||
_i1.RouteDef(
|
_i1.RouteDef(
|
||||||
UserIndexTrackingViewRoutes.makananListView,
|
UserIndexTrackingViewRoutes.makananListView,
|
||||||
page: _i13.MakananListView,
|
page: _i14.MakananListView,
|
||||||
),
|
),
|
||||||
_i1.RouteDef(
|
_i1.RouteDef(
|
||||||
UserIndexTrackingViewRoutes.pesananListView,
|
UserIndexTrackingViewRoutes.pesananListView,
|
||||||
page: _i14.PesananListView,
|
page: _i15.PesananListView,
|
||||||
),
|
),
|
||||||
_i1.RouteDef(
|
_i1.RouteDef(
|
||||||
UserIndexTrackingViewRoutes.akunUserView,
|
UserIndexTrackingViewRoutes.akunUserView,
|
||||||
page: _i15.AkunUserView,
|
page: _i16.AkunUserView,
|
||||||
),
|
),
|
||||||
];
|
];
|
||||||
|
|
||||||
final _pagesMap = <Type, _i1.StackedRouteFactory>{
|
final _pagesMap = <Type, _i1.StackedRouteFactory>{
|
||||||
_i12.ReservasiMejaView: (data) {
|
_i13.ReservasiMejaView: (data) {
|
||||||
return _i11.MaterialPageRoute<dynamic>(
|
return _i11.MaterialPageRoute<dynamic>(
|
||||||
builder: (context) => const _i12.ReservasiMejaView(),
|
builder: (context) => const _i13.ReservasiMejaView(),
|
||||||
settings: data,
|
settings: data,
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
_i13.MakananListView: (data) {
|
_i14.MakananListView: (data) {
|
||||||
return _i11.MaterialPageRoute<dynamic>(
|
return _i11.MaterialPageRoute<dynamic>(
|
||||||
builder: (context) => const _i13.MakananListView(),
|
builder: (context) => const _i14.MakananListView(),
|
||||||
settings: data,
|
settings: data,
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
_i14.PesananListView: (data) {
|
_i15.PesananListView: (data) {
|
||||||
return _i11.MaterialPageRoute<dynamic>(
|
return _i11.MaterialPageRoute<dynamic>(
|
||||||
builder: (context) => const _i14.PesananListView(),
|
builder: (context) => const _i15.PesananListView(),
|
||||||
settings: data,
|
settings: data,
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
_i15.AkunUserView: (data) {
|
_i16.AkunUserView: (data) {
|
||||||
return _i11.MaterialPageRoute<dynamic>(
|
return _i11.MaterialPageRoute<dynamic>(
|
||||||
builder: (context) => const _i15.AkunUserView(),
|
builder: (context) => const _i16.AkunUserView(),
|
||||||
settings: data,
|
settings: data,
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
@ -297,7 +327,7 @@ class UserIndexTrackingViewRouter extends _i1.RouterBase {
|
|||||||
Map<Type, _i1.StackedRouteFactory> get pagesMap => _pagesMap;
|
Map<Type, _i1.StackedRouteFactory> get pagesMap => _pagesMap;
|
||||||
}
|
}
|
||||||
|
|
||||||
extension NavigatorStateExtension on _i16.NavigationService {
|
extension NavigatorStateExtension on _i17.NavigationService {
|
||||||
Future<dynamic> navigateToSplashScreenView([
|
Future<dynamic> navigateToSplashScreenView([
|
||||||
int? routerId,
|
int? routerId,
|
||||||
bool preventDuplicates = true,
|
bool preventDuplicates = true,
|
||||||
@ -385,14 +415,18 @@ extension NavigatorStateExtension on _i16.NavigationService {
|
|||||||
transition: transition);
|
transition: transition);
|
||||||
}
|
}
|
||||||
|
|
||||||
Future<dynamic> navigateToDetailMakananView([
|
Future<dynamic> navigateToDetailMakananView({
|
||||||
|
_i11.Key? key,
|
||||||
|
required _i12.MakananModel makananModel,
|
||||||
int? routerId,
|
int? routerId,
|
||||||
bool preventDuplicates = true,
|
bool preventDuplicates = true,
|
||||||
Map<String, String>? parameters,
|
Map<String, String>? parameters,
|
||||||
Widget Function(BuildContext, Animation<double>, Animation<double>, Widget)?
|
Widget Function(BuildContext, Animation<double>, Animation<double>, Widget)?
|
||||||
transition,
|
transition,
|
||||||
]) async {
|
}) async {
|
||||||
return navigateTo<dynamic>(Routes.detailMakananView,
|
return navigateTo<dynamic>(Routes.detailMakananView,
|
||||||
|
arguments:
|
||||||
|
DetailMakananViewArguments(key: key, makananModel: makananModel),
|
||||||
id: routerId,
|
id: routerId,
|
||||||
preventDuplicates: preventDuplicates,
|
preventDuplicates: preventDuplicates,
|
||||||
parameters: parameters,
|
parameters: parameters,
|
||||||
@ -574,14 +608,18 @@ extension NavigatorStateExtension on _i16.NavigationService {
|
|||||||
transition: transition);
|
transition: transition);
|
||||||
}
|
}
|
||||||
|
|
||||||
Future<dynamic> replaceWithDetailMakananView([
|
Future<dynamic> replaceWithDetailMakananView({
|
||||||
|
_i11.Key? key,
|
||||||
|
required _i12.MakananModel makananModel,
|
||||||
int? routerId,
|
int? routerId,
|
||||||
bool preventDuplicates = true,
|
bool preventDuplicates = true,
|
||||||
Map<String, String>? parameters,
|
Map<String, String>? parameters,
|
||||||
Widget Function(BuildContext, Animation<double>, Animation<double>, Widget)?
|
Widget Function(BuildContext, Animation<double>, Animation<double>, Widget)?
|
||||||
transition,
|
transition,
|
||||||
]) async {
|
}) async {
|
||||||
return replaceWith<dynamic>(Routes.detailMakananView,
|
return replaceWith<dynamic>(Routes.detailMakananView,
|
||||||
|
arguments:
|
||||||
|
DetailMakananViewArguments(key: key, makananModel: makananModel),
|
||||||
id: routerId,
|
id: routerId,
|
||||||
preventDuplicates: preventDuplicates,
|
preventDuplicates: preventDuplicates,
|
||||||
parameters: parameters,
|
parameters: parameters,
|
||||||
|
|||||||
@ -1,3 +1,5 @@
|
|||||||
|
import 'dart:io';
|
||||||
|
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter_dotenv/flutter_dotenv.dart';
|
import 'package:flutter_dotenv/flutter_dotenv.dart';
|
||||||
import 'package:flutter_easyloading/flutter_easyloading.dart';
|
import 'package:flutter_easyloading/flutter_easyloading.dart';
|
||||||
@ -9,6 +11,7 @@ import 'app/themes/app_theme.dart';
|
|||||||
|
|
||||||
Future main() async {
|
Future main() async {
|
||||||
WidgetsFlutterBinding.ensureInitialized();
|
WidgetsFlutterBinding.ensureInitialized();
|
||||||
|
HttpOverrides.global = MyHttpOverrides();
|
||||||
await dotenv.load(fileName: ".env");
|
await dotenv.load(fileName: ".env");
|
||||||
await setupAllLocator();
|
await setupAllLocator();
|
||||||
runApp(const MyApp());
|
runApp(const MyApp());
|
||||||
@ -37,3 +40,12 @@ Future<void> setupAllLocator() async {
|
|||||||
// setupBottomsheetUi();
|
// setupBottomsheetUi();
|
||||||
// setupSnackbarUi();
|
// setupSnackbarUi();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
class MyHttpOverrides extends HttpOverrides {
|
||||||
|
@override
|
||||||
|
HttpClient createHttpClient(SecurityContext? context) {
|
||||||
|
return super.createHttpClient(context)
|
||||||
|
..badCertificateCallback =
|
||||||
|
(X509Certificate cert, String host, int port) => true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
32
lib/model/makanan_model.dart
Normal file
32
lib/model/makanan_model.dart
Normal file
@ -0,0 +1,32 @@
|
|||||||
|
class MakananModel {
|
||||||
|
int? idMakanan;
|
||||||
|
String? namaMakanan;
|
||||||
|
String? hargaMakanan;
|
||||||
|
String? deskripsiMakanan;
|
||||||
|
String? imgUrl;
|
||||||
|
|
||||||
|
MakananModel(
|
||||||
|
{this.idMakanan,
|
||||||
|
this.namaMakanan,
|
||||||
|
this.hargaMakanan,
|
||||||
|
this.deskripsiMakanan,
|
||||||
|
this.imgUrl});
|
||||||
|
|
||||||
|
MakananModel.fromJson(Map<String, dynamic> json) {
|
||||||
|
idMakanan = json['id_makanan'];
|
||||||
|
namaMakanan = json['nama_makanan'];
|
||||||
|
hargaMakanan = json['harga_makanan'];
|
||||||
|
deskripsiMakanan = json['deskripsi_makanan'];
|
||||||
|
imgUrl = json['img_url'];
|
||||||
|
}
|
||||||
|
|
||||||
|
Map<String, dynamic> toJson() {
|
||||||
|
final Map<String, dynamic> data = <String, dynamic>{};
|
||||||
|
data['id_makanan'] = idMakanan;
|
||||||
|
data['nama_makanan'] = namaMakanan;
|
||||||
|
data['harga_makanan'] = hargaMakanan;
|
||||||
|
data['deskripsi_makanan'] = deskripsiMakanan;
|
||||||
|
data['img_url'] = imgUrl;
|
||||||
|
return data;
|
||||||
|
}
|
||||||
|
}
|
||||||
21
lib/model/my_model.dart
Normal file
21
lib/model/my_model.dart
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
class MyModel {
|
||||||
|
String? message;
|
||||||
|
bool? theBool;
|
||||||
|
dynamic data;
|
||||||
|
|
||||||
|
MyModel({this.message, this.theBool, this.data});
|
||||||
|
|
||||||
|
MyModel.fromJson(Map<String, dynamic> json) {
|
||||||
|
message = json['message'];
|
||||||
|
theBool = json['bool'];
|
||||||
|
data = json['data'];
|
||||||
|
}
|
||||||
|
|
||||||
|
Map<String, dynamic> toJson() {
|
||||||
|
final Map<String, dynamic> data = <String, dynamic>{};
|
||||||
|
data['message'] = message;
|
||||||
|
data['bool'] = theBool;
|
||||||
|
data['data'] = this.data;
|
||||||
|
return data;
|
||||||
|
}
|
||||||
|
}
|
||||||
36
lib/model/reservasi_meja_model.dart
Normal file
36
lib/model/reservasi_meja_model.dart
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
class ReservasiMejaModel {
|
||||||
|
int? idMeja;
|
||||||
|
int? idUser;
|
||||||
|
String? status;
|
||||||
|
String? jamBooking;
|
||||||
|
String? createdAt;
|
||||||
|
String? updatedAt;
|
||||||
|
|
||||||
|
ReservasiMejaModel(
|
||||||
|
{this.idMeja,
|
||||||
|
this.idUser,
|
||||||
|
this.status,
|
||||||
|
this.jamBooking,
|
||||||
|
this.createdAt,
|
||||||
|
this.updatedAt});
|
||||||
|
|
||||||
|
ReservasiMejaModel.fromJson(Map<String, dynamic> json) {
|
||||||
|
idMeja = json['id_meja'];
|
||||||
|
idUser = json['id_user'];
|
||||||
|
status = json['status'];
|
||||||
|
jamBooking = json['jam_booking'];
|
||||||
|
createdAt = json['created_at'];
|
||||||
|
updatedAt = json['updated_at'];
|
||||||
|
}
|
||||||
|
|
||||||
|
Map<String, dynamic> toJson() {
|
||||||
|
final Map<String, dynamic> data = <String, dynamic>{};
|
||||||
|
data['id_meja'] = idMeja;
|
||||||
|
data['id_user'] = idUser;
|
||||||
|
data['status'] = status;
|
||||||
|
data['jam_booking'] = jamBooking;
|
||||||
|
data['created_at'] = createdAt;
|
||||||
|
data['updated_at'] = updatedAt;
|
||||||
|
return data;
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -6,7 +6,7 @@ import '../app/app.logger.dart';
|
|||||||
class MyHttpServices {
|
class MyHttpServices {
|
||||||
final log = getLogger('MyHttpServices');
|
final log = getLogger('MyHttpServices');
|
||||||
final _options = BaseOptions(
|
final _options = BaseOptions(
|
||||||
baseUrl: dotenv.env['api_url']!,
|
baseUrl: dotenv.env['url']!,
|
||||||
connectTimeout: const Duration(seconds: 120),
|
connectTimeout: const Duration(seconds: 120),
|
||||||
receiveTimeout: const Duration(seconds: 120),
|
receiveTimeout: const Duration(seconds: 120),
|
||||||
);
|
);
|
||||||
|
|||||||
48
lib/services/my_socket_io_client.dart
Normal file
48
lib/services/my_socket_io_client.dart
Normal file
@ -0,0 +1,48 @@
|
|||||||
|
import 'package:flutter_dotenv/flutter_dotenv.dart';
|
||||||
|
import 'package:socket_io_client/socket_io_client.dart';
|
||||||
|
|
||||||
|
import '../app/app.logger.dart';
|
||||||
|
|
||||||
|
class MySocketIoClient {
|
||||||
|
final log = getLogger('MySocketIoClient');
|
||||||
|
final String _url = dotenv.env['url']!;
|
||||||
|
static final MySocketIoClient _instance = MySocketIoClient._internal();
|
||||||
|
factory MySocketIoClient() => _instance;
|
||||||
|
MySocketIoClient._internal();
|
||||||
|
|
||||||
|
late Socket _socket;
|
||||||
|
Socket get socket => _socket;
|
||||||
|
|
||||||
|
Future<void> init() async {
|
||||||
|
try {
|
||||||
|
_socket = io(_url, <String, dynamic>{
|
||||||
|
'transports': ['websocket'],
|
||||||
|
'autoConnect': false,
|
||||||
|
});
|
||||||
|
_socket.connect();
|
||||||
|
log.i('socket connected');
|
||||||
|
} catch (e) {
|
||||||
|
log.e('error : $e');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Future<void> emit(String event, dynamic data) async {
|
||||||
|
_socket.emit(event, data);
|
||||||
|
}
|
||||||
|
|
||||||
|
Future<void> on(String event, Function(dynamic) callback) async {
|
||||||
|
_socket.on(event, callback);
|
||||||
|
}
|
||||||
|
|
||||||
|
Future<void> off(String event) async {
|
||||||
|
_socket.off(event);
|
||||||
|
}
|
||||||
|
|
||||||
|
Future<void> disconnect() async {
|
||||||
|
_socket.disconnect();
|
||||||
|
}
|
||||||
|
|
||||||
|
Future<void> connect() async {
|
||||||
|
_socket.connect();
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -85,9 +85,18 @@ class MejaDetailView extends StatelessWidget {
|
|||||||
style: regularTextStyle,
|
style: regularTextStyle,
|
||||||
children: [
|
children: [
|
||||||
TextSpan(
|
TextSpan(
|
||||||
text: 'Tersedia',
|
text: model.theBool
|
||||||
|
? (model.reservasiMejaModel == null
|
||||||
|
? 'Loading'
|
||||||
|
: model.reservasiMejaModel!.status!
|
||||||
|
.toUpperCase())
|
||||||
|
: 'Tersedia',
|
||||||
style: regularTextStyle.copyWith(
|
style: regularTextStyle.copyWith(
|
||||||
color: Colors.green,
|
color: model.theBool
|
||||||
|
? (model.reservasiMejaModel == null
|
||||||
|
? Colors.grey
|
||||||
|
: Colors.red)
|
||||||
|
: Colors.green,
|
||||||
fontWeight: FontWeight.bold,
|
fontWeight: FontWeight.bold,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
@ -146,10 +155,14 @@ class MejaDetailView extends StatelessWidget {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
floatingActionButton: FloatingActionButton.extended(
|
floatingActionButton: FloatingActionButton.extended(
|
||||||
onPressed: () {},
|
onPressed: () {
|
||||||
|
if (model.theBool == false) {
|
||||||
|
model.showReservasiMeja();
|
||||||
|
}
|
||||||
|
},
|
||||||
label: const Text('Pesan'),
|
label: const Text('Pesan'),
|
||||||
icon: const Icon(Icons.add_shopping_cart),
|
icon: const Icon(Icons.add_shopping_cart),
|
||||||
backgroundColor: mainColor,
|
backgroundColor: mainColor.withOpacity(model.theBool ? 0.5 : 1),
|
||||||
),
|
),
|
||||||
floatingActionButtonAnimator: FloatingActionButtonAnimator.scaling,
|
floatingActionButtonAnimator: FloatingActionButtonAnimator.scaling,
|
||||||
floatingActionButtonLocation:
|
floatingActionButtonLocation:
|
||||||
|
|||||||
@ -1,17 +1,24 @@
|
|||||||
|
import 'package:dio/dio.dart';
|
||||||
|
import 'package:reza_app/model/reservasi_meja_model.dart';
|
||||||
|
|
||||||
import '../../../app/app.logger.dart';
|
import '../../../app/app.logger.dart';
|
||||||
import '../../../app/core/custom_base_view_model.dart';
|
import '../../../app/core/custom_base_view_model.dart';
|
||||||
|
import '../../../model/my_model.dart';
|
||||||
|
|
||||||
class MejaDetailViewModel extends CustomBaseViewModel {
|
class MejaDetailViewModel extends CustomBaseViewModel {
|
||||||
final log = getLogger('MejaDetailViewModel');
|
final log = getLogger('MejaDetailViewModel');
|
||||||
|
|
||||||
late String mejaId;
|
late String mejaId;
|
||||||
late String namaMeja;
|
late String namaMeja;
|
||||||
|
late int idMeja;
|
||||||
|
|
||||||
String? imgAsset;
|
String? imgAsset;
|
||||||
|
bool theBool = false;
|
||||||
|
ReservasiMejaModel? reservasiMejaModel;
|
||||||
|
|
||||||
Future<void> init(String mejaId) async {
|
Future<void> init(String mejaId) async {
|
||||||
log.i('MejaDetailViewModel init');
|
// log.i('MejaDetailViewModel init');
|
||||||
log.i('mejaId : $mejaId');
|
// log.i('mejaId : $mejaId');
|
||||||
this.mejaId = mejaId;
|
this.mejaId = mejaId;
|
||||||
globalVar.backPressed = 'backNormal';
|
globalVar.backPressed = 'backNormal';
|
||||||
// seperate the number from the string
|
// seperate the number from the string
|
||||||
@ -27,9 +34,76 @@ class MejaDetailViewModel extends CustomBaseViewModel {
|
|||||||
namaMeja = 'Meja';
|
namaMeja = 'Meja';
|
||||||
imgAsset = 'assets/reza_meja_2.jpeg';
|
imgAsset = 'assets/reza_meja_2.jpeg';
|
||||||
}
|
}
|
||||||
|
idMeja = number;
|
||||||
|
|
||||||
namaMeja = '$namaMeja $number';
|
namaMeja = '$namaMeja $number';
|
||||||
|
|
||||||
log.i('imgAsset : $imgAsset');
|
// log.i('imgAsset : $imgAsset');
|
||||||
|
getData();
|
||||||
|
}
|
||||||
|
|
||||||
|
getData() async {
|
||||||
|
easyLoading.showLoading();
|
||||||
|
setBusy(true);
|
||||||
|
try {
|
||||||
|
var response = await httpService.get('table/detail/$idMeja');
|
||||||
|
log.i('response : $response');
|
||||||
|
MyModel myModel = MyModel.fromJson(response.data);
|
||||||
|
theBool = myModel.theBool!;
|
||||||
|
|
||||||
|
reservasiMejaModel =
|
||||||
|
theBool ? ReservasiMejaModel.fromJson(myModel.data) : null;
|
||||||
|
|
||||||
|
log.i('reservasiMejaModel : $reservasiMejaModel');
|
||||||
|
} catch (e) {
|
||||||
|
log.e('error : $e');
|
||||||
|
} finally {
|
||||||
|
setBusy(false);
|
||||||
|
easyLoading.dismissLoading();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
showReservasiMeja() async {
|
||||||
|
await dialogService
|
||||||
|
.showDialog(
|
||||||
|
title: 'Reservasi Meja',
|
||||||
|
description: 'Apakah anda ingin reservasi meja ini?',
|
||||||
|
buttonTitle: 'Ya',
|
||||||
|
cancelTitle: 'Tidak',
|
||||||
|
)
|
||||||
|
.then((value) {
|
||||||
|
log.i('value : $value');
|
||||||
|
if (value!.confirmed) {
|
||||||
|
reservasiMeja();
|
||||||
|
log.i('confirmed');
|
||||||
|
} else {
|
||||||
|
log.i('not confirmed');
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
reservasiMeja() async {
|
||||||
|
easyLoading.customLoading('Melakukan reservasi meja...');
|
||||||
|
setBusy(true);
|
||||||
|
try {
|
||||||
|
var formData = FormData.fromMap({'id_user': 1, 'status': 'booking'});
|
||||||
|
|
||||||
|
String path = 'table/reservation/$idMeja';
|
||||||
|
|
||||||
|
await httpService.postWithFormData(path, formData);
|
||||||
|
// log.i('res : $res');
|
||||||
|
getData();
|
||||||
|
snackbarService.showSnackbar(
|
||||||
|
message:
|
||||||
|
'Reservasi meja berhasil\nSila Bayar Rp. 20 ribu jika tiba di cafe',
|
||||||
|
title: 'Berhasil',
|
||||||
|
duration: const Duration(seconds: 2),
|
||||||
|
);
|
||||||
|
} catch (e) {
|
||||||
|
log.e('error : $e');
|
||||||
|
} finally {
|
||||||
|
setBusy(false);
|
||||||
|
easyLoading.dismissLoading();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,9 +1,14 @@
|
|||||||
import 'package:reza_app/app/app.router.dart';
|
import 'package:reza_app/app/app.router.dart';
|
||||||
import 'package:reza_app/app/core/custom_base_view_model.dart';
|
import 'package:reza_app/app/core/custom_base_view_model.dart';
|
||||||
|
|
||||||
|
import '../../../app/app.locator.dart';
|
||||||
|
import '../../../services/my_socket_io_client.dart';
|
||||||
|
|
||||||
class SplashScreenViewModel extends CustomBaseViewModel {
|
class SplashScreenViewModel extends CustomBaseViewModel {
|
||||||
|
final socketIoClient = locator<MySocketIoClient>();
|
||||||
Future<void> init() async {
|
Future<void> init() async {
|
||||||
// after 2 second, navigate to login page
|
// after 2 second, navigate to login page
|
||||||
|
socketIoClient.init();
|
||||||
await Future.delayed(const Duration(seconds: 2));
|
await Future.delayed(const Duration(seconds: 2));
|
||||||
await navigationService.navigateToLoginUserView();
|
await navigationService.navigateToLoginUserView();
|
||||||
}
|
}
|
||||||
|
|||||||
@ -62,8 +62,8 @@ class AkunUserView extends StatelessWidget {
|
|||||||
Center(
|
Center(
|
||||||
child: ClipRRect(
|
child: ClipRRect(
|
||||||
borderRadius: BorderRadius.circular(150),
|
borderRadius: BorderRadius.circular(150),
|
||||||
child: Image.network(
|
child: Image.asset(
|
||||||
'https://a.cdn-hotels.com/gdcs/production0/d1513/35c1c89e-408c-4449-9abe-f109068f40c0.jpg?impolicy=fcrop&w=800&h=533&q=medium',
|
'assets/nasi_goreng.jpg',
|
||||||
height: 150,
|
height: 150,
|
||||||
width: 150,
|
width: 150,
|
||||||
fit: BoxFit.fill,
|
fit: BoxFit.fill,
|
||||||
|
|||||||
@ -1,5 +1,7 @@
|
|||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:flutter_dotenv/flutter_dotenv.dart';
|
||||||
import 'package:flutter_hooks/flutter_hooks.dart';
|
import 'package:flutter_hooks/flutter_hooks.dart';
|
||||||
|
import 'package:reza_app/model/makanan_model.dart';
|
||||||
import 'package:stacked/stacked.dart';
|
import 'package:stacked/stacked.dart';
|
||||||
|
|
||||||
import '../../../../../app/themes/app_colors.dart';
|
import '../../../../../app/themes/app_colors.dart';
|
||||||
@ -8,8 +10,12 @@ import '../../../../widgets/my_white_container.dart';
|
|||||||
import './detail_makanan_view_model.dart';
|
import './detail_makanan_view_model.dart';
|
||||||
|
|
||||||
class DetailMakananView extends HookWidget {
|
class DetailMakananView extends HookWidget {
|
||||||
const DetailMakananView({Key? key}) : super(key: key);
|
final MakananModel makananModel;
|
||||||
|
|
||||||
|
const DetailMakananView({
|
||||||
|
Key? key,
|
||||||
|
required this.makananModel,
|
||||||
|
}) : super(key: key);
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
final scrollController = useScrollController();
|
final scrollController = useScrollController();
|
||||||
@ -21,7 +27,7 @@ class DetailMakananView extends HookWidget {
|
|||||||
return ViewModelBuilder<DetailMakananViewModel>.reactive(
|
return ViewModelBuilder<DetailMakananViewModel>.reactive(
|
||||||
viewModelBuilder: () => DetailMakananViewModel(),
|
viewModelBuilder: () => DetailMakananViewModel(),
|
||||||
onViewModelReady: (DetailMakananViewModel model) async {
|
onViewModelReady: (DetailMakananViewModel model) async {
|
||||||
await model.init();
|
await model.init(makananModel);
|
||||||
},
|
},
|
||||||
builder: (
|
builder: (
|
||||||
BuildContext context,
|
BuildContext context,
|
||||||
@ -127,7 +133,9 @@ class DetailMakananView extends HookWidget {
|
|||||||
),
|
),
|
||||||
// bikin dummy text tentang nasi goreng
|
// bikin dummy text tentang nasi goreng
|
||||||
Text(
|
Text(
|
||||||
"Nasi goreng adalah makanan yang terbuat dari nasi yang digoreng dan diaduk dalam minyak goreng atau margarin, biasanya ditambah kecap manis, bawang merah, bawang putih, daging ayam, telur, dan bumbu-bumbu lainnya. Nasi goreng sering dianggap sebagai makanan nasional Indonesia. Nasi goreng dapat ditemukan di seluruh Indonesia, dari restoran pinggir jalan, warung, hingga hotel bintang lima dan restoran mewah.",
|
model.isBusy
|
||||||
|
? 'Loading...'
|
||||||
|
: model.makananModel!.deskripsiMakanan!,
|
||||||
style: regularTextStyle.copyWith(
|
style: regularTextStyle.copyWith(
|
||||||
fontSize: 13,
|
fontSize: 13,
|
||||||
color: fontGrey,
|
color: fontGrey,
|
||||||
@ -184,7 +192,9 @@ class DetailMakananView extends HookWidget {
|
|||||||
height: 5,
|
height: 5,
|
||||||
),
|
),
|
||||||
Text(
|
Text(
|
||||||
"Rp. 35.000",
|
model.isBusy
|
||||||
|
? 'Loading...'
|
||||||
|
: 'Rp. ${int.parse(makananModel.hargaMakanan!) + 10000}',
|
||||||
style: boldTextStyle.copyWith(
|
style: boldTextStyle.copyWith(
|
||||||
fontSize: 16,
|
fontSize: 16,
|
||||||
color: dangerColor,
|
color: dangerColor,
|
||||||
@ -342,7 +352,9 @@ class SecondWidget extends ViewModelWidget<DetailMakananViewModel> {
|
|||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
children: [
|
children: [
|
||||||
Text(
|
Text(
|
||||||
"Burger King Handcrafted Burgers ",
|
viewModel.isBusy
|
||||||
|
? 'Loading...'
|
||||||
|
: viewModel.makananModel!.namaMakanan!,
|
||||||
style: regularTextStyle.copyWith(
|
style: regularTextStyle.copyWith(
|
||||||
fontSize: 17,
|
fontSize: 17,
|
||||||
),
|
),
|
||||||
@ -351,7 +363,9 @@ class SecondWidget extends ViewModelWidget<DetailMakananViewModel> {
|
|||||||
height: 10,
|
height: 10,
|
||||||
),
|
),
|
||||||
Text(
|
Text(
|
||||||
"Rp. 25.000",
|
viewModel.isBusy
|
||||||
|
? 'Loading...'
|
||||||
|
: 'Rp .${viewModel.makananModel!.hargaMakanan!}',
|
||||||
style: regularTextStyle.copyWith(
|
style: regularTextStyle.copyWith(
|
||||||
fontSize: 18,
|
fontSize: 18,
|
||||||
color: dangerColor,
|
color: dangerColor,
|
||||||
@ -407,35 +421,36 @@ class TopMenuWidget extends ViewModelWidget<DetailMakananViewModel> {
|
|||||||
SizedBox(
|
SizedBox(
|
||||||
width: double.infinity,
|
width: double.infinity,
|
||||||
height: MediaQuery.of(context).size.height * 0.35,
|
height: MediaQuery.of(context).size.height * 0.35,
|
||||||
child: Image.network(
|
child: viewModel.isBusy
|
||||||
'https://a.cdn-hotels.com/gdcs/production0/d1513/35c1c89e-408c-4449-9abe-f109068f40c0.jpg?impolicy=fcrop&w=800&h=533&q=medium',
|
? const Center(child: CircularProgressIndicator())
|
||||||
|
: Image.network(
|
||||||
|
'${dotenv.env['url']}assets/makanan/${viewModel.makananModel!.imgUrl}',
|
||||||
fit: BoxFit.cover,
|
fit: BoxFit.cover,
|
||||||
),
|
)),
|
||||||
),
|
// Positioned(
|
||||||
Positioned(
|
// bottom: 10,
|
||||||
bottom: 10,
|
// right: 10,
|
||||||
right: 10,
|
// child: Container(
|
||||||
child: Container(
|
// padding: const EdgeInsets.symmetric(
|
||||||
padding: const EdgeInsets.symmetric(
|
// horizontal: 5,
|
||||||
horizontal: 5,
|
// ),
|
||||||
),
|
// // width: 20,
|
||||||
// width: 20,
|
// height: 20,
|
||||||
height: 20,
|
// decoration: BoxDecoration(
|
||||||
decoration: BoxDecoration(
|
// color: Colors.white,
|
||||||
color: Colors.white,
|
// borderRadius: BorderRadius.circular(10),
|
||||||
borderRadius: BorderRadius.circular(10),
|
// ),
|
||||||
),
|
// child: const Center(
|
||||||
child: const Center(
|
// child: Text(
|
||||||
child: Text(
|
// '1 / 2',
|
||||||
'1 / 2',
|
// style: TextStyle(
|
||||||
style: TextStyle(
|
// color: fontGrey,
|
||||||
color: fontGrey,
|
// fontSize: 12,
|
||||||
fontSize: 12,
|
// ),
|
||||||
),
|
// ),
|
||||||
),
|
// ),
|
||||||
),
|
// ),
|
||||||
),
|
// ),
|
||||||
),
|
|
||||||
],
|
],
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,10 +1,16 @@
|
|||||||
|
import 'package:reza_app/model/makanan_model.dart';
|
||||||
|
|
||||||
import '../../../../../app/app.logger.dart';
|
import '../../../../../app/app.logger.dart';
|
||||||
import '../../../../../app/core/custom_base_view_model.dart';
|
import '../../../../../app/core/custom_base_view_model.dart';
|
||||||
|
|
||||||
class DetailMakananViewModel extends CustomBaseViewModel {
|
class DetailMakananViewModel extends CustomBaseViewModel {
|
||||||
final log = getLogger('DetailMakananViewModel');
|
final log = getLogger('DetailMakananViewModel');
|
||||||
|
MakananModel? makananModel;
|
||||||
|
|
||||||
Future<void> init() async {
|
Future<void> init(MakananModel makananModel) async {
|
||||||
|
setBusy(true);
|
||||||
globalVar.backPressed = 'backNormal';
|
globalVar.backPressed = 'backNormal';
|
||||||
|
this.makananModel = makananModel;
|
||||||
|
setBusy(false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,4 +1,5 @@
|
|||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:flutter_dotenv/flutter_dotenv.dart';
|
||||||
import 'package:reza_app/ui/widgets/my_textformfield.dart';
|
import 'package:reza_app/ui/widgets/my_textformfield.dart';
|
||||||
import 'package:reza_app/ui/widgets/my_white_container.dart';
|
import 'package:reza_app/ui/widgets/my_white_container.dart';
|
||||||
import 'package:stacked/stacked.dart';
|
import 'package:stacked/stacked.dart';
|
||||||
@ -147,37 +148,65 @@ class MakananListView extends StatelessWidget {
|
|||||||
height: 10,
|
height: 10,
|
||||||
),
|
),
|
||||||
Expanded(
|
Expanded(
|
||||||
child: Center(
|
child: model.isBusy
|
||||||
child: SingleChildScrollView(
|
? const Center(
|
||||||
|
child: CircularProgressIndicator(),
|
||||||
|
)
|
||||||
|
: (model.listMakanan.isEmpty
|
||||||
|
? const Center(
|
||||||
|
child: Text('Data Kosong'),
|
||||||
|
)
|
||||||
|
: SingleChildScrollView(
|
||||||
child: Wrap(
|
child: Wrap(
|
||||||
spacing: 10,
|
spacing: 5,
|
||||||
runSpacing: 10,
|
runSpacing: 10,
|
||||||
|
// alignment: WrapAlignment.spaceAround,
|
||||||
|
// crossAxisAlignment: WrapCrossAlignment.center,
|
||||||
children: [
|
children: [
|
||||||
for (var i = 0; i < 10; i++)
|
for (var i = 0;
|
||||||
|
i < model.listMakanan.length;
|
||||||
|
i++)
|
||||||
GestureDetector(
|
GestureDetector(
|
||||||
onTap: () => model.goToDetailMakanan(),
|
onTap: () => model.goToDetailMakanan(
|
||||||
|
model.listMakanan[i]),
|
||||||
|
child: Padding(
|
||||||
|
padding: const EdgeInsets.only(
|
||||||
|
left: 10,
|
||||||
|
// right: 5,
|
||||||
|
),
|
||||||
child: Container(
|
child: Container(
|
||||||
width: MediaQuery.of(context).size.width * 0.46,
|
width: MediaQuery.of(context)
|
||||||
|
.size
|
||||||
|
.width *
|
||||||
|
0.46,
|
||||||
color: Colors.white,
|
color: Colors.white,
|
||||||
child: Column(
|
child: Column(
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
crossAxisAlignment:
|
||||||
|
CrossAxisAlignment.start,
|
||||||
children: [
|
children: [
|
||||||
Image.network(
|
Image.network(
|
||||||
'https://a.cdn-hotels.com/gdcs/production0/d1513/35c1c89e-408c-4449-9abe-f109068f40c0.jpg?impolicy=fcrop&w=800&h=533&q=medium',
|
'${dotenv.env['url']}assets/makanan/${model.listMakanan[i].imgUrl}',
|
||||||
height: 150,
|
height: 150,
|
||||||
width: double.infinity,
|
width: double.infinity,
|
||||||
fit: BoxFit.fill,
|
fit: BoxFit.fill,
|
||||||
),
|
),
|
||||||
|
// Image.asset(
|
||||||
|
// 'assets/nasi_goreng.jpg',
|
||||||
|
// height: 150,
|
||||||
|
// width: double.infinity,
|
||||||
|
// fit: BoxFit.fill,
|
||||||
|
// ),
|
||||||
const SizedBox(
|
const SizedBox(
|
||||||
height: 5,
|
height: 5,
|
||||||
),
|
),
|
||||||
const Padding(
|
Padding(
|
||||||
padding: EdgeInsets.only(
|
padding: const EdgeInsets.only(
|
||||||
left: 5,
|
left: 5,
|
||||||
),
|
),
|
||||||
child: Text(
|
child: Text(
|
||||||
'Product Name',
|
model.listMakanan[i]
|
||||||
style: TextStyle(
|
.namaMakanan!,
|
||||||
|
style: const TextStyle(
|
||||||
fontWeight: FontWeight.bold,
|
fontWeight: FontWeight.bold,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
@ -185,13 +214,14 @@ class MakananListView extends StatelessWidget {
|
|||||||
const SizedBox(
|
const SizedBox(
|
||||||
height: 5,
|
height: 5,
|
||||||
),
|
),
|
||||||
const Padding(
|
Padding(
|
||||||
padding: EdgeInsets.only(
|
padding: const EdgeInsets.only(
|
||||||
left: 5,
|
left: 5,
|
||||||
),
|
),
|
||||||
child: Text(
|
child: Text(
|
||||||
'Rp. 100.000',
|
model.listMakanan[i]
|
||||||
style: TextStyle(
|
.deskripsiMakanan!,
|
||||||
|
style: const TextStyle(
|
||||||
color: Colors.grey,
|
color: Colors.grey,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
@ -203,10 +233,10 @@ class MakananListView extends StatelessWidget {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
)),
|
||||||
),
|
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
|
|||||||
@ -1,15 +1,50 @@
|
|||||||
|
import '../../../../app/app.locator.dart';
|
||||||
import '../../../../app/app.logger.dart';
|
import '../../../../app/app.logger.dart';
|
||||||
import '../../../../app/app.router.dart';
|
import '../../../../app/app.router.dart';
|
||||||
import '../../../../app/core/custom_base_view_model.dart';
|
import '../../../../app/core/custom_base_view_model.dart';
|
||||||
|
import '../../../../model/makanan_model.dart';
|
||||||
|
import '../../../../model/my_model.dart';
|
||||||
|
import '../../../../services/my_socket_io_client.dart';
|
||||||
|
|
||||||
class MakananListViewModel extends CustomBaseViewModel {
|
class MakananListViewModel extends CustomBaseViewModel {
|
||||||
final log = getLogger('MakananListViewModel');
|
final log = getLogger('MakananListViewModel');
|
||||||
|
final socketIoClient = locator<MySocketIoClient>();
|
||||||
|
List<MakananModel> listMakanan = [];
|
||||||
Future<void> init() async {
|
Future<void> init() async {
|
||||||
globalVar.backPressed = 'exitApp';
|
globalVar.backPressed = 'exitApp';
|
||||||
|
getData();
|
||||||
|
socketIoClient.on('makanan_user', (data) {
|
||||||
|
log.i('data : $data');
|
||||||
|
listMakanan.clear();
|
||||||
|
getData();
|
||||||
|
// webViewController!.reload();
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
goToDetailMakanan() {
|
getData() async {
|
||||||
|
setBusy(true);
|
||||||
|
easyLoading.showLoading();
|
||||||
|
try {
|
||||||
|
var res = await httpService.get('table/makanan');
|
||||||
|
MyModel myModel = MyModel.fromJson(res.data);
|
||||||
|
|
||||||
|
if (myModel.data.length > 0) {
|
||||||
|
for (var item in myModel.data) {
|
||||||
|
listMakanan.add(MakananModel.fromJson(item));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
log.i(listMakanan);
|
||||||
|
} catch (e) {
|
||||||
|
log.e(e.toString());
|
||||||
|
} finally {
|
||||||
|
easyLoading.dismissLoading();
|
||||||
|
setBusy(false);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
goToDetailMakanan(MakananModel makananModel) {
|
||||||
log.i('goToDetailMakanan');
|
log.i('goToDetailMakanan');
|
||||||
navigationService.navigateTo(Routes.detailMakananView);
|
navigationService.navigateTo(Routes.detailMakananView,
|
||||||
|
arguments: DetailMakananViewArguments(makananModel: makananModel));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -72,8 +72,8 @@ class KeranjangSayaView extends StatelessWidget {
|
|||||||
),
|
),
|
||||||
child: ClipRRect(
|
child: ClipRRect(
|
||||||
borderRadius: BorderRadius.circular(10),
|
borderRadius: BorderRadius.circular(10),
|
||||||
child: Image.network(
|
child: Image.asset(
|
||||||
'https://a.cdn-hotels.com/gdcs/production0/d1513/35c1c89e-408c-4449-9abe-f109068f40c0.jpg?impolicy=fcrop&w=800&h=533&q=medium',
|
'assets/nasi_goreng.jpg',
|
||||||
height: 150,
|
height: 150,
|
||||||
width: double.infinity,
|
width: double.infinity,
|
||||||
fit: BoxFit.fill,
|
fit: BoxFit.fill,
|
||||||
|
|||||||
@ -157,8 +157,8 @@ class PesananListView extends StatelessWidget {
|
|||||||
),
|
),
|
||||||
child: ClipRRect(
|
child: ClipRRect(
|
||||||
borderRadius: BorderRadius.circular(10),
|
borderRadius: BorderRadius.circular(10),
|
||||||
child: Image.network(
|
child: Image.asset(
|
||||||
'https://a.cdn-hotels.com/gdcs/production0/d1513/35c1c89e-408c-4449-9abe-f109068f40c0.jpg?impolicy=fcrop&w=800&h=533&q=medium',
|
'assets/nasi_goreng.jpg',
|
||||||
height: 100,
|
height: 100,
|
||||||
width: double.infinity,
|
width: double.infinity,
|
||||||
fit: BoxFit.fill,
|
fit: BoxFit.fill,
|
||||||
|
|||||||
@ -104,16 +104,14 @@ class ReservasiMejaView extends StatelessWidget {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
Expanded(
|
Expanded(
|
||||||
|
// child: SizedBox(),
|
||||||
child: WebView(
|
child: WebView(
|
||||||
initialUrl: dotenv.env['table_url'],
|
initialUrl: dotenv.env['table_url'],
|
||||||
// initialUrl: 'http://172.29.85.181/parkir/user',
|
// initialUrl: 'http://172.29.85.181/parkir/user',
|
||||||
// initialUrl: 'https://rekam-medis.airlangga-it.com/',
|
// initialUrl: 'https://rekam-medis.airlangga-it.com/',
|
||||||
javascriptMode: JavascriptMode.unrestricted,
|
javascriptMode: JavascriptMode.unrestricted,
|
||||||
onWebViewCreated: (WebViewController webViewController) {
|
onWebViewCreated: (WebViewController webViewController) {
|
||||||
// _controller.complete(webViewController);
|
model.webViewController = webViewController;
|
||||||
// model.controllerCompleter.future
|
|
||||||
// .then((value) => model.webViewController = value);
|
|
||||||
// model.controllerCompleter.complete(webViewController);
|
|
||||||
},
|
},
|
||||||
onProgress: (int progress) {
|
onProgress: (int progress) {
|
||||||
// model.log.i('WebView is loading (progress : $progress%)');
|
// model.log.i('WebView is loading (progress : $progress%)');
|
||||||
@ -196,19 +194,19 @@ class ReservasiMejaView extends StatelessWidget {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
const SizedBox(width: 5),
|
const SizedBox(width: 5),
|
||||||
const Text('Tidak Tersedia'),
|
const Text('Dibooking'),
|
||||||
|
|
||||||
const SizedBox(width: 10),
|
const SizedBox(width: 10),
|
||||||
Container(
|
Container(
|
||||||
width: 20,
|
width: 20,
|
||||||
height: 20,
|
height: 20,
|
||||||
decoration: const BoxDecoration(
|
decoration: const BoxDecoration(
|
||||||
color: Colors.blue,
|
color: Colors.grey,
|
||||||
shape: BoxShape.circle,
|
shape: BoxShape.circle,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
const SizedBox(width: 5),
|
const SizedBox(width: 5),
|
||||||
const Text('Dipesan'),
|
const Text('Tidak Tersedia'),
|
||||||
const SizedBox(width: 10),
|
const SizedBox(width: 10),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
|
|||||||
@ -1,10 +1,16 @@
|
|||||||
import 'dart:async';
|
import 'dart:async';
|
||||||
|
|
||||||
|
import 'package:webview_flutter/webview_flutter.dart';
|
||||||
|
|
||||||
|
import '../../../../app/app.locator.dart';
|
||||||
import '../../../../app/app.logger.dart';
|
import '../../../../app/app.logger.dart';
|
||||||
import '../../../../app/core/custom_base_view_model.dart';
|
import '../../../../app/core/custom_base_view_model.dart';
|
||||||
|
import '../../../../services/my_socket_io_client.dart';
|
||||||
|
|
||||||
class ReservasiMejaViewModel extends CustomBaseViewModel {
|
class ReservasiMejaViewModel extends CustomBaseViewModel {
|
||||||
final log = getLogger('ReservasiMejaViewModel');
|
final log = getLogger('ReservasiMejaViewModel');
|
||||||
|
WebViewController? webViewController;
|
||||||
|
final socketIoClient = locator<MySocketIoClient>();
|
||||||
|
|
||||||
List<String> imagePaths = [
|
List<String> imagePaths = [
|
||||||
'assets/reza_gazebo.jpeg',
|
'assets/reza_gazebo.jpeg',
|
||||||
@ -14,5 +20,10 @@ class ReservasiMejaViewModel extends CustomBaseViewModel {
|
|||||||
|
|
||||||
Future<void> init() async {
|
Future<void> init() async {
|
||||||
globalVar.backPressed = 'exitApp';
|
globalVar.backPressed = 'exitApp';
|
||||||
|
socketIoClient.on('table_admin', (data) {
|
||||||
|
log.i('data : $data');
|
||||||
|
// getData();
|
||||||
|
webViewController!.reload();
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
20
pubspec.lock
20
pubspec.lock
@ -229,10 +229,10 @@ packages:
|
|||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: file
|
name: file
|
||||||
sha256: "5fc22d7c25582e38ad9a8515372cd9a93834027aacf1801cf01164dac0ffa08c"
|
sha256: "1b92bec4fc2a72f59a8e15af5f52cd441e4a7860b49499d69dfa817af20e925d"
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "7.0.0"
|
version: "6.1.4"
|
||||||
file_selector_linux:
|
file_selector_linux:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
@ -773,6 +773,22 @@ packages:
|
|||||||
description: flutter
|
description: flutter
|
||||||
source: sdk
|
source: sdk
|
||||||
version: "0.0.99"
|
version: "0.0.99"
|
||||||
|
socket_io_client:
|
||||||
|
dependency: "direct main"
|
||||||
|
description:
|
||||||
|
name: socket_io_client
|
||||||
|
sha256: ede469f3e4c55e8528b4e023bdedbc20832e8811ab9b61679d1ba3ed5f01f23b
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "2.0.3+1"
|
||||||
|
socket_io_common:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: socket_io_common
|
||||||
|
sha256: "2ab92f8ff3ebbd4b353bf4a98bee45cc157e3255464b2f90f66e09c4472047eb"
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "2.0.3"
|
||||||
source_gen:
|
source_gen:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
|
|||||||
@ -55,6 +55,7 @@ dependencies:
|
|||||||
flutter_hooks: ^0.19.0
|
flutter_hooks: ^0.19.0
|
||||||
webview_flutter: ^3.0.4
|
webview_flutter: ^3.0.4
|
||||||
carousel_slider: ^4.2.1
|
carousel_slider: ^4.2.1
|
||||||
|
socket_io_client:
|
||||||
|
|
||||||
dev_dependencies:
|
dev_dependencies:
|
||||||
flutter_test:
|
flutter_test:
|
||||||
@ -88,6 +89,7 @@ flutter:
|
|||||||
- assets/reza_gazebo.jpeg
|
- assets/reza_gazebo.jpeg
|
||||||
- assets/reza_meja_1.jpeg
|
- assets/reza_meja_1.jpeg
|
||||||
- assets/reza_meja_2.jpeg
|
- assets/reza_meja_2.jpeg
|
||||||
|
- assets/nasi_goreng.jpg
|
||||||
# - images/a_dot_ham.jpeg
|
# - images/a_dot_ham.jpeg
|
||||||
|
|
||||||
# An image asset can refer to one or more resolution-specific "variants", see
|
# An image asset can refer to one or more resolution-specific "variants", see
|
||||||
|
|||||||
Reference in New Issue
Block a user