Skip to content

Commit

Permalink
Merge pull request #90 from SWM-M3PRO/feature/M3-328-cachingImage
Browse files Browse the repository at this point in the history
M3-328 이미지 캐시를 도입해 로딩 속도 개선하기
  • Loading branch information
koomin1227 authored Sep 3, 2024
2 parents ed5336a + fc2965e commit f65536f
Show file tree
Hide file tree
Showing 7 changed files with 127 additions and 16 deletions.
7 changes: 7 additions & 0 deletions ios/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,9 @@ PODS:
- FlutterMacOS
- sign_in_with_apple (0.0.1):
- Flutter
- sqflite (0.0.3):
- Flutter
- FlutterMacOS
- url_launcher_ios (0.0.1):
- Flutter
- wakelock_plus (0.0.1):
Expand Down Expand Up @@ -192,6 +195,7 @@ DEPENDENCIES:
- permission_handler_apple (from `.symlinks/plugins/permission_handler_apple/ios`)
- shared_preferences_foundation (from `.symlinks/plugins/shared_preferences_foundation/darwin`)
- sign_in_with_apple (from `.symlinks/plugins/sign_in_with_apple/ios`)
- sqflite (from `.symlinks/plugins/sqflite/darwin`)
- url_launcher_ios (from `.symlinks/plugins/url_launcher_ios/ios`)
- wakelock_plus (from `.symlinks/plugins/wakelock_plus/ios`)
- webview_flutter_wkwebview (from `.symlinks/plugins/webview_flutter_wkwebview/ios`)
Expand Down Expand Up @@ -256,6 +260,8 @@ EXTERNAL SOURCES:
:path: ".symlinks/plugins/shared_preferences_foundation/darwin"
sign_in_with_apple:
:path: ".symlinks/plugins/sign_in_with_apple/ios"
sqflite:
:path: ".symlinks/plugins/sqflite/darwin"
url_launcher_ios:
:path: ".symlinks/plugins/url_launcher_ios/ios"
wakelock_plus:
Expand Down Expand Up @@ -298,6 +304,7 @@ SPEC CHECKSUMS:
PromisesObjC: f5707f49cb48b9636751c5b2e7d227e43fba9f47
shared_preferences_foundation: fcdcbc04712aee1108ac7fda236f363274528f78
sign_in_with_apple: f3bf75217ea4c2c8b91823f225d70230119b8440
sqflite: 673a0e54cc04b7d6dba8d24fb8095b31c3a99eec
url_launcher_ios: 5334b05cef931de560670eeae103fd3e431ac3fe
wakelock_plus: 78ec7c5b202cab7761af8e2b2b3d0671be6c4ae1
webview_flutter_wkwebview: be0f0d33777f1bfd0c9fdcb594786704dbf65f36
Expand Down
15 changes: 9 additions & 6 deletions lib/widgets/map/bottom_sheet/visited_user_list.dart
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import 'package:cached_network_image/cached_network_image.dart';
import 'package:flutter/cupertino.dart';
import 'package:intl/intl.dart';

