From cdcd2dcab35d0ba77a74dfb08afede1172729a31 Mon Sep 17 00:00:00 2001 From: Novian Andika Date: Thu, 20 Apr 2023 13:04:04 +0700 Subject: [PATCH 1/7] =?UTF-8?q?=F0=9F=94=A7=20chore(assets=5Fcleaner.yaml)?= =?UTF-8?q?:=20add=20configuration=20options=20for=20excluding=20extension?= =?UTF-8?q?s=20and=20files=20=F0=9F=9A=80=20feat(pubspec.yaml):=20update?= =?UTF-8?q?=20collection=20dependency=20to=20version=201.17.0=20The=20asse?= =?UTF-8?q?ts=5Fcleaner.yaml=20file=20now=20has=20configuration=20options?= =?UTF-8?q?=20for=20excluding=20specific=20extensions=20and=20files=20from?= =?UTF-8?q?=20the=20assets.=20This=20allows=20for=20more=20control=20over?= =?UTF-8?q?=20the=20cleaning=20process=20and=20ensures=20that=20important?= =?UTF-8?q?=20files=20are=20not=20accidentally=20deleted.=20The=20pubspec.?= =?UTF-8?q?yaml=20file=20has=20been=20updated=20to=20use=20version=201.17.?= =?UTF-8?q?0=20of=20the=20collection=20dependency,=20which=20provides=20bu?= =?UTF-8?q?g=20fixes=20and=20performance=20improvements.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- assets_cleaner.yaml | 13 +++++++++++++ pubspec.lock | 32 ++++++++++++++++---------------- pubspec.yaml | 2 +- 3 files changed, 30 insertions(+), 17 deletions(-) create mode 100644 assets_cleaner.yaml diff --git a/assets_cleaner.yaml b/assets_cleaner.yaml new file mode 100644 index 00000000..9fb62e19 --- /dev/null +++ b/assets_cleaner.yaml @@ -0,0 +1,13 @@ +config: + # If you want to exclude specific + # extension + exclude-extension: + # - jpg # Uncomment this if you want to use + # - png # Uncomment this if you want to use + - ttf + + # If you want to exclude specific + # file from assets + exclude-file: + # - /assets/images/banner_upgrade.png # Uncomment this if you want to use + # - /assets/images/logo.png # Uncomment this if you want to use diff --git a/pubspec.lock b/pubspec.lock index 16fb7e99..f27433c4 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -77,10 +77,10 @@ packages: dependency: transitive description: name: async - sha256: "947bfcf187f74dbc5e146c9eb9c0f10c9f8b30743e341481c1e2ed3ecc18c20c" + sha256: bfe67ef28df125b7dddcea62755991f807aa39a2492a23e1550161692950bbe0 url: "https://pub.dev" source: hosted - version: "2.11.0" + version: "2.10.0" avatar_glow: dependency: "direct main" description: @@ -189,10 +189,10 @@ packages: dependency: transitive description: name: characters - sha256: "04a925763edad70e8443c99234dc3328f442e811f1d8fd1a72f1c8ad0f69a605" + sha256: e6a326c8af69605aec75ed6c187d06b349707a27fbff8222ca9cc2cff167975c url: "https://pub.dev" source: hosted - version: "1.3.0" + version: "1.2.1" checked_yaml: dependency: transitive description: @@ -221,10 +221,10 @@ packages: dependency: "direct main" description: name: collection - sha256: "4a07be6cb69c84d677a6c3096fcf960cc3285a8330b4603e0d463d15d9bd934c" + sha256: cfc915e6923fe5ce6e153b0723c753045de46de1b4d63771530504004a45fae0 url: "https://pub.dev" source: hosted - version: "1.17.1" + version: "1.17.0" community_material_icon: dependency: transitive description: @@ -1200,10 +1200,10 @@ packages: dependency: transitive description: name: js - sha256: f2c445dce49627136094980615a031419f7f3eb393237e4ecd97ac15dea343f3 + sha256: "5528c2f391ededb7775ec1daa69e65a2d61276f7552de2b5f7b8d34ee9fd4ab7" url: "https://pub.dev" source: hosted - version: "0.6.7" + version: "0.6.5" json_annotation: dependency: transitive description: @@ -1280,10 +1280,10 @@ packages: dependency: transitive description: name: matcher - sha256: "6501fbd55da300384b768785b83e5ce66991266cec21af89ab9ae7f5ce1c4cbb" + sha256: "16db949ceee371e9b99d22f88fa3a73c4e59fd0afed0bd25fc336eb76c198b72" url: "https://pub.dev" source: hosted - version: "0.12.15" + version: "0.12.13" material_color_utilities: dependency: transitive description: @@ -1296,10 +1296,10 @@ packages: dependency: transitive description: name: meta - sha256: "3c74dbf8763d36539f114c799d8a2d87343b5067e9d796ca22b5eb8437090ee3" + sha256: "6c268b42ed578a53088d834796959e4a1814b5e9e164f147f580a386e5decf42" url: "https://pub.dev" source: hosted - version: "1.9.1" + version: "1.8.0" mgrs_dart: dependency: transitive description: @@ -1385,10 +1385,10 @@ packages: dependency: transitive description: name: path - sha256: "8829d8a55c13fc0e37127c29fedf290c102f4e40ae94ada574091fe0ff96c917" + sha256: db9d4f58c908a4ba5953fcee2ae317c94889433e5024c27ce74a37f94267945b url: "https://pub.dev" source: hosted - version: "1.8.3" + version: "1.8.2" path_parsing: dependency: transitive description: @@ -1863,10 +1863,10 @@ packages: dependency: transitive description: name: test_api - sha256: "6b12a91cd2febdb6f7e7d92c00d1d0c01d88bffc7fe36b1ed236f0cc37cb5ca4" + sha256: ad540f65f92caa91bf21dfc8ffb8c589d6e4dc0c2267818b4cc2792857706206 url: "https://pub.dev" source: hosted - version: "0.5.0" + version: "0.4.16" timeline_tile: dependency: "direct main" description: diff --git a/pubspec.yaml b/pubspec.yaml index 46803d98..791c94b2 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -12,7 +12,7 @@ dependencies: bootstrap_alert: ^1.0.1 bottom_bar_matu: ^1.3.0 cached_network_image: ^3.2.3 - collection: 1.17.1 + collection: 1.17.0 cupertino_icons: ^1.0.5 currency_text_input_formatter: ^2.1.9 data_connection_checker: From e57f5e7912a87cc0379099ea1f65bc34826860f2 Mon Sep 17 00:00:00 2001 From: Novian Andika Date: Thu, 20 Apr 2023 13:13:33 +0700 Subject: [PATCH 2/7] =?UTF-8?q?=F0=9F=94=A8=20chore(build.yml):=20update?= =?UTF-8?q?=20Flutter=20version=20and=20remove=20force-upgrade=20=E2=9C=A8?= =?UTF-8?q?=20feat(pubspec.yaml):=20update=20dependencies=20to=20latest=20?= =?UTF-8?q?versions=20The=20Flutter=20version=20has=20been=20updated=20to?= =?UTF-8?q?=203.7.12,=20which=20is=20the=20latest=20stable=20version.=20Th?= =?UTF-8?q?e=20force-upgrade=20flag=20has=20been=20removed=20from=20the=20?= =?UTF-8?q?flutter=20update-packages=20command=20as=20it=20is=20no=20longe?= =?UTF-8?q?r=20necessary.=20The=20dependencies=20in=20pubspec.yaml=20have?= =?UTF-8?q?=20been=20updated=20to=20their=20latest=20versions.=20This=20en?= =?UTF-8?q?sures=20that=20the=20application=20is=20using=20the=20latest=20?= =?UTF-8?q?features=20and=20bug=20fixes.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/build.yml | 5 +-- pubspec.lock | 76 ++++++++++++++++++------------------- pubspec.yaml | 20 +++++----- 3 files changed, 49 insertions(+), 52 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index d5f09b13..8d00833a 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -25,7 +25,7 @@ jobs: - name: Setup Flutter uses: subosito/flutter-action@v2 with: - flutter-version: "3.7.9" + flutter-version: "3.7.12" channel: "stable" # Decode file KEYSTORE_JKS_PROD yang berbentuk base64 dan mengubahnya menjadi keystore.jks @@ -48,9 +48,6 @@ jobs: # sed -i 's/99.99.99+99/'$GIT_TAG_NAME'/g' pubspec.yaml| # echo "Tag used version:"$GIT_TAG_NAME - - name: Bump Fluter dependencies - run: flutter update-packages --force-upgrade - # Step ini digunakan untuk menginstall dependency yang dibutuhkan - name: Pub Get Packages run: flutter pub get diff --git a/pubspec.lock b/pubspec.lock index f27433c4..2cf02d7e 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -13,18 +13,18 @@ packages: dependency: transitive description: name: _flutterfire_internals - sha256: f175bc1414e4edf8c5b83372c98eeabecf8353f39c9da423c2cfdf1f1f508788 + sha256: "6a0ad72b2bcdb461749e40c01c478212a78db848dfcb2f10f2a461988bc5fb29" url: "https://pub.dev" source: hosted - version: "1.1.0" + version: "1.1.1" about: dependency: "direct main" description: name: about - sha256: c981182cbff7271885a4cbf2b7d681684c2287ebd2fb4931a1d7f725a2920594 + sha256: "65e34364ac29adf7ed1b3c5e2a57da74a0694e23db1d713a3773f5e1f53c0b00" url: "https://pub.dev" source: hosted - version: "2.1.1" + version: "2.1.3" analyzer: dependency: transitive description: @@ -447,58 +447,58 @@ packages: dependency: "direct main" description: name: firebase_analytics - sha256: acba5361bdc2b2f711c47ae09171d9864c1e5f46156ec5ad8c4ce619dc55b968 + sha256: "2d8f475f79658a8e1865ee8a9e2e8eea70de5e487e3a646d9073dc3d1520d3e8" url: "https://pub.dev" source: hosted - version: "10.2.0" + version: "10.2.1" firebase_analytics_platform_interface: dependency: transitive description: name: firebase_analytics_platform_interface - sha256: "5019bb18deed5b92e0f22b11b496e8265548034179e55ac7a12987fabf133d16" + sha256: a667807edbcd3f5a6336275a21c8802de8f98f0a91b8c97abb76119b142aa91d url: "https://pub.dev" source: hosted - version: "3.4.0" + version: "3.4.1" firebase_analytics_web: dependency: transitive description: name: firebase_analytics_web - sha256: "5bcdf3a63d1c6fe2426e22252b41d8579b8b7dd121225bcd623f4920d4cef4f9" + sha256: "907285030d59570d7c1a8d721912db990957ab9b87736e50a9457491c16bcffe" url: "https://pub.dev" source: hosted - version: "0.5.2" + version: "0.5.2+1" firebase_auth: dependency: "direct main" description: name: firebase_auth - sha256: "3d33d6646f08407122cd2cbd292d274b98035d93f59c9e341ba992ebefd59ffa" + sha256: "8c97619ed2633148c41c344a59461f23c73bf8aa477ae48296703f06d9621fb0" url: "https://pub.dev" source: hosted - version: "4.4.0" + version: "4.4.2" firebase_auth_platform_interface: dependency: transitive description: name: firebase_auth_platform_interface - sha256: "5d5f283517ba34afd69ef448cc81ea23bcf8887393bedae4f70f45060b045fb9" + sha256: f7db119be795d79533c503887075a0315fc3ae1da6f9a9cd4f9100a62c68859c url: "https://pub.dev" source: hosted - version: "6.13.0" + version: "6.13.1" firebase_auth_web: dependency: transitive description: name: firebase_auth_web - sha256: f50f7026b95c62dba3f0b28bdb3ab3601ea402b4908c1469103f16ae2b0f5281 + sha256: "45687246f5be811baf3810652460acd0f3d8c98f9d8f8b1961d7cc5c15c1e803" url: "https://pub.dev" source: hosted - version: "5.3.0" + version: "5.3.2" firebase_core: dependency: "direct main" description: name: firebase_core - sha256: ed611fb8e67e43ecc7956f242cecca383d87cf71aace27287aa5dd4bdba4ac07 + sha256: "239e4ac688674a7e7b5476fd16b0d8e2b5a453d464f32091af3ce1df4ebb7316" url: "https://pub.dev" source: hosted - version: "2.9.0" + version: "2.10.0" firebase_core_platform_interface: dependency: transitive description: @@ -519,42 +519,42 @@ packages: dependency: "direct main" description: name: firebase_crashlytics - sha256: "42cf6a137eaae7e485e6cc9794336e8e518c506b691aa6e19ff918206c535bec" + sha256: bfc662a87df622e7d95c360536a4999f06474f53eda5a219af9e29193d498529 url: "https://pub.dev" source: hosted - version: "3.1.0" + version: "3.1.1" firebase_crashlytics_platform_interface: dependency: transitive description: name: firebase_crashlytics_platform_interface - sha256: baa4c3d4af426d29800f0d80d165f31df4548985db151fd761346e07ed433d31 + sha256: b9c7b8498c877a2901ad323fc92c10f672be1597bc82d08f121f6228f321a7e0 url: "https://pub.dev" source: hosted - version: "3.4.0" + version: "3.4.1" firebase_messaging: dependency: "direct main" description: name: firebase_messaging - sha256: e4a5eb079aa9e7bd6b5fb2681f2bb8a6c78f87aacbf1c732c6ce91ad71e595ba + sha256: b300f728021b52018e4fc5aed326e71f876ef58219d7f10754370f424a338929 url: "https://pub.dev" source: hosted - version: "14.4.0" + version: "14.4.1" firebase_messaging_platform_interface: dependency: transitive description: name: firebase_messaging_platform_interface - sha256: "3a007c888e3414c9e4f7c35ea6fa59eafc623c62ee36155710563a1ebc160063" + sha256: "3585b447d9a8c8a22ab6c14ffe57c64c0fcd9656e437e3dd226ef88a5f334b84" url: "https://pub.dev" source: hosted - version: "4.3.0" + version: "4.3.1" firebase_messaging_web: dependency: transitive description: name: firebase_messaging_web - sha256: a3239662b91b652cea4ce3b3ecac6cccbaebc1b4ac3101224bef805de4195fbf + sha256: "9e95a7694a1a24a8cdb047351c5a75583c84767d82ce74c52647ee9f81b425ae" url: "https://pub.dev" source: hosted - version: "3.3.0" + version: "3.3.1" flutter: dependency: "direct main" description: flutter @@ -787,10 +787,10 @@ packages: dependency: "direct main" description: name: flutter_slidable - sha256: "6c68e1fad129b4b807b2218ef4cf7f7f6f61c5ec8861c990dc2278d9d03cb09f" + sha256: cc4231579e3eae41ae166660df717f4bad1359c87f4a4322ad8ba1befeb3d2be url: "https://pub.dev" source: hosted - version: "2.0.0" + version: "3.0.0" flutter_staggered_grid_view: dependency: "direct main" description: @@ -1006,10 +1006,10 @@ packages: dependency: "direct main" description: name: getwidget - sha256: d97c08d2cc8f2456bb8b28e34931879b1c5da6545453f3d64b7bebd70b7abfcf + sha256: "6bdf191f91de5f80f9abd49e3cffaef66256167aaa091626ac78d5c81c645335" url: "https://pub.dev" source: hosted - version: "3.0.1" + version: "3.1.1" glob: dependency: transitive description: @@ -1118,10 +1118,10 @@ packages: dependency: "direct main" description: name: image_picker - sha256: "8b0efbf350ba4f2be1531d629396a994983d0c02f4a82a128aed84d954b90cfa" + sha256: f202f5d730eb8219e35e80c4461fb3a779940ad30ce8fde1586df756e3af25e6 url: "https://pub.dev" source: hosted - version: "0.8.7+2" + version: "0.8.7+3" image_picker_android: dependency: transitive description: @@ -1823,18 +1823,18 @@ packages: dependency: "direct main" description: name: syncfusion_flutter_charts - sha256: "724a4758fbdb79d8446fe1720d1b003ba493aedc84cd6df22c8209fe66c2219e" + sha256: afc6ddd660c898a3af3f4fe47cfc9219407bcea497c992854e102aa9dcd5a477 url: "https://pub.dev" source: hosted - version: "21.1.39" + version: "21.1.41" syncfusion_flutter_core: dependency: transitive description: name: syncfusion_flutter_core - sha256: "3659bd6b4774ff95ce22b624be932f009c20913a99baf8898166ba2d36b73156" + sha256: "05b079cb1be26a8d5c1afe714172d2eed9178049f4a7dc773b2cbb8b053eff8d" url: "https://pub.dev" source: hosted - version: "21.1.39" + version: "21.1.41" synchronized: dependency: transitive description: diff --git a/pubspec.yaml b/pubspec.yaml index 791c94b2..0d05cb98 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -6,7 +6,7 @@ environment: sdk: ">=2.17.6 <3.0.0" dependencies: - about: ^2.1.1 + about: ^2.1.3 avatar_glow: ^2.0.2 awesome_dialog: ^3.0.2 bootstrap_alert: ^1.0.1 @@ -29,11 +29,11 @@ dependencies: git: url: https://github.com/yuvaraja2303/finance/ ref: patch-1 - firebase_analytics: ^10.2.0 - firebase_auth: ^4.4.0 - firebase_core: ^2.9.0 - firebase_crashlytics: ^3.1.0 - firebase_messaging: ^14.4.0 + firebase_analytics: ^10.2.1 + firebase_auth: ^4.4.2 + firebase_core: ^2.10.0 + firebase_crashlytics: ^3.1.1 + firebase_messaging: ^14.4.1 flutter: sdk: flutter flutter_animate: ^4.1.1+1 @@ -51,7 +51,7 @@ dependencies: flutter_map_marker_popup: ^4.0.2 flutter_markdown: ^0.6.14 flutter_native_splash: ^2.2.19 - flutter_slidable: ^2.0.0 + flutter_slidable: ^3.0.0 flutter_staggered_grid_view: ^0.6.2 flutter_styled_toast: ^2.1.3 flutter_svg: ^2.0.5 @@ -68,11 +68,11 @@ dependencies: geocoding: ^2.1.0 geolocator: ^9.0.2 get: 4.6.5 - getwidget: ^3.0.1 + getwidget: ^3.1.1 google_fonts: ^4.0.3 google_sign_in: ^6.1.0 http: ^0.13.5 - image_picker: ^0.8.7+2 + image_picker: ^0.8.7+3 in_app_update: git: url: https://github.com/nikb7/flutter_in_app_update @@ -109,7 +109,7 @@ dependencies: settings_ui: ^2.0.2 share_plus: ^6.3.2 shared_preferences: ^2.1.0 - syncfusion_flutter_charts: ^21.1.39 + syncfusion_flutter_charts: ^21.1.41 terbilang_id: ^0.1.0 timeline_tile: ^2.0.0 url_launcher: ^6.1.10 From e76d4783f0e34c1072d6dcd6497cf0f78966b103 Mon Sep 17 00:00:00 2001 From: Novian Andika Date: Fri, 21 Apr 2023 10:10:02 +0700 Subject: [PATCH 3/7] =?UTF-8?q?=F0=9F=8E=A8=20chore(assets=5Fcleaner.yaml)?= =?UTF-8?q?:=20add=20exclusion=20for=20times-new-roman.ttf=20font=20file?= =?UTF-8?q?=20=F0=9F=9A=80=20feat(reviewer=5Fsubmit=5Fview.dart):=20add=20?= =?UTF-8?q?ReviewerSubmitResponse=20widget=20The=20ReviewerSubmitResponse?= =?UTF-8?q?=20widget=20is=20added=20to=20the=20ReviewerSubmitView.=20This?= =?UTF-8?q?=20widget=20displays=20a=20list=20of=20responses=20from=20the?= =?UTF-8?q?=20reviewer=20to=20the=20submitted=20application.=20The=20widge?= =?UTF-8?q?t=20allows=20the=20reviewer=20to=20add=20or=20remove=20response?= =?UTF-8?q?s=20dynamically.=20The=20assets=5Fcleaner.yaml=20file=20is=20up?= =?UTF-8?q?dated=20to=20exclude=20the=20times-new-roman.ttf=20font=20file?= =?UTF-8?q?=20from=20the=20assets.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- assets/images/home/list_response.zip | Bin 0 -> 6222 bytes assets_cleaner.yaml | 5 +- .../views/reviewer_submit_view.dart | 140 +--------------- .../widget/reviewer_submit_response.dart | 156 ++++++++++++++++++ 4 files changed, 166 insertions(+), 135 deletions(-) create mode 100644 assets/images/home/list_response.zip create mode 100644 lib/app/modules/reviewer_submit/widget/reviewer_submit_response.dart diff --git a/assets/images/home/list_response.zip b/assets/images/home/list_response.zip new file mode 100644 index 0000000000000000000000000000000000000000..f1b1b83380a0845af9e2e8e7a87846ab46fcc4de GIT binary patch literal 6222 zcmV-U7_sM2O9KQH000080E%!iR42(m#o8AD0BEZK00{s90AyiwVJ>QOZ*J{f%W@mJ zlKmA0*To9FAKuNgS9ddaVm1yhbZzyu!?NU%-*SGEv1UiXvs%qG&cd zqD@r+1)xwk`9fymkHv3`SBu!^zAn1OuQ!WVuJ$z>W2|!~8*jVChtG>wrdwR&Cz{^y zKWBW3!Ip0E-+Tg<-nZYYPiXJA^UDwK&fk9czyG~D`*eQw<^1x@qWO34-bqX6x3?E} zw~JS=-*k)1^WQIS`1c=U@rNt?qN%&z7q3EV@h|6B*Jr<7`t0rX)!p^Y z)%7i!y}gm@AJNJmi);RKF7158ZNv8d2Y=YF-Qs3eHk25Yd~PLHN-&lWyn#~FrqTc6(cCi>16*V|%O{TAHL-7@vnxk<;qx3zP9ExGlJwtV}n_~y2{Xj{wCbvE)% zzP{19a`;~O7Xvt-P33DF_{#dPX_f6*`F5=`K1%z)RZXob8@|@re1HD=LYD=X!Q$^X z_|PBj^xItNI+23g_lvQ+kMoXXN?*S=9MNmn`x-ifwO!@PV6nPB$ABxXftfM2;ATjX zm-xfDZfSdKwbX^c%P7};=8b%wp$9xrO_2vm)hGBNm!U7tj=iAgY*{IVgv-!p8_=iC z8CR)KE_WP;Jb>xcx7E5jm2_uCCgCIe!*xfy3v<0y)_a2 z#@;#C9`S|mm(ZOwi7I>sOPIsO6BTQ08L{vx$MJUY>h9*t#n-kJzBXk3=gs*)&fi@N zz&~B##y|b*KmXg=e_gx>x`{m~P%V$)0k1zM@`Q`0}EIfX{UoRKZ^mKus zXM73cYq7y#nf5WJf|&`CAIR`kYcjb6kGZpL4TS+L_rV_(`&c1=`y_=j@c+2Dyu7%2 zVBo*poPU1*;Vp*#?;kENH;(*{OY-yD()OU9ktD$PnICGLt2Mxw6-*ukNUPu!3WOyomf z{(B(ZN3K*X*hmn8Hge8;ABwKyn7L|f^m^%|;MfO0LUyT5uu>i>33j>IyJ-hmJ4jYK z2qPjvrUQ{1y!4_(*z_*9F{A+O55+9CY>&nJ#S+Gpt}2)l=vpPMqb-y|D(-y|Xa!|l%7Y+>h7LT+x?yMpX%1z?-O>eNT(QTh zmP)8a&WzrK&*It&r^b+ly}JnM2Csy+GY5bMY{fPBb7O^Iqo5yP+%>-dI)%4IYxFZT zoCzAi7Fr`w&?(<;)6{`i8a?(O*fmNv6TO4pOIbZ`7}jlC2-aP?8G}4YzO3$tlk! zmg2myc8Htgqq&IA2Knw_*(h}Q0M*0B0xi=Y9Z6&zhsmIo#zlA>#Zq$|R2wMmeLBH*>kJtrz+fN+_KtI{Y# z#lWEL=cc~af@KQCme!3Cu5OI#!yq}RJ3^LW@R6vz^R7*qkp2}e=O}ec% zi!iE+WTK>so8Ipo2ZMpb2zRk_-V=q-s1fAQfB;FnU{EQ7xWuDFLfVRiv|l9n-X*bR zI728DC{Ln&VX;VQ$g=Ef78E2XN{KYTIMwV71Tj<+PD2*L!lb&D8ZsfX1wNpXnius8 z49X4mP%nC7(!xM3u8O3|o}!4MMU0xsRk_k9saT2WG~1Q^#M1QX#N3$4IxPq(2hx7%al@=$=3LEz$m4UVEDMD&Id+GBY4_3l!M~bWBi=3qPR{z z3rkZ|Os)Z<^kE@6JFqk$IpR~8baY70Taldi&C`4l^Pz28UbG^Q1)oMZLLMt>dP!yA zYK8dDB2Us-S%By4Ce{(EY8E%0RdG?sgCF!Y$W@9`yKhWn;aeGFr#{q+)6wD}1 zk`-e7@v*nE6%=J(pumC^!7H0VeoN#$Rv8giu;DVPW-v)6r)Cb{^84qHxoV zeCV=#vpVc>#HxE2DhF61MK>>8NbQb{66m$94(5uoF2Ju;0W>O*=Y#s-lDj8~yBX?5 zV0FKxJ-+XKe9>ZSa8@QJjT$apQsy$j!C6pqp}z%Y@A!7{&Gv14voF+B_apO*!OFq~ zS0ir->I*~P4Dm~YPQ9??3c^Do5Tk0kxd`I5q9~}*ujmqC7^n-Yj=rJ-zyx5= zy%N=S@qQFL0`RXC%sVRi-O@wJ7oVkNjKF=uo!aZ5J!Sz@f0~d z>rbXD++Pfn53J6UReW-F4(5wx_bm9Qk-<-&_}nL13DVxbTz~r8hpY3Ovpa40cJtB# zb-KH_LDPS^xcU3VpI~bZsumP3h+xNOZn1+8Sl&!r-A_SWtviW#EB4408+ z5l`cUZaj#z6Xp6~=<8G8ovvqo@Rbt>X&VOJP4-_& zae1T0GI{;!-89Tt>NZWl{2QaH&cSk+g!y_osVpx|V@X?~vv>#rM@V7AcBLh}1cl9z zJYq+)ux!I{2N;4^vXctAiXa+HSfjiQ&tgPK?QNYHYeR3v_pT03gppw~+$tWcWNy@` z?56@!q3D;aA0| zxwsMQBeamqK3P=DTT%vC0DTx{ry^Z`+IyI%Wwfqc_VYh9;p;Tx*QfDYeV=;jjOjA-d> zZAdsaYQEjK+wRS|n*`R8YMUVjmvM=}RtpU3C9tOVA+FIfIJ`Y-Ac_4!w@4X@U5v6{V@y zdh+ox*bWb3I}O;jJHX8y_u7GRm(paiETUajODSlMCAv*>&$kpnXf3ar>_e|YZJ}P- zDR0+FNuW_dWUHp}@o5M=^%Rr!SS>7ycy5!`_?}|}_jV6!!u-#) zT$S`kcOU7YLi!U1SL8~k;*ReBzHO;9ECJVc9;v!LquVo#)Ot0<*g=e{Y9W*GzPx>? zZ}zxhvEd_^;dAn@*@w36^UGhe41YhwgMenj+-0bCYRbZO;&o72x%M$LnW_K4I%LE`9K^-ni+OgAp{K$7xyP&t2`Ovs9P^t!`hI-x z_qSU}CEcvYz!PrXHJ|ZGI**}d@RGNxxsq5l*&18dF$N_M%BuA(jQJkMvh0{zrjo3B zE!lv)_=Inw2EI`PsArLG>kqw*__{am$>u&8BrO*WQ`_H$*|tnGVz2F4(!&Hph-LG; zK!~ACZPd0k<0Ow-Fne;9v69e$IB4O9vVX(7VV2`;xI2JH5(;K}-(_k=7nR%_$?{p7 z?lC2^$Kowx@5lIgw@PhxSc*x7wwI~hQB;XXo3yjOaMI4_mO9I0q|Tqy=k&>vSUwyV znfn4s-6D|WA0m*HO#;cwdZONEzwT-5*FDUBbKSvz^EUqbb1~mAW4@+7%zg8T`yM3s zHB5ehbz1OE^3f*!tuLJP_r!glf&2P3?i&W~n~sb7)+6M;;Tx6T*toC%X71|;?(2_+ z``X7d-*jTWhs%5m6Q@8ZG|UlHjy9!tec6=WaymqmT!&86B}PqxVU!{}#P9rRgl5?NaK``t-Sq)Yb z-UH%Vln&+QDkuik)K0(QZ93Ap(btH?+^UDHK0A8U8F3Rf!x00t%JS0KAtJ+QIDBbA zl5sq$K)aD%CV51hWG5fTm8=Bm%c#c(N^7jrnpEKt^Ku<+2Kn@|8RUhYhZQ}a@P&AfFDUou?2yrR zok7Gk2Jrx+5l*3LGT=KYGx$l_H$l!b%ePH~UDg%Js)Yhx`pl!?ByU~((=Ym*`odUD#t(UddCx@X(3O7yRFTYIB z7D_t_ByhufDAqqZE&kJU1v)oFObVbT&L3|c@$kZV#JT9Q$D)h2ozP=rC--#0W;uF8 z3-u3Kuqw9<2M1H!*;J_=?EO#&s~tXQ#n5bITmQBEcAAlFNKGdD$C}b4 zPUy+1^;j4%gLju`X*s3Z-Dko+tO_}wL2XLo%@*>7vdvk@XEjzTdC_wXR*j7q!uOSf zcXCs-15XvApNBdC5>r9Wqf70i-XN*=B>GHH<$6z3wjIVSjujDFDO&(((Hta?SM&g zd~(NpqIyO&^S#zC2mGkJCa_XmS3~b4<+5D+j_zop2toKRjBgz);D&Ll8z)RXa{nYT zS)t@z&c|pl{vnxNf1JUX5)&7MpLy3+D~BLNU)IgXQdLgEsk7}ze@~8^rKW?#;G^V3 zR@)fRQz6QQ!Rr{!rX(T%f;QB5K~Du0D?wqhWuD1X{0T^pm(p?sMU%Am$A_csd;E6K zoBT|i>bhO~^s-sW?Z&vR7V%dkMk7xSPa+&+krSm>#}(k7rdX)SZEI1wl)ciptr~ii z6FalFQ@?~rRvP1a+N`2S3<0ZNeCulNL+J=*G4y2~PQcs_CN-3Uxn>@5K)$+%=`ArF#bg+fhGwD$2!N^B zAiOxVgpwF60}slmO=ipVBJ4VjM?BFKX$^$sm``-)k#xru2u2AEoCek7O9SDyJ3u(| z<5RPvG6wST;)eNG-+cXlP)h*<6ay3h000O8if}PhC&@s?+7|!-XsZAK2><{900000 s00000wt)Zu003lRbYU)Pb8l`?O9ci1000010096u000017ytkO0FkjmrvLx| literal 0 HcmV?d00001 diff --git a/assets_cleaner.yaml b/assets_cleaner.yaml index 9fb62e19..9be591e9 100644 --- a/assets_cleaner.yaml +++ b/assets_cleaner.yaml @@ -9,5 +9,6 @@ config: # If you want to exclude specific # file from assets exclude-file: - # - /assets/images/banner_upgrade.png # Uncomment this if you want to use - # - /assets/images/logo.png # Uncomment this if you want to use + # - /assets/images/banner_upgrade.png # Uncomment this if you want to use + # - /assets/images/logo.png # Uncomment this if you want to use + - /assets/fonts/times-new-roman.ttf diff --git a/lib/app/modules/reviewer_submit/views/reviewer_submit_view.dart b/lib/app/modules/reviewer_submit/views/reviewer_submit_view.dart index 30f2a0f3..f7ef15d0 100644 --- a/lib/app/modules/reviewer_submit/views/reviewer_submit_view.dart +++ b/lib/app/modules/reviewer_submit/views/reviewer_submit_view.dart @@ -9,6 +9,7 @@ import 'package:akm/app/modules/reviewer_submit/widget/reviewer_submit_gallery.d import 'package:akm/app/modules/reviewer_submit/widget/reviewer_submit_inputan.dart'; import 'package:akm/app/modules/reviewer_submit/widget/reviewer_submit_karakter.dart'; import 'package:akm/app/modules/reviewer_submit/widget/reviewer_submit_keuangan.dart'; +import 'package:akm/app/modules/reviewer_submit/widget/reviewer_submit_response.dart'; import 'package:akm/app/modules/reviewer_submit/widget/reviewer_submit_usaha.dart'; import 'package:flutter/material.dart'; @@ -67,34 +68,6 @@ class ReviewerSubmitView extends GetView { } } - Widget myWidget(int num) { - return Column( - children: [ - Container( - padding: const EdgeInsets.symmetric(vertical: 8), - child: FormBuilderTextField( - name: 'name$num', - textInputAction: TextInputAction.next, - maxLines: 3, - onChanged: (value) { - debugPrint('value: $value'); - }, - validator: FormBuilderValidators.required(), - decoration: InputDecoration( - alignLabelWithHint: true, - labelText: 'Poin ${num + 1}', - border: const OutlineInputBorder( - borderRadius: BorderRadius.all(Radius.circular(10.0)), - ), - ), - ), - ), - ], - ); - } - - var list = List.empty(growable: true).obs; - Icon iconNotYet() { return const Icon( Icons.info_outline, @@ -155,10 +128,9 @@ class ReviewerSubmitView extends GetView { backgroundColor: secondaryColor, body: SafeArea( child: Scrollbar( - child: Container( - padding: const EdgeInsets.all(16), - child: SingleChildScrollView( - controller: _scrollController, + child: SingleChildScrollView( + child: Container( + padding: const EdgeInsets.all(16), child: FormBuilder( key: controller.formKey, child: Column( @@ -328,107 +300,9 @@ class ReviewerSubmitView extends GetView { iconNotYet: iconNotYet(), ), const SizedBox(height: 20), - Container( - color: Colors.grey[200], - child: Card( - child: Padding( - padding: const EdgeInsets.all(8.0), - child: Column( - children: [ - const GFTypography( - text: 'Tanggapan Reviewer', - type: GFTypographyType.typo3, - showDivider: false, - ), - const SizedBox(height: 10), - Text( - 'Ini merupakan catatan dari reviewer terhadap pengajuan debitur', - style: Theme.of(context) - .textTheme - .bodySmall - ?.merge( - const TextStyle( - fontSize: 14, - ), - ), - ), - const SizedBox(height: 10), - Row( - mainAxisAlignment: - MainAxisAlignment.spaceBetween, - children: [ - const Text(''), - Row( - children: [ - GFIconButton( - shape: GFIconButtonShape.circle, - size: GFSize.SMALL, - color: GFColors.SUCCESS, - onPressed: () { - list.add( - // Get dynamic string from textfield - controller.formKey.currentState - ?.fields['name']?.value, - ); - }, - icon: const Icon(Icons.add), - ), - const SizedBox( - width: 10, - ), - GFIconButton( - color: GFColors.DANGER, - size: GFSize.SMALL, - shape: GFIconButtonShape.circle, - onPressed: () { - list.removeLast(); - controller.formKey.currentState - ?.removeInternalFieldValue( - 'name${list.length}', - isSetState: true); - debugPrint('list: $list'); - }, - icon: const Icon(Icons.remove), - ), - ], - ), - ], - ), - const SizedBox(height: 10), - Obx(() { - if (list.isEmpty) { - return Column( - children: const [ - Center( - child: Text( - 'Tambahkan Tanggapan Reviewer', - style: TextStyle( - fontSize: 24, - fontWeight: FontWeight.w400, - ), - ), - ), - SizedBox(height: 20), - ], - ); - } else { - return SizedBox( - height: 400, - child: Scrollbar( - child: ListView.builder( - itemCount: list.length, - itemBuilder: (context, index) { - return myWidget(index); - }, - ), - ), - ); - } - }) - ], - ), - ), - ), + ReviewerSubmitResponse( + controller: controller, + subtitleStyle: subtitleStyle(), ), const SizedBox(height: 20), GFButton( diff --git a/lib/app/modules/reviewer_submit/widget/reviewer_submit_response.dart b/lib/app/modules/reviewer_submit/widget/reviewer_submit_response.dart new file mode 100644 index 00000000..abbbf03b --- /dev/null +++ b/lib/app/modules/reviewer_submit/widget/reviewer_submit_response.dart @@ -0,0 +1,156 @@ +// 🎯 Dart imports: + +// 🐦 Flutter imports: +import 'package:akm/app/common/style.dart'; +import 'package:flutter/material.dart'; + +// 📦 Package imports: +import 'package:flutter_form_builder/flutter_form_builder.dart'; +import 'package:form_builder_validators/form_builder_validators.dart'; +import 'package:get/get.dart'; +import 'package:getwidget/getwidget.dart'; +import 'package:lottie/lottie.dart'; + +// 🌎 Project imports: +import '../controllers/reviewer_submit_controller.dart'; + +class ReviewerSubmitResponse extends StatelessWidget { + const ReviewerSubmitResponse({ + super.key, + required this.controller, + required this.subtitleStyle, + }); + + final ReviewerSubmitController controller; + final TextStyle subtitleStyle; + + @override + Widget build(BuildContext context) { + Widget responseList(int num) { + return Padding( + padding: const EdgeInsets.symmetric(vertical: 8, horizontal: 10), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text('Poin ${num + 1}'), + const SizedBox(height: 10), + FormBuilderTextField( + name: 'name$num', + textInputAction: TextInputAction.next, + maxLines: 3, + onChanged: (value) { + debugPrint('value: $value'); + }, + validator: FormBuilderValidators.required(), + decoration: const InputDecoration( + alignLabelWithHint: true, + // labelText: 'Poin ${num + 1}', + border: OutlineInputBorder( + borderRadius: BorderRadius.all(Radius.circular(10.0)), + ), + ), + ), + const SizedBox(height: 10), + ], + ), + ); + } + + var list = List.empty(growable: true).obs; + + return Container( + color: Colors.grey[200], + child: Card( + shape: RoundedRectangleBorder( + borderRadius: BorderRadius.circular(20.0), + ), + elevation: 0, + child: Padding( + padding: const EdgeInsets.all(8.0), + child: Column( + children: [ + const GFTypography( + text: 'Tanggapan Reviewer', + type: GFTypographyType.typo3, + showDivider: false, + ), + const SizedBox(height: 10), + Text( + 'Ini merupakan catatan dari reviewer terhadap pengajuan debitur', + style: subtitleStyle, + ), + const SizedBox(height: 10), + Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + const Text(''), + Row( + children: [ + GFIconButton( + shape: GFIconButtonShape.circle, + size: GFSize.SMALL, + color: primaryColor, + onPressed: () { + list.add( + // Get dynamic string from textfield + controller + .formKey.currentState?.fields['name']?.value, + ); + }, + icon: const Icon(Icons.add), + ), + const SizedBox( + width: 10, + ), + GFIconButton( + color: GFColors.LIGHT, + size: GFSize.SMALL, + shape: GFIconButtonShape.circle, + onPressed: () { + list.removeLast(); + controller.formKey.currentState + ?.removeInternalFieldValue('name${list.length}', + isSetState: true); + debugPrint('list: $list'); + }, + icon: const Icon(Icons.remove), + ), + ], + ), + ], + ), + const SizedBox(height: 10), + Obx(() { + if (list.isEmpty) { + return Column( + children: [ + Center( + child: Lottie.asset( + 'assets/images/home/list_response.zip', + repeat: false, + ), + ), + const SizedBox(height: 20), + ], + ); + } else { + return SizedBox( + height: 400, + child: Scrollbar( + child: ListView.builder( + itemCount: list.length, + itemBuilder: (context, index) { + return responseList(index); + }, + ), + ), + ); + } + }) + ], + ), + ), + ), + ); + } +} From 24be30f12e7eabe9a6ca8a7c9aeb03a7df692244 Mon Sep 17 00:00:00 2001 From: Novian Andika Date: Fri, 21 Apr 2023 10:27:58 +0700 Subject: [PATCH 4/7] =?UTF-8?q?=F0=9F=8E=A8=20style(filter=5Fform.dart,=20?= =?UTF-8?q?list=5Fdebitur=5Ffilter=5Ffab.dart,=20reviewer=5Fsubmit=5Frespo?= =?UTF-8?q?nse.dart,=20datepicker=5Ffield.dart,=20searchable=5Fdropdown=5F?= =?UTF-8?q?field.dart,=20text=5Ffield.dart):=20change=20form=20field=20bac?= =?UTF-8?q?kground=20color=20The=20background=20color=20of=20the=20form=20?= =?UTF-8?q?fields=20has=20been=20changed=20from=20`Colors.grey.shade400`?= =?UTF-8?q?=20to=20`Colors.grey.shade300`=20to=20improve=20the=20visual=20?= =?UTF-8?q?consistency=20of=20the=20application.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../list_debitur_filter_fab/filter_form.dart | 10 +- .../widget/list_debitur_filter_fab.dart | 10 +- .../widget/reviewer_submit_response.dart | 103 +++++++++++------- lib/app/widget/form/datepicker_field.dart | 2 +- .../form/searchable_dropdown_field.dart | 2 +- lib/app/widget/form/text_field.dart | 2 +- 6 files changed, 74 insertions(+), 55 deletions(-) diff --git a/lib/app/modules/list_debitur/widget/components/list_debitur_filter_fab/filter_form.dart b/lib/app/modules/list_debitur/widget/components/list_debitur_filter_fab/filter_form.dart index 9ac649b3..746e377a 100644 --- a/lib/app/modules/list_debitur/widget/components/list_debitur_filter_fab/filter_form.dart +++ b/lib/app/modules/list_debitur/widget/components/list_debitur_filter_fab/filter_form.dart @@ -78,7 +78,7 @@ class FilterForm extends StatelessWidget { suffixStyle: const TextStyle( fontSize: 16, ), - fillColor: Colors.grey.shade400, + fillColor: Colors.grey.shade300, focusedBorder: OutlineInputBorder( borderSide: BorderSide(color: Theme.of(context).primaryColor), @@ -153,7 +153,7 @@ class FilterForm extends StatelessWidget { fontSize: 16, ), filled: true, - fillColor: Colors.grey.shade400, + fillColor: Colors.grey.shade300, focusedBorder: const OutlineInputBorder( borderSide: BorderSide(color: Colors.grey), ), @@ -217,7 +217,7 @@ class FilterForm extends StatelessWidget { fontSize: 16, ), filled: true, - fillColor: Colors.grey.shade400, + fillColor: Colors.grey.shade300, focusedBorder: const OutlineInputBorder( borderSide: BorderSide(color: Colors.grey), ), @@ -281,7 +281,7 @@ class FilterForm extends StatelessWidget { fontSize: 16, ), filled: true, - fillColor: Colors.grey.shade400, + fillColor: Colors.grey.shade300, focusedBorder: const OutlineInputBorder( borderSide: BorderSide(color: Colors.grey), ), @@ -357,7 +357,7 @@ class FilterForm extends StatelessWidget { fontSize: 16, ), filled: true, - fillColor: Colors.grey.shade400, + fillColor: Colors.grey.shade300, focusedBorder: const OutlineInputBorder( borderSide: BorderSide(color: Colors.grey), ), diff --git a/lib/app/modules/list_debitur/widget/list_debitur_filter_fab.dart b/lib/app/modules/list_debitur/widget/list_debitur_filter_fab.dart index 871a9f81..69977581 100644 --- a/lib/app/modules/list_debitur/widget/list_debitur_filter_fab.dart +++ b/lib/app/modules/list_debitur/widget/list_debitur_filter_fab.dart @@ -156,7 +156,7 @@ class ListDebiturFilterFab extends StatelessWidget { suffixStyle: const TextStyle( fontSize: 16, ), - fillColor: Colors.grey.shade400, + fillColor: Colors.grey.shade300, focusedBorder: OutlineInputBorder( borderSide: BorderSide( color: Theme.of(context) @@ -250,7 +250,7 @@ class ListDebiturFilterFab extends StatelessWidget { fontSize: 16, ), filled: true, - fillColor: Colors.grey.shade400, + fillColor: Colors.grey.shade300, focusedBorder: const OutlineInputBorder( borderSide: BorderSide( @@ -330,7 +330,7 @@ class ListDebiturFilterFab extends StatelessWidget { fontSize: 16, ), filled: true, - fillColor: Colors.grey.shade400, + fillColor: Colors.grey.shade300, focusedBorder: const OutlineInputBorder( borderSide: BorderSide( @@ -416,7 +416,7 @@ class ListDebiturFilterFab extends StatelessWidget { fontSize: 16, ), filled: true, - fillColor: Colors.grey.shade400, + fillColor: Colors.grey.shade300, focusedBorder: const OutlineInputBorder( borderSide: BorderSide( @@ -515,7 +515,7 @@ class ListDebiturFilterFab extends StatelessWidget { ), filled: true, fillColor: - Colors.grey.shade400, + Colors.grey.shade300, focusedBorder: const OutlineInputBorder( borderSide: BorderSide( diff --git a/lib/app/modules/reviewer_submit/widget/reviewer_submit_response.dart b/lib/app/modules/reviewer_submit/widget/reviewer_submit_response.dart index abbbf03b..b2cfc799 100644 --- a/lib/app/modules/reviewer_submit/widget/reviewer_submit_response.dart +++ b/lib/app/modules/reviewer_submit/widget/reviewer_submit_response.dart @@ -12,6 +12,7 @@ import 'package:getwidget/getwidget.dart'; import 'package:lottie/lottie.dart'; // 🌎 Project imports: +import '../../../widget/simple_snackbar.dart'; import '../controllers/reviewer_submit_controller.dart'; class ReviewerSubmitResponse extends StatelessWidget { @@ -42,11 +43,15 @@ class ReviewerSubmitResponse extends StatelessWidget { debugPrint('value: $value'); }, validator: FormBuilderValidators.required(), - decoration: const InputDecoration( + decoration: InputDecoration( alignLabelWithHint: true, - // labelText: 'Poin ${num + 1}', - border: OutlineInputBorder( - borderRadius: BorderRadius.all(Radius.circular(10.0)), + filled: true, + fillColor: Colors.grey.shade300, + focusedBorder: OutlineInputBorder( + borderSide: BorderSide(color: Theme.of(context).primaryColor), + ), + enabledBorder: const OutlineInputBorder( + borderSide: BorderSide(color: Colors.grey), ), ), ), @@ -80,44 +85,53 @@ class ReviewerSubmitResponse extends StatelessWidget { style: subtitleStyle, ), const SizedBox(height: 10), - Row( - mainAxisAlignment: MainAxisAlignment.spaceBetween, - children: [ - const Text(''), - Row( - children: [ - GFIconButton( - shape: GFIconButtonShape.circle, - size: GFSize.SMALL, - color: primaryColor, - onPressed: () { - list.add( - // Get dynamic string from textfield - controller - .formKey.currentState?.fields['name']?.value, - ); - }, - icon: const Icon(Icons.add), - ), - const SizedBox( - width: 10, - ), - GFIconButton( - color: GFColors.LIGHT, - size: GFSize.SMALL, - shape: GFIconButtonShape.circle, - onPressed: () { - list.removeLast(); - controller.formKey.currentState - ?.removeInternalFieldValue('name${list.length}', - isSetState: true); - debugPrint('list: $list'); - }, - icon: const Icon(Icons.remove), - ), - ], - ), - ], + Padding( + padding: const EdgeInsets.symmetric(horizontal: 10), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + const Text(''), + Row( + children: [ + GFIconButton( + shape: GFIconButtonShape.circle, + size: GFSize.SMALL, + color: primaryColor, + onPressed: () { + list.add( + // Get dynamic string from textfield + controller + .formKey.currentState?.fields['name']?.value, + ); + + CustomSnackBar.show(context, + 'Poin nomor ${list.length} ditambahkan'); + }, + icon: const Icon(Icons.add), + ), + const SizedBox( + width: 10, + ), + GFIconButton( + color: GFColors.LIGHT, + size: GFSize.SMALL, + shape: GFIconButtonShape.circle, + onPressed: () { + list.removeLast(); + controller.formKey.currentState + ?.removeInternalFieldValue('name${list.length}', + isSetState: true); + debugPrint('list: $list'); + + CustomSnackBar.show(context, + 'Poin nomor ${list.length + 1} dihapus'); + }, + icon: const Icon(Icons.remove), + ), + ], + ), + ], + ), ), const SizedBox(height: 10), Obx(() { @@ -128,6 +142,11 @@ class ReviewerSubmitResponse extends StatelessWidget { child: Lottie.asset( 'assets/images/home/list_response.zip', repeat: false, + fit: BoxFit.cover, + errorBuilder: (context, error, stackTrace) { + return const Text('Error'); + }, + filterQuality: FilterQuality.high, ), ), const SizedBox(height: 20), diff --git a/lib/app/widget/form/datepicker_field.dart b/lib/app/widget/form/datepicker_field.dart index 78011b55..16d01546 100644 --- a/lib/app/widget/form/datepicker_field.dart +++ b/lib/app/widget/form/datepicker_field.dart @@ -38,7 +38,7 @@ class FleetimeDatePicker extends StatelessWidget { decoration: InputDecoration( hintText: hintText, filled: true, - fillColor: Colors.grey.shade400, + fillColor: Colors.grey.shade300, focusedBorder: const OutlineInputBorder( borderSide: BorderSide(color: primaryColor), ), diff --git a/lib/app/widget/form/searchable_dropdown_field.dart b/lib/app/widget/form/searchable_dropdown_field.dart index c3c7641a..50a0e624 100644 --- a/lib/app/widget/form/searchable_dropdown_field.dart +++ b/lib/app/widget/form/searchable_dropdown_field.dart @@ -43,7 +43,7 @@ class FleetimeSearchableDropdown extends StatelessWidget { fontSize: 16, ), filled: true, - fillColor: Colors.grey.shade400, + fillColor: Colors.grey.shade300, focusedBorder: const OutlineInputBorder( borderSide: BorderSide(color: Colors.grey), ), diff --git a/lib/app/widget/form/text_field.dart b/lib/app/widget/form/text_field.dart index ec97688c..3dc91470 100644 --- a/lib/app/widget/form/text_field.dart +++ b/lib/app/widget/form/text_field.dart @@ -60,7 +60,7 @@ class FleetimeTextField extends StatelessWidget { suffixStyle: const TextStyle( fontSize: 16, ), - fillColor: Colors.grey.shade400, + fillColor: Colors.grey.shade300, focusedBorder: focusedBorder ?? OutlineInputBorder( borderSide: BorderSide(color: Theme.of(context).primaryColor), From 9cdf3192edb15280e49436e3a249967569626a7c Mon Sep 17 00:00:00 2001 From: Novian Andika Date: Fri, 21 Apr 2023 11:10:39 +0700 Subject: [PATCH 5/7] =?UTF-8?q?=F0=9F=8E=A8=20style(reviewer=5Fsubmit=5Fvi?= =?UTF-8?q?ew.dart):=20refactor=20ReviewerSubmitView=20widget=20and=20add?= =?UTF-8?q?=20ReviewerSubmitBottomNavbar=20widget=20=E2=9C=A8=20feat(revie?= =?UTF-8?q?wer=5Fsubmit=5Fbotton=5Fnavbar.dart):=20add=20ReviewerSubmitBot?= =?UTF-8?q?tomNavbar=20widget=20=F0=9F=90=9B=20fix(reviewer=5Fsubmit=5Fres?= =?UTF-8?q?ponse.dart):=20add=20elevation=20to=20Card=20widget=20The=20Rev?= =?UTF-8?q?iewerSubmitView=20widget=20is=20refactored=20to=20improve=20rea?= =?UTF-8?q?dability=20and=20maintainability.=20The=20ReviewerSubmitBottomN?= =?UTF-8?q?avbar=20widget=20is=20added=20to=20separate=20the=20bottom=20na?= =?UTF-8?q?vigation=20bar=20from=20the=20main=20widget.=20The=20ReviewerSu?= =?UTF-8?q?bmitResponse=20widget=20has=20a=20bug=20where=20the=20Card=20wi?= =?UTF-8?q?dget=20does=20not=20have=20an=20elevation,=20which=20is=20fixed?= =?UTF-8?q?=20by=20adding=20an=20elevation=20of=206.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../views/reviewer_submit_view.dart | 121 ++++-------------- .../widget/reviewer_submit_botton_navbar.dart | 105 +++++++++++++++ .../widget/reviewer_submit_response.dart | 7 +- 3 files changed, 132 insertions(+), 101 deletions(-) create mode 100644 lib/app/modules/reviewer_submit/widget/reviewer_submit_botton_navbar.dart diff --git a/lib/app/modules/reviewer_submit/views/reviewer_submit_view.dart b/lib/app/modules/reviewer_submit/views/reviewer_submit_view.dart index f7ef15d0..0cdf1172 100644 --- a/lib/app/modules/reviewer_submit/views/reviewer_submit_view.dart +++ b/lib/app/modules/reviewer_submit/views/reviewer_submit_view.dart @@ -5,6 +5,7 @@ import 'dart:convert'; import 'package:akm/app/modules/reviewer_submit/widget/reviewer_submit_agunan.dart'; import 'package:akm/app/modules/reviewer_submit/widget/reviewer_submit_analys_response.dart'; import 'package:akm/app/modules/reviewer_submit/widget/reviewer_submit_bisnis.dart'; +import 'package:akm/app/modules/reviewer_submit/widget/reviewer_submit_botton_navbar.dart'; import 'package:akm/app/modules/reviewer_submit/widget/reviewer_submit_gallery.dart'; import 'package:akm/app/modules/reviewer_submit/widget/reviewer_submit_inputan.dart'; import 'package:akm/app/modules/reviewer_submit/widget/reviewer_submit_karakter.dart'; @@ -29,7 +30,7 @@ import '../controllers/reviewer_submit_controller.dart'; // ignore: must_be_immutable class ReviewerSubmitView extends GetView { - ReviewerSubmitView({Key? key}) : super(key: key); + const ReviewerSubmitView({Key? key}) : super(key: key); String formatDatetime(DateTime date) { return DateFormat('dd MMMM yyyy').format(date); @@ -120,15 +121,26 @@ class ReviewerSubmitView extends GetView { ); } - final _scrollController = ScrollController(); - @override Widget build(BuildContext context) { + ScrollController scrollController = ScrollController(); + + RxBool showButton = false.obs; + + scrollController.addListener(() { + if (scrollController.position.pixels == + scrollController.position.maxScrollExtent) { + // User reached the bottom of the page + showButton.value = true; + } + }); + return Scaffold( backgroundColor: secondaryColor, body: SafeArea( child: Scrollbar( child: SingleChildScrollView( + controller: scrollController, child: Container( padding: const EdgeInsets.all(16), child: FormBuilder( @@ -305,102 +317,6 @@ class ReviewerSubmitView extends GetView { subtitleStyle: subtitleStyle(), ), const SizedBox(height: 20), - GFButton( - onPressed: () { - if (controller.formKey.currentState! - .saveAndValidate()) { - // controller.submit(); - debugPrint(controller.formKey.currentState!.value - .toString()); - Get.dialog( - AlertDialog( - title: const Text( - 'Submit', - style: TextStyle( - fontSize: 20, - fontWeight: FontWeight.bold, - ), - ), - content: const Text( - 'Dengan menekan tombol Ya, data diatas akan dikirim ke pemutus yang dipilih, dan status pengajuan berubah menjadi REVIEWED. Apakah anda yakin?', - style: TextStyle( - fontSize: 15, - ), - ), - actions: [ - GFButton( - color: GFColors.DANGER, - size: GFSize.LARGE, - onPressed: () { - Navigator.pop(context); - }, - child: const Text('Tidak'), - ), - GFButton( - color: GFColors.SUCCESS, - size: GFSize.LARGE, - onPressed: () { - var list = - controller.formKey.currentState!.value; - - // Transform map to list - var list2 = list.entries.toList(); - - // // remove MapEntry and key - list2.removeWhere( - (element) => - element.key == 'pemutus' || - element.key == 'tglReview' || - element.key == 'inputan' || - element.key == 'keuangan' || - element.key == 'karakter' || - element.key == 'bisnis' || - element.key == 'usaha' || - element.key == 'agunan' || - element.key == 'berkas', - ); - - // debugPrint('list2: $list2'); - - // Transform list2 to list of string - var list3 = - list2.map((e) => e.value).toList(); - - // list3.removeWhere((element) => element.k) - - // transform list3 to string - list3 = - list3.map((e) => e.toString()).toList(); - - controller.bahasanReviewer = list3; - - var listFinal = controller.bahasanReviewer; - - debugPrint(listFinal.toString()); - - Navigator.pop(context); - controller.saveReview(); - }, - child: const Text('Ya'), - ), - ], - ), - ); - } else { - debugPrint('validation failed'); - } - }, - text: 'Submit', - shape: GFButtonShape.square, - color: GFColors.SUCCESS, - fullWidthButton: true, - size: GFSize.LARGE, - textStyle: const TextStyle( - color: Colors.white, - fontSize: 18, - fontWeight: FontWeight.bold, - ), - ), ], ), ), @@ -408,6 +324,13 @@ class ReviewerSubmitView extends GetView { ), ), ), + bottomNavigationBar: Obx( + () => showButton.value + ? ReviewerSubmitBottomNavbar( + controller: controller, + ) + : const SizedBox.shrink(), + ), ); } } diff --git a/lib/app/modules/reviewer_submit/widget/reviewer_submit_botton_navbar.dart b/lib/app/modules/reviewer_submit/widget/reviewer_submit_botton_navbar.dart new file mode 100644 index 00000000..2b1ae333 --- /dev/null +++ b/lib/app/modules/reviewer_submit/widget/reviewer_submit_botton_navbar.dart @@ -0,0 +1,105 @@ +// 🎯 Dart imports: + +// 🐦 Flutter imports: +import 'package:akm/app/widget/bottomnavbar_button.dart'; +import 'package:flutter/material.dart'; + +// 📦 Package imports: +import 'package:get/get.dart'; +import 'package:getwidget/getwidget.dart'; + +// 🌎 Project imports: +import '../controllers/reviewer_submit_controller.dart'; + +class ReviewerSubmitBottomNavbar extends StatelessWidget { + const ReviewerSubmitBottomNavbar({super.key, required this.controller}); + + final ReviewerSubmitController controller; + + @override + Widget build(BuildContext context) { + return BottomNavBarButton( + text: 'Kirim', + icon: Icons.send, + onPressed: () { + if (controller.formKey.currentState!.saveAndValidate()) { + // controller.submit(); + debugPrint(controller.formKey.currentState!.value.toString()); + Get.dialog( + AlertDialog( + title: const Text( + 'Submit', + style: TextStyle( + fontSize: 20, + fontWeight: FontWeight.bold, + ), + ), + content: const Text( + 'Dengan menekan tombol Ya, data diatas akan dikirim ke pemutus yang dipilih, dan status pengajuan berubah menjadi REVIEWED. Apakah anda yakin?', + style: TextStyle( + fontSize: 15, + ), + ), + actions: [ + GFButton( + color: GFColors.DANGER, + size: GFSize.LARGE, + onPressed: () { + Navigator.pop(context); + }, + child: const Text('Tidak'), + ), + GFButton( + color: GFColors.SUCCESS, + size: GFSize.LARGE, + onPressed: () { + var list = controller.formKey.currentState!.value; + + // Transform map to list + var list2 = list.entries.toList(); + + // // remove MapEntry and key + list2.removeWhere( + (element) => + element.key == 'pemutus' || + element.key == 'tglReview' || + element.key == 'inputan' || + element.key == 'keuangan' || + element.key == 'karakter' || + element.key == 'bisnis' || + element.key == 'usaha' || + element.key == 'agunan' || + element.key == 'berkas', + ); + + // debugPrint('list2: $list2'); + + // Transform list2 to list of string + var list3 = list2.map((e) => e.value).toList(); + + // list3.removeWhere((element) => element.k) + + // transform list3 to string + list3 = list3.map((e) => e.toString()).toList(); + + controller.bahasanReviewer = list3; + + var listFinal = controller.bahasanReviewer; + + debugPrint(listFinal.toString()); + + Navigator.pop(context); + controller.saveReview(); + }, + child: const Text('Ya'), + ), + ], + ), + ); + } else { + debugPrint('validation failed'); + } + }, + ); + } +} diff --git a/lib/app/modules/reviewer_submit/widget/reviewer_submit_response.dart b/lib/app/modules/reviewer_submit/widget/reviewer_submit_response.dart index b2cfc799..b83e6b95 100644 --- a/lib/app/modules/reviewer_submit/widget/reviewer_submit_response.dart +++ b/lib/app/modules/reviewer_submit/widget/reviewer_submit_response.dart @@ -2,6 +2,7 @@ // 🐦 Flutter imports: import 'package:akm/app/common/style.dart'; +import 'package:akm/app/widget/text_label.dart'; import 'package:flutter/material.dart'; // 📦 Package imports: @@ -33,7 +34,9 @@ class ReviewerSubmitResponse extends StatelessWidget { child: Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ - Text('Poin ${num + 1}'), + DebiturTextLabel( + text: 'Tanggapan Reviewer ${num + 1}', + ), const SizedBox(height: 10), FormBuilderTextField( name: 'name$num', @@ -69,7 +72,7 @@ class ReviewerSubmitResponse extends StatelessWidget { shape: RoundedRectangleBorder( borderRadius: BorderRadius.circular(20.0), ), - elevation: 0, + elevation: 6, child: Padding( padding: const EdgeInsets.all(8.0), child: Column( From 4f7e3dfc7961511e6097c035058cd31d3f7ebb50 Mon Sep 17 00:00:00 2001 From: Novian Andika Date: Fri, 21 Apr 2023 19:39:01 +0700 Subject: [PATCH 6/7] =?UTF-8?q?=F0=9F=94=A8=20refactor(list=5Fpending.dart?= =?UTF-8?q?,=20reviewer=5Fsubmit=5Fbotton=5Fnavbar.dart,=20simple=5Falert.?= =?UTF-8?q?dart):=20refactor=20code=20and=20replace=20NormalAlert=20with?= =?UTF-8?q?=20NativePromptAlert=20This=20commit=20refactors=20the=20code?= =?UTF-8?q?=20in=20list=5Fpending.dart=20and=20reviewer=5Fsubmit=5Fbotton?= =?UTF-8?q?=5Fnavbar.dart=20files=20to=20replace=20the=20NormalAlert=20wid?= =?UTF-8?q?get=20with=20the=20NativePromptAlert=20widget.=20The=20NativePr?= =?UTF-8?q?omptAlert=20widget=20is=20a=20more=20flexible=20and=20reusable?= =?UTF-8?q?=20widget=20that=20can=20be=20used=20in=20different=20parts=20o?= =?UTF-8?q?f=20the=20application.=20The=20SimpleAlert.dart=20file=20is=20a?= =?UTF-8?q?lso=20added=20to=20the=20project=20to=20contain=20the=20NativeP?= =?UTF-8?q?romptAlert=20widget.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../list_pending.dart | 84 ++------ .../widget/reviewer_submit_botton_navbar.dart | 197 +++++++++++------- lib/app/widget/simple_alert.dart | 70 +++++++ 3 files changed, 214 insertions(+), 137 deletions(-) create mode 100644 lib/app/widget/simple_alert.dart diff --git a/lib/app/modules/reviewer_pending_list/widget/components/reviewer_pending_list_available/list_pending.dart b/lib/app/modules/reviewer_pending_list/widget/components/reviewer_pending_list_available/list_pending.dart index 4d44c1ff..6125b501 100644 --- a/lib/app/modules/reviewer_pending_list/widget/components/reviewer_pending_list_available/list_pending.dart +++ b/lib/app/modules/reviewer_pending_list/widget/components/reviewer_pending_list_available/list_pending.dart @@ -1,10 +1,9 @@ -import 'package:akm/app/common/style.dart'; import 'package:akm/app/modules/reviewer_pending_list/controllers/reviewer_pending_list_controller.dart'; import 'package:akm/app/routes/app_pages.dart'; +import 'package:akm/app/widget/simple_alert.dart'; import 'package:flutter/material.dart'; import 'package:get/get.dart'; -import 'package:getwidget/getwidget.dart'; import 'package:intl/intl.dart'; import 'package:random_avatar/random_avatar.dart'; @@ -89,9 +88,24 @@ class ListPendingPengajuanReviewer extends StatelessWidget { return InkWell( onTap: () { Get.dialog( - NormalAlert( + NativePromptAlert( controller: controller, index: index, + title: + 'Detail ${controller.listMyPendingReview[index].debitur.peminjam1}', + content: 'Pilih aksi yang ingin dilakukan', + textDanger: 'REVIEW', + textSuccess: 'LIHAT PROGRESS', + onPressedDanger: () { + Navigator.pop(context); + + Get.toNamed(Routes.REVIEWER_SUBMIT, + arguments: controller.listMyPendingReview[index]); + }, + onPressedSuccess: () { + Get.toNamed(Routes.PENGAJUAN_DETAIL, + arguments: controller.listMyPendingReview[index].id!); + }, ), ); }, @@ -135,70 +149,6 @@ class ListPendingPengajuanReviewer extends StatelessWidget { } } -class NormalAlert extends StatelessWidget { - final int index; - - const NormalAlert({ - super.key, - required this.controller, - required this.index, - }); - - final ReviewerPendingListController controller; - - @override - Widget build(BuildContext context) { - return AlertDialog( - shape: const RoundedRectangleBorder( - borderRadius: BorderRadius.all( - Radius.circular(20), - ), - ), - title: Text( - 'Detail ${controller.listMyPendingReview[index].debitur.peminjam1}', - style: const TextStyle( - fontSize: 20, - fontWeight: FontWeight.bold, - color: Colors.white, - ), - ), - backgroundColor: primaryColor, - content: const Text( - 'Pilih aksi yang ingin dilakukan', - style: TextStyle( - fontSize: 15, - color: Colors.white, - ), - ), - actions: [ - GFButton( - color: GFColors.DANGER, - size: GFSize.LARGE, - shape: GFButtonShape.pills, - onPressed: () { - Navigator.pop(context); - - Get.toNamed(Routes.REVIEWER_SUBMIT, - arguments: controller.listMyPendingReview[index]); - // pop dialog - }, - text: 'Review', - ), - GFButton( - size: GFSize.LARGE, - shape: GFButtonShape.pills, - onPressed: () { - Navigator.pop(context); - Get.toNamed(Routes.PENGAJUAN_DETAIL, - arguments: controller.listMyPendingReview[index].id!); - }, - text: 'Lihat Progress', - ) - ], - ); - } -} - class TitlePendingList extends StatelessWidget { final int index; final TextStyle subtitleStyle; diff --git a/lib/app/modules/reviewer_submit/widget/reviewer_submit_botton_navbar.dart b/lib/app/modules/reviewer_submit/widget/reviewer_submit_botton_navbar.dart index 2b1ae333..a2a7537f 100644 --- a/lib/app/modules/reviewer_submit/widget/reviewer_submit_botton_navbar.dart +++ b/lib/app/modules/reviewer_submit/widget/reviewer_submit_botton_navbar.dart @@ -2,11 +2,12 @@ // 🐦 Flutter imports: import 'package:akm/app/widget/bottomnavbar_button.dart'; +import 'package:akm/app/widget/dialog_box.dart'; +import 'package:akm/app/widget/simple_alert.dart'; import 'package:flutter/material.dart'; // 📦 Package imports: import 'package:get/get.dart'; -import 'package:getwidget/getwidget.dart'; // 🌎 Project imports: import '../controllers/reviewer_submit_controller.dart'; @@ -26,78 +27,134 @@ class ReviewerSubmitBottomNavbar extends StatelessWidget { // controller.submit(); debugPrint(controller.formKey.currentState!.value.toString()); Get.dialog( - AlertDialog( - title: const Text( - 'Submit', - style: TextStyle( - fontSize: 20, - fontWeight: FontWeight.bold, - ), - ), - content: const Text( - 'Dengan menekan tombol Ya, data diatas akan dikirim ke pemutus yang dipilih, dan status pengajuan berubah menjadi REVIEWED. Apakah anda yakin?', - style: TextStyle( - fontSize: 15, - ), - ), - actions: [ - GFButton( - color: GFColors.DANGER, - size: GFSize.LARGE, - onPressed: () { - Navigator.pop(context); - }, - child: const Text('Tidak'), - ), - GFButton( - color: GFColors.SUCCESS, - size: GFSize.LARGE, - onPressed: () { - var list = controller.formKey.currentState!.value; - - // Transform map to list - var list2 = list.entries.toList(); - - // // remove MapEntry and key - list2.removeWhere( - (element) => - element.key == 'pemutus' || - element.key == 'tglReview' || - element.key == 'inputan' || - element.key == 'keuangan' || - element.key == 'karakter' || - element.key == 'bisnis' || - element.key == 'usaha' || - element.key == 'agunan' || - element.key == 'berkas', - ); - - // debugPrint('list2: $list2'); - - // Transform list2 to list of string - var list3 = list2.map((e) => e.value).toList(); - - // list3.removeWhere((element) => element.k) - - // transform list3 to string - list3 = list3.map((e) => e.toString()).toList(); - - controller.bahasanReviewer = list3; - - var listFinal = controller.bahasanReviewer; - - debugPrint(listFinal.toString()); - - Navigator.pop(context); - controller.saveReview(); - }, - child: const Text('Ya'), - ), - ], + // AlertDialog( + // title: const Text( + // 'Submit', + // style: TextStyle( + // fontSize: 20, + // fontWeight: FontWeight.bold, + // ), + // ), + // content: const Text( + // 'Dengan menekan tombol Ya, data diatas akan dikirim ke pemutus yang dipilih, dan status pengajuan berubah menjadi REVIEWED. Apakah anda yakin?', + // style: TextStyle( + // fontSize: 15, + // ), + // ), + // actions: [ + // GFButton( + // color: GFColors.DANGER, + // size: GFSize.LARGE, + // onPressed: () { + // Navigator.pop(context); + // }, + // child: const Text('Tidak'), + // ), + // GFButton( + // color: GFColors.SUCCESS, + // size: GFSize.LARGE, + // onPressed: () { + // var list = controller.formKey.currentState!.value; + + // // Transform map to list + // var list2 = list.entries.toList(); + + // // // remove MapEntry and key + // list2.removeWhere( + // (element) => + // element.key == 'pemutus' || + // element.key == 'tglReview' || + // element.key == 'inputan' || + // element.key == 'keuangan' || + // element.key == 'karakter' || + // element.key == 'bisnis' || + // element.key == 'usaha' || + // element.key == 'agunan' || + // element.key == 'berkas', + // ); + + // // debugPrint('list2: $list2'); + + // // Transform list2 to list of string + // var list3 = list2.map((e) => e.value).toList(); + + // // list3.removeWhere((element) => element.k) + + // // transform list3 to string + // list3 = list3.map((e) => e.toString()).toList(); + + // controller.bahasanReviewer = list3; + + // var listFinal = controller.bahasanReviewer; + + // debugPrint(listFinal.toString()); + + // Navigator.pop(context); + // controller.saveReview(); + // }, + // child: const Text('Ya'), + // ), + // ], + // ), + NativePromptAlert( + controller: controller, + index: 0, + title: 'Submit', + content: + 'Dengan menekan tombol Ya, data diatas akan dikirim ke pemutus yang dipilih, dan status pengajuan berubah menjadi REVIEWED. Apakah anda yakin?', + onPressedDanger: () { + Navigator.pop(context); + }, + onPressedSuccess: () { + var list = controller.formKey.currentState!.value; + + // Transform map to list + var list2 = list.entries.toList(); + + // // remove MapEntry and key + list2.removeWhere( + (element) => + element.key == 'pemutus' || + element.key == 'tglReview' || + element.key == 'inputan' || + element.key == 'keuangan' || + element.key == 'karakter' || + element.key == 'bisnis' || + element.key == 'usaha' || + element.key == 'agunan' || + element.key == 'berkas', + ); + + // debugPrint('list2: $list2'); + + // Transform list2 to list of string + var list3 = list2.map((e) => e.value).toList(); + + // list3.removeWhere((element) => element.k) + + // transform list3 to string + list3 = list3.map((e) => e.toString()).toList(); + + controller.bahasanReviewer = list3; + + var listFinal = controller.bahasanReviewer; + + debugPrint(listFinal.toString()); + + Navigator.pop(context); + controller.saveReview(); + }, + textDanger: 'TIDAK', + textSuccess: 'YA', ), ); } else { - debugPrint('validation failed'); + ErrorDialog( + context: context, + title: 'Perhatian', + desc: 'Pastikan semua analisa sudah diperiksa', + btnOkOnPress: () {}, + ).show(); } }, ); diff --git a/lib/app/widget/simple_alert.dart b/lib/app/widget/simple_alert.dart new file mode 100644 index 00000000..60b30b94 --- /dev/null +++ b/lib/app/widget/simple_alert.dart @@ -0,0 +1,70 @@ +import 'package:akm/app/common/style.dart'; +import 'package:flutter/material.dart'; + +import 'package:getwidget/getwidget.dart'; + +class NativePromptAlert extends StatelessWidget { + final int index; + + const NativePromptAlert({ + super.key, + required this.controller, + required this.index, + required this.title, + required this.content, + this.onPressedDanger, + this.onPressedSuccess, + required this.textDanger, + required this.textSuccess, + }); + + final dynamic controller; + final String title; + final String content; + final String textDanger; + final String textSuccess; + final void Function()? onPressedDanger; + final void Function()? onPressedSuccess; + + @override + Widget build(BuildContext context) { + return AlertDialog( + shape: const RoundedRectangleBorder( + borderRadius: BorderRadius.all( + Radius.circular(20), + ), + ), + title: Text( + title, + style: const TextStyle( + fontSize: 20, + fontWeight: FontWeight.bold, + color: Colors.white, + ), + ), + backgroundColor: primaryColor, + content: Text( + content, + style: const TextStyle( + fontSize: 15, + color: Colors.white, + ), + ), + actions: [ + GFButton( + color: GFColors.DANGER, + size: GFSize.LARGE, + shape: GFButtonShape.pills, + onPressed: onPressedDanger, + text: textDanger, + ), + GFButton( + size: GFSize.LARGE, + shape: GFButtonShape.pills, + onPressed: onPressedSuccess, + text: textSuccess, + ) + ], + ); + } +} From 620a43258981cd6676ca0cfb91b6ccee5fdd69b0 Mon Sep 17 00:00:00 2001 From: Novian Andika Date: Fri, 21 Apr 2023 22:22:30 +0700 Subject: [PATCH 7/7] feat: final push --- .../reviewer_information.dart | 12 +- .../views/components/list_tile_printing.dart | 378 +++++++++++------- .../print_button.dart | 281 +++++++------ .../widget/reviewer_completed_list_empty.dart | 25 +- .../widget/reviewer_pending_list_empty.dart | 26 +- lib/app/widget/dialog_box.dart | 6 + pubspec.yaml | 2 +- 7 files changed, 440 insertions(+), 290 deletions(-) diff --git a/lib/app/modules/home_reviewer/widget/components/home_reviewer_main_menu/reviewer_information.dart b/lib/app/modules/home_reviewer/widget/components/home_reviewer_main_menu/reviewer_information.dart index cf50ef46..20c50cc0 100644 --- a/lib/app/modules/home_reviewer/widget/components/home_reviewer_main_menu/reviewer_information.dart +++ b/lib/app/modules/home_reviewer/widget/components/home_reviewer_main_menu/reviewer_information.dart @@ -1,9 +1,9 @@ +import 'package:akm/app/common/style.dart'; import 'package:flutter/material.dart'; // 📦 Package imports: import 'package:font_awesome_flutter/font_awesome_flutter.dart'; import 'package:get/get.dart'; -import 'package:getwidget/getwidget.dart'; // 🌎 Project imports: import 'package:akm/app/modules/home/controllers/home_controller.dart'; @@ -25,8 +25,8 @@ class ReviewerDeviceInformation extends StatelessWidget { child: Row( children: [ const Icon( - FontAwesomeIcons.check, - color: GFColors.SUCCESS, + FontAwesomeIcons.android, + color: primaryColor, ), const SizedBox( width: 8, @@ -61,7 +61,7 @@ class ReviewerDeviceInformation extends StatelessWidget { ) : const Icon( FontAwesomeIcons.locationDot, - color: GFColors.DANGER, + color: primaryColor, )), const SizedBox( width: 8, @@ -113,8 +113,8 @@ class ReviewerDeviceInformation extends StatelessWidget { ), ) : const Icon( - FontAwesomeIcons.building, - color: GFColors.INFO, + FontAwesomeIcons.locationArrow, + color: primaryColor, )), const SizedBox( width: 8, diff --git a/lib/app/modules/insight_debitur/views/components/list_tile_printing.dart b/lib/app/modules/insight_debitur/views/components/list_tile_printing.dart index ca956b04..7a61e8f3 100644 --- a/lib/app/modules/insight_debitur/views/components/list_tile_printing.dart +++ b/lib/app/modules/insight_debitur/views/components/list_tile_printing.dart @@ -1,5 +1,6 @@ // 🐦 Flutter imports: import 'package:akm/app/modules/insight_debitur/views/components/printing/pk/pk_input.dart'; +import 'package:akm/app/widget/dialog_box.dart'; import 'package:flutter/material.dart'; // 📦 Package imports: @@ -53,19 +54,28 @@ class PrintInput extends StatelessWidget { text: "READY", buttonBoxShadow: true, color: GFColors.SUCCESS, + shape: GFButtonShape.pills, ) : GFButton( onPressed: () { - Get.snackbar( - 'Error', - 'Harap Lengkapi Semua Untuk Melanjutkan', - backgroundColor: Colors.red, - colorText: Colors.white, - ); + // Get.snackbar( + // 'Error', + // 'Harap Lengkapi Semua Untuk Melanjutkan', + // backgroundColor: Colors.red, + // colorText: Colors.white, + // ); + + ErrorDialog( + title: 'Inputan belum lengkap', + desc: 'Harap Lengkapi Semua Untuk Melanjutkan', + context: context, + btnOkOnPress: () {}, + ).show(); }, text: "N/A", buttonBoxShadow: true, color: GFColors.DANGER, + shape: GFButtonShape.pills, ), ); } @@ -106,19 +116,21 @@ class PrintNeraca extends StatelessWidget { text: "READY", buttonBoxShadow: true, color: GFColors.SUCCESS, + shape: GFButtonShape.pills, ) : GFButton( onPressed: () { - Get.snackbar( - 'Error', - 'Data Neraca belum lengkap', - backgroundColor: Colors.red, - colorText: Colors.white, - ); + ErrorDialog( + title: 'Keterangan Neraca belum lengkap', + desc: 'Harap lengkapi untuk melanjutkan', + context: context, + btnOkOnPress: () {}, + ).show(); }, text: "N/A", buttonBoxShadow: true, color: GFColors.DANGER, + shape: GFButtonShape.pills, ), ); } @@ -164,19 +176,21 @@ class PrintUsulanBaru extends StatelessWidget { text: "READY", buttonBoxShadow: true, color: GFColors.SUCCESS, + shape: GFButtonShape.pills, ) : GFButton( onPressed: () { - Get.snackbar( - 'Error', - 'Hara Lengkapi Semua Untuk Melanjutkan', - backgroundColor: Colors.red, - colorText: Colors.white, - ); + ErrorDialog( + title: 'Error', + desc: 'Harap isi semua section untuk melanjutkan', + context: context, + btnOkOnPress: () {}, + ).show(); }, text: "N/A", buttonBoxShadow: true, color: GFColors.DANGER, + shape: GFButtonShape.pills, ), ); } @@ -217,19 +231,21 @@ class PrintRugiLaba extends StatelessWidget { text: "READY", buttonBoxShadow: true, color: GFColors.SUCCESS, + shape: GFButtonShape.pills, ) : GFButton( onPressed: () { - Get.snackbar( - 'Error', - 'Data Laporan Keuangan belum lengkap', - backgroundColor: Colors.red, - colorText: Colors.white, - ); + ErrorDialog( + title: 'Laporan Keuangan belum lengkap', + desc: 'Harap lengkapi untuk melanjutkan', + context: context, + btnOkOnPress: () {}, + ).show(); }, text: "N/A", buttonBoxShadow: true, color: GFColors.DANGER, + shape: GFButtonShape.pills, ), ); } @@ -270,19 +286,21 @@ class PrintAgunan extends StatelessWidget { text: "READY", buttonBoxShadow: true, color: GFColors.SUCCESS, + shape: GFButtonShape.pills, ) : GFButton( onPressed: () { - Get.snackbar( - 'Error', - 'Data Analisa Agunan belum lengkap', - backgroundColor: Colors.red, - colorText: Colors.white, - ); + ErrorDialog( + title: 'Data Agunan belum lengkap', + desc: 'Harap Lengkapi Semua Untuk Melanjutkan', + context: context, + btnOkOnPress: () {}, + ).show(); }, text: "N/A", buttonBoxShadow: true, color: GFColors.DANGER, + shape: GFButtonShape.pills, ), ); } @@ -329,19 +347,22 @@ class PrintPutusan extends StatelessWidget { text: "READY", buttonBoxShadow: true, color: GFColors.SUCCESS, + shape: GFButtonShape.pills, ) : GFButton( onPressed: () { - Get.snackbar( - 'Error', - 'Harap Lengkapi Semua Sebelum Melanjutkan', - backgroundColor: Colors.red, - colorText: Colors.white, - ); + ErrorDialog( + title: 'Error', + desc: + 'Putusan Kredit dapat dibuka setelah di acc oleh komite kredit', + context: context, + btnOkOnPress: () {}, + ).show(); }, text: "N/A", buttonBoxShadow: true, color: GFColors.DANGER, + shape: GFButtonShape.pills, ), ); } @@ -388,19 +409,21 @@ class PrintUsulan extends StatelessWidget { text: "READY", buttonBoxShadow: true, color: GFColors.SUCCESS, + shape: GFButtonShape.pills, ) : GFButton( onPressed: () { - Get.snackbar( - 'Error', - 'Harap Lengkapi Semua Untuk Melanjutkan', - backgroundColor: Colors.red, - colorText: Colors.white, - ); + ErrorDialog( + title: 'Error', + desc: 'Harap lengkapi semua data sebelum melanjutkan', + context: context, + btnOkOnPress: () {}, + ).show(); }, text: "N/A", buttonBoxShadow: true, color: GFColors.DANGER, + shape: GFButtonShape.pills, ), ); } @@ -441,19 +464,21 @@ class PrintKeuangan extends StatelessWidget { text: "READY", buttonBoxShadow: true, color: GFColors.SUCCESS, + shape: GFButtonShape.pills, ) : GFButton( onPressed: () { - Get.snackbar( - 'Error', - 'Data Keuangan belum lengkap', - backgroundColor: Colors.red, - colorText: Colors.white, - ); + ErrorDialog( + title: 'Data Keuangan belum lengkap', + desc: 'Harap Lengkapi Semua Untuk Melanjutkan', + context: context, + btnOkOnPress: () {}, + ).show(); }, text: "N/A", buttonBoxShadow: true, color: GFColors.DANGER, + shape: GFButtonShape.pills, ), ); } @@ -494,6 +519,7 @@ class ModelPrint extends StatelessWidget { text: "READY", buttonBoxShadow: true, color: GFColors.SUCCESS, + shape: GFButtonShape.pills, ), ); } @@ -534,19 +560,21 @@ class BisnisPrint extends StatelessWidget { text: "READY", buttonBoxShadow: true, color: GFColors.SUCCESS, + shape: GFButtonShape.pills, ) : GFButton( onPressed: () { - Get.snackbar( - 'Error', - 'Data Bisnis belum lengkap', - backgroundColor: Colors.red, - colorText: Colors.white, - ); + ErrorDialog( + title: 'Data Bisnis belum lengkap', + desc: 'Harap Lengkapi Semua Untuk Melanjutkan', + context: context, + btnOkOnPress: () {}, + ).show(); }, text: "N/A", buttonBoxShadow: true, color: GFColors.DANGER, + shape: GFButtonShape.pills, ), ); } @@ -587,19 +615,21 @@ class KarakterPrint extends StatelessWidget { text: "READY", buttonBoxShadow: true, color: GFColors.SUCCESS, + shape: GFButtonShape.pills, ) : GFButton( onPressed: () { - Get.snackbar( - 'Error', - 'Data Karakter belum lengkap', - backgroundColor: Colors.red, - colorText: Colors.white, - ); + ErrorDialog( + title: 'Data Karakter belum lengkap', + desc: 'Harap Lengkapi Semua Untuk Melanjutkan', + context: context, + btnOkOnPress: () {}, + ).show(); }, text: "N/A", buttonBoxShadow: true, color: GFColors.DANGER, + shape: GFButtonShape.pills, ), ); } @@ -640,19 +670,21 @@ class JenisUsahaPrint extends StatelessWidget { text: "READY", buttonBoxShadow: true, color: GFColors.SUCCESS, + shape: GFButtonShape.pills, ) : GFButton( onPressed: () { - Get.snackbar( - 'Error', - 'Data Jenis Usaha belum lengkap', - backgroundColor: Colors.red, - colorText: Colors.white, - ); + ErrorDialog( + title: 'Data Jenis Usaha belum lengkap', + desc: 'Harap Lengkapi Semua Untuk Melanjutkan', + context: context, + btnOkOnPress: () {}, + ).show(); }, text: "N/A", buttonBoxShadow: true, color: GFColors.DANGER, + shape: GFButtonShape.pills, ), ); } @@ -668,31 +700,53 @@ class SlikPrint extends StatelessWidget { @override Widget build(BuildContext context) { return GFListTile( - title: const Text( - 'Pernyataan SLIK', - style: TextStyle( - color: primaryColor, - fontSize: 25, - fontWeight: FontWeight.w500, - ), + title: const Text( + 'Pernyataan SLIK', + style: TextStyle( + color: primaryColor, + fontSize: 25, + fontWeight: FontWeight.w500, ), - avatar: const GFAvatar( - backgroundColor: primaryColor, - child: Icon( - FontAwesomeIcons.squarespace, - color: secondaryColor, - ), + ), + avatar: const GFAvatar( + backgroundColor: primaryColor, + child: Icon( + FontAwesomeIcons.squarespace, + color: secondaryColor, ), - subTitleText: 'Print Pernyaataan SLIK', - icon: GFButton( - onPressed: () { - Get.toNamed(Routes.SLIK_PRINTING, - arguments: controller.insightDebitur.value); - }, - text: "READY", - buttonBoxShadow: true, - color: GFColors.SUCCESS, - )); + ), + subTitleText: 'Print Pernyaataan SLIK', + icon: controller.insightDebitur.value.analisaKeuangan != null && + controller.insightDebitur.value.analisaAgunan != null && + controller.insightDebitur.value.analisaBisnis != null && + controller.insightDebitur.value.analisaJenisUsaha != null && + controller.insightDebitur.value.analisaKarakter != null && + controller.insightDebitur.value.syaratLain!.isNotEmpty + ? GFButton( + onPressed: () { + Get.toNamed(Routes.SLIK_PRINTING, + arguments: controller.insightDebitur.value); + }, + text: "READY", + buttonBoxShadow: true, + color: GFColors.SUCCESS, + shape: GFButtonShape.pills, + ) + : GFButton( + onPressed: () { + ErrorDialog( + title: 'Data SLIK belum lengkap', + desc: 'Harap Lengkapi Semua Untuk Melanjutkan', + context: context, + btnOkOnPress: () {}, + ).show(); + }, + text: "N/A", + buttonBoxShadow: true, + color: GFColors.DANGER, + shape: GFButtonShape.pills, + ), + ); } } @@ -706,31 +760,53 @@ class SpkkPrint extends StatelessWidget { @override Widget build(BuildContext context) { return GFListTile( - title: const Text( - 'SPKK', - style: TextStyle( - color: primaryColor, - fontSize: 25, - fontWeight: FontWeight.w500, - ), + title: const Text( + 'SPKK', + style: TextStyle( + color: primaryColor, + fontSize: 25, + fontWeight: FontWeight.w500, ), - avatar: const GFAvatar( - backgroundColor: primaryColor, - child: Icon( - FontAwesomeIcons.medium, - color: secondaryColor, - ), + ), + avatar: const GFAvatar( + backgroundColor: primaryColor, + child: Icon( + FontAwesomeIcons.medium, + color: secondaryColor, ), - subTitleText: 'Print SPKK', - icon: GFButton( - onPressed: () { - Get.toNamed(Routes.SPKK_PRINTING, - arguments: controller.insightDebitur.value); - }, - text: "READY", - buttonBoxShadow: true, - color: GFColors.SUCCESS, - )); + ), + subTitleText: 'Print SPKK', + icon: controller.insightDebitur.value.analisaKeuangan != null && + controller.insightDebitur.value.analisaAgunan != null && + controller.insightDebitur.value.analisaBisnis != null && + controller.insightDebitur.value.analisaJenisUsaha != null && + controller.insightDebitur.value.analisaKarakter != null && + controller.insightDebitur.value.syaratLain!.isNotEmpty + ? GFButton( + onPressed: () { + Get.toNamed(Routes.SPKK_PRINTING, + arguments: controller.insightDebitur.value); + }, + text: "READY", + buttonBoxShadow: true, + color: GFColors.SUCCESS, + shape: GFButtonShape.pills, + ) + : GFButton( + onPressed: () { + ErrorDialog( + title: 'Data SPKK belum lengkap', + desc: 'Harap Lengkapi Semua Untuk Melanjutkan', + context: context, + btnOkOnPress: () {}, + ).show(); + }, + text: "N/A", + buttonBoxShadow: true, + color: GFColors.DANGER, + shape: GFButtonShape.pills, + ), + ); } } @@ -744,35 +820,57 @@ class PkPrint extends StatelessWidget { @override Widget build(BuildContext context) { return GFListTile( - title: const Text( - 'Perjanjian Kredit', - style: TextStyle( - color: primaryColor, - fontSize: 25, - fontWeight: FontWeight.w500, - ), + title: const Text( + 'Perjanjian Kredit', + style: TextStyle( + color: primaryColor, + fontSize: 25, + fontWeight: FontWeight.w500, ), - avatar: const GFAvatar( - backgroundColor: primaryColor, - child: Icon( - FontAwesomeIcons.github, - color: secondaryColor, - ), + ), + avatar: const GFAvatar( + backgroundColor: primaryColor, + child: Icon( + FontAwesomeIcons.github, + color: secondaryColor, ), - subTitleText: 'Print Perjanjian Kredit', - icon: GFButton( - onPressed: () { - // Get.toNamed(Routes.PK_PRINTING, - // arguments: controller.insightDebitur.value); - - Get.to( - () => const InputBeforePk(), - arguments: controller.insightDebitur.value, - ); - }, - text: "READY", - buttonBoxShadow: true, - color: GFColors.SUCCESS, - )); + ), + subTitleText: 'Print Perjanjian Kredit', + icon: controller.insightDebitur.value.analisaKeuangan != null && + controller.insightDebitur.value.analisaAgunan != null && + controller.insightDebitur.value.analisaBisnis != null && + controller.insightDebitur.value.analisaJenisUsaha != null && + controller.insightDebitur.value.analisaKarakter != null && + controller.insightDebitur.value.syaratLain!.isNotEmpty + ? GFButton( + onPressed: () { + // Get.toNamed(Routes.PK_PRINTING, + // arguments: controller.insightDebitur.value); + + Get.to( + () => const InputBeforePk(), + arguments: controller.insightDebitur.value, + ); + }, + text: "READY", + buttonBoxShadow: true, + color: GFColors.SUCCESS, + shape: GFButtonShape.pills, + ) + : GFButton( + onPressed: () { + ErrorDialog( + title: 'Data PK belum lengkap', + desc: 'Harap Lengkapi Semua Untuk Melanjutkan', + context: context, + btnOkOnPress: () {}, + ).show(); + }, + text: "N/A", + buttonBoxShadow: true, + color: GFColors.DANGER, + shape: GFButtonShape.pills, + ), + ); } } diff --git a/lib/app/modules/insight_debitur/widget/components/insight_debitur_top_section/print_button.dart b/lib/app/modules/insight_debitur/widget/components/insight_debitur_top_section/print_button.dart index 1988db11..99e05c51 100644 --- a/lib/app/modules/insight_debitur/widget/components/insight_debitur_top_section/print_button.dart +++ b/lib/app/modules/insight_debitur/widget/components/insight_debitur_top_section/print_button.dart @@ -86,139 +86,174 @@ class PrintButton extends StatelessWidget { ), ), Expanded( - child: ListView( - children: [ - Obx( - () { - if (analisaKeuanganController - .isAnalisaKeuanganProcessing.value) { + child: Scrollbar( + child: ListView( + children: [ + Obx( + () { + if (analisaKeuanganController + .isAnalisaKeuanganProcessing.value) { + return const Center( + child: CircularProgressIndicator(), + ); + } else { + return PrintInput(); + } + }, + ), + Obx( + () { + if (rugiLabaController.isRugiLabaProcessing.value) { + return const Center( + child: CircularProgressIndicator(), + ); + } else { + return PrintRugiLaba(); + } + }, + ), + Obx( + () { + if (neracaController.isNeracaProcessing.value) { + return const Center( + child: CircularProgressIndicator(), + ); + } else { + return PrintNeraca(); + } + }, + ), + Obx( + () { + if (analisaKeuanganController + .isAnalisaKeuanganProcessing.value) { + return const Center( + child: CircularProgressIndicator(), + ); + } else { + return PrintKeuangan(); + } + }, + ), + Obx( + () { + if (analisaBisnisController + .isAnalisaBisnisProcessing.value) { + return const Center( + child: CircularProgressIndicator(), + ); + } else { + return BisnisPrint(); + } + }, + ), + Obx(() { + if (analisaKarakterController + .isAnalisaKarakterProcessing.value) { return const Center( child: CircularProgressIndicator(), ); } else { - return PrintInput(); + return KarakterPrint(); } - }, - ), - SlikPrint(), - SpkkPrint(), - PkPrint(), - Obx( - () { - if (rugiLabaController.isRugiLabaProcessing.value) { - return const Center( - child: CircularProgressIndicator(), - ); - } else { - return PrintRugiLaba(); - } - }, - ), - Obx( - () { - if (neracaController.isNeracaProcessing.value) { + }), + Obx(() { + if (analisaAgunanController + .isAnalisaAgunanProcessing.value) { return const Center( child: CircularProgressIndicator(), ); } else { - return PrintNeraca(); + return PrintAgunan(); } - }, - ), - Obx( - () { - if (analisaKeuanganController - .isAnalisaKeuanganProcessing.value) { - return const Center( - child: CircularProgressIndicator(), - ); - } else { - return PrintKeuangan(); - } - }, - ), - Obx( - () { - if (analisaBisnisController - .isAnalisaBisnisProcessing.value) { - return const Center( - child: CircularProgressIndicator(), - ); - } else { - return BisnisPrint(); - } - }, - ), - Obx(() { - if (analisaKarakterController - .isAnalisaKarakterProcessing.value) { - return const Center( - child: CircularProgressIndicator(), - ); - } else { - return KarakterPrint(); - } - }), - Obx(() { - if (analisaAgunanController - .isAnalisaAgunanProcessing.value) { - return const Center( - child: CircularProgressIndicator(), - ); - } else { - return PrintAgunan(); - } - }), - Obx( - () { - if (analisaJenisUsahaController - .isAnalisaUsahaProcessing.value) { - return const Center( - child: CircularProgressIndicator(), - ); - } else { - return JenisUsahaPrint(); - } - }, - ), - ModelPrint(controller: controller), - Obx( - () { - if (analisaKeuanganController - .isAnalisaKeuanganProcessing.value) { - return const Center( - child: CircularProgressIndicator(), - ); - } else { - return PrintUsulanBaru(); - } - }, - ), - Obx( - () { - if (analisaKeuanganController - .isAnalisaKeuanganProcessing.value) { - return const Center( - child: CircularProgressIndicator(), - ); - } else { - return PrintUsulan(); - } - }, - ), - Obx( - () { - if (analisaKeuanganController - .isAnalisaKeuanganProcessing.value) { - return const Center( - child: CircularProgressIndicator(), - ); - } else { - return PrintPutusan(); - } - }, - ), - ], + }), + Obx( + () { + if (analisaJenisUsahaController + .isAnalisaUsahaProcessing.value) { + return const Center( + child: CircularProgressIndicator(), + ); + } else { + return JenisUsahaPrint(); + } + }, + ), + ModelPrint(controller: controller), + Obx( + () { + if (analisaKeuanganController + .isAnalisaKeuanganProcessing.value) { + return const Center( + child: CircularProgressIndicator(), + ); + } else { + return PrintUsulanBaru(); + } + }, + ), + Obx( + () { + if (analisaKeuanganController + .isAnalisaKeuanganProcessing.value) { + return const Center( + child: CircularProgressIndicator(), + ); + } else { + return PrintUsulan(); + } + }, + ), + Obx( + () { + if (analisaKeuanganController + .isAnalisaKeuanganProcessing.value) { + return const Center( + child: CircularProgressIndicator(), + ); + } else { + return PrintPutusan(); + } + }, + ), + Obx( + () { + if (analisaKeuanganController + .isAnalisaKeuanganProcessing.value) { + return const Center( + child: CircularProgressIndicator(), + ); + } else { + return SlikPrint(); + } + }, + ), + Obx( + () { + if (analisaKeuanganController + .isAnalisaKeuanganProcessing.value) { + return const Center( + child: CircularProgressIndicator(), + ); + } else { + return SpkkPrint(); + } + }, + ), + Obx( + () { + if (analisaKeuanganController + .isAnalisaKeuanganProcessing.value) { + return const Center( + child: CircularProgressIndicator(), + ); + } else { + return PkPrint(); + } + }, + ), + ], + ), ), ), ], diff --git a/lib/app/modules/reviewer_completed_list/widget/reviewer_completed_list_empty.dart b/lib/app/modules/reviewer_completed_list/widget/reviewer_completed_list_empty.dart index 45adcaa1..7e757747 100644 --- a/lib/app/modules/reviewer_completed_list/widget/reviewer_completed_list_empty.dart +++ b/lib/app/modules/reviewer_completed_list/widget/reviewer_completed_list_empty.dart @@ -1,3 +1,4 @@ +import 'package:akm/app/common/style.dart'; import 'package:flutter/material.dart'; import 'package:lottie/lottie.dart'; @@ -37,7 +38,8 @@ class EmptyCompletedList extends StatelessWidget { child: Lottie.asset( 'assets/images/home/empty.json', frameRate: FrameRate.max, - fit: BoxFit.cover, + fit: BoxFit.contain, + height: 350, repeat: true, errorBuilder: (context, error, stackTrace) { return const Text( @@ -53,20 +55,23 @@ class EmptyCompletedList extends StatelessWidget { child: Column( mainAxisAlignment: MainAxisAlignment.center, children: [ - const Text( - 'Belum ada pengajuan yang selesai direview', - style: TextStyle( - color: Colors.black87, - fontSize: 22, - fontWeight: FontWeight.normal, - letterSpacing: 1.2, + const Padding( + padding: EdgeInsets.symmetric(horizontal: 20), + child: Text( + 'Belum ada pengajuan yang selesai direview', + style: TextStyle( + color: Colors.black87, + fontSize: 22, + fontWeight: FontWeight.normal, + letterSpacing: 1.2, + height: 1.5), + textAlign: TextAlign.center, ), - textAlign: TextAlign.center, ), const SizedBox(height: 20), TextButton( style: TextButton.styleFrom( - backgroundColor: Colors.blueAccent, + backgroundColor: primaryColor, padding: const EdgeInsets.symmetric( horizontal: 30, vertical: 15), shape: RoundedRectangleBorder( diff --git a/lib/app/modules/reviewer_pending_list/widget/reviewer_pending_list_empty.dart b/lib/app/modules/reviewer_pending_list/widget/reviewer_pending_list_empty.dart index dcc8c3e2..5b326bc1 100644 --- a/lib/app/modules/reviewer_pending_list/widget/reviewer_pending_list_empty.dart +++ b/lib/app/modules/reviewer_pending_list/widget/reviewer_pending_list_empty.dart @@ -1,3 +1,4 @@ +import 'package:akm/app/common/style.dart'; import 'package:flutter/material.dart'; import 'package:lottie/lottie.dart'; @@ -37,7 +38,8 @@ class EmptyPendingList extends StatelessWidget { child: Lottie.asset( 'assets/images/home/empty.json', frameRate: FrameRate.max, - fit: BoxFit.cover, + fit: BoxFit.contain, + height: 350, repeat: true, errorBuilder: (context, error, stackTrace) { return const Text( @@ -53,20 +55,24 @@ class EmptyPendingList extends StatelessWidget { child: Column( mainAxisAlignment: MainAxisAlignment.center, children: [ - const Text( - 'Belum ada pengajuan yang perlu direview', - style: TextStyle( - color: Colors.black87, - fontSize: 22, - fontWeight: FontWeight.normal, - letterSpacing: 1.2, + const Padding( + padding: EdgeInsets.symmetric(horizontal: 20), + child: Text( + 'Belum ada pengajuan yang perlu direview', + style: TextStyle( + color: Colors.black87, + fontSize: 22, + fontWeight: FontWeight.normal, + letterSpacing: 1.2, + height: 1.5, + ), + textAlign: TextAlign.center, ), - textAlign: TextAlign.center, ), const SizedBox(height: 20), TextButton( style: TextButton.styleFrom( - backgroundColor: Colors.blueAccent, + backgroundColor: primaryColor, padding: const EdgeInsets.symmetric( horizontal: 30, vertical: 15), shape: RoundedRectangleBorder( diff --git a/lib/app/widget/dialog_box.dart b/lib/app/widget/dialog_box.dart index e7a8d597..1f7c3aec 100644 --- a/lib/app/widget/dialog_box.dart +++ b/lib/app/widget/dialog_box.dart @@ -80,6 +80,9 @@ class PrompDialog extends AwesomeDialog { }) : super( context: context, animType: AnimType.scale, + padding: const EdgeInsets.symmetric( + horizontal: 20, + ), dialogType: DialogType.question, title: title, titleTextStyle: GoogleFonts.poppins( @@ -128,6 +131,9 @@ class InfoDialog extends AwesomeDialog { }) : super( context: context, animType: AnimType.scale, + padding: const EdgeInsets.symmetric( + horizontal: 20, + ), dialogType: DialogType.warning, title: title, titleTextStyle: GoogleFonts.poppins( diff --git a/pubspec.yaml b/pubspec.yaml index 0d05cb98..90849122 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,5 +1,5 @@ name: akm -version: 1.1.18+36 +version: 1.1.19+39 publish_to: none description: Mobile app untuk Analisis Kredit Mikro built with Flutter and NodeJS. environment: