This commit is contained in:
parent
0d9ed1e6c1
commit
6fb4775043
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;
|
bool _random = false;
|
||||||
String? _tag;
|
String? _tag;
|
||||||
int _crossAxisCount = 0;
|
int _crossAxisCount = 0;
|
||||||
final List<MediaItem> _mediaItems = [];
|
List<MediaItem> _mediaItems = [];
|
||||||
bool _isLoading = false;
|
bool _isLoading = false;
|
||||||
|
|
||||||
List<String> types = ["alles", "image", "video", "audio"];
|
List<String> types = ["alles", "image", "video", "audio"];
|
||||||
@ -19,7 +19,7 @@ class MediaProvider extends ChangeNotifier {
|
|||||||
int get mode => _mode;
|
int get mode => _mode;
|
||||||
bool get random => _random;
|
bool get random => _random;
|
||||||
String? get tag => _tag;
|
String? get tag => _tag;
|
||||||
int get crossAxisCount => _crossAxisCount;
|
int get crossAxisCount => _crossAxisCount;
|
||||||
List<MediaItem> get mediaItems => _mediaItems;
|
List<MediaItem> get mediaItems => _mediaItems;
|
||||||
bool get isLoading => _isLoading;
|
bool get isLoading => _isLoading;
|
||||||
|
|
||||||
@ -49,8 +49,7 @@ class MediaProvider extends ChangeNotifier {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void setMediaItems(List<MediaItem> mediaItems) {
|
void setMediaItems(List<MediaItem> mediaItems) {
|
||||||
_mediaItems.clear();
|
_mediaItems = mediaItems;
|
||||||
addMediaItems(mediaItems);
|
|
||||||
notifyListeners();
|
notifyListeners();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2,7 +2,6 @@ import 'package:flutter/material.dart';
|
|||||||
import 'package:cached_network_image/cached_network_image.dart';
|
import 'package:cached_network_image/cached_network_image.dart';
|
||||||
import 'package:provider/provider.dart';
|
import 'package:provider/provider.dart';
|
||||||
import 'package:f0ckapp/screens/DetailView.dart';
|
import 'package:f0ckapp/screens/DetailView.dart';
|
||||||
import 'package:f0ckapp/services/Api.dart';
|
|
||||||
import 'package:f0ckapp/providers/MediaProvider.dart';
|
import 'package:f0ckapp/providers/MediaProvider.dart';
|
||||||
|
|
||||||
class MediaGrid extends StatefulWidget {
|
class MediaGrid extends StatefulWidget {
|
||||||
@ -42,22 +41,8 @@ class _MediaGridState extends State<MediaGrid> {
|
|||||||
key: scaffoldKey,
|
key: scaffoldKey,
|
||||||
appBar: AppBar(
|
appBar: AppBar(
|
||||||
//centerTitle: true,
|
//centerTitle: true,
|
||||||
title: Text('f0ck v1.0.26+26'),
|
title: Text('f0ck v1.0.27+27'),
|
||||||
actions: [
|
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(
|
IconButton(
|
||||||
icon: const Icon(Icons.menu),
|
icon: const Icon(Icons.menu),
|
||||||
onPressed: () {
|
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(
|
endDrawer: Drawer(
|
||||||
child: ListView(
|
child: ListView(
|
||||||
padding: EdgeInsets.zero,
|
padding: EdgeInsets.zero,
|
||||||
@ -74,7 +103,7 @@ class _MediaGridState extends State<MediaGrid> {
|
|||||||
padding: EdgeInsets.all(0),
|
padding: EdgeInsets.all(0),
|
||||||
child: Image.asset('assets/images/menu.webp', fit: BoxFit.cover),
|
child: Image.asset('assets/images/menu.webp', fit: BoxFit.cover),
|
||||||
),
|
),
|
||||||
ListTile(
|
/*ListTile(
|
||||||
title: Text(
|
title: Text(
|
||||||
'All',
|
'All',
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
@ -129,7 +158,7 @@ class _MediaGridState extends State<MediaGrid> {
|
|||||||
onTap: () {
|
onTap: () {
|
||||||
provider.setType('audio');
|
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
|
# 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
|
# 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.
|
# 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:
|
environment:
|
||||||
sdk: ^3.9.0-100.2.beta
|
sdk: ^3.9.0-100.2.beta
|
||||||
|
Loading…
x
Reference in New Issue
Block a user