Expand Down Expand Up @@ -55,9 +56,10 @@ class OwnerInfo extends StatelessWidget {
children: [
ClipOval(
child: pixelOwnerUser.profileImageUrl != null
? Image.network(
pixelOwnerUser.profileImageUrl!,
cacheWidth: 100,
? Image(
image: CachedNetworkImageProvider(
pixelOwnerUser.profileImageUrl!,
),
width: 44,
height: 44,
fit: BoxFit.cover,
Expand Down Expand Up @@ -130,9 +132,10 @@ class VisitedUserListElement extends StatelessWidget {
children: [
ClipOval(
child: visitedUser.profileImageUrl != null
? Image.network(
visitedUser.profileImageUrl!,
cacheWidth: 100,
? Image(
image: CachedNetworkImageProvider(
visitedUser.profileImageUrl!,
),
width: 44,
height: 44,
fit: BoxFit.cover,
Expand Down
7 changes: 5 additions & 2 deletions lib/widgets/my_page/user_info.dart
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import 'package:cached_network_image/cached_network_image.dart';
import 'package:flutter/material.dart';
import 'package:get/get.dart';

Expand Down Expand Up @@ -29,8 +30,10 @@ class UserInfo extends StatelessWidget {
children: [
ClipOval(
child: myPageController.getProfileImageURL() != null
? Image.network(
myPageController.getProfileImageURL(),
? Image(
image: CachedNetworkImageProvider(
myPageController.getProfileImageURL(),
),
width: 44,
height: 44,
fit: BoxFit.cover,
Expand Down
11 changes: 5 additions & 6 deletions lib/widgets/ranking/ranking_info.dart
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import 'package:cached_network_image/cached_network_image.dart';
import 'package:flutter/cupertino.dart';
import 'package:intl/intl.dart';

Expand All @@ -20,9 +21,8 @@ class RankingInfo extends StatelessWidget {
SizedBox(width: 10),
ClipOval(
child: ranking.profileImageUrl != null
? Image.network(
ranking.profileImageUrl!,
cacheWidth: 100,
? Image(
image: CachedNetworkImageProvider(ranking.profileImageUrl!),
width: 30,
height: 30,
fit: BoxFit.cover,
Expand Down Expand Up @@ -108,9 +108,8 @@ class RankingInfoMy extends StatelessWidget {
children: [
ClipOval(
child: ranking.profileImageUrl != null
? Image.network(
ranking.profileImageUrl!,
cacheWidth: 100,
? Image(
image: CachedNetworkImageProvider(ranking.profileImageUrl!),
width: 44,
height: 44,
fit: BoxFit.cover,
Expand Down
5 changes: 3 additions & 2 deletions lib/widgets/ranking/ranking_user_info.dart
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import 'package:cached_network_image/cached_network_image.dart';
import 'package:flutter/material.dart';

import '../../constants/app_colors.dart';
Expand Down Expand Up @@ -30,8 +31,8 @@ class RankingUserInfo extends StatelessWidget {
children: [
ClipOval(
child: profileImageUrl != null
? Image.network(
profileImageUrl!,
? Image(
image: CachedNetworkImageProvider(profileImageUrl!),
width: 44,
height: 44,
fit: BoxFit.cover,
Expand Down
96 changes: 96 additions & 0 deletions pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,30 @@ packages:
url: "https://pub.dev"
source: hosted
version: "2.1.1"
cached_network_image:
dependency: "direct main"
description:
name: cached_network_image
sha256: "4a5d8d2c728b0f3d0245f69f921d7be90cae4c2fd5288f773088672c0893f819"
url: "https://pub.dev"
source: hosted
version: "3.4.0"
cached_network_image_platform_interface:
dependency: transitive
description:
name: cached_network_image_platform_interface
sha256: ff0c949e323d2a1b52be73acce5b4a7b04063e61414c8ca542dbba47281630a7
url: "https://pub.dev"
source: hosted
version: "4.1.0"
cached_network_image_web:
dependency: transitive
description:
name: cached_network_image_web
sha256: "6322dde7a5ad92202e64df659241104a43db20ed594c41ca18de1014598d7996"
url: "https://pub.dev"
source: hosted
version: "1.3.0"
carp_serializable:
dependency: transitive
description:
Expand Down Expand Up @@ -361,6 +385,14 @@ packages:
url: "https://pub.dev"
source: hosted
version: "3.8.12"
fixnum:
dependency: transitive
description:
name: fixnum
sha256: "25517a4deb0c03aa0f32fd12db525856438902d9c16536311e76cdc57b31d7d1"
url: "https://pub.dev"
source: hosted
version: "1.1.0"
fl_chart:
dependency: "direct main"
description:
Expand All @@ -374,6 +406,14 @@ packages:
description: flutter
source: sdk
version: "0.0.0"
flutter_cache_manager:
dependency: transitive
description:
name: flutter_cache_manager
sha256: a77f77806a790eb9ba0118a5a3a936e81c4fea2b61533033b2b0c3d50bbde5ea
url: "https://pub.dev"
source: hosted
version: "3.4.0"
flutter_config:
dependency: "direct main"
description:
Expand Down Expand Up @@ -888,6 +928,14 @@ packages:
url: "https://pub.dev"
source: hosted
version: "0.5.0"
octo_image:
dependency: transitive
description:
name: octo_image
sha256: "34faa6639a78c7e3cbe79be6f9f96535867e879748ade7d17c9b1ae7536293bd"
url: "https://pub.dev"
source: hosted
version: "2.1.0"
optimize_battery:
dependency: "direct main"
description:
Expand Down Expand Up @@ -1064,6 +1112,14 @@ packages:
url: "https://pub.dev"
source: hosted
version: "6.1.2"
rxdart:
dependency: transitive
description:
name: rxdart
sha256: "5c3004a4a8dbb94bd4bf5412a4def4acdaa12e12f269737a5751369e12d1a962"
url: "https://pub.dev"
source: hosted
version: "0.28.0"
sanitize_html:
dependency: transitive
description:
Expand Down Expand Up @@ -1173,6 +1229,30 @@ packages:
url: "https://pub.dev"
source: hosted
version: "1.10.0"
sprintf:
dependency: transitive
description:
name: sprintf
sha256: "1fc9ffe69d4df602376b52949af107d8f5703b77cda567c4d7d86a0693120f23"
url: "https://pub.dev"
source: hosted
version: "7.0.0"
sqflite:
dependency: transitive
description:
name: sqflite
sha256: a43e5a27235518c03ca238e7b4732cf35eabe863a369ceba6cbefa537a66f16d
url: "https://pub.dev"
source: hosted
version: "2.3.3+1"
sqflite_common:
dependency: transitive
description:
name: sqflite_common
sha256: "3da423ce7baf868be70e2c0976c28a1bb2f73644268b7ffa7d2e08eab71f16a4"
url: "https://pub.dev"
source: hosted
version: "2.5.4"
stack_trace:
dependency: transitive
description:
Expand Down Expand Up @@ -1205,6 +1285,14 @@ packages:
url: "https://pub.dev"
source: hosted
version: "1.2.0"
synchronized:
dependency: transitive
description:
name: synchronized
sha256: "539ef412b170d65ecdafd780f924e5be3f60032a1128df156adad6c5b373d558"
url: "https://pub.dev"
source: hosted
version: "3.1.0+1"
term_glyph:
dependency: transitive
description:
Expand Down Expand Up @@ -1301,6 +1389,14 @@ packages:
url: "https://pub.dev"
source: hosted
version: "3.1.1"
uuid:
dependency: transitive
description:
name: uuid
sha256: "83d37c7ad7aaf9aa8e275490669535c8080377cfa7a7004c24dfac53afffaa90"
url: "https://pub.dev"
source: hosted
version: "4.4.2"
vector_math:
dependency: transitive
description:
Expand Down
2 changes: 2 additions & 0 deletions pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@ dependencies:
firebase_messaging: ^15.0.4
package_info_plus: ^8.0.2
optimize_battery: ^0.0.4
cached_network_image: ^3.4.0


dev_dependencies:
flutter_test:
Expand Down

0 comments on commit f65536f

Please sign in to comment.