-
Notifications
You must be signed in to change notification settings - Fork 68
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #34 from dshukertjr/feat/default-videos-on-search-tab
Display some contents on search tab before user starts searching
- Loading branch information
Showing
13 changed files
with
349 additions
and
202 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
- You can upload videos on your device now | ||
- Maps now have labels | ||
- Search tab now displays the recently posted videos | ||
- Video will display the location on lower left corner |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
import 'package:flutter/material.dart'; | ||
import 'package:spot/app/constants.dart'; | ||
import 'package:spot/models/video.dart'; | ||
import 'package:spot/pages/view_video_page.dart'; | ||
|
||
class VideoList extends StatelessWidget { | ||
const VideoList({ | ||
Key? key, | ||
required this.videos, | ||
}) : super(key: key); | ||
|
||
final List<Video> videos; | ||
|
||
@override | ||
Widget build(BuildContext context) { | ||
return Material( | ||
color: Colors.transparent, | ||
child: Wrap( | ||
alignment: WrapAlignment.spaceBetween, | ||
children: List.generate(videos.length, (index) { | ||
final video = videos[index]; | ||
return SizedBox( | ||
width: MediaQuery.of(context).size.width / 3, | ||
child: AspectRatio( | ||
aspectRatio: 1, | ||
child: GestureDetector( | ||
onTap: () { | ||
Navigator.of(context).push(ViewVideoPage.route(video.id)); | ||
}, | ||
child: Image.network( | ||
video.thumbnailUrl, | ||
fit: BoxFit.cover, | ||
loadingBuilder: (context, child, loadingProgress) { | ||
if (loadingProgress == null) { | ||
return child; | ||
} | ||
return preloader; | ||
}, | ||
), | ||
), | ||
), | ||
); | ||
}), | ||
), | ||
); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.