This commit is contained in:
		
										
											Binary file not shown.
										
									
								
							| 
		 Before Width: | Height: | Size: 16 KiB After Width: | Height: | Size: 15 KiB  | 
@@ -8,7 +8,7 @@ class MediaProvider extends ChangeNotifier {
 | 
			
		||||
  bool _random = false;
 | 
			
		||||
  String? _tag;
 | 
			
		||||
  int _crossAxisCount = 0;
 | 
			
		||||
  final List<MediaItem> _mediaItems = [];
 | 
			
		||||
  List<MediaItem> _mediaItems = [];
 | 
			
		||||
  bool _isLoading = false;
 | 
			
		||||
 | 
			
		||||
  List<String> types = ["alles", "image", "video", "audio"];
 | 
			
		||||
@@ -19,7 +19,7 @@ class MediaProvider extends ChangeNotifier {
 | 
			
		||||
  int get mode => _mode;
 | 
			
		||||
  bool get random => _random;
 | 
			
		||||
  String? get tag => _tag;
 | 
			
		||||
  int get crossAxisCount  => _crossAxisCount;
 | 
			
		||||
  int get crossAxisCount => _crossAxisCount;
 | 
			
		||||
  List<MediaItem> get mediaItems => _mediaItems;
 | 
			
		||||
  bool get isLoading => _isLoading;
 | 
			
		||||
 | 
			
		||||
@@ -49,8 +49,7 @@ class MediaProvider extends ChangeNotifier {
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  void setMediaItems(List<MediaItem> mediaItems) {
 | 
			
		||||
    _mediaItems.clear();
 | 
			
		||||
    addMediaItems(mediaItems);
 | 
			
		||||
    _mediaItems = mediaItems;
 | 
			
		||||
    notifyListeners();
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -2,7 +2,6 @@ import 'package:flutter/material.dart';
 | 
			
		||||
import 'package:cached_network_image/cached_network_image.dart';
 | 
			
		||||
import 'package:provider/provider.dart';
 | 
			
		||||
import 'package:f0ckapp/screens/DetailView.dart';
 | 
			
		||||
import 'package:f0ckapp/services/Api.dart';
 | 
			
		||||
import 'package:f0ckapp/providers/MediaProvider.dart';
 | 
			
		||||
 | 
			
		||||
class MediaGrid extends StatefulWidget {
 | 
			
		||||
@@ -42,22 +41,8 @@ class _MediaGridState extends State<MediaGrid> {
 | 
			
		||||
      key: scaffoldKey,
 | 
			
		||||
      appBar: AppBar(
 | 
			
		||||
        //centerTitle: true,
 | 
			
		||||
        title: Text('f0ck v1.0.26+26'),
 | 
			
		||||
        title: Text('f0ck v1.0.27+27'),
 | 
			
		||||
        actions: [
 | 
			
		||||
          DropdownButton<String>(
 | 
			
		||||
            // mode
 | 
			
		||||
            value: provider.modes[provider.mode],
 | 
			
		||||
            isDense: true,
 | 
			
		||||
            icon: SizedBox.shrink(),
 | 
			
		||||
            items: provider.modes.map((String value) {
 | 
			
		||||
              return DropdownMenuItem<String>(value: value, child: Text(value));
 | 
			
		||||
            }).toList(),
 | 
			
		||||
            onChanged: (String? newValue) {
 | 
			
		||||
              if (newValue != null) {
 | 
			
		||||
                provider.setMode(provider.modes.indexOf(newValue));
 | 
			
		||||
              }
 | 
			
		||||
            },
 | 
			
		||||
          ),
 | 
			
		||||
          IconButton(
 | 
			
		||||
            icon: const Icon(Icons.menu),
 | 
			
		||||
            onPressed: () {
 | 
			
		||||
@@ -66,6 +51,50 @@ class _MediaGridState extends State<MediaGrid> {
 | 
			
		||||
          ),
 | 
			
		||||
        ],
 | 
			
		||||
      ),
 | 
			
		||||
      bottomNavigationBar: BottomAppBar(
 | 
			
		||||
        height: 50,
 | 
			
		||||
        child: Row(
 | 
			
		||||
          mainAxisAlignment: MainAxisAlignment.spaceAround,
 | 
			
		||||
          children: [
 | 
			
		||||
            Text('type: '),
 | 
			
		||||
            DropdownButton<String>(
 | 
			
		||||
              // type
 | 
			
		||||
              value: provider.type,
 | 
			
		||||
              isDense: true,
 | 
			
		||||
              //icon: SizedBox.shrink(),
 | 
			
		||||
              items: provider.types.map((String value) {
 | 
			
		||||
                return DropdownMenuItem<String>(
 | 
			
		||||
                  value: value,
 | 
			
		||||
                  child: Text(value, style: TextStyle(color: Colors.white)),
 | 
			
		||||
                );
 | 
			
		||||
              }).toList(),
 | 
			
		||||
              onChanged: (String? newValue) {
 | 
			
		||||
                if (newValue != null) {
 | 
			
		||||
                  provider.setType(newValue);
 | 
			
		||||
                }
 | 
			
		||||
              },
 | 
			
		||||
            ),
 | 
			
		||||
            Text('mode: '),
 | 
			
		||||
            DropdownButton<String>(
 | 
			
		||||
              // mode
 | 
			
		||||
              value: provider.modes[provider.mode],
 | 
			
		||||
              isDense: true,
 | 
			
		||||
              //icon: SizedBox.shrink(),
 | 
			
		||||
              items: provider.modes.map((String value) {
 | 
			
		||||
                return DropdownMenuItem<String>(
 | 
			
		||||
                  value: value,
 | 
			
		||||
                  child: Text(value),
 | 
			
		||||
                );
 | 
			
		||||
              }).toList(),
 | 
			
		||||
              onChanged: (String? newValue) {
 | 
			
		||||
                if (newValue != null) {
 | 
			
		||||
                  provider.setMode(provider.modes.indexOf(newValue));
 | 
			
		||||
                }
 | 
			
		||||
              },
 | 
			
		||||
            ),
 | 
			
		||||
          ],
 | 
			
		||||
        ),
 | 
			
		||||
      ),
 | 
			
		||||
      endDrawer: Drawer(
 | 
			
		||||
        child: ListView(
 | 
			
		||||
          padding: EdgeInsets.zero,
 | 
			
		||||
@@ -74,7 +103,7 @@ class _MediaGridState extends State<MediaGrid> {
 | 
			
		||||
              padding: EdgeInsets.all(0),
 | 
			
		||||
              child: Image.asset('assets/images/menu.webp', fit: BoxFit.cover),
 | 
			
		||||
            ),
 | 
			
		||||
            ListTile(
 | 
			
		||||
            /*ListTile(
 | 
			
		||||
              title: Text(
 | 
			
		||||
                'All',
 | 
			
		||||
                style: TextStyle(
 | 
			
		||||
@@ -129,7 +158,7 @@ class _MediaGridState extends State<MediaGrid> {
 | 
			
		||||
              onTap: () {
 | 
			
		||||
                provider.setType('audio');
 | 
			
		||||
              },
 | 
			
		||||
            ),
 | 
			
		||||
            ),*/
 | 
			
		||||
          ],
 | 
			
		||||
        ),
 | 
			
		||||
      ),
 | 
			
		||||
 
 | 
			
		||||
@@ -16,7 +16,7 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev
 | 
			
		||||
# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
 | 
			
		||||
# In Windows, build-name is used as the major, minor, and patch parts
 | 
			
		||||
# of the product and file versions while build-number is used as the build suffix.
 | 
			
		||||
version: 1.0.26+26
 | 
			
		||||
version: 1.0.27+27
 | 
			
		||||
 | 
			
		||||
environment:
 | 
			
		||||
  sdk: ^3.9.0-100.2.beta
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user