OpenMediacenterMobileFlutter/lib/video_feed.dart

30 lines
69 KiB
Dart
Raw Normal View History

2021-12-10 10:40:20 +00:00
import 'package:flutter/material.dart';
import 'package:flutter/rendering.dart';
import 'preview_tile.dart';
class VideoFeed extends StatelessWidget {
VideoFeed({Key? key}) : super(key: key);
static const String testprev =
"/9j/4AAQSkZJRgABAQAAAQABAAD/2wCEAAYGBgYGBgcICAcKCgkKCg4NDAwNDhUPEA8QDxUgFBgUFBgUIB0jHBocIx0zKCQkKDM7Mi8yO0hAQEhaVlp2dp8BBgYGBgYGBwgIBwoKCQoKDg0MDA0OFQ8QDxAPFSAUGBQUGBQgHSMcGhwjHTMoJCQoMzsyLzI7SEBASFpWWnZ2n//CABEIAu4B9AMBIgACEQEDEQH/xAA2AAABBAMBAQAAAAAAAAAAAAAAAQIDBAUGBwgJAQADAQEBAQEAAAAAAAAAAAAAAQIDBAUGB//aAAwDAQACEAMQAAAA89egfOvo3Zem7mOyOLVj6YPj4HEzvcmtZxGQmx0gXyJQkaxQVsiA0cgJrmx4IOJeavRvnqjbeabPrNGf9C8a3qTTdP3TQGWaGz6mGWpXabM9arXEaZlsPsLNhZLfR1jfefbVmbVkdTy7Nkt4jIhcWRQheqBLrOycqDOZjVPPjO6bb487aHZuDa36cR4hwPo3zpR7N6nyXrUgAHzH9u+KfXGy7NkcJl8XKMxYReJvaOLo8U9/5ryK19Bsl4r9HZnUn6/cRl5qV0co1QaDQbhcxhA8+cO6txjQs03xi7Fhtu0CSrhcnWG3WNr1pmVp2qoZazHRClkYZGbXnbOHRvG6c83OXs9/FXkthzWv5kM6+nODoXRhPqOyAaNmpdbe+6ay62HM+24TaFjj/OnpLEC0Psfnf0QAAHzH6hytvTPqrpfijdsq3mbQfTSNxvFiCnxXvNRnzrs+w/M9nYew+eemwuo3sbkU5AUEjfEEeGzWADzHxLrXINCw1LRHpfkPWecRWh5LEZOiDBZvAhnMbl8KPY8LkqANzetbmG76ttmvI2LctD3hGz5DGZJGXzeDzIZGeIB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5x9n+X+7hOYQg9NgIAAAAAA5H5V6bpHVGpZ7XelBzjK1bgLs+N0sIeg6rv8lrkmyaGyMaugs1dwTEKgNR0iq2YISRAkhc0JGIoKjVCe9i50Z2CKxBgZyCx+Qx1oec6HyHe830op1sqs8P8AVPl+519oazI6KcK6oqMh3rzx0FVtd/O8ll7UWSX7MAhAAAAAAeU+B/RbgXSuGXc1QJ07J4/G2XUS+jPadE9GJq57BWIKgDkcAgAKxwPkY4H13KCsQBXMAVHskVWgS3saItwtkYy3DbVUNhwrkuy88zWKzrZcboVijHFqtUyxzvFSSeAHT15Su98vg2SHtxiRHtsDIAAAAAATyz27y7opdZZl9Z0KbJQWXMRtHMJLu1avDRNBZqUMGAXqZKiIVoEjnMRiCFQAAAAUFVqAoghVsoisioFq/h8sm+jfYPI5LWcvDxNHdNaooWqt9rH5fKUIWFjelKGSJ47eZwWbVZY1wD6VAc4AAAAABrHhnr3mvpndLmmdGpalhqmw2U8IThkcfdrhTcrWEkT00kYxJ7mjJIkAUQQogCiAKIAogDlc8G5LFpJn6VeyilLYrhmMeW5umyOKo6bjNT6PleB1ba9rHhaUl5HO6mya3rESq0VienZd50vEL6FAYMAAAAxOW5e15i5VtUnXOy9S1irg+Rmyc+6EXqVuhtdAABA5oNRJBIxUAAQogCgAAAOaoOEeC3KbQycNaaSFtlgE1dUPuUEC7RyONBcnjVH1vAaxuOVbfruC3qa1nm++Q3OgD2aQ6aMHEOEvqABzWAAAAeXvQnhbRc+6Jz7qvROS0DbdXgwuKG7D7VeQIWqAAAAAAIAEAAAAAACooPZOBAs0YK5rSntRSZEYA9YySS5SchL1N4V3KxlrY9Vzc1sdXHZHN5PG4jMDq6tt2v1OMELlAA+oQHLYAAEQce8RdZ5H1za6xpWZSr6pmtSsYC6EjjfUc8X6a/PjJ6gv0x8JSc/Pp18/g0W99Dny/m8nsnBUeWoPZeqB5mr+5dgk+fS/TLl4eHi162te
final List<VideoPreview> _vids =
List.generate(6000, (index) => VideoPreview(testprev, "title4", index));
@override
Widget build(BuildContext context) {
return GridView.builder(
gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(
crossAxisCount: 2,
childAspectRatio: MediaQuery.of(context).size.width /
MediaQuery.of(context).size.height,
crossAxisSpacing: 10),
itemCount: _vids.length,
itemBuilder: (context, index) {
print("item $index built!");
return PreviewTile(dta: _vids[index]);
});
}
}