Skip to content

Commit

Permalink
Added A loader in Sample app
Browse files Browse the repository at this point in the history
  • Loading branch information
umareko committed Mar 19, 2024
1 parent 8f92648 commit 61d3097
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 8 deletions.
2 changes: 2 additions & 0 deletions android/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
<application
android:label="sample_app"
android:name="${applicationName}"
android:hardwareAccelerated="false"
android:largeHeap="true"
android:requestLegacyExternalStorage="true"
android:icon="@mipmap/ic_launcher">
<activity
Expand Down
24 changes: 17 additions & 7 deletions lib/core/widget/story_widget.dart
Original file line number Diff line number Diff line change
Expand Up @@ -234,11 +234,11 @@ class StoryContentWidget extends StatelessWidget {
return Column(
children: [
SelectableText(
'Thumbnail -> ${data.thumbnail.fileUrl ?? 'No Thumbnail'}',
),
'Thumbnail -> ${data.thumbnail.fileUrl ?? 'No Thumbnail'}',
),
SelectableText(
'Video Resolutions -> ${data.video.getResolutions() ?? 'No Resolution'}',
),
'Video Resolutions -> ${data.video.getResolutions() ?? 'No Resolution'}',
),
(data.video.hasLocalPreview != null)
? (data.video.hasLocalPreview!)
? SizedBox(
Expand Down Expand Up @@ -370,8 +370,18 @@ class _MiniVideoPlayerState extends State<MiniVideoPlayer> {

@override
Widget build(BuildContext context) {
return Chewie(
controller: chewieController,
);
return chewieController != null &&
chewieController!.videoPlayerController.value.isInitialized
? Chewie(
controller: chewieController!,
)
: const Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
CircularProgressIndicator(),
SizedBox(height: 20),
Text('Loading'),
],
);
}
}
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: flutter_social_sample_app
description: Demonstrates how to use the flutter_application_1 plugin.
version: 1.1.23+38
version: 1.1.24+39

environment:
sdk: ">=3.0.0 <4.0.0"
Expand Down

0 comments on commit 61d3097

Please sign in to comment.