diff --git a/lib/main.dart b/lib/main.dart index 234bdaafe..796fc4242 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -27,7 +27,6 @@ import 'package:Okuna/services/universal_links/universal_links.dart'; import 'package:Okuna/widgets/toast.dart'; import 'package:Okuna/translation/constants.dart'; import 'package:flutter/material.dart'; -import 'package:flutter_advanced_networkimage/provider.dart'; import 'package:flutter\_localizations/flutter\_localizations.dart'; import 'package:sentry_flutter/sentry_flutter.dart'; import 'dart:async'; @@ -67,7 +66,8 @@ class _MyAppState extends State { } void bootstrap() { - DiskCache().maxEntries = MAX_NETWORK_IMAGE_CACHE_ENTRIES; + + // DiskCache().maxEntries = MAX_NETWORK_IMAGE_CACHE_ENTRIES; //DiskCache().maxSizeBytes = MAX_NETWORK_IMAGE_CACHE_MB * 1000000; // 200mb } diff --git a/lib/pages/home/bottom_sheets/camera_picker.dart b/lib/pages/home/bottom_sheets/camera_picker.dart index 6c6210f17..84ceb1234 100644 --- a/lib/pages/home/bottom_sheets/camera_picker.dart +++ b/lib/pages/home/bottom_sheets/camera_picker.dart @@ -14,6 +14,7 @@ class OBCameraPickerBottomSheet extends StatelessWidget { @override Widget build(BuildContext context) { + final _picker = ImagePicker(); var provider = OpenbookProvider.of(context); LocalizationService localizationService = provider.localizationService; @@ -28,7 +29,8 @@ class OBCameraPickerBottomSheet extends StatelessWidget { bool permissionGranted = await provider.permissionService .requestStoragePermissions(context: context); if (permissionGranted) { - File file = await ImagePicker.pickImage(source: ImageSource.camera); + final pickedFile = await _picker.getImage(source: ImageSource.camera); + final File file = File(pickedFile.path); Navigator.pop( context, file != null ? MediaFile(file, FileType.image) : null); } @@ -43,7 +45,8 @@ class OBCameraPickerBottomSheet extends StatelessWidget { bool permissionGranted = await provider.permissionService .requestStoragePermissions(context: context); if (permissionGranted) { - File file = await ImagePicker.pickVideo(source: ImageSource.camera); + final pickedFile = await _picker.getVideo(source: ImageSource.camera); + final File file = File(pickedFile.path); Navigator.pop( context, file != null ? MediaFile(file, FileType.video) : null); } diff --git a/lib/pages/home/bottom_sheets/image_picker.dart b/lib/pages/home/bottom_sheets/image_picker.dart index aa60c8555..8e7e49cae 100644 --- a/lib/pages/home/bottom_sheets/image_picker.dart +++ b/lib/pages/home/bottom_sheets/image_picker.dart @@ -14,6 +14,7 @@ class OBImagePickerBottomSheet extends StatelessWidget { @override Widget build(BuildContext context) { + final _picker = ImagePicker(); var provider = OpenbookProvider.of(context); LocalizationService localizationService = provider.localizationService; @@ -47,9 +48,9 @@ class OBImagePickerBottomSheet extends StatelessWidget { bool permissionGranted = await provider.permissionService .requestCameraPermissions(context: context); if (permissionGranted) { - File pickedImage = - await ImagePicker.pickImage(source: ImageSource.camera); - Navigator.pop(context, pickedImage); + final pickedFile = await _picker.getImage(source: ImageSource.camera); + final File file = File(pickedFile.path); + Navigator.pop(context, file); } }, ) diff --git a/lib/pages/home/bottom_sheets/video_picker.dart b/lib/pages/home/bottom_sheets/video_picker.dart index 142d44a65..c54826c47 100644 --- a/lib/pages/home/bottom_sheets/video_picker.dart +++ b/lib/pages/home/bottom_sheets/video_picker.dart @@ -13,6 +13,7 @@ class OBVideoPickerBottomSheet extends StatelessWidget { @override Widget build(BuildContext context) { + final _picker = ImagePicker(); var provider = OpenbookProvider.of(context); LocalizationService localizationService = provider.localizationService; @@ -45,10 +46,10 @@ class OBVideoPickerBottomSheet extends StatelessWidget { onTap: () async { bool permissionGranted = await provider.permissionService .requestCameraPermissions(context: context); - if (permissionGranted) { - File pickedVideo = - await ImagePicker.pickVideo(source: ImageSource.camera); - Navigator.pop(context, pickedVideo); + if (permissionGranted) { + final pickedFile = await _picker.getVideo(source: ImageSource.camera); + final File file = File(pickedFile.path); + Navigator.pop(context, file); } }, ) diff --git a/lib/pages/home/modals/save_post/widgets/post_image_previewer.dart b/lib/pages/home/modals/save_post/widgets/post_image_previewer.dart index 1bb40f0e0..5965e3b1c 100644 --- a/lib/pages/home/modals/save_post/widgets/post_image_previewer.dart +++ b/lib/pages/home/modals/save_post/widgets/post_image_previewer.dart @@ -2,8 +2,9 @@ import 'dart:io'; import 'package:Okuna/models/post_image.dart'; import 'package:Okuna/provider.dart'; +import 'package:Okuna/widgets/progress_indicator.dart'; +import 'package:extended_image/extended_image.dart'; import 'package:flutter/material.dart'; -import 'package:flutter_advanced_networkimage/provider.dart'; class OBPostImagePreviewer extends StatelessWidget { final PostImage postImage; @@ -34,20 +35,41 @@ class OBPostImagePreviewer extends StatelessWidget { height: 200.0, width: 200, child: ClipRRect( - borderRadius: new BorderRadius.circular(avatarBorderRadius), - child: isFileImage - ? Image.file( - postImageFile, - fit: BoxFit.cover, - ) - : Image( - fit: BoxFit.cover, - image: AdvancedNetworkImage(postImage.image, - useDiskCache: true, - fallbackAssetImage: - 'assets/images/fallbacks/post-fallback.png', - retryLimit: 0), - ))); + borderRadius: new BorderRadius.circular(avatarBorderRadius), + child: isFileImage + ? Image.file( + postImageFile, + fit: BoxFit.cover, + ) + : ExtendedImage.network( + postImage.image, + fit: BoxFit.cover, + cache: true, + retries: 0, + loadStateChanged: (ExtendedImageState state) { + switch (state.extendedImageLoadState) { + case LoadState.loading: + return OBProgressIndicator(); + break; + case LoadState.completed: + return null; + break; + case LoadState.failed: + return Image.asset( + "assets/images/fallbacks/post-fallback.png", + fit: BoxFit.cover, + ); + break; + default: + return Image.asset( + "assets/images/fallbacks/post-fallback.png", + fit: BoxFit.cover, + ); + break; + } + }, + ), + )); if (onRemove == null) return imagePreview; diff --git a/lib/pages/home/modals/save_post/widgets/post_video_previewer.dart b/lib/pages/home/modals/save_post/widgets/post_video_previewer.dart index 3ccdbb308..0810aba9e 100644 --- a/lib/pages/home/modals/save_post/widgets/post_video_previewer.dart +++ b/lib/pages/home/modals/save_post/widgets/post_video_previewer.dart @@ -3,8 +3,9 @@ import 'dart:io'; import 'package:Okuna/models/post_video.dart'; import 'package:Okuna/models/video_format.dart'; import 'package:Okuna/provider.dart'; +import 'package:Okuna/widgets/progress_indicator.dart'; +import 'package:extended_image/extended_image.dart'; import 'package:flutter/material.dart'; -import 'package:flutter_advanced_networkimage/provider.dart'; class OBPostVideoPreview extends StatelessWidget { final File postVideoFile; @@ -40,13 +41,35 @@ class OBPostVideoPreview extends StatelessWidget { fit: BoxFit.cover, )); }) - : _wrapImageWidgetForThumbnail(Image( - fit: BoxFit.cover, - image: AdvancedNetworkImage(postVideo.thumbnail, - useDiskCache: true, - fallbackAssetImage: 'assets/images/fallbacks/post-fallback.png', - retryLimit: 0), - )); + : _wrapImageWidgetForThumbnail( + ExtendedImage.network( + postVideo.thumbnail, + fit: BoxFit.cover, + cache: true, + loadStateChanged: (ExtendedImageState state) { + switch (state.extendedImageLoadState) { + case LoadState.loading: + return OBProgressIndicator(); + break; + case LoadState.completed: + return null; + break; + case LoadState.failed: + return Image.asset( + "assets/images/fallbacks/post-fallback.png", + fit: BoxFit.cover, + ); + break; + default: + return Image.asset( + "assets/images/fallbacks/post-fallback.png", + fit: BoxFit.cover, + ); + break; + } + }, + ), + ); return Stack( children: [ diff --git a/lib/pages/home/modals/zoomable_photo.dart b/lib/pages/home/modals/zoomable_photo.dart index 7695c44aa..5e0aa7cc0 100644 --- a/lib/pages/home/modals/zoomable_photo.dart +++ b/lib/pages/home/modals/zoomable_photo.dart @@ -1,10 +1,10 @@ import 'package:Okuna/widgets/icon.dart'; import 'package:Okuna/widgets/page_scaffold.dart'; +import 'package:Okuna/widgets/progress_indicator.dart'; +import 'package:extended_image/extended_image.dart'; import 'package:flutter/gestures.dart'; import 'package:flutter/material.dart'; -import 'package:flutter_advanced_networkimage/provider.dart'; import 'package:photo_view/photo_view.dart'; -import 'package:pigment/pigment.dart'; import "dart:math" show pi; class OBZoomablePhotoModal extends StatefulWidget { @@ -61,7 +61,6 @@ class OBZoomablePhotoModalState extends State @override Widget build(BuildContext context) { - return WillPopScope( child: OBCupertinoPageScaffold( backgroundColor: Colors.black26, @@ -123,17 +122,34 @@ class OBZoomablePhotoModalState extends State key: Key(widget.imageUrl), enableRotation: false, scaleStateChangedCallback: _photoViewScaleStateChangedCallback, - imageProvider: AdvancedNetworkImage(widget.imageUrl, - retryLimit: 0, - useDiskCache: true, - getRealUrl: () { - return Future.delayed((Duration(milliseconds: 0)),() => widget.imageUrl); + imageProvider: ExtendedImage.network( + widget.imageUrl, + fit: BoxFit.cover, + cacheMaxAge: const Duration(days: 7), + cache: true, + loadStateChanged: (ExtendedImageState state) { + switch (state.extendedImageLoadState) { + case LoadState.loading: + return OBProgressIndicator(); + break; + case LoadState.completed: + return null; + break; + case LoadState.failed: + return Image.asset( + "assets/images/fallbacks/post-fallback.png", + fit: BoxFit.cover, + ); + break; + default: + return Image.asset( + "assets/images/fallbacks/post-fallback.png", + fit: BoxFit.cover, + ); + break; + } }, - cacheRule: CacheRule( - maxAge: const Duration(days: 7), - checksum: true, - ), - fallbackAssetImage: 'assets/images/fallbacks/post-fallback.png'), + ).image, maxScale: PhotoViewComputedScale.covered, minScale: PhotoViewComputedScale.contained, ), diff --git a/lib/pages/home/pages/communities/widgets/category_tab.dart b/lib/pages/home/pages/communities/widgets/category_tab.dart index 0bcc826fb..5cfb70e3e 100644 --- a/lib/pages/home/pages/communities/widgets/category_tab.dart +++ b/lib/pages/home/pages/communities/widgets/category_tab.dart @@ -2,8 +2,8 @@ import 'package:Okuna/models/category.dart'; import 'package:Okuna/provider.dart'; import 'package:Okuna/services/theme_value_parser.dart'; import 'package:Okuna/widgets/tabs/image_tab.dart'; +import 'package:extended_image/extended_image.dart'; import 'package:flutter/material.dart'; -import 'package:flutter_advanced_networkimage/provider.dart'; class OBCategoryTab extends StatelessWidget { final Category category; @@ -22,8 +22,10 @@ class OBCategoryTab extends StatelessWidget { text: category.title, color: categoryColor, textColor: categoryColorIsDark ? Colors.white : Colors.black, - imageProvider: - AdvancedNetworkImage(category.avatar, useDiskCache: true), + imageProvider: ExtendedNetworkImageProvider( + category.avatar, + cache: true, + ), ); } } diff --git a/lib/services/httpie.dart b/lib/services/httpie.dart index f0fabf837..8cd9b0b78 100644 --- a/lib/services/httpie.dart +++ b/lib/services/httpie.dart @@ -79,7 +79,7 @@ class HttpieService { Response response; try { - response = await client.post(url, + response = await client.post(Uri.parse(url), headers: finalHeaders, body: body, encoding: encoding); } catch (error) { _handleRequestError(error); @@ -102,7 +102,7 @@ class HttpieService { Response response; try { - response = await client.put(url, + response = await client.put(Uri.parse(url), headers: finalHeaders, body: body, encoding: encoding); } catch (error) { _handleRequestError(error); @@ -124,7 +124,7 @@ class HttpieService { Response response; try { - response = await client.patch(url, + response = await client.patch(Uri.parse(url), headers: finalHeaders, body: body, encoding: encoding); } catch (error) { _handleRequestError(error); @@ -145,7 +145,7 @@ class HttpieService { Response response; try { - response = await client.delete(url, headers: finalHeaders); + response = await client.delete(Uri.parse(url), headers: finalHeaders); } catch (error) { _handleRequestError(error); } @@ -230,7 +230,7 @@ class HttpieService { Response response; try { - response = await client.get(url, headers: finalHeaders); + response = await client.get(Uri.parse(url), headers: finalHeaders); } catch (error) { _handleRequestError(error); } diff --git a/lib/services/user.dart b/lib/services/user.dart index 56e269d5c..765e6521e 100644 --- a/lib/services/user.dart +++ b/lib/services/user.dart @@ -73,8 +73,8 @@ import 'package:Okuna/services/user_invites_api.dart'; import 'package:Okuna/services/waitlist_service.dart'; import 'package:crypto/crypto.dart'; import 'package:device_info/device_info.dart'; +import 'package:extended_image/extended_image.dart'; import 'package:flutter/cupertino.dart'; -import 'package:flutter_advanced_networkimage/provider.dart'; import 'package:meta/meta.dart'; import 'package:rxdart/rxdart.dart'; export 'package:Okuna/services/httpie.dart'; @@ -248,7 +248,7 @@ class UserService { Future clearCache() async { await _removeStoredFirstPostsData(); await _removeStoredTopPostsData(); - await DiskCache().clear(); + clearMemoryImageCache(); await clearTemporaryDirectories(); Post.clearCache(); User.clearNavigationCache(); diff --git a/lib/widgets/avatars/avatar.dart b/lib/widgets/avatars/avatar.dart index a45107b0a..61c885085 100644 --- a/lib/widgets/avatars/avatar.dart +++ b/lib/widgets/avatars/avatar.dart @@ -1,7 +1,8 @@ import 'dart:io'; import 'package:Okuna/provider.dart'; +import 'package:Okuna/widgets/progress_indicator.dart'; +import 'package:extended_image/extended_image.dart'; import 'package:flutter/material.dart'; -import 'package:flutter_advanced_networkimage/provider.dart'; enum OBAvatarSize { extraSmall, small, medium, large, extraLarge } @@ -76,14 +77,35 @@ class OBAvatar extends StatelessWidget { image: FileImage(avatarFile), ); } else if (avatarUrl != null) { - finalAvatarImage = Image( - height: avatarSize, - width: avatarSize, - fit: BoxFit.cover, - image: AdvancedNetworkImage(avatarUrl, - useDiskCache: true, - fallbackAssetImage: DEFAULT_AVATAR_ASSET, - retryLimit: 0)); + finalAvatarImage = ExtendedImage.network( + avatarUrl, + fit: BoxFit.cover, + height: avatarSize, + width: avatarSize, + cache: true, + loadStateChanged: (ExtendedImageState state) { + switch (state.extendedImageLoadState) { + case LoadState.loading: + return OBProgressIndicator(); + break; + case LoadState.completed: + return null; + break; + case LoadState.failed: + return Image.asset( + DEFAULT_AVATAR_ASSET, + fit: BoxFit.cover, + ); + break; + default: + return Image.asset( + DEFAULT_AVATAR_ASSET, + fit: BoxFit.cover, + ); + break; + } + }, + ); if (isZoomable) { finalAvatarImage = GestureDetector( diff --git a/lib/widgets/emoji_picker/widgets/emoji_groups/widgets/emoji_group/widgets/emoji.dart b/lib/widgets/emoji_picker/widgets/emoji_groups/widgets/emoji_group/widgets/emoji.dart index 8c1729168..f63fda329 100644 --- a/lib/widgets/emoji_picker/widgets/emoji_groups/widgets/emoji_group/widgets/emoji.dart +++ b/lib/widgets/emoji_picker/widgets/emoji_groups/widgets/emoji_group/widgets/emoji.dart @@ -1,7 +1,7 @@ import 'package:Okuna/models/emoji.dart'; import 'package:Okuna/models/emoji_group.dart'; +import 'package:extended_image/extended_image.dart'; import 'package:flutter/material.dart'; -import 'package:flutter_advanced_networkimage/provider.dart'; enum OBEmojiSize { small, medium, large } @@ -21,7 +21,10 @@ class OBEmoji extends StatelessWidget { return IconButton( icon: Image( height: dimensions, - image: AdvancedNetworkImage(emoji.image, useDiskCache: true), + image: ExtendedNetworkImageProvider( + emoji.image, + cache: true, + ), ), onPressed: onEmojiPressed != null ? () { diff --git a/lib/widgets/hashtag.dart b/lib/widgets/hashtag.dart index 6be0fd015..a3f912263 100644 --- a/lib/widgets/hashtag.dart +++ b/lib/widgets/hashtag.dart @@ -2,8 +2,8 @@ import 'package:Okuna/models/hashtag.dart'; import 'package:Okuna/provider.dart'; import 'package:Okuna/services/user_preferences.dart'; import 'package:Okuna/widgets/theming/text.dart'; +import 'package:extended_image/extended_image.dart'; import 'package:flutter/material.dart'; -import 'package:flutter_advanced_networkimage/provider.dart'; class OBHashtag extends StatelessWidget { final Hashtag hashtag; @@ -105,11 +105,13 @@ class OBHashtag extends StatelessWidget { child, Padding( padding: const EdgeInsets.only(left: 2), - child: Image( - height: 15, - image: - AdvancedNetworkImage(hashtag.emoji.image, useDiskCache: true), - )), + child: ExtendedImage.network( + hashtag.emoji.image, + height: 15, + clearMemoryCacheIfFailed: true, + cache: true + ), + ), ], ); } diff --git a/lib/widgets/link_preview.dart b/lib/widgets/link_preview.dart index 07a94d128..2f5bc85cb 100644 --- a/lib/widgets/link_preview.dart +++ b/lib/widgets/link_preview.dart @@ -14,8 +14,8 @@ import 'package:Okuna/widgets/progress_indicator.dart'; import 'package:Okuna/widgets/theming/highlighted_box.dart'; import 'package:Okuna/widgets/theming/secondary_text.dart'; import 'package:Okuna/widgets/theming/text.dart'; +import 'package:extended_image/extended_image.dart'; import 'package:flutter/material.dart'; -import 'package:flutter_advanced_networkimage/provider.dart'; import 'package:flutter_svg/svg.dart'; import 'package:async/async.dart'; @@ -364,13 +364,35 @@ class OBLinkPreviewState extends State { decoration: BoxDecoration( image: DecorationImage( fit: BoxFit.cover, - image: AdvancedNetworkImage(imageSource, - header: headers, - useDiskCache: true, - fallbackAssetImage: - 'assets/images/fallbacks/post-fallback.png', - retryLimit: 3, - timeoutDuration: const Duration(minutes: 1)))), + image: ExtendedImage.network( + imageSource, + headers: headers, + fit: BoxFit.cover, + cache: true, + loadStateChanged: (ExtendedImageState state) { + switch (state.extendedImageLoadState) { + case LoadState.loading: + return OBProgressIndicator(); + break; + case LoadState.completed: + return null; + break; + case LoadState.failed: + return Image.asset( + "assets/images/fallbacks/post-fallback.png", + fit: BoxFit.cover, + ); + break; + default: + return Image.asset( + "assets/images/fallbacks/post-fallback.png", + fit: BoxFit.cover, + ); + break; + } + }, + ).image, + )), ), ); } diff --git a/lib/widgets/markdown.dart b/lib/widgets/markdown.dart index 37f4a48f0..48d74ac65 100644 --- a/lib/widgets/markdown.dart +++ b/lib/widgets/markdown.dart @@ -65,22 +65,22 @@ class OBMarkdown extends StatelessWidget { code: new TextStyle( color: primaryTextColor, fontFamily: "monospace", - fontSize: flutterTheme.textTheme.body1.fontSize * 0.85), - h1: flutterTheme.textTheme.headline + fontSize: flutterTheme.textTheme.bodyText2.fontSize * 0.85), + h1: flutterTheme.textTheme.headline5 .copyWith(color: primaryTextColor, fontWeight: FontWeight.bold), - h2: flutterTheme.textTheme.title + h2: flutterTheme.textTheme.headline6 .copyWith(color: primaryTextColor, fontWeight: FontWeight.bold), - h3: flutterTheme.textTheme.subhead + h3: flutterTheme.textTheme.subtitle1 .copyWith(color: primaryTextColor, fontWeight: FontWeight.bold), - h4: flutterTheme.textTheme.body2 + h4: flutterTheme.textTheme.bodyText1 .copyWith(color: primaryTextColor, fontWeight: FontWeight.bold), - h5: flutterTheme.textTheme.body2 + h5: flutterTheme.textTheme.bodyText1 .copyWith(color: primaryTextColor, fontWeight: FontWeight.bold), - h6: flutterTheme.textTheme.body2 + h6: flutterTheme.textTheme.bodyText1 .copyWith(color: primaryTextColor, fontWeight: FontWeight.bold), em: const TextStyle(fontStyle: FontStyle.italic), strong: const TextStyle(fontWeight: FontWeight.bold), - img: flutterTheme.textTheme.body1.copyWith(color: primaryTextColor), + img: flutterTheme.textTheme.bodyText2.copyWith(color: primaryTextColor), codeblockDecoration: new BoxDecoration( color: Colors.grey.shade100, borderRadius: new BorderRadius.circular(2.0)), @@ -90,15 +90,15 @@ class OBMarkdown extends StatelessWidget { ), blockSpacing: 10.0, listIndent: 32.0, - blockquotePadding: 10.0, - p: flutterTheme.textTheme.body1 + blockquotePadding: EdgeInsets.all(10.0), + p: flutterTheme.textTheme.bodyText2 .copyWith(color: primaryTextColor, fontSize: pFontSize), a: TextStyle(color: actionsForegroundColor, fontSize: pFontSize), blockquoteDecoration: BoxDecoration( color: accentColor, borderRadius: new BorderRadius.circular(5.0))); - Function onTapLink = (String tappedLink) async { + Function onTapLink = (text, tappedLink, title) async { bool canLaunchUrl = await urlLauncherService.canLaunchUrl(tappedLink); if (canLaunchUrl) { urlLauncherService.launchUrl(tappedLink); diff --git a/lib/widgets/nav_bars/image_nav_bar.dart b/lib/widgets/nav_bars/image_nav_bar.dart index 63fda0665..0f560347d 100644 --- a/lib/widgets/nav_bars/image_nav_bar.dart +++ b/lib/widgets/nav_bars/image_nav_bar.dart @@ -1,8 +1,9 @@ import 'package:Okuna/pages/home/pages/hashtag/widgets/cupertino_nav_bar.dart'; +import 'package:Okuna/widgets/progress_indicator.dart'; import 'package:cached_network_image/cached_network_image.dart'; +import 'package:extended_image/extended_image.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; -import 'package:flutter_advanced_networkimage/provider.dart'; //AutomaticKeepAliveClientMixin /// A coloured navigation bar, used in communities. @@ -34,15 +35,36 @@ class OBImageNavBar extends StatelessWidget right: 0, left: 0, top: 0, - child: Image( - fit: BoxFit.cover, - gaplessPlayback: true, - image: AdvancedNetworkImage(imageSrc, - useDiskCache: true, - fallbackAssetImage: 'assets/images/fallbacks/post-fallback.png', - retryLimit: 3, - timeoutDuration: const Duration(minutes: 1)), - ), + child: ExtendedImage.network( + imageSrc, + fit: BoxFit.cover, + gaplessPlayback: true, + timeLimit: const Duration(minutes: 1), + clearMemoryCacheIfFailed: true, + cache: true, + loadStateChanged: (ExtendedImageState state) { + switch (state.extendedImageLoadState) { + case LoadState.loading: + return OBProgressIndicator(); + break; + case LoadState.completed: + return null; + break; + case LoadState.failed: + return Image.asset( + 'assets/images/fallbacks/post-fallback.png', + fit: BoxFit.cover, + ); + break; + default: + return Image.asset( + 'assets/images/fallbacks/post-fallback.png', + fit: BoxFit.cover, + ); + break; + } + }, + ), ), OBCupertinoNavigationBar( border: null, diff --git a/lib/widgets/post/widgets/post-body/widgets/post_body_media/post_body_media.dart b/lib/widgets/post/widgets/post-body/widgets/post_body_media/post_body_media.dart index c2ed3cb82..28d1830de 100644 --- a/lib/widgets/post/widgets/post-body/widgets/post_body_media/post_body_media.dart +++ b/lib/widgets/post/widgets/post-body/widgets/post_body_media/post_body_media.dart @@ -12,10 +12,9 @@ import 'package:Okuna/widgets/post/widgets/post-body/widgets/post_body_media/wid import 'package:Okuna/widgets/post/widgets/post-body/widgets/post_body_media/widgets/post_body_video.dart'; import 'package:Okuna/widgets/progress_indicator.dart'; import 'package:Okuna/widgets/theming/text.dart'; +import 'package:extended_image/extended_image.dart'; import 'package:flutter/material.dart'; import 'package:async/async.dart'; -import 'package:flutter_advanced_networkimage/provider.dart'; -import 'package:flutter_advanced_networkimage/transition.dart'; class OBPostBodyMedia extends StatefulWidget { final Post post; @@ -127,21 +126,37 @@ class OBPostBodyMediaState extends State { Widget _buildPostMediaItemsThumbnail() { String thumbnailUrl = widget.post.mediaThumbnail; - - return TransitionToImage( - height: _mediaHeight, + return ExtendedImage.network( + thumbnailUrl, width: _mediaWidth, - loadingWidget: const Center( - child: const OBProgressIndicator(), - ), + height: _mediaHeight, fit: BoxFit.cover, alignment: Alignment.center, - image: AdvancedNetworkImage(thumbnailUrl, - useDiskCache: true, - fallbackAssetImage: 'assets/images/fallbacks/post-fallback.png', - retryLimit: 3, - timeoutDuration: const Duration(seconds: 5)), - duration: Duration(milliseconds: 100), + cache: true, + loadStateChanged: (ExtendedImageState state) { + switch (state.extendedImageLoadState) { + case LoadState.loading: + return const Center( + child: const OBProgressIndicator(), + ); + break; + case LoadState.completed: + return null; + break; + case LoadState.failed: + return Image.asset( + 'assets/images/fallbacks/post-fallback.png', + fit: BoxFit.fill, + ); + break; + default: + return Image.asset( + 'assets/images/fallbacks/post-fallback.png', + fit: BoxFit.fill, + ); + break; + } + }, ); } diff --git a/lib/widgets/post/widgets/post-body/widgets/post_body_media/widgets/post_body_image.dart b/lib/widgets/post/widgets/post-body/widgets/post_body_media/widgets/post_body_image.dart index 02ee4807b..eac60adfc 100644 --- a/lib/widgets/post/widgets/post-body/widgets/post_body_media/widgets/post_body_image.dart +++ b/lib/widgets/post/widgets/post-body/widgets/post_body_media/widgets/post_body_image.dart @@ -1,11 +1,8 @@ import 'package:Okuna/models/post_image.dart'; import 'package:Okuna/provider.dart'; import 'package:Okuna/widgets/icon.dart'; -import 'package:Okuna/widgets/progress_indicator.dart'; -import 'package:flutter_advanced_networkimage/provider.dart'; -import 'package:flutter_advanced_networkimage/transition.dart'; +import 'package:extended_image/extended_image.dart'; import 'package:flutter/material.dart'; -import 'dart:math'; class OBPostBodyImage extends StatelessWidget { final PostImage postImage; @@ -46,16 +43,35 @@ class OBPostBodyImage extends StatelessWidget { } Widget _buildImageWidget({String imageUrl, double height, double width}) { - return Image( - height: height, - width: width, - fit: BoxFit.cover, - image: AdvancedNetworkImage(imageUrl, - useDiskCache: true, - fallbackAssetImage: 'assets/images/fallbacks/post-fallback.png', - retryLimit: 3, - timeoutDuration: const Duration(minutes: 1)), - ); + return ExtendedImage.network( + imageUrl, + width: width, + height: height, + cache: true, + timeLimit: const Duration(minutes: 1), + loadStateChanged: (ExtendedImageState state) { + switch (state.extendedImageLoadState) { + case LoadState.loading: + return Center(child: CircularProgressIndicator()); + break; + case LoadState.completed: + return null; + break; + case LoadState.failed: + return Image.asset( + "assets/images/fallbacks/post-fallback.png", + fit: BoxFit.cover, + ); + break; + default: + return Image.asset( + "assets/images/fallbacks/post-fallback.png", + fit: BoxFit.cover, + ); + break; + } + }, + ); } Widget _buildExpandIcon() { diff --git a/lib/widgets/reaction_emoji_count.dart b/lib/widgets/reaction_emoji_count.dart index b9dcb4fdc..19b3aa4c8 100644 --- a/lib/widgets/reaction_emoji_count.dart +++ b/lib/widgets/reaction_emoji_count.dart @@ -1,9 +1,8 @@ import 'package:Okuna/models/reactions_emoji_count.dart'; -import 'package:Okuna/models/theme.dart'; -import 'package:Okuna/provider.dart'; +import 'package:Okuna/widgets/progress_indicator.dart'; import 'package:Okuna/widgets/theming/text.dart'; +import 'package:extended_image/extended_image.dart'; import 'package:flutter/material.dart'; -import 'package:flutter_advanced_networkimage/provider.dart'; import 'buttons/button.dart'; @@ -25,9 +24,20 @@ class OBEmojiReactionButton extends StatelessWidget { var emoji = postReactionsEmojiCount.emoji; List buttonRowItems = [ - Image( + ExtendedImage.network( + emoji.image, + cache: true, height: size == OBEmojiReactionButtonSize.medium ? 18 : 14, - image: AdvancedNetworkImage(emoji.image, useDiskCache: true), + loadStateChanged: (ExtendedImageState state) { + switch (state.extendedImageLoadState) { + case LoadState.loading: + return OBProgressIndicator(); + break; + default: + return null; + break; + } + }, ), const SizedBox( width: 10.0, diff --git a/lib/widgets/tiles/community_tile.dart b/lib/widgets/tiles/community_tile.dart index 16317940b..75e41a859 100644 --- a/lib/widgets/tiles/community_tile.dart +++ b/lib/widgets/tiles/community_tile.dart @@ -6,9 +6,10 @@ import 'package:Okuna/services/theme.dart'; import 'package:Okuna/services/theme_value_parser.dart'; import 'package:Okuna/widgets/avatars/letter_avatar.dart'; import 'package:Okuna/widgets/avatars/avatar.dart'; +import 'package:Okuna/widgets/progress_indicator.dart'; +import 'package:extended_image/extended_image.dart'; import 'package:flutter/material.dart'; import 'package:Okuna/libs/pretty_count.dart'; -import 'package:flutter_advanced_networkimage/provider.dart'; import 'package:flutter_slidable/flutter_slidable.dart'; import 'package:tinycolor/tinycolor.dart'; @@ -59,10 +60,36 @@ class OBCommunityTile extends StatelessWidget { fit: BoxFit.cover, colorFilter: new ColorFilter.mode( Colors.black.withOpacity(0.60), BlendMode.darken), - image: AdvancedNetworkImage(community.cover, - useDiskCache: true, - fallbackAssetImage: COVER_PLACEHOLDER, - retryLimit: 0))); + image: ExtendedImage.network( + community.cover, + cache: true, + timeLimit: const Duration(seconds: 5), + loadStateChanged: (ExtendedImageState state) { + switch (state.extendedImageLoadState) { + case LoadState.loading: + return Center( + child: const OBProgressIndicator(), + ); + break; + case LoadState.completed: + return null; + break; + case LoadState.failed: + return Image.asset( + COVER_PLACEHOLDER, + fit: BoxFit.cover, + ); + break; + default: + return Image.asset( + COVER_PLACEHOLDER, + fit: BoxFit.cover, + ); + break; + } + }, + ).image + )); } else { textColor = isCommunityColorDark ? Colors.white : Colors.black; bool communityColorIsNearWhite = communityColor.computeLuminance() > 0.9; diff --git a/lib/widgets/tiles/notification_tile/notification_tile_post_media_preview.dart b/lib/widgets/tiles/notification_tile/notification_tile_post_media_preview.dart index 2396b5489..31d83acd9 100644 --- a/lib/widgets/tiles/notification_tile/notification_tile_post_media_preview.dart +++ b/lib/widgets/tiles/notification_tile/notification_tile_post_media_preview.dart @@ -1,32 +1,54 @@ import 'package:Okuna/models/post.dart'; +import 'package:extended_image/extended_image.dart'; import 'package:flutter/material.dart'; -import 'package:flutter_advanced_networkimage/provider.dart'; -import 'package:flutter_advanced_networkimage/transition.dart'; + +import '../../progress_indicator.dart'; class OBNotificationTilePostMediaPreview extends StatelessWidget { static final double postMediaPreviewSize = 40; final Post post; - const OBNotificationTilePostMediaPreview({Key key, @required this.post}) : super(key: key); + const OBNotificationTilePostMediaPreview({Key key, @required this.post}) + : super(key: key); @override Widget build(BuildContext context) { return ClipRRect( borderRadius: BorderRadius.circular(8.0), child: SizedBox( - height: postMediaPreviewSize, - width: postMediaPreviewSize, - child: TransitionToImage( - loadingWidget: const SizedBox(), - fit: BoxFit.cover, - alignment: Alignment.center, - image: AdvancedNetworkImage(post.mediaThumbnail, - useDiskCache: true, - fallbackAssetImage: 'assets/images/fallbacks/post-fallback.png', - retryLimit: 3, - timeoutDuration: const Duration(seconds: 5)), - duration: Duration(milliseconds: 300), - ), - )); + height: postMediaPreviewSize, + width: postMediaPreviewSize, + child: ExtendedImage.network( + post.mediaThumbnail, + fit: BoxFit.cover, + alignment: Alignment.center, + cache: true, + timeLimit: const Duration(seconds: 5), + loadStateChanged: (ExtendedImageState state) { + switch (state.extendedImageLoadState) { + case LoadState.loading: + return Center( + child: const OBProgressIndicator(), + ); + break; + case LoadState.completed: + return null; + break; + case LoadState.failed: + return Image.asset( + 'assets/images/fallbacks/post-fallback.png', + fit: BoxFit.cover, + ); + break; + default: + return Image.asset( + 'assets/images/fallbacks/post-fallback.png', + fit: BoxFit.cover, + ); + break; + } + }, + ) + )); } } diff --git a/lib/widgets/video_player/video_player.dart b/lib/widgets/video_player/video_player.dart index 237b84ef3..e9f23bfb9 100644 --- a/lib/widgets/video_player/video_player.dart +++ b/lib/widgets/video_player/video_player.dart @@ -1,6 +1,7 @@ import 'dart:async'; import 'dart:io'; import 'dart:math'; +import 'package:extended_image/extended_image.dart'; import 'package:retry/retry.dart'; import 'package:Okuna/provider.dart'; import 'package:Okuna/services/user_preferences.dart'; @@ -8,7 +9,6 @@ import 'package:Okuna/widgets/video_player/widgets/chewie/chewie_player.dart'; import 'package:Okuna/widgets/video_player/widgets/video_player_controls.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; -import 'package:flutter_advanced_networkimage/provider.dart'; import 'package:video_player/video_player.dart'; import 'package:visibility_detector/visibility_detector.dart'; @@ -233,8 +233,10 @@ class OBVideoPlayerState extends State { decoration: BoxDecoration( image: DecorationImage( fit: BoxFit.cover, - image: AdvancedNetworkImage(widget.thumbnailUrl, - useDiskCache: true), + image: ExtendedNetworkImageProvider( + widget.thumbnailUrl, + cache: true, + ), )), ) : const SizedBox(), diff --git a/pubspec.lock b/pubspec.lock index e9e1d04ab..fd3c2389e 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -1,55 +1,41 @@ # Generated by pub # See https://dart.dev/tools/pub/glossary#lockfile packages: - _fe_analyzer_shared: - dependency: transitive - description: - name: _fe_analyzer_shared - url: "https://pub.dartlang.org" - source: hosted - version: "7.0.0" - analyzer: - dependency: transitive - description: - name: analyzer - url: "https://pub.dartlang.org" - source: hosted - version: "0.39.17" archive: dependency: transitive description: name: archive url: "https://pub.dartlang.org" source: hosted - version: "2.0.13" + version: "3.1.2" args: dependency: transitive description: name: args url: "https://pub.dartlang.org" source: hosted - version: "1.6.0" + version: "2.0.0" async: dependency: transitive description: name: async url: "https://pub.dartlang.org" source: hosted - version: "2.5.0-nullsafety.1" + version: "2.6.1" back_button_interceptor: dependency: "direct main" description: name: back_button_interceptor url: "https://pub.dartlang.org" source: hosted - version: "4.4.0" + version: "5.0.0" boolean_selector: dependency: transitive description: name: boolean_selector url: "https://pub.dartlang.org" source: hosted - version: "2.1.0-nullsafety.1" + version: "2.1.0" cached_network_image: dependency: "direct main" description: @@ -63,105 +49,84 @@ packages: name: characters url: "https://pub.dartlang.org" source: hosted - version: "1.1.0-nullsafety.3" + version: "1.1.0" charcode: dependency: transitive description: name: charcode url: "https://pub.dartlang.org" source: hosted - version: "1.2.0-nullsafety.1" - cli_util: - dependency: transitive - description: - name: cli_util - url: "https://pub.dartlang.org" - source: hosted - version: "0.2.0" + version: "1.2.0" clock: dependency: transitive description: name: clock url: "https://pub.dartlang.org" source: hosted - version: "1.1.0-nullsafety.1" + version: "1.1.0" collection: dependency: transitive description: name: collection url: "https://pub.dartlang.org" source: hosted - version: "1.15.0-nullsafety.3" + version: "1.15.0" connectivity: dependency: "direct main" description: name: connectivity url: "https://pub.dartlang.org" source: hosted - version: "0.4.9+5" + version: "3.0.6" connectivity_for_web: dependency: transitive description: name: connectivity_for_web url: "https://pub.dartlang.org" source: hosted - version: "0.3.1+2" + version: "0.4.0" connectivity_macos: dependency: transitive description: name: connectivity_macos url: "https://pub.dartlang.org" source: hosted - version: "0.1.0+5" + version: "0.2.0" connectivity_platform_interface: dependency: transitive description: name: connectivity_platform_interface url: "https://pub.dartlang.org" source: hosted - version: "1.0.6" + version: "2.0.0" convert: dependency: transitive description: name: convert url: "https://pub.dartlang.org" source: hosted - version: "2.1.1" - coverage: - dependency: transitive - description: - name: coverage - url: "https://pub.dartlang.org" - source: hosted - version: "0.14.1" + version: "3.0.0" crypto: dependency: transitive description: name: crypto url: "https://pub.dartlang.org" source: hosted - version: "2.1.5" + version: "3.0.1" csslib: dependency: transitive description: name: csslib url: "https://pub.dartlang.org" source: hosted - version: "0.16.2" + version: "0.17.0" cupertino_icons: dependency: "direct main" description: name: cupertino_icons url: "https://pub.dartlang.org" source: hosted - version: "0.1.3" - dart_style: - dependency: transitive - description: - name: dart_style - url: "https://pub.dartlang.org" - source: hosted - version: "1.3.6" + version: "1.0.3" dcache: dependency: "direct main" description: @@ -175,70 +140,75 @@ packages: name: device_info url: "https://pub.dartlang.org" source: hosted - version: "0.4.2+9" + version: "2.0.2" device_info_platform_interface: dependency: transitive description: name: device_info_platform_interface url: "https://pub.dartlang.org" source: hosted - version: "1.0.1" + version: "2.0.0" exif: dependency: "direct main" description: name: exif url: "https://pub.dartlang.org" source: hosted - version: "1.0.3" + version: "2.2.0" expandable: dependency: "direct main" description: name: expandable url: "https://pub.dartlang.org" source: hosted - version: "4.1.4" + version: "5.0.1" + extended_image: + dependency: "direct main" + description: + name: extended_image + url: "https://pub.dartlang.org" + source: hosted + version: "4.1.0" + extended_image_library: + dependency: transitive + description: + name: extended_image_library + url: "https://pub.dartlang.org" + source: hosted + version: "3.1.0" fake_async: dependency: transitive description: name: fake_async url: "https://pub.dartlang.org" source: hosted - version: "1.2.0-nullsafety.1" + version: "1.2.0" ffi: dependency: transitive description: name: ffi url: "https://pub.dartlang.org" source: hosted - version: "0.1.3" + version: "1.1.1" file: dependency: transitive description: name: file url: "https://pub.dartlang.org" source: hosted - version: "5.2.1" + version: "6.1.1" file_picker: dependency: "direct main" description: name: file_picker url: "https://pub.dartlang.org" source: hosted - version: "2.1.5+1" + version: "3.0.2+2" flutter: dependency: "direct main" description: flutter source: sdk version: "0.0.0" - flutter_advanced_networkimage: - dependency: "direct main" - description: - path: "." - ref: "bugfix/fix-breaking-master-change" - resolved-ref: "536fb1408d0983de0e5f9905f34cb74ab0ab3674" - url: "https://github.com/OkunaOrg/flutter_advanced_networkimage.git" - source: git - version: "0.6.0" flutter_blurhash: dependency: transitive description: @@ -252,7 +222,7 @@ packages: name: flutter_cache_manager url: "https://pub.dartlang.org" source: hosted - version: "1.4.2" + version: "2.1.2" flutter_colorpicker: dependency: "direct main" description: @@ -266,21 +236,21 @@ packages: name: flutter_ffmpeg url: "https://pub.dartlang.org" source: hosted - version: "0.3.0" + version: "0.4.0" flutter_image_compress: dependency: "direct main" description: name: flutter_image_compress url: "https://pub.dartlang.org" source: hosted - version: "0.7.0" + version: "1.0.0" flutter_launcher_icons: dependency: "direct dev" description: name: flutter_launcher_icons url: "https://pub.dartlang.org" source: hosted - version: "0.7.5" + version: "0.9.0" flutter_localizations: dependency: "direct main" description: flutter @@ -292,42 +262,42 @@ packages: name: flutter_markdown url: "https://pub.dartlang.org" source: hosted - version: "0.2.0" + version: "0.6.2" flutter_pagewise: dependency: "direct main" description: name: flutter_pagewise url: "https://pub.dartlang.org" source: hosted - version: "1.2.3" + version: "2.0.1" flutter_plugin_android_lifecycle: dependency: transitive description: name: flutter_plugin_android_lifecycle url: "https://pub.dartlang.org" source: hosted - version: "1.0.11" + version: "2.0.2" flutter_secure_storage: dependency: "direct main" description: name: flutter_secure_storage url: "https://pub.dartlang.org" source: hosted - version: "3.3.5" + version: "4.2.0" flutter_slidable: dependency: "direct main" description: name: flutter_slidable url: "https://pub.dartlang.org" source: hosted - version: "0.5.7" + version: "0.6.0" flutter_svg: dependency: "direct main" description: name: flutter_svg url: "https://pub.dartlang.org" source: hosted - version: "0.18.0" + version: "0.22.0" flutter_test: dependency: "direct dev" description: flutter @@ -338,55 +308,48 @@ packages: description: flutter source: sdk version: "0.0.0" - glob: - dependency: transitive - description: - name: glob - url: "https://pub.dartlang.org" - source: hosted - version: "1.2.0" html: dependency: "direct main" description: name: html url: "https://pub.dartlang.org" source: hosted - version: "0.14.0+4" + version: "0.15.0" http: dependency: "direct main" description: name: http url: "https://pub.dartlang.org" source: hosted - version: "0.12.2" - http_multi_server: + version: "0.13.3" + http_client_helper: dependency: transitive description: - name: http_multi_server + name: http_client_helper url: "https://pub.dartlang.org" source: hosted - version: "2.2.0" + version: "2.0.2" http_parser: dependency: transitive description: name: http_parser url: "https://pub.dartlang.org" source: hosted - version: "3.1.4" + version: "4.0.0" http_retry: dependency: "direct main" description: name: http_retry url: "https://pub.dartlang.org" source: hosted - version: "0.1.1+3" + version: "0.2.0" image: dependency: transitive description: name: image url: "https://pub.dartlang.org" source: hosted - version: "2.1.18" + version: "3.0.2" image_cropper: dependency: "direct main" description: @@ -400,35 +363,35 @@ packages: name: image_picker url: "https://pub.dartlang.org" source: hosted - version: "0.6.7+21" + version: "0.8.0" + image_picker_for_web: + dependency: transitive + description: + name: image_picker_for_web + url: "https://pub.dartlang.org" + source: hosted + version: "2.0.0" image_picker_platform_interface: dependency: transitive description: name: image_picker_platform_interface url: "https://pub.dartlang.org" source: hosted - version: "1.1.1" + version: "2.1.0" intercom_flutter: dependency: "direct main" description: name: intercom_flutter url: "https://pub.dartlang.org" source: hosted - version: "2.3.3" + version: "3.1.0" intl: dependency: transitive description: name: intl url: "https://pub.dartlang.org" source: hosted - version: "0.16.1" - intl_translation: - dependency: "direct dev" - description: - name: intl_translation - url: "https://pub.dartlang.org" - source: hosted - version: "0.17.10+1" + version: "0.17.0" inview_notifier_list: dependency: "direct main" description: @@ -438,76 +401,41 @@ packages: url: "https://github.com/OkunaOrg/inview_notifier_list.git" source: git version: "1.0.0" - io: - dependency: transitive - description: - name: io - url: "https://pub.dartlang.org" - source: hosted - version: "0.3.4" js: dependency: transitive description: name: js url: "https://pub.dartlang.org" source: hosted - version: "0.6.3-nullsafety.2" - logging: - dependency: transitive - description: - name: logging - url: "https://pub.dartlang.org" - source: hosted - version: "0.11.4" + version: "0.6.3" markdown: dependency: transitive description: name: markdown url: "https://pub.dartlang.org" source: hosted - version: "2.1.8" + version: "4.0.0" matcher: dependency: transitive description: name: matcher url: "https://pub.dartlang.org" source: hosted - version: "0.12.10-nullsafety.1" + version: "0.12.10" meta: dependency: transitive description: name: meta url: "https://pub.dartlang.org" source: hosted - version: "1.3.0-nullsafety.3" + version: "1.3.0" mime: dependency: "direct main" description: name: mime url: "https://pub.dartlang.org" source: hosted - version: "0.9.7" - node_interop: - dependency: transitive - description: - name: node_interop - url: "https://pub.dartlang.org" - source: hosted - version: "1.1.1" - node_io: - dependency: transitive - description: - name: node_io - url: "https://pub.dartlang.org" - source: hosted - version: "1.1.1" - node_preamble: - dependency: transitive - description: - name: node_preamble - url: "https://pub.dartlang.org" - source: hosted - version: "1.4.12" + version: "1.0.0" octo_image: dependency: transitive description: @@ -529,13 +457,6 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "0.3.0" - package_config: - dependency: transitive - description: - name: package_config - url: "https://pub.dartlang.org" - source: hosted - version: "1.9.3" package_info: dependency: "direct main" description: @@ -543,83 +464,125 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "0.4.3" + package_info_plus: + dependency: transitive + description: + name: package_info_plus + url: "https://pub.dartlang.org" + source: hosted + version: "1.0.1" + package_info_plus_linux: + dependency: transitive + description: + name: package_info_plus_linux + url: "https://pub.dartlang.org" + source: hosted + version: "1.0.2" + package_info_plus_macos: + dependency: transitive + description: + name: package_info_plus_macos + url: "https://pub.dartlang.org" + source: hosted + version: "1.1.1" + package_info_plus_platform_interface: + dependency: transitive + description: + name: package_info_plus_platform_interface + url: "https://pub.dartlang.org" + source: hosted + version: "1.0.1" + package_info_plus_web: + dependency: transitive + description: + name: package_info_plus_web + url: "https://pub.dartlang.org" + source: hosted + version: "1.0.1" + package_info_plus_windows: + dependency: transitive + description: + name: package_info_plus_windows + url: "https://pub.dartlang.org" + source: hosted + version: "1.0.1" path: dependency: "direct main" description: name: path url: "https://pub.dartlang.org" source: hosted - version: "1.8.0-nullsafety.1" + version: "1.8.0" path_drawing: dependency: transitive description: name: path_drawing url: "https://pub.dartlang.org" source: hosted - version: "0.4.1+1" + version: "0.5.1" path_parsing: dependency: transitive description: name: path_parsing url: "https://pub.dartlang.org" source: hosted - version: "0.1.4" + version: "0.2.1" path_provider: dependency: transitive description: name: path_provider url: "https://pub.dartlang.org" source: hosted - version: "1.6.22" + version: "2.0.2" path_provider_linux: dependency: transitive description: name: path_provider_linux url: "https://pub.dartlang.org" source: hosted - version: "0.0.1+2" + version: "2.0.0" path_provider_macos: dependency: transitive description: name: path_provider_macos url: "https://pub.dartlang.org" source: hosted - version: "0.0.4+4" + version: "2.0.0" path_provider_platform_interface: dependency: transitive description: name: path_provider_platform_interface url: "https://pub.dartlang.org" source: hosted - version: "1.0.3" + version: "2.0.1" path_provider_windows: dependency: transitive description: name: path_provider_windows url: "https://pub.dartlang.org" source: hosted - version: "0.0.4+1" + version: "2.0.1" pedantic: dependency: transitive description: name: pedantic url: "https://pub.dartlang.org" source: hosted - version: "1.10.0-nullsafety.2" + version: "1.11.0" petitparser: dependency: transitive description: name: petitparser url: "https://pub.dartlang.org" source: hosted - version: "3.1.0" + version: "4.1.0" photo_view: dependency: "direct main" description: name: photo_view url: "https://pub.dartlang.org" source: hosted - version: "0.9.2" + version: "0.11.1" pigment: dependency: "direct main" description: @@ -633,49 +596,35 @@ packages: name: platform url: "https://pub.dartlang.org" source: hosted - version: "2.2.1" + version: "3.0.0" plugin_platform_interface: dependency: transitive description: name: plugin_platform_interface url: "https://pub.dartlang.org" source: hosted - version: "1.0.3" - pool: - dependency: transitive - description: - name: pool - url: "https://pub.dartlang.org" - source: hosted - version: "1.5.0-nullsafety.2" + version: "2.0.0" process: dependency: transitive description: name: process url: "https://pub.dartlang.org" source: hosted - version: "3.0.13" - pub_semver: - dependency: transitive - description: - name: pub_semver - url: "https://pub.dartlang.org" - source: hosted - version: "1.4.4" + version: "4.2.1" public_suffix: dependency: "direct main" description: name: public_suffix url: "https://pub.dartlang.org" source: hosted - version: "1.2.1" + version: "3.0.0" punycode: dependency: transitive description: name: punycode url: "https://pub.dartlang.org" source: hosted - version: "0.1.0" + version: "1.0.0" retry: dependency: "direct main" description: @@ -689,7 +638,7 @@ packages: name: rxdart url: "https://pub.dartlang.org" source: hosted - version: "0.24.1" + version: "0.25.0" screen: dependency: "direct main" description: @@ -703,35 +652,28 @@ packages: name: sentry url: "https://pub.dartlang.org" source: hosted - version: "4.0.3" + version: "5.0.0" sentry_flutter: dependency: "direct main" description: name: sentry_flutter url: "https://pub.dartlang.org" source: hosted - version: "4.0.3" + version: "5.0.0" share: dependency: "direct main" description: name: share url: "https://pub.dartlang.org" source: hosted - version: "0.6.5+4" + version: "2.0.4" shared_preferences: dependency: "direct main" description: name: shared_preferences url: "https://pub.dartlang.org" source: hosted - version: "0.5.12+2" - shared_preferences_linux: - dependency: transitive - description: - name: shared_preferences_linux - url: "https://pub.dartlang.org" - source: hosted - version: "0.0.2+2" + version: "0.5.7+3" shared_preferences_macos: dependency: transitive description: @@ -753,81 +695,32 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "0.1.2+7" - shared_preferences_windows: - dependency: transitive - description: - name: shared_preferences_windows - url: "https://pub.dartlang.org" - source: hosted - version: "0.0.1+1" - shelf: - dependency: transitive - description: - name: shelf - url: "https://pub.dartlang.org" - source: hosted - version: "0.7.9" - shelf_packages_handler: - dependency: transitive - description: - name: shelf_packages_handler - url: "https://pub.dartlang.org" - source: hosted - version: "2.0.0" - shelf_static: - dependency: transitive - description: - name: shelf_static - url: "https://pub.dartlang.org" - source: hosted - version: "0.2.8" - shelf_web_socket: - dependency: transitive - description: - name: shelf_web_socket - url: "https://pub.dartlang.org" - source: hosted - version: "0.2.3" shimmer: dependency: "direct main" description: name: shimmer url: "https://pub.dartlang.org" source: hosted - version: "1.1.2" + version: "2.0.0" sky_engine: dependency: transitive description: flutter source: sdk version: "0.0.99" - source_map_stack_trace: - dependency: transitive - description: - name: source_map_stack_trace - url: "https://pub.dartlang.org" - source: hosted - version: "2.1.0-nullsafety.3" - source_maps: - dependency: transitive - description: - name: source_maps - url: "https://pub.dartlang.org" - source: hosted - version: "0.10.10-nullsafety.2" source_span: dependency: transitive description: name: source_span url: "https://pub.dartlang.org" source: hosted - version: "1.8.0-nullsafety.2" + version: "1.8.1" sprintf: dependency: "direct main" description: name: sprintf url: "https://pub.dartlang.org" source: hosted - version: "4.1.0" + version: "6.0.0" sqflite: dependency: transitive description: @@ -848,14 +741,14 @@ packages: name: stack_trace url: "https://pub.dartlang.org" source: hosted - version: "1.10.0-nullsafety.1" + version: "1.10.0" stream_channel: dependency: transitive description: name: stream_channel url: "https://pub.dartlang.org" source: hosted - version: "2.1.0-nullsafety.1" + version: "2.1.0" stream_transform: dependency: transitive description: @@ -869,7 +762,7 @@ packages: name: string_scanner url: "https://pub.dartlang.org" source: hosted - version: "1.1.0-nullsafety.1" + version: "1.1.0" synchronized: dependency: transitive description: @@ -883,42 +776,28 @@ packages: name: term_glyph url: "https://pub.dartlang.org" source: hosted - version: "1.2.0-nullsafety.1" - test: - dependency: transitive - description: - name: test - url: "https://pub.dartlang.org" - source: hosted - version: "1.16.0-nullsafety.5" + version: "1.2.0" test_api: dependency: transitive description: name: test_api url: "https://pub.dartlang.org" source: hosted - version: "0.2.19-nullsafety.2" - test_core: - dependency: transitive - description: - name: test_core - url: "https://pub.dartlang.org" - source: hosted - version: "0.3.12-nullsafety.5" + version: "0.3.0" throttling: dependency: "direct main" description: name: throttling url: "https://pub.dartlang.org" source: hosted - version: "0.8.0" + version: "1.0.0" timeago: dependency: "direct main" description: name: timeago url: "https://pub.dartlang.org" source: hosted - version: "2.0.28" + version: "3.0.2" tinycolor: dependency: "direct main" description: @@ -932,77 +811,77 @@ packages: name: typed_data url: "https://pub.dartlang.org" source: hosted - version: "1.3.0-nullsafety.3" + version: "1.3.0" uni_links: dependency: "direct main" description: name: uni_links url: "https://pub.dartlang.org" source: hosted - version: "0.2.0" + version: "0.4.0" url_launcher: dependency: "direct main" description: name: url_launcher url: "https://pub.dartlang.org" source: hosted - version: "5.7.10" + version: "6.0.5" url_launcher_linux: dependency: transitive description: name: url_launcher_linux url: "https://pub.dartlang.org" source: hosted - version: "0.0.1+4" + version: "2.0.0" url_launcher_macos: dependency: transitive description: name: url_launcher_macos url: "https://pub.dartlang.org" source: hosted - version: "0.0.1+9" + version: "2.0.0" url_launcher_platform_interface: dependency: transitive description: name: url_launcher_platform_interface url: "https://pub.dartlang.org" source: hosted - version: "1.0.9" + version: "2.0.1" url_launcher_web: dependency: transitive description: name: url_launcher_web url: "https://pub.dartlang.org" source: hosted - version: "0.1.5+1" + version: "2.0.1" url_launcher_windows: dependency: transitive description: name: url_launcher_windows url: "https://pub.dartlang.org" source: hosted - version: "0.0.1+3" + version: "2.0.0" uuid: dependency: "direct main" description: name: uuid url: "https://pub.dartlang.org" source: hosted - version: "2.2.2" + version: "3.0.4" validators: dependency: "direct main" description: name: validators url: "https://pub.dartlang.org" source: hosted - version: "1.0.0+1" + version: "3.0.0" vector_math: dependency: transitive description: name: vector_math url: "https://pub.dartlang.org" source: hosted - version: "2.1.0-nullsafety.3" + version: "2.1.0" video_player: dependency: "direct main" description: @@ -1018,77 +897,77 @@ packages: name: video_thumbnail url: "https://pub.dartlang.org" source: hosted - version: "0.2.5+1" + version: "0.3.3" visibility_detector: dependency: "direct main" description: name: visibility_detector url: "https://pub.dartlang.org" source: hosted - version: "0.1.5" - vm_service: - dependency: transitive - description: - name: vm_service - url: "https://pub.dartlang.org" - source: hosted - version: "5.3.1" + version: "0.2.0" wakelock: dependency: "direct main" description: name: wakelock url: "https://pub.dartlang.org" source: hosted - version: "0.1.4+2" - watcher: + version: "0.5.2" + wakelock_macos: dependency: transitive description: - name: watcher + name: wakelock_macos url: "https://pub.dartlang.org" source: hosted - version: "0.9.7+15" - web_socket_channel: + version: "0.1.0+1" + wakelock_platform_interface: dependency: transitive description: - name: web_socket_channel + name: wakelock_platform_interface url: "https://pub.dartlang.org" source: hosted - version: "1.1.0" - webkit_inspection_protocol: + version: "0.2.1+1" + wakelock_web: dependency: transitive description: - name: webkit_inspection_protocol + name: wakelock_web url: "https://pub.dartlang.org" source: hosted - version: "0.7.3" + version: "0.2.0+1" + wakelock_windows: + dependency: transitive + description: + name: wakelock_windows + url: "https://pub.dartlang.org" + source: hosted + version: "0.1.0" win32: dependency: transitive description: name: win32 url: "https://pub.dartlang.org" source: hosted - version: "1.7.3" + version: "2.1.3" xdg_directories: dependency: transitive description: name: xdg_directories url: "https://pub.dartlang.org" source: hosted - version: "0.1.2" + version: "0.2.0" xml: dependency: transitive description: name: xml url: "https://pub.dartlang.org" source: hosted - version: "4.5.1" + version: "5.1.1" yaml: dependency: transitive description: name: yaml url: "https://pub.dartlang.org" source: hosted - version: "2.2.1" + version: "3.1.0" sdks: - dart: ">=2.10.2 <2.11.0" - flutter: ">=1.22.2 <2.0.0" + dart: ">=2.13.0 <3.0.0" + flutter: ">=2.0.0" diff --git a/pubspec.yaml b/pubspec.yaml index 9b03f848e..e493c20d6 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -15,66 +15,63 @@ environment: publish_to: none dependencies: - exif: ^1.0.2 - html: ^0.14.0+2 - expandable: ^4.1.4 - uuid: ^2.0.1 - flutter_image_compress: ^0.7.0 + exif: ^2.2.0 + html: ^0.15.0 + expandable: ^5.0.1 + uuid: ^3.0.4 + flutter_image_compress: ^1.0.0 inview_notifier_list: git: url: https://github.com/OkunaOrg/inview_notifier_list.git ref: d60972d4928463352781e027f20bd5eca0007cd9 - connectivity: ^0.4.4 - visibility_detector: ^0.1.5 - http_retry: ^0.1.1+3 - video_thumbnail: ^0.2.5+1 - flutter_ffmpeg: ^0.3.0 + connectivity: ^3.0.6 + visibility_detector: ^0.2.0 + http_retry: ^0.2.0 + video_thumbnail: ^0.3.3 + flutter_ffmpeg: ^0.4.0 open_iconic_flutter: ^0.3.0 retry: ^3.0.0+1 shared_preferences: ^0.5.2 - flutter_markdown: ^0.2.0 - file_picker: ^2.1.5+1 - sentry_flutter: ^4.0.1 + flutter_markdown: ^0.6.2 + file_picker: ^3.0.2+2 + sentry_flutter: ^5.0.0 screen: ^0.0.5 - back_button_interceptor: ^4.0.1 + back_button_interceptor: ^5.0.0 flutter_colorpicker: any - intercom_flutter: ^2.3.3 - device_info: ^0.4.0+1 - flutter_pagewise: ^1.2.2 + intercom_flutter: ^3.1.0 + device_info: ^2.0.2 + flutter_pagewise: ^2.0.1 tinycolor: ^1.0.2 onesignal_flutter: ^2.6.2 - flutter_advanced_networkimage: - git: - url: https://github.com/OkunaOrg/flutter_advanced_networkimage.git - ref: bugfix/fix-breaking-master-change + extended_image: ^4.0.0 dcache: ^0.1.0 - validators: ^1.0.0+1 - url_launcher: ^5.7.10 - uni_links: ^0.2.0 - flutter_slidable: "^0.5.7" - flutter_cache_manager: ^1.4.1 + validators: ^3.0.0 + url_launcher: ^6.0.5 + uni_links: ^0.4.0 + flutter_slidable: ^0.6.0 + flutter_cache_manager: ^2.1.2 cached_network_image: ^2.2.0+1 - timeago: ^2.0.9 - public_suffix: ^1.2.0 + timeago: ^3.0.2 + public_suffix: ^3.0.0 pigment: ^1.0.3 - photo_view: ^0.9.2 - flutter_svg: 0.18.0 - flutter_secure_storage: ^3.1.2 - mime: ^0.9.6+2 - http: ^0.12.0 - throttling: ^0.8.0 - wakelock: ^0.1.3 - rxdart: ^0.24.1 + photo_view: ^0.11.1 + flutter_svg: ^0.22.0 + flutter_secure_storage: ^4.2.0 + mime: ^1.0.0 + http: ^0.13.3 + throttling: ^1.0.0 + wakelock: ^0.5.2 + rxdart: ^0.25.0 video_player: git: url: https://github.com/OkunaOrg/plugins.git ref: ricardo/develop2 path: packages/video_player - sprintf: "^4.0.0" - image_picker: 0.6.7+21 + sprintf: ^6.0.0 + image_picker: ^0.8.0 image_cropper: ^1.3.1 - shimmer: ^1.0.0 - share: ^0.6.4 + shimmer: ^2.0.0 + share: ^2.0.4 path: ^1.7.0 package_info: ^0.4.0 flutter: @@ -84,13 +81,13 @@ dependencies: # The following adds the Cupertino Icons font to your application. # Use with the CupertinoIcons class for iOS style icons. - cupertino_icons: ^0.1.2 + cupertino_icons: ^1.0.3 dev_dependencies: flutter_test: sdk: flutter - flutter_launcher_icons: ^0.7.0 - intl_translation: ^0.17.10+1 + flutter_launcher_icons: ^0.9.0 + # intl_translation: ^0.17.10+1 flutter_icons: android: true