Compare commits
No commits in common. "master" and "v1.2.0+54" have entirely different histories.
@ -1,11 +0,0 @@
|
||||
{
|
||||
"settings_title": "Einstellungen",
|
||||
"settings_language": "Sprache",
|
||||
"settings_drawer_title": "Drawer per Geste öffnen",
|
||||
"settings_drawer_subtitle": "Wähle, ob der Drawer mit einer Wischgeste geschlossen/geöffnet werden kann.",
|
||||
"settings_numberofcolumns_title": "Spaltenanzahl",
|
||||
"settings_numberofcolumns_columns": "@count Spalten",
|
||||
"settings_pageanimation_title": "Seitenwechselanimation",
|
||||
"settings_cache_title": "Cache leeren",
|
||||
"settings_cache_clear_button": "Leeren"
|
||||
}
|
@ -1,11 +0,0 @@
|
||||
{
|
||||
"settings_title": "Settings",
|
||||
"settings_language": "Language",
|
||||
"settings_drawer_title": "Open drawer with gesture",
|
||||
"settings_drawer_subtitle": "Choose whether the drawer can be closed/opened with a swipe gesture.",
|
||||
"settings_numberofcolumns_title": "Number of columns",
|
||||
"settings_numberofcolumns_columns": "@count columns",
|
||||
"settings_pageanimation_title": "Page change animation",
|
||||
"settings_cache_title": "Clear Cache",
|
||||
"settings_cache_clear_button": "Clear"
|
||||
}
|
@ -1,11 +0,0 @@
|
||||
{
|
||||
"settings_title": "Paramètres",
|
||||
"settings_language": "Langue",
|
||||
"settings_drawer_title": "Ouvrir le tiroir avec un geste",
|
||||
"settings_drawer_subtitle": "Choisissez si le tiroir peut être ouvert/fermé avec un geste de balayage.",
|
||||
"settings_numberofcolumns_title": "Nombre de colonnes",
|
||||
"settings_numberofcolumns_columns": "@count colonnes",
|
||||
"settings_pageanimation_title": "Animation de changement de page",
|
||||
"settings_cache_title": "Vider le cache",
|
||||
"settings_cache_clear_button": "Vider"
|
||||
}
|
@ -1,11 +0,0 @@
|
||||
{
|
||||
"settings_title": "Instellingen",
|
||||
"settings_language": "Taal",
|
||||
"settings_drawer_title": "Lade openen met een gebaar",
|
||||
"settings_drawer_subtitle": "Kies of de lade geopend/gesloten kan worden met een veeggebaar.",
|
||||
"settings_numberofcolumns_title": "Aantal kolommen",
|
||||
"settings_numberofcolumns_columns": "@count kolommen",
|
||||
"settings_pageanimation_title": "Pagina-overgangsanimatie",
|
||||
"settings_cache_title": "Cache wissen",
|
||||
"settings_cache_clear_button": "Wissen"
|
||||
}
|
@ -1,61 +0,0 @@
|
||||
import 'dart:convert';
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
|
||||
import 'package:get/get.dart';
|
||||
import 'package:encrypt_shared_preferences/provider.dart';
|
||||
|
||||
class MyTranslations extends Translations {
|
||||
static final MyTranslations instance = MyTranslations._internal();
|
||||
MyTranslations._internal();
|
||||
|
||||
static final Map<String, Map<String, String>> _translations = {};
|
||||
|
||||
static Future<void> loadTranslations() async {
|
||||
final locales = ['en_US', 'de_DE', 'fr_FR', 'nl_NL'];
|
||||
for (final locale in locales) {
|
||||
final String jsonString = await rootBundle.loadString('assets/i18n/$locale.json');
|
||||
final Map<String, dynamic> jsonMap = json.decode(jsonString);
|
||||
_translations[locale] = jsonMap.map((key, value) => MapEntry(key, value.toString()));
|
||||
}
|
||||
}
|
||||
|
||||
@override
|
||||
Map<String, Map<String, String>> get keys => _translations;
|
||||
}
|
||||
|
||||
class LocalizationController extends GetxController {
|
||||
final EncryptedSharedPreferencesAsync storage =
|
||||
EncryptedSharedPreferencesAsync.getInstance();
|
||||
Rx<Locale> currentLocale = const Locale('en', 'US').obs;
|
||||
|
||||
@override
|
||||
void onInit() {
|
||||
super.onInit();
|
||||
loadLocale();
|
||||
}
|
||||
|
||||
Future<void> loadLocale() async {
|
||||
String? savedLocale = await storage.getString(
|
||||
'locale',
|
||||
defaultValue: 'en_US',
|
||||
);
|
||||
if (savedLocale != null && savedLocale.isNotEmpty) {
|
||||
final List<String> parts = savedLocale.split('_');
|
||||
currentLocale.value = parts.length == 2
|
||||
? Locale(parts[0], parts[1])
|
||||
: Locale(parts[0]);
|
||||
Get.locale = currentLocale.value;
|
||||
}
|
||||
}
|
||||
|
||||
Future<void> changeLocale(Locale newLocale) async {
|
||||
currentLocale.value = newLocale;
|
||||
Get.updateLocale(newLocale);
|
||||
await storage.setString(
|
||||
'locale',
|
||||
'${newLocale.languageCode}_${newLocale.countryCode}',
|
||||
);
|
||||
}
|
||||
}
|
@ -1,110 +0,0 @@
|
||||
import 'package:encrypt_shared_preferences/provider.dart';
|
||||
import 'package:get/get.dart';
|
||||
|
||||
import 'package:f0ckapp/utils/animatedtransition.dart';
|
||||
import 'package:f0ckapp/service/media_service.dart';
|
||||
import 'package:f0ckapp/models/media_item.dart';
|
||||
|
||||
class MediaController extends GetxController {
|
||||
final EncryptedSharedPreferencesAsync storage =
|
||||
EncryptedSharedPreferencesAsync.getInstance();
|
||||
|
||||
final RxList<MediaItem> mediaItems = <MediaItem>[].obs;
|
||||
final RxBool isLoading = false.obs;
|
||||
final RxString errorMessage = ''.obs;
|
||||
final MediaService _mediaService = MediaService();
|
||||
|
||||
RxnString tag = RxnString();
|
||||
RxInt type = 0.obs;
|
||||
RxInt mode = 0.obs;
|
||||
RxBool random = false.obs;
|
||||
late RxBool muted = false.obs;
|
||||
late RxInt crossAxisCount = 0.obs;
|
||||
late RxBool drawerSwipeEnabled = true.obs;
|
||||
final Rx<PageTransition> transitionType = PageTransition.opacity.obs;
|
||||
|
||||
@override
|
||||
void onInit() async {
|
||||
super.onInit();
|
||||
await loadSettings();
|
||||
}
|
||||
|
||||
Future<void> loadSettings() async {
|
||||
muted.value = await storage.getBoolean('muted') ?? false;
|
||||
crossAxisCount.value = await storage.getInt('crossAxisCount') ?? 0;
|
||||
drawerSwipeEnabled.value =
|
||||
await storage.getBoolean('drawerSwipeEnabled') ?? true;
|
||||
transitionType.value =
|
||||
PageTransition.values[await storage.getInt('transitionType') ?? 0];
|
||||
}
|
||||
|
||||
Future<void> saveSettings() async {
|
||||
await storage.setBoolean('muted', muted.value);
|
||||
await storage.setInt('crossAxisCount', crossAxisCount.value);
|
||||
await storage.setBoolean('drawerSwipeEnabled', drawerSwipeEnabled.value);
|
||||
await storage.setInt('transitionType', transitionType.value.index);
|
||||
}
|
||||
|
||||
Future<void> setTag(String? newTag) async {
|
||||
tag.value = newTag;
|
||||
await loadMediaItems();
|
||||
}
|
||||
|
||||
Future<void> setType(int newType) async {
|
||||
type.value = newType;
|
||||
await loadMediaItems();
|
||||
}
|
||||
|
||||
Future<void> setMode(int newMode) async {
|
||||
mode.value = newMode;
|
||||
await loadMediaItems();
|
||||
}
|
||||
|
||||
Future<void> toggleRandom() async {
|
||||
random.value = !random.value;
|
||||
await loadMediaItems();
|
||||
}
|
||||
|
||||
Future<void> toggleMuted() async {
|
||||
muted.value = !muted.value;
|
||||
await saveSettings();
|
||||
}
|
||||
|
||||
Future<void> setCrossAxisCount(int newCrossAxisCount) async {
|
||||
crossAxisCount.value = newCrossAxisCount;
|
||||
await saveSettings();
|
||||
}
|
||||
|
||||
Future<void> setDrawerSwipeEnabled(bool newValue) async {
|
||||
drawerSwipeEnabled.value = newValue;
|
||||
await saveSettings();
|
||||
}
|
||||
|
||||
Future<void> setTransitionType(PageTransition newType) async {
|
||||
transitionType.value = newType;
|
||||
await saveSettings();
|
||||
}
|
||||
|
||||
Future<void> loadMediaItems({int? older, bool append = false}) async {
|
||||
if (isLoading.value) return;
|
||||
try {
|
||||
isLoading.value = true;
|
||||
final List<MediaItem> items = await _mediaService.fetchMediaItems(
|
||||
type: type.value,
|
||||
mode: mode.value,
|
||||
random: random.value ? 1 : 0,
|
||||
tag: tag.value,
|
||||
older: older,
|
||||
);
|
||||
|
||||
append ? mediaItems.addAll(items) : mediaItems.assignAll(items);
|
||||
|
||||
errorMessage.value = '';
|
||||
} catch (e) {
|
||||
errorMessage.value = 'Fehler beim Laden der Daten: ${e.toString()}';
|
||||
Get.snackbar('Error', e.toString());
|
||||
} finally {
|
||||
isLoading.value = false;
|
||||
}
|
||||
}
|
||||
}
|
@ -1,52 +1,46 @@
|
||||
import 'package:f0ckapp/providers/theme_provider.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
|
||||
import 'package:get/get.dart';
|
||||
import 'package:encrypt_shared_preferences/provider.dart';
|
||||
|
||||
import 'package:f0ckapp/controller/localization_controller.dart';
|
||||
import 'package:f0ckapp/utils/appversion.dart';
|
||||
import 'package:f0ckapp/controller/theme_controller.dart';
|
||||
import 'package:f0ckapp/controller/media_controller.dart';
|
||||
import 'package:f0ckapp/screens/detail_view.dart';
|
||||
import 'package:f0ckapp/utils/appversion_util.dart';
|
||||
import 'package:f0ckapp/services/api_service.dart';
|
||||
import 'package:f0ckapp/screens/media_grid.dart';
|
||||
import 'package:f0ckapp/screens/settings_screen.dart';
|
||||
import 'package:f0ckapp/screens/detailview_screen.dart';
|
||||
|
||||
void main() async {
|
||||
WidgetsFlutterBinding.ensureInitialized();
|
||||
await SystemChrome.setPreferredOrientations([DeviceOrientation.portraitUp]);
|
||||
await EncryptedSharedPreferencesAsync.initialize('VokTnbAbemBUa2j9');
|
||||
await MyTranslations.loadTranslations();
|
||||
await AppVersion.init();
|
||||
Get.put(MediaController());
|
||||
LocalizationController localizationController = Get.put(LocalizationController());
|
||||
final ThemeController themeController = Get.put(ThemeController());
|
||||
|
||||
Get.addTranslations(MyTranslations.instance.keys);
|
||||
Get.locale = localizationController.currentLocale.value;
|
||||
|
||||
//Locale systemLocale = WidgetsBinding.instance.platformDispatcher.locale;
|
||||
final api = ApiService();
|
||||
await api.fetchMedia();
|
||||
Get.put(api);
|
||||
|
||||
runApp(
|
||||
Obx(
|
||||
() => MaterialApp(
|
||||
locale: Get.locale,
|
||||
navigatorKey: Get.key,
|
||||
theme: themeController.currentTheme.value,
|
||||
debugShowCheckedModeBanner: false,
|
||||
onGenerateRoute: (RouteSettings settings) {
|
||||
final uri = Uri.parse(settings.name ?? '/');
|
||||
|
||||
if (uri.path == '/' || uri.pathSegments.isEmpty) {
|
||||
return MaterialPageRoute(builder: (_) => MediaGrid());
|
||||
}
|
||||
|
||||
if (uri.pathSegments.length == 1) {
|
||||
final int id = int.parse(uri.pathSegments.first);
|
||||
return MaterialPageRoute(builder: (_) => DetailView(initialId: id));
|
||||
}
|
||||
|
||||
return MaterialPageRoute(builder: (_) => MediaGrid());
|
||||
},
|
||||
GetMaterialApp(
|
||||
theme: themeController.currentTheme.value,
|
||||
initialRoute: '/',
|
||||
getPages: [
|
||||
GetPage(name: '/', page: () => MediaGrid()),
|
||||
GetPage(name: '/settings', page: () => SettingsPage()),
|
||||
GetPage(
|
||||
name: '/:itemId',
|
||||
page: () {
|
||||
int? test = int.tryParse(Get.parameters['itemId']!);
|
||||
if (test == null) {
|
||||
return Scaffold(body: Center(child: Text('oof')));
|
||||
}
|
||||
return DetailView(initialItemId: test);
|
||||
},
|
||||
),
|
||||
],
|
||||
unknownRoute: GetPage(
|
||||
name: '/notfound',
|
||||
page: () => Center(child: Text('oof')),
|
||||
),
|
||||
),
|
||||
);
|
||||
|
@ -18,15 +18,6 @@ class MediaItem {
|
||||
});
|
||||
|
||||
factory MediaItem.fromJson(Map<String, dynamic> json) {
|
||||
List<Tag> parsedTags = [];
|
||||
if (json['tags'] is List) {
|
||||
parsedTags = (json['tags'] as List<dynamic>)
|
||||
.map((tagJson) => Tag.fromJson(tagJson as Map<String, dynamic>))
|
||||
.toList();
|
||||
} else {
|
||||
parsedTags = [];
|
||||
}
|
||||
|
||||
return MediaItem(
|
||||
id: json['id'],
|
||||
mime: json['mime'],
|
||||
@ -34,7 +25,9 @@ class MediaItem {
|
||||
stamp: json['stamp'],
|
||||
dest: json['dest'],
|
||||
mode: json['mode'],
|
||||
tags: parsedTags,
|
||||
tags: (json['tags'] as List<dynamic>)
|
||||
.map((tagJson) => Tag.fromJson(tagJson))
|
||||
.toList(),
|
||||
);
|
||||
}
|
||||
|
@ -1,8 +1,8 @@
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
import 'package:get/get.dart';
|
||||
import 'package:encrypt_shared_preferences/provider.dart';
|
||||
import 'package:flutter_secure_storage/flutter_secure_storage.dart';
|
||||
|
||||
// Definiere deine Themes wie gehabt:
|
||||
final ThemeData f0ckTheme = ThemeData(
|
||||
brightness: Brightness.dark,
|
||||
primaryColor: const Color(0xFF9FFF00),
|
||||
@ -237,8 +237,9 @@ final ThemeData f0ck95dTheme = ThemeData(
|
||||
);
|
||||
|
||||
class ThemeController extends GetxController {
|
||||
final EncryptedSharedPreferencesAsync storage =
|
||||
EncryptedSharedPreferencesAsync.getInstance();
|
||||
final FlutterSecureStorage secureStorage = const FlutterSecureStorage(
|
||||
aOptions: AndroidOptions(encryptedSharedPreferences: true),
|
||||
);
|
||||
|
||||
final Rx<ThemeData> currentTheme = f0ckTheme.obs;
|
||||
|
||||
@ -260,13 +261,13 @@ class ThemeController extends GetxController {
|
||||
|
||||
Future<void> _loadTheme() async {
|
||||
try {
|
||||
final String? savedThemeName = await storage.getString('theme');
|
||||
final String? savedThemeName = await secureStorage.read(key: 'theme');
|
||||
if (savedThemeName != null && themeMap.containsKey(savedThemeName)) {
|
||||
currentTheme.value = themeMap[savedThemeName]!;
|
||||
Get.changeTheme(currentTheme.value);
|
||||
}
|
||||
} catch (error) {
|
||||
Get.snackbar('', 'Fehler beim Laden des Themes: $error');
|
||||
debugPrint('Fehler beim Laden des Themes: $error');
|
||||
currentTheme.value = f0ckTheme;
|
||||
Get.changeTheme(f0ckTheme);
|
||||
}
|
||||
@ -274,7 +275,7 @@ class ThemeController extends GetxController {
|
||||
|
||||
Future<void> updateTheme(String themeName) async {
|
||||
try {
|
||||
await storage.setString('theme', themeName);
|
||||
await secureStorage.write(key: 'theme', value: themeName);
|
||||
if (themeMap.containsKey(themeName)) {
|
||||
currentTheme.value = themeMap[themeName]!;
|
||||
Get.changeTheme(currentTheme.value);
|
||||
@ -283,7 +284,7 @@ class ThemeController extends GetxController {
|
||||
Get.changeTheme(f0ckTheme);
|
||||
}
|
||||
} catch (error) {
|
||||
Get.snackbar('', 'Fehler beim Aktualisieren des Themes: $error');
|
||||
debugPrint('Fehler beim Aktualisieren des Themes: $error');
|
||||
}
|
||||
}
|
||||
}
|
@ -4,67 +4,86 @@ import 'package:flutter/material.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
|
||||
import 'package:cached_network_image/cached_network_image.dart';
|
||||
import 'package:get/get.dart';
|
||||
import 'package:flutter_cache_manager/flutter_cache_manager.dart';
|
||||
import 'package:get/get.dart';
|
||||
import 'package:share_plus/share_plus.dart';
|
||||
|
||||
import 'package:f0ckapp/utils/animatedtransition.dart';
|
||||
import 'package:f0ckapp/utils/smartrefreshindicator.dart';
|
||||
import 'package:f0ckapp/controller/media_controller.dart';
|
||||
import 'package:f0ckapp/models/media_item.dart';
|
||||
import 'package:f0ckapp/screens/media_grid.dart';
|
||||
import 'package:f0ckapp/screens/fullscreen_screen.dart';
|
||||
import 'package:f0ckapp/models/mediaitem_model.dart';
|
||||
import 'package:f0ckapp/services/api_service.dart';
|
||||
import 'package:f0ckapp/widgets/end_drawer.dart';
|
||||
import 'package:f0ckapp/screens/fullscreen_screen.dart';
|
||||
import 'package:f0ckapp/widgets/video_widget.dart';
|
||||
|
||||
class DetailView extends StatefulWidget {
|
||||
final int initialId;
|
||||
const DetailView({super.key, required this.initialId});
|
||||
final int initialItemId;
|
||||
const DetailView({super.key, required this.initialItemId});
|
||||
|
||||
@override
|
||||
State<DetailView> createState() => _DetailViewState();
|
||||
}
|
||||
|
||||
class _DetailViewState extends State<DetailView> {
|
||||
final MediaController controller = Get.find<MediaController>();
|
||||
MediaItem? item;
|
||||
bool isLoading = false;
|
||||
final ApiService apiService = Get.find<ApiService>();
|
||||
PageController? _pageController;
|
||||
Future<void>? _loadingFuture;
|
||||
int _currentPage = 0;
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
super.initState();
|
||||
_setupInitialView();
|
||||
|
||||
ever(controller.drawerSwipeEnabled, (_) {
|
||||
setState(() {});
|
||||
});
|
||||
if (!_mediaItemExists(widget.initialItemId)) {
|
||||
_loadingFuture = _fetchAndPreloadMedia(widget.initialItemId);
|
||||
} else {
|
||||
_initializePageController();
|
||||
}
|
||||
}
|
||||
|
||||
Future<void> _setupInitialView() async {
|
||||
bool itemExists = controller.mediaItems.any(
|
||||
(media) => media.id == widget.initialId,
|
||||
);
|
||||
bool _mediaItemExists(int id) {
|
||||
return apiService.mediaItems.any((media) => media.id == id);
|
||||
}
|
||||
|
||||
if (!itemExists) {
|
||||
await _initializeDetail(widget.initialId);
|
||||
Future<void> _fetchAndPreloadMedia(int targetId) async {
|
||||
try {
|
||||
await apiService.setTag(null);
|
||||
await apiService.fetchMedia(id: targetId + 50, reset: false);
|
||||
_initializePageController();
|
||||
} catch (e) {
|
||||
_showMsg("Medien konnten nicht geladen werden");
|
||||
}
|
||||
_initializePageController();
|
||||
}
|
||||
|
||||
void _initializePageController() {
|
||||
_currentPage = controller.mediaItems.indexWhere(
|
||||
(media) => media.id == widget.initialId,
|
||||
_currentPage = apiService.mediaItems.indexWhere(
|
||||
(media) => media.id == widget.initialItemId,
|
||||
);
|
||||
if (_currentPage < 0) _currentPage = 0;
|
||||
if (_currentPage < 0) {
|
||||
_currentPage = 0;
|
||||
}
|
||||
_pageController = PageController(initialPage: _currentPage)
|
||||
..addListener(() {
|
||||
setState(() => _currentPage = _pageController!.page!.round());
|
||||
setState(() {
|
||||
_currentPage = _pageController!.page!.round();
|
||||
});
|
||||
});
|
||||
setState(() {});
|
||||
}
|
||||
|
||||
@override
|
||||
void dispose() {
|
||||
_pageController?.dispose();
|
||||
super.dispose();
|
||||
}
|
||||
|
||||
MediaItem? _findMediaItem() {
|
||||
try {
|
||||
return apiService.mediaItems.firstWhere(
|
||||
(media) => media.id == widget.initialItemId,
|
||||
);
|
||||
} catch (e) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
Future<void> _downloadMedia(MediaItem item) async {
|
||||
final File file = await DefaultCacheManager().getSingleFile(item.mediaUrl);
|
||||
final MethodChannel methodChannel = const MethodChannel('MediaShit');
|
||||
@ -81,60 +100,59 @@ class _DetailViewState extends State<DetailView> {
|
||||
|
||||
void _showMsg(String message) {
|
||||
if (!mounted) return;
|
||||
Get
|
||||
..closeAllSnackbars()
|
||||
..snackbar('hehe', message, snackPosition: SnackPosition.BOTTOM);
|
||||
}
|
||||
|
||||
Future<void> _initializeDetail(int deepLinkId) async {
|
||||
item = controller.mediaItems.firstWhereOrNull(
|
||||
(element) => element.id == deepLinkId,
|
||||
);
|
||||
|
||||
if (item == null) {
|
||||
setState(() => isLoading = true);
|
||||
await controller.loadMediaItems(older: deepLinkId + 50);
|
||||
item = controller.mediaItems.firstWhereOrNull(
|
||||
(element) => element.id == deepLinkId,
|
||||
);
|
||||
if (item == null) {
|
||||
Get.offAll(() => const MediaGrid());
|
||||
}
|
||||
setState(() => isLoading = false);
|
||||
}
|
||||
ScaffoldMessenger.of(context)
|
||||
..removeCurrentSnackBar()
|
||||
..showSnackBar(SnackBar(content: Text(message)));
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
if (isLoading) {
|
||||
return Scaffold(
|
||||
appBar: AppBar(
|
||||
title: const Text("f0ck"),
|
||||
leading: Navigator.canPop(context)
|
||||
? null
|
||||
: IconButton(
|
||||
icon: const Icon(Icons.arrow_back),
|
||||
onPressed: () {
|
||||
Get.offAll(() => const MediaGrid());
|
||||
},
|
||||
),
|
||||
),
|
||||
body: const Center(child: CircularProgressIndicator()),
|
||||
if (_loadingFuture != null) {
|
||||
return FutureBuilder<void>(
|
||||
future: _loadingFuture,
|
||||
builder: (context, snapshot) {
|
||||
if (snapshot.connectionState == ConnectionState.waiting) {
|
||||
return Scaffold(
|
||||
appBar: AppBar(title: const Text("Detail")),
|
||||
body: const Center(child: CircularProgressIndicator()),
|
||||
);
|
||||
} else {
|
||||
MediaItem? item = _findMediaItem();
|
||||
if (item == null) {
|
||||
return Scaffold(
|
||||
appBar: AppBar(title: const Text("Detail")),
|
||||
body: const Center(child: Text("f0ck nicht gefunden")),
|
||||
);
|
||||
}
|
||||
return _buildDetail();
|
||||
}
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
final MediaItem currentItem = controller.mediaItems[_currentPage];
|
||||
MediaItem? existingItem = _findMediaItem();
|
||||
if (existingItem == null) {
|
||||
return Scaffold(
|
||||
appBar: AppBar(title: const Text("Detail")),
|
||||
body: const Center(child: Text("f0ck nicht gefunden")),
|
||||
);
|
||||
}
|
||||
return _buildDetail();
|
||||
}
|
||||
|
||||
Widget _buildDetail() {
|
||||
final MediaItem currentItem = apiService.mediaItems[_currentPage];
|
||||
|
||||
return Scaffold(
|
||||
endDrawer: const EndDrawer(),
|
||||
endDrawerEnableOpenDragGesture: controller.drawerSwipeEnabled.value,
|
||||
persistentFooterButtons: controller.tag.value != null
|
||||
endDrawerEnableOpenDragGesture: false,
|
||||
persistentFooterButtons: apiService.tag.value != null
|
||||
? [
|
||||
Center(
|
||||
child: InputChip(
|
||||
label: Text(controller.tag.value!),
|
||||
label: Text(apiService.tag.value!),
|
||||
onDeleted: () {
|
||||
controller.setTag(null);
|
||||
apiService.setTag(null);
|
||||
Get.offAllNamed('/');
|
||||
},
|
||||
),
|
||||
@ -151,11 +169,7 @@ class _DetailViewState extends State<DetailView> {
|
||||
title: Text('f0ck #${currentItem.id.toString()}'),
|
||||
leading: IconButton(
|
||||
icon: const Icon(Icons.arrow_back),
|
||||
onPressed: () {
|
||||
Navigator.canPop(context)
|
||||
? Get.back()
|
||||
: Get.offAllNamed('/');
|
||||
}
|
||||
onPressed: () => Get.back(),
|
||||
),
|
||||
actions: [
|
||||
IconButton(
|
||||
@ -238,72 +252,69 @@ class _DetailViewState extends State<DetailView> {
|
||||
SliverFillRemaining(
|
||||
child: PageView.builder(
|
||||
controller: _pageController,
|
||||
itemCount: controller.mediaItems.length,
|
||||
itemCount: apiService.mediaItems.length,
|
||||
itemBuilder: (context, index) {
|
||||
final MediaItem pageItem = controller.mediaItems[index];
|
||||
final MediaItem pageItem = apiService.mediaItems[index];
|
||||
return AnimatedBuilder(
|
||||
animation: _pageController!,
|
||||
builder: (context, child) {
|
||||
return buildAnimatedTransition(
|
||||
context: context,
|
||||
child: child!,
|
||||
pageController: _pageController!,
|
||||
index: index,
|
||||
controller: controller,
|
||||
double value = 0;
|
||||
if (_pageController!.position.haveDimensions) {
|
||||
value = (_pageController!.page! - index).abs();
|
||||
}
|
||||
double factor = Curves.easeOut.transform(
|
||||
1 - value.clamp(0.0, 1.0),
|
||||
);
|
||||
double scale = 0.8 + factor * 0.2;
|
||||
return Transform.scale(scale: scale, child: child);
|
||||
},
|
||||
child: SmartRefreshIndicator(
|
||||
onRefresh: () async {
|
||||
_showMsg('not hehe');
|
||||
},
|
||||
child: SafeArea(
|
||||
top: false,
|
||||
child: SingleChildScrollView(
|
||||
child: Column(
|
||||
children: [
|
||||
if (pageItem.mime.startsWith('image'))
|
||||
CachedNetworkImage(
|
||||
imageUrl: pageItem.mediaUrl,
|
||||
fit: BoxFit.contain,
|
||||
placeholder: (context, url) => const Center(
|
||||
child: CircularProgressIndicator(),
|
||||
),
|
||||
errorWidget: (context, url, error) =>
|
||||
const Center(child: Icon(Icons.error)),
|
||||
)
|
||||
else
|
||||
VideoWidget(
|
||||
details: pageItem,
|
||||
isActive: index == _currentPage,
|
||||
child: SafeArea(
|
||||
top: false,
|
||||
child: SingleChildScrollView(
|
||||
child: Column(
|
||||
children: [
|
||||
if (pageItem.mime.startsWith('image'))
|
||||
CachedNetworkImage(
|
||||
imageUrl: pageItem.mediaUrl,
|
||||
fit: BoxFit.contain,
|
||||
placeholder: (context, url) => const Center(
|
||||
child: CircularProgressIndicator(),
|
||||
),
|
||||
const SizedBox(height: 10, width: double.infinity),
|
||||
Wrap(
|
||||
alignment: WrapAlignment.center,
|
||||
spacing: 5.0,
|
||||
children: pageItem.tags.map((tag) {
|
||||
return ActionChip(
|
||||
onPressed: () {
|
||||
if (tag.tag == 'sfw' || tag.tag == 'nsfw') {
|
||||
return;
|
||||
}
|
||||
controller.setTag(tag.tag);
|
||||
Get.offAllNamed('/');
|
||||
},
|
||||
label: Text(tag.tag),
|
||||
backgroundColor: switch (tag.id) {
|
||||
1 => Colors.green,
|
||||
2 => Colors.red,
|
||||
_ => const Color(0xFF090909),
|
||||
},
|
||||
labelStyle: const TextStyle(
|
||||
color: Colors.white,
|
||||
),
|
||||
);
|
||||
}).toList(),
|
||||
errorWidget: (context, url, error) =>
|
||||
const Center(child: Icon(Icons.error)),
|
||||
)
|
||||
else
|
||||
VideoWidget(
|
||||
details: pageItem,
|
||||
isActive: index == _currentPage,
|
||||
),
|
||||
const SizedBox(height: 20),
|
||||
],
|
||||
),
|
||||
const SizedBox(height: 10, width: double.infinity),
|
||||
Wrap(
|
||||
alignment: WrapAlignment.center,
|
||||
spacing: 5.0,
|
||||
children: pageItem.tags.map((tag) {
|
||||
return ActionChip(
|
||||
onPressed: () {
|
||||
if (tag.tag == 'sfw' || tag.tag == 'nsfw') {
|
||||
return;
|
||||
}
|
||||
apiService.setTag(tag.tag);
|
||||
Get.offAllNamed('/');
|
||||
},
|
||||
label: Text(tag.tag),
|
||||
backgroundColor: switch (tag.id) {
|
||||
1 => Colors.green,
|
||||
2 => Colors.red,
|
||||
_ => const Color(0xFF090909),
|
||||
},
|
||||
labelStyle: const TextStyle(
|
||||
color: Colors.white,
|
||||
),
|
||||
);
|
||||
}).toList(),
|
||||
),
|
||||
const SizedBox(height: 20),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
@ -3,7 +3,7 @@ import 'package:flutter/services.dart';
|
||||
|
||||
import 'package:cached_network_image/cached_network_image.dart';
|
||||
|
||||
import 'package:f0ckapp/models/media_item.dart';
|
||||
import 'package:f0ckapp/models/mediaitem_model.dart';
|
||||
import 'package:f0ckapp/widgets/video_widget.dart';
|
||||
|
||||
class FullScreenMediaView extends StatefulWidget {
|
||||
|
@ -2,41 +2,30 @@ import 'package:flutter/material.dart';
|
||||
|
||||
import 'package:get/get.dart';
|
||||
|
||||
import 'package:f0ckapp/utils/customsearchdelegate.dart';
|
||||
import 'package:f0ckapp/widgets/filter_bar.dart';
|
||||
import 'package:f0ckapp/widgets/end_drawer.dart';
|
||||
import 'package:f0ckapp/controller/media_controller.dart';
|
||||
import 'package:f0ckapp/services/api_service.dart';
|
||||
import 'package:f0ckapp/widgets/media_tile.dart';
|
||||
import 'package:f0ckapp/widgets/end_drawer.dart';
|
||||
import 'package:f0ckapp/widgets/filter_bar.dart';
|
||||
import 'package:f0ckapp/utils/customsearchdelegate_util.dart';
|
||||
|
||||
class MediaGrid extends StatefulWidget {
|
||||
const MediaGrid({super.key});
|
||||
|
||||
@override
|
||||
State<MediaGrid> createState() => _MediaGridState();
|
||||
State<StatefulWidget> createState() => _MediaGrid();
|
||||
}
|
||||
|
||||
class _MediaGridState extends State<MediaGrid> {
|
||||
final MediaController controller = Get.find<MediaController>();
|
||||
class _MediaGrid extends State<MediaGrid> {
|
||||
final ApiService apiService = Get.find<ApiService>();
|
||||
final ScrollController _scrollController = ScrollController();
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
super.initState();
|
||||
controller.loadMediaItems();
|
||||
|
||||
ever(controller.drawerSwipeEnabled, (_) {
|
||||
setState(() {});
|
||||
});
|
||||
|
||||
_scrollController.addListener(() {
|
||||
if (_scrollController.position.extentAfter < 200 &&
|
||||
!controller.isLoading.value) {
|
||||
controller.loadMediaItems(
|
||||
older: controller.mediaItems.isNotEmpty
|
||||
? controller.mediaItems.last.id
|
||||
: null,
|
||||
append: true,
|
||||
);
|
||||
_scrollController.addListener(() async {
|
||||
if (_scrollController.position.pixels >=
|
||||
_scrollController.position.maxScrollExtent - 300) {
|
||||
await apiService.fetchMedia();
|
||||
}
|
||||
});
|
||||
}
|
||||
@ -45,102 +34,14 @@ class _MediaGridState extends State<MediaGrid> {
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
endDrawer: EndDrawer(),
|
||||
endDrawerEnableOpenDragGesture: controller.drawerSwipeEnabled.value,
|
||||
body: RefreshIndicator(
|
||||
edgeOffset: 100,
|
||||
onRefresh: () async {
|
||||
await controller.loadMediaItems();
|
||||
},
|
||||
child: CustomScrollView(
|
||||
controller: _scrollController,
|
||||
slivers: [
|
||||
SliverAppBar(
|
||||
floating: true,
|
||||
snap: true,
|
||||
title: GestureDetector(
|
||||
child: Row(
|
||||
children: [
|
||||
Image.asset(
|
||||
'assets/images/f0ck_small.webp',
|
||||
fit: BoxFit.fitHeight,
|
||||
),
|
||||
const SizedBox(width: 10),
|
||||
const Text('fApp', style: TextStyle(fontSize: 24)),
|
||||
],
|
||||
),
|
||||
onTap: () {
|
||||
controller.setTag(null);
|
||||
},
|
||||
),
|
||||
actions: [
|
||||
IconButton(
|
||||
icon: const Icon(Icons.search),
|
||||
onPressed: () async {
|
||||
await showSearch(
|
||||
context: context,
|
||||
delegate: CustomSearchDelegate(),
|
||||
);
|
||||
},
|
||||
),
|
||||
Obx(
|
||||
() => IconButton(
|
||||
icon: Icon(
|
||||
controller.random.value
|
||||
? Icons.shuffle_on_outlined
|
||||
: Icons.shuffle,
|
||||
),
|
||||
onPressed: () async {
|
||||
await controller.toggleRandom();
|
||||
},
|
||||
),
|
||||
),
|
||||
|
||||
Builder(
|
||||
builder: (context) {
|
||||
return IconButton(
|
||||
icon: const Icon(Icons.menu),
|
||||
onPressed: () {
|
||||
Scaffold.of(context).openEndDrawer();
|
||||
},
|
||||
);
|
||||
},
|
||||
),
|
||||
],
|
||||
),
|
||||
SliverPadding(
|
||||
padding: EdgeInsets.zero,
|
||||
sliver: Obx(
|
||||
() => SliverGrid(
|
||||
delegate: SliverChildBuilderDelegate((context, index) {
|
||||
return MediaTile(item: controller.mediaItems[index]);
|
||||
}, childCount: controller.mediaItems.length),
|
||||
gridDelegate: controller.crossAxisCount.value == 0
|
||||
? const SliverGridDelegateWithMaxCrossAxisExtent(
|
||||
maxCrossAxisExtent: 150,
|
||||
crossAxisSpacing: 5,
|
||||
mainAxisSpacing: 5,
|
||||
childAspectRatio: 1,
|
||||
)
|
||||
: SliverGridDelegateWithFixedCrossAxisCount(
|
||||
crossAxisCount: controller.crossAxisCount.value,
|
||||
crossAxisSpacing: 5,
|
||||
mainAxisSpacing: 5,
|
||||
childAspectRatio: 1,
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
persistentFooterButtons: [
|
||||
Obx(() {
|
||||
if (controller.tag.value != null) {
|
||||
if (apiService.tag.value != null) {
|
||||
return Center(
|
||||
child: InputChip(
|
||||
label: Text(controller.tag.value!),
|
||||
onDeleted: () async {
|
||||
await controller.setTag(null);
|
||||
label: Text(apiService.tag.value!),
|
||||
onDeleted: () {
|
||||
apiService.setTag(null);
|
||||
Get.offAllNamed('/');
|
||||
},
|
||||
),
|
||||
@ -150,7 +51,84 @@ class _MediaGridState extends State<MediaGrid> {
|
||||
}
|
||||
}),
|
||||
],
|
||||
body: CustomScrollView(
|
||||
controller: _scrollController,
|
||||
slivers: [
|
||||
SliverAppBar(
|
||||
floating: true,
|
||||
snap: true,
|
||||
title: GestureDetector(
|
||||
onTap: () async {
|
||||
apiService.setTag(null);
|
||||
},
|
||||
child: Row(
|
||||
children: [
|
||||
Image.asset(
|
||||
'assets/images/f0ck_small.webp',
|
||||
fit: BoxFit.fitHeight,
|
||||
),
|
||||
const SizedBox(width: 10),
|
||||
const Text('fApp', style: TextStyle(fontSize: 24)),
|
||||
],
|
||||
),
|
||||
),
|
||||
actions: [
|
||||
IconButton(
|
||||
icon: const Icon(Icons.search),
|
||||
onPressed: () async {
|
||||
await showSearch(
|
||||
context: context,
|
||||
delegate: CustomSearchDelegate(),
|
||||
);
|
||||
},
|
||||
),
|
||||
Obx(
|
||||
() => IconButton(
|
||||
icon: Icon(
|
||||
apiService.random.value
|
||||
? Icons.shuffle_on_outlined
|
||||
: Icons.shuffle,
|
||||
),
|
||||
onPressed: () {
|
||||
apiService.toggleRandom();
|
||||
},
|
||||
),
|
||||
),
|
||||
Builder(
|
||||
builder: (context) {
|
||||
return IconButton(
|
||||
icon: const Icon(Icons.menu),
|
||||
onPressed: () {
|
||||
Scaffold.of(context).openEndDrawer();
|
||||
},
|
||||
);
|
||||
},
|
||||
),
|
||||
],
|
||||
),
|
||||
SliverPadding(
|
||||
padding: EdgeInsets.zero,
|
||||
sliver: Obx(
|
||||
() => SliverGrid(
|
||||
delegate: SliverChildBuilderDelegate((context, index) {
|
||||
return MediaTile(item: apiService.mediaItems[index]);
|
||||
}, childCount: apiService.mediaItems.length),
|
||||
gridDelegate: const SliverGridDelegateWithMaxCrossAxisExtent(
|
||||
maxCrossAxisExtent: 150,
|
||||
crossAxisSpacing: 5,
|
||||
mainAxisSpacing: 5,
|
||||
childAspectRatio: 1,
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
bottomNavigationBar: FilterBar(scrollController: _scrollController),
|
||||
floatingActionButton: FloatingActionButton(
|
||||
onPressed: () {},
|
||||
child: Icon(Icons.add),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
@ -1,11 +1,9 @@
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
import 'package:flutter_cache_manager/flutter_cache_manager.dart';
|
||||
import 'package:get/get.dart';
|
||||
|
||||
import 'package:f0ckapp/controller/media_controller.dart';
|
||||
import 'package:f0ckapp/controller/localization_controller.dart';
|
||||
import 'package:f0ckapp/utils/animatedtransition.dart';
|
||||
import 'package:f0ckapp/widgets/end_drawer.dart';
|
||||
import 'package:get/get.dart';
|
||||
|
||||
class SettingsPage extends StatefulWidget {
|
||||
const SettingsPage({super.key});
|
||||
@ -15,147 +13,90 @@ class SettingsPage extends StatefulWidget {
|
||||
}
|
||||
|
||||
class _SettingsPageState extends State<SettingsPage> {
|
||||
final MediaController controller = Get.find();
|
||||
final LocalizationController localizationController = Get.find();
|
||||
int _columns = 3;
|
||||
bool _drawerSwipeEnabled = true;
|
||||
|
||||
void _showMsg(String message, BuildContext context) {
|
||||
ScaffoldMessenger.of(context)
|
||||
..removeCurrentSnackBar()
|
||||
..showSnackBar(SnackBar(content: Text(message)));
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
endDrawerEnableOpenDragGesture: _drawerSwipeEnabled,
|
||||
endDrawer: EndDrawer(),
|
||||
body: CustomScrollView(
|
||||
slivers: [
|
||||
SliverAppBar(
|
||||
floating: false,
|
||||
pinned: true,
|
||||
title: Text('settings_title'.tr),
|
||||
title: const Text('Settings'),
|
||||
leading: IconButton(
|
||||
icon: const Icon(Icons.arrow_back),
|
||||
onPressed: () {
|
||||
Get.back();
|
||||
},
|
||||
),
|
||||
),
|
||||
SliverList(
|
||||
delegate: SliverChildListDelegate([
|
||||
ListTile(
|
||||
title: Text('settings_numberofcolumns_title'.tr),
|
||||
trailing: Obx(
|
||||
() => DropdownButton<int>(
|
||||
value: controller.crossAxisCount.value,
|
||||
dropdownColor: const Color.fromARGB(255, 43, 43, 43),
|
||||
iconEnabledColor: Colors.white,
|
||||
items: [0, 3, 4, 5].map((int value) {
|
||||
return DropdownMenuItem<int>(
|
||||
value: value,
|
||||
child: Text(
|
||||
value == 0
|
||||
? 'auto'
|
||||
: 'settings_numberofcolumns_columns'.trParams({
|
||||
'count': value.toString(),
|
||||
}),
|
||||
),
|
||||
);
|
||||
}).toList(),
|
||||
onChanged: (int? newValue) async {
|
||||
if (newValue != null) {
|
||||
await controller.setCrossAxisCount(newValue);
|
||||
setState(() {});
|
||||
}
|
||||
},
|
||||
),
|
||||
/*Padding(
|
||||
padding: const EdgeInsets.all(16.0),
|
||||
child: Text(
|
||||
"Anzahl der Spalten",
|
||||
style: Theme.of(context).textTheme.titleLarge,
|
||||
),
|
||||
),
|
||||
const Divider(),
|
||||
ListTile(
|
||||
title: Text('settings_pageanimation_title'.tr),
|
||||
trailing: Obx(
|
||||
() => DropdownButton<PageTransition>(
|
||||
value: controller.transitionType.value,
|
||||
dropdownColor: const Color.fromARGB(255, 43, 43, 43),
|
||||
iconEnabledColor: Colors.white,
|
||||
items: PageTransition.values.map((PageTransition type) {
|
||||
String label;
|
||||
switch (type) {
|
||||
case PageTransition.opacity:
|
||||
label = 'Opacity';
|
||||
break;
|
||||
case PageTransition.scale:
|
||||
label = 'Scale';
|
||||
break;
|
||||
case PageTransition.slide:
|
||||
label = 'Slide';
|
||||
break;
|
||||
case PageTransition.rotate:
|
||||
label = 'Rotate';
|
||||
break;
|
||||
case PageTransition.flip:
|
||||
label = 'Flip';
|
||||
break;
|
||||
}
|
||||
return DropdownMenuItem<PageTransition>(
|
||||
value: type,
|
||||
child: Text(label),
|
||||
);
|
||||
}).toList(),
|
||||
onChanged: (PageTransition? newValue) async {
|
||||
if (newValue != null) {
|
||||
await controller.setTransitionType(newValue);
|
||||
setState(() {});
|
||||
}
|
||||
},
|
||||
),
|
||||
title: const Text("Spaltenanzahl"),
|
||||
trailing: DropdownButton<int>(
|
||||
value: mediaState.crossAxisCount,
|
||||
dropdownColor: const Color.fromARGB(255, 43, 43, 43),
|
||||
iconEnabledColor: Colors.white,
|
||||
items: [0, 3, 4, 5].map((int value) {
|
||||
return DropdownMenuItem<int>(
|
||||
value: value,
|
||||
child: Text(value == 0 ? 'auto' : '$value Spalten'),
|
||||
);
|
||||
}).toList(),
|
||||
onChanged: (int? newValue) {
|
||||
if (newValue != null) {
|
||||
setState(() {
|
||||
_columns = newValue;
|
||||
mediaNotifier.setCrossAxisCount(newValue);
|
||||
});
|
||||
}
|
||||
},
|
||||
),
|
||||
),
|
||||
|
||||
),*/
|
||||
const Divider(),
|
||||
SwitchListTile(
|
||||
title: Text('settings_drawer_title'.tr),
|
||||
subtitle: Text('settings_drawer_subtitle'.tr),
|
||||
value: controller.drawerSwipeEnabled.value,
|
||||
onChanged: (bool value) async {
|
||||
await controller.setDrawerSwipeEnabled(value);
|
||||
setState(() {});
|
||||
title: const Text("Drawer per Geste öffnen"),
|
||||
subtitle: const Text(
|
||||
"Wähle, ob der Drawer mit einer Wischgeste geschlossen/ geöffnet werden kann.",
|
||||
),
|
||||
value: _drawerSwipeEnabled,
|
||||
onChanged: (bool value) {
|
||||
setState(() {
|
||||
_drawerSwipeEnabled = value;
|
||||
});
|
||||
},
|
||||
),
|
||||
const Divider(),
|
||||
ListTile(
|
||||
title: Text('settings_language'.tr),
|
||||
trailing: Obx(
|
||||
() => DropdownButton<Locale>(
|
||||
value: localizationController.currentLocale.value,
|
||||
dropdownColor: const Color.fromARGB(255, 43, 43, 43),
|
||||
iconEnabledColor: Colors.white,
|
||||
items: const [
|
||||
DropdownMenuItem<Locale>(
|
||||
value: Locale('en', 'US'),
|
||||
child: Text('English'),
|
||||
),
|
||||
DropdownMenuItem<Locale>(
|
||||
value: Locale('de', 'DE'),
|
||||
child: Text('Deutsch'),
|
||||
),
|
||||
DropdownMenuItem<Locale>(
|
||||
value: Locale('fr', 'FR'),
|
||||
child: Text('Français'),
|
||||
),
|
||||
DropdownMenuItem<Locale>(
|
||||
value: Locale('nl', 'NL'),
|
||||
child: Text('Nederlands'),
|
||||
),
|
||||
],
|
||||
onChanged: (Locale? newLocale) async {
|
||||
if (newLocale != null) {
|
||||
await localizationController.changeLocale(newLocale);
|
||||
}
|
||||
},
|
||||
),
|
||||
),
|
||||
),
|
||||
const Divider(),
|
||||
ListTile(
|
||||
title: Text('settings_cache_title'.tr),
|
||||
title: Text("Cache löschen"),
|
||||
trailing: ElevatedButton(
|
||||
onPressed: () async {
|
||||
await DefaultCacheManager().emptyCache();
|
||||
if (!mounted) return;
|
||||
Get.snackbar('', 'der Cache wurde geleert.');
|
||||
_showMsg('Cache wurde geleert.', context);
|
||||
},
|
||||
child: Text('settings_cache_clear_button'.tr),
|
||||
child: const Text("Löschen"),
|
||||
),
|
||||
),
|
||||
const SizedBox(height: 20),
|
||||
]),
|
||||
),
|
||||
],
|
||||
|
@ -1,39 +0,0 @@
|
||||
import 'package:get/get.dart';
|
||||
|
||||
import 'package:f0ckapp/models/media_item.dart';
|
||||
|
||||
const List<String> mediaTypes = ["alles", "image", "video", "audio"];
|
||||
const List<String> mediaModes = ["sfw", "nsfw", "untagged", "all"];
|
||||
|
||||
class MediaService extends GetConnect {
|
||||
Future<List<MediaItem>> fetchMediaItems({
|
||||
required int type,
|
||||
required int mode,
|
||||
required int random,
|
||||
String? tag,
|
||||
int? older,
|
||||
}) async {
|
||||
final queryParameters = {
|
||||
'type': type.toString(),
|
||||
'mode': mode.toString(),
|
||||
'random': random.toString(),
|
||||
if (tag != null) 'tag': tag,
|
||||
if (older != null) 'older': older.toString(),
|
||||
};
|
||||
|
||||
try {
|
||||
final response = await get(
|
||||
'https://api.f0ck.me/items/get',
|
||||
query: queryParameters,
|
||||
);
|
||||
if (response.status.code == 200 && response.body is List) {
|
||||
final data = response.body as List<dynamic>;
|
||||
return data.map((json) => MediaItem.fromJson(json)).toList();
|
||||
} else {
|
||||
return Future.error('Fehler beim Laden der Daten: ${response.body}');
|
||||
}
|
||||
} catch (e) {
|
||||
return Future.error('Netzwerkfehler: ${e.toString()}');
|
||||
}
|
||||
}
|
||||
}
|
94
lib/services/api_service.dart
Normal file
94
lib/services/api_service.dart
Normal file
@ -0,0 +1,94 @@
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
import 'package:get/get.dart';
|
||||
|
||||
import 'package:f0ckapp/models/mediaitem_model.dart';
|
||||
|
||||
const List<String> mediaTypes = ["alles", "image", "video", "audio"];
|
||||
const List<String> mediaModes = ["sfw", "nsfw", "untagged", "all"];
|
||||
|
||||
class ApiService extends GetConnect {
|
||||
RxList<MediaItem> mediaItems = <MediaItem>[].obs;
|
||||
RxnString tag = RxnString();
|
||||
RxInt type = 0.obs;
|
||||
RxInt mode = 0.obs;
|
||||
RxBool random = false.obs;
|
||||
|
||||
bool _isFetching = false;
|
||||
DateTime? _lastFetchTime;
|
||||
final Duration _minFetchInterval = Duration(milliseconds: 500);
|
||||
|
||||
@override
|
||||
void onInit() {
|
||||
super.onInit();
|
||||
everAll([tag, type, mode, random], (_) => fetchMedia(reset: true));
|
||||
}
|
||||
|
||||
Future<void> setTag(String? newTag) async {
|
||||
tag.value = newTag;
|
||||
return await fetchMedia(reset: true);
|
||||
}
|
||||
|
||||
Future<void> setType(int newType) async {
|
||||
type.value = newType >= 0 && newType < mediaTypes.length ? newType : 0;
|
||||
return await fetchMedia(reset: true);
|
||||
}
|
||||
|
||||
Future<void> setMode(int newMode) async {
|
||||
mode.value = newMode >= 0 && newMode < mediaModes.length ? newMode : 0;
|
||||
return await fetchMedia(reset: true);
|
||||
}
|
||||
|
||||
Future<void> toggleRandom() async {
|
||||
random.value = !random.value;
|
||||
return await fetchMedia(reset: true);
|
||||
}
|
||||
|
||||
Future fetchMedia({int? id, bool reset = false}) async {
|
||||
if (!reset) {
|
||||
if (_isFetching) return;
|
||||
if (_lastFetchTime != null &&
|
||||
DateTime.now().difference(_lastFetchTime!) < _minFetchInterval) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
_lastFetchTime = DateTime.now();
|
||||
_isFetching = true;
|
||||
|
||||
if (reset) mediaItems.clear();
|
||||
|
||||
final int? older =
|
||||
id ?? (mediaItems.isNotEmpty ? mediaItems.last.id : null);
|
||||
final Uri url = Uri.parse('https://api.f0ck.me/items/get').replace(
|
||||
queryParameters: {
|
||||
'type': mediaTypes[type.value],
|
||||
'mode': mode.value.toString(),
|
||||
'random': (random.value ? 1 : 0).toString(),
|
||||
if (tag.value != null) 'tag': tag.value,
|
||||
if (older != null) 'older': older.toString(),
|
||||
},
|
||||
);
|
||||
|
||||
try {
|
||||
final Response<dynamic> response = await get(url.toString());
|
||||
|
||||
if (response.isOk && response.body is List) {
|
||||
List<MediaItem> newMedia = (response.body as List)
|
||||
.map((json) => MediaItem.fromJson(json))
|
||||
.toList();
|
||||
|
||||
if (reset) {
|
||||
mediaItems.assignAll(newMedia);
|
||||
} else {
|
||||
mediaItems.addAll(newMedia);
|
||||
}
|
||||
} else {
|
||||
debugPrint('Fehler beim Laden der MediaItems: ${response.statusText}');
|
||||
}
|
||||
} catch (e) {
|
||||
debugPrint('Exception beim Laden der MediaItems: $e');
|
||||
} finally {
|
||||
_isFetching = false;
|
||||
}
|
||||
}
|
||||
}
|
@ -1,50 +0,0 @@
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
import 'package:f0ckapp/controller/media_controller.dart';
|
||||
|
||||
enum PageTransition { opacity, scale, slide, rotate, flip }
|
||||
|
||||
Widget buildAnimatedTransition({
|
||||
required BuildContext context,
|
||||
required Widget child,
|
||||
required PageController pageController,
|
||||
required int index,
|
||||
required MediaController controller,
|
||||
}) {
|
||||
final double value = pageController.position.haveDimensions
|
||||
? pageController.page! - index
|
||||
: 0;
|
||||
|
||||
switch (controller.transitionType.value) {
|
||||
case PageTransition.opacity:
|
||||
return Opacity(
|
||||
opacity: Curves.easeOut.transform(1 - value.abs().clamp(0.0, 1.0)),
|
||||
child: Transform(transform: Matrix4.identity(), child: child),
|
||||
);
|
||||
case PageTransition.scale:
|
||||
return Transform.scale(
|
||||
scale:
|
||||
0.8 +
|
||||
Curves.easeOut.transform(1 - value.abs().clamp(0.0, 1.0)) * 0.2,
|
||||
child: child,
|
||||
);
|
||||
case PageTransition.slide:
|
||||
return Transform.translate(
|
||||
offset: Offset(300 * value.abs(), 0),
|
||||
child: child,
|
||||
);
|
||||
case PageTransition.rotate:
|
||||
return Opacity(
|
||||
opacity: (1 - value.abs()).clamp(0.0, 1.0),
|
||||
child: Transform.rotate(angle: value.abs() * 0.5, child: child),
|
||||
);
|
||||
case PageTransition.flip:
|
||||
return Transform(
|
||||
transform: Matrix4.identity()
|
||||
..setEntry(3, 2, 0.001)
|
||||
..rotateY(value.abs()),
|
||||
alignment: Alignment.center,
|
||||
child: child,
|
||||
);
|
||||
}
|
||||
}
|
@ -1,12 +0,0 @@
|
||||
import 'package:flutter/services.dart';
|
||||
|
||||
class AppVersion {
|
||||
static late String version;
|
||||
|
||||
static Future<void> init() async {
|
||||
final String yaml = await rootBundle.loadString('pubspec.yaml');
|
||||
final RegExpMatch? match = RegExp(r'^version:\s*(.*)$', multiLine: true).firstMatch(yaml);
|
||||
final String? v = match?.group(1)!.replaceAll('"', '').replaceAll("'", '').trim();
|
||||
version = v ?? "";
|
||||
}
|
||||
}
|
10
lib/utils/appversion_util.dart
Normal file
10
lib/utils/appversion_util.dart
Normal file
@ -0,0 +1,10 @@
|
||||
import 'package:package_info_plus/package_info_plus.dart';
|
||||
|
||||
class AppVersion {
|
||||
static String version = "";
|
||||
|
||||
static Future<void> init() async {
|
||||
PackageInfo packageInfo = await PackageInfo.fromPlatform();
|
||||
version = '${packageInfo.version}+${packageInfo.buildNumber}';
|
||||
}
|
||||
}
|
@ -1,16 +1,16 @@
|
||||
import 'dart:async';
|
||||
import 'dart:convert';
|
||||
|
||||
import 'package:f0ckapp/controller/media_controller.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
import 'package:get/get.dart';
|
||||
import 'package:http/http.dart' as http;
|
||||
|
||||
import 'package:f0ckapp/services/api_service.dart';
|
||||
import 'package:f0ckapp/models/suggestion_model.dart';
|
||||
|
||||
class CustomSearchDelegate extends SearchDelegate<String> {
|
||||
final MediaController controller = Get.find<MediaController>();
|
||||
final ApiService apiService = Get.find<ApiService>();
|
||||
Timer? _debounceTimer;
|
||||
List<Suggestion>? _suggestions;
|
||||
bool _isLoading = false;
|
||||
@ -145,7 +145,7 @@ class CustomSearchDelegate extends SearchDelegate<String> {
|
||||
style: TextStyle(fontSize: 12),
|
||||
),
|
||||
onTap: () async {
|
||||
await controller.setTag(suggestion.tag);
|
||||
await apiService.setTag(suggestion.tag);
|
||||
close(context, suggestion.tag);
|
||||
},
|
||||
);
|
@ -2,9 +2,9 @@ import 'package:flutter/material.dart';
|
||||
|
||||
import 'package:get/get.dart';
|
||||
|
||||
import 'package:f0ckapp/screens/settings_screen.dart';
|
||||
import 'package:f0ckapp/controller/theme_controller.dart';
|
||||
import 'package:f0ckapp/utils/appversion.dart';
|
||||
import 'package:f0ckapp/providers/theme_provider.dart';
|
||||
//import 'package:f0ckapp/services/api_service.dart';
|
||||
import 'package:f0ckapp/utils/appversion_util.dart';
|
||||
|
||||
class EndDrawer extends StatelessWidget {
|
||||
const EndDrawer({super.key});
|
||||
@ -17,6 +17,7 @@ class EndDrawer extends StatelessWidget {
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
//final ApiService c = Get.find<ApiService>();
|
||||
final ThemeController themeController = Get.find();
|
||||
|
||||
return Drawer(
|
||||
@ -114,7 +115,7 @@ class EndDrawer extends StatelessWidget {
|
||||
title: const Text('Settings'),
|
||||
onTap: () {
|
||||
Navigator.pop(context);
|
||||
Get.bottomSheet(SettingsPage());
|
||||
Get.toNamed('/settings');
|
||||
},
|
||||
),
|
||||
ListTile(
|
||||
|
@ -2,8 +2,7 @@ import 'package:flutter/material.dart';
|
||||
|
||||
import 'package:get/get.dart';
|
||||
|
||||
import 'package:f0ckapp/controller/media_controller.dart';
|
||||
import 'package:f0ckapp/service/media_service.dart';
|
||||
import 'package:f0ckapp/services/api_service.dart';
|
||||
|
||||
class FilterBar extends StatelessWidget {
|
||||
final ScrollController scrollController;
|
||||
@ -15,7 +14,7 @@ class FilterBar extends StatelessWidget {
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final MediaController c = Get.find<MediaController>();
|
||||
final ApiService c = Get.find<ApiService>();
|
||||
|
||||
return BottomAppBar(
|
||||
height: 50,
|
||||
|
@ -3,7 +3,7 @@ import 'package:flutter/material.dart';
|
||||
import 'package:cached_network_image/cached_network_image.dart';
|
||||
import 'package:get/get.dart';
|
||||
|
||||
import 'package:f0ckapp/models/media_item.dart';
|
||||
import 'package:f0ckapp/models/mediaitem_model.dart';
|
||||
|
||||
class MediaTile extends StatelessWidget {
|
||||
final MediaItem item;
|
||||
@ -14,6 +14,7 @@ class MediaTile extends StatelessWidget {
|
||||
Widget build(BuildContext context) {
|
||||
return InkWell(
|
||||
onTap: () {
|
||||
//Navigator.pushNamed(context, '/${item.id}');
|
||||
Get.toNamed('/${item.id}');
|
||||
},
|
||||
child: Stack(
|
||||
|
@ -1,14 +1,12 @@
|
||||
import 'dart:async';
|
||||
|
||||
import 'package:f0ckapp/controller/media_controller.dart';
|
||||
import 'package:f0ckapp/models/media_item.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
import 'package:cached_video_player_plus/cached_video_player_plus.dart';
|
||||
import 'package:cached_network_image/cached_network_image.dart';
|
||||
|
||||
import 'package:f0ckapp/models/mediaitem_model.dart';
|
||||
import 'package:f0ckapp/widgets/videooverlay_widget.dart';
|
||||
import 'package:get/get.dart';
|
||||
|
||||
class VideoWidget extends StatefulWidget {
|
||||
final MediaItem details;
|
||||
@ -27,7 +25,6 @@ class VideoWidget extends StatefulWidget {
|
||||
}
|
||||
|
||||
class _VideoWidgetState extends State<VideoWidget> {
|
||||
final MediaController controller = Get.find<MediaController>();
|
||||
late CachedVideoPlayerPlusController _controller;
|
||||
bool _showControls = false;
|
||||
Timer? _hideControlsTimer;
|
||||
@ -52,7 +49,8 @@ class _VideoWidgetState extends State<VideoWidget> {
|
||||
}
|
||||
_controller.setLooping(true);
|
||||
|
||||
_controller.setVolume(controller.muted.value ? 0.0 : 1.0);
|
||||
//final bool muted = ref.read(mediaProvider).muted;
|
||||
//_controller.setVolume(muted ? 0.0 : 1.0);
|
||||
}
|
||||
|
||||
@override
|
||||
@ -88,11 +86,11 @@ class _VideoWidgetState extends State<VideoWidget> {
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final bool muted = controller.muted.value;
|
||||
if (_controller.value.isInitialized &&
|
||||
_controller.value.volume != (muted ? 0.0 : 1.0)) {
|
||||
_controller.setVolume(muted ? 0.0 : 1.0);
|
||||
}
|
||||
//final bool muted = ref.watch(mediaProvider).muted;
|
||||
//if (_controller.value.isInitialized &&
|
||||
// _controller.value.volume != (muted ? 0.0 : 1.0)) {
|
||||
// _controller.setVolume(muted ? 0.0 : 1.0);
|
||||
//}
|
||||
|
||||
bool isAudio = widget.details.mime.startsWith('audio');
|
||||
|
||||
|
@ -1,9 +1,6 @@
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
import 'package:cached_video_player_plus/cached_video_player_plus.dart';
|
||||
import 'package:get/get.dart';
|
||||
|
||||
import 'package:f0ckapp/controller/media_controller.dart';
|
||||
|
||||
class VideoControlsOverlay extends StatelessWidget {
|
||||
final CachedVideoPlayerPlusController controller;
|
||||
@ -17,25 +14,10 @@ class VideoControlsOverlay extends StatelessWidget {
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final MediaController c = Get.find<MediaController>();
|
||||
|
||||
return Stack(
|
||||
alignment: Alignment.center,
|
||||
children: [
|
||||
Positioned(
|
||||
right: 12,
|
||||
bottom: 12,
|
||||
child: Obx(
|
||||
() => _ControlButton(
|
||||
c.muted.value ? Icons.volume_off : Icons.volume_up,
|
||||
() async {
|
||||
button();
|
||||
await c.toggleMuted();
|
||||
},
|
||||
size: 16,
|
||||
),
|
||||
),
|
||||
),
|
||||
Center(
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
|
280
pubspec.lock
280
pubspec.lock
@ -1,22 +1,6 @@
|
||||
# Generated by pub
|
||||
# See https://dart.dev/tools/pub/glossary#lockfile
|
||||
packages:
|
||||
args:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: args
|
||||
sha256: d0481093c50b1da8910eb0bb301626d4d8eb7284aa739614d2b394ee09e3ea04
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "2.7.0"
|
||||
asn1lib:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: asn1lib
|
||||
sha256: "0511d6be23b007e95105ae023db599aea731df604608978dada7f9faf2637623"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "1.6.4"
|
||||
async:
|
||||
dependency: transitive
|
||||
description:
|
||||
@ -89,14 +73,6 @@ packages:
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "1.19.1"
|
||||
convert:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: convert
|
||||
sha256: b30acd5944035672bc15c6b7a8b47d773e41e2f17de064350988c5d02adb1c68
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "3.1.2"
|
||||
cross_file:
|
||||
dependency: transitive
|
||||
description:
|
||||
@ -121,46 +97,14 @@ packages:
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "1.0.2"
|
||||
devtools_shared:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: devtools_shared
|
||||
sha256: "659e2d65aa5ef5c3551163811c5c6fa1b973b3df80d8cac6f618035edcdc1096"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "11.2.1"
|
||||
dtd:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: dtd
|
||||
sha256: "14a0360d898ded87c3d99591fc386b8a6ea5d432927bee709b22130cd25b993a"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "2.5.1"
|
||||
encrypt:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: encrypt
|
||||
sha256: "62d9aa4670cc2a8798bab89b39fc71b6dfbacf615de6cf5001fb39f7e4a996a2"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "5.0.3"
|
||||
encrypt_shared_preferences:
|
||||
cupertino_icons:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
name: encrypt_shared_preferences
|
||||
sha256: ab8a957db7ae645c8b0341e8aee85c1cd046a5cb9a0529459ea417ebd6040ba2
|
||||
name: cupertino_icons
|
||||
sha256: ba631d1c7f7bef6b729a622b7b752645a2d076dba9976925b8f25725a30e1ee6
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "0.9.9"
|
||||
extension_discovery:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: extension_discovery
|
||||
sha256: de1fce715ab013cdfb00befc3bdf0914bea5e409c3a567b7f8f144bc061611a7
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "2.1.0"
|
||||
version: "1.0.8"
|
||||
fake_async:
|
||||
dependency: transitive
|
||||
description:
|
||||
@ -214,6 +158,54 @@ packages:
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "6.0.0"
|
||||
flutter_secure_storage:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
name: flutter_secure_storage
|
||||
sha256: "9cad52d75ebc511adfae3d447d5d13da15a55a92c9410e50f67335b6d21d16ea"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "9.2.4"
|
||||
flutter_secure_storage_linux:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: flutter_secure_storage_linux
|
||||
sha256: be76c1d24a97d0b98f8b54bce6b481a380a6590df992d0098f868ad54dc8f688
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "1.2.3"
|
||||
flutter_secure_storage_macos:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: flutter_secure_storage_macos
|
||||
sha256: "6c0a2795a2d1de26ae202a0d78527d163f4acbb11cde4c75c670f3a0fc064247"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "3.1.3"
|
||||
flutter_secure_storage_platform_interface:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: flutter_secure_storage_platform_interface
|
||||
sha256: cf91ad32ce5adef6fba4d736a542baca9daf3beac4db2d04be350b87f69ac4a8
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "1.1.2"
|
||||
flutter_secure_storage_web:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: flutter_secure_storage_web
|
||||
sha256: f4ebff989b4f07b2656fb16b47852c0aab9fed9b4ec1c70103368337bc1886a9
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "1.2.1"
|
||||
flutter_secure_storage_windows:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: flutter_secure_storage_windows
|
||||
sha256: b20b07cb5ed4ed74fc567b78a72936203f587eba460af1df11281c9326cd3709
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "3.1.2"
|
||||
flutter_test:
|
||||
dependency: "direct dev"
|
||||
description: flutter
|
||||
@ -272,14 +264,6 @@ packages:
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "0.6.7"
|
||||
json_rpc_2:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: json_rpc_2
|
||||
sha256: "246b321532f0e8e2ba474b4d757eaa558ae4fdd0688fdbc1e1ca9705f9b8ca0e"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "3.0.3"
|
||||
leak_tracker:
|
||||
dependency: transitive
|
||||
description:
|
||||
@ -312,14 +296,6 @@ packages:
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "6.0.0"
|
||||
logging:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: logging
|
||||
sha256: c8245ada5f1717ed44271ed1c26b8ce85ca3228fd2ffdb75468ab01979309d61
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "1.3.0"
|
||||
matcher:
|
||||
dependency: transitive
|
||||
description:
|
||||
@ -360,6 +336,22 @@ packages:
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "2.1.0"
|
||||
package_info_plus:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
name: package_info_plus
|
||||
sha256: "7976bfe4c583170d6cdc7077e3237560b364149fcd268b5f53d95a991963b191"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "8.3.0"
|
||||
package_info_plus_platform_interface:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: package_info_plus_platform_interface
|
||||
sha256: "6c935fb612dff8e3cc9632c2b301720c77450a126114126ffaafe28d2e87956c"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "3.2.0"
|
||||
path:
|
||||
dependency: transitive
|
||||
description:
|
||||
@ -432,22 +424,6 @@ packages:
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "2.1.8"
|
||||
pointycastle:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: pointycastle
|
||||
sha256: "4be0097fcf3fd3e8449e53730c631200ebc7b88016acecab2b0da2f0149222fe"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "3.9.1"
|
||||
pool:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: pool
|
||||
sha256: "20fe868b6314b322ea036ba325e6fc0711a22948856475e2c2b6306e8ab39c2a"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "1.5.1"
|
||||
rxdart:
|
||||
dependency: transitive
|
||||
description:
|
||||
@ -472,70 +448,6 @@ packages:
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "6.0.0"
|
||||
shared_preferences:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: shared_preferences
|
||||
sha256: "6e8bf70b7fef813df4e9a36f658ac46d107db4b4cfe1048b477d4e453a8159f5"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "2.5.3"
|
||||
shared_preferences_android:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: shared_preferences_android
|
||||
sha256: "20cbd561f743a342c76c151d6ddb93a9ce6005751e7aa458baad3858bfbfb6ac"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "2.4.10"
|
||||
shared_preferences_foundation:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: shared_preferences_foundation
|
||||
sha256: "6a52cfcdaeac77cad8c97b539ff688ccfc458c007b4db12be584fbe5c0e49e03"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "2.5.4"
|
||||
shared_preferences_linux:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: shared_preferences_linux
|
||||
sha256: "580abfd40f415611503cae30adf626e6656dfb2f0cee8f465ece7b6defb40f2f"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "2.4.1"
|
||||
shared_preferences_platform_interface:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: shared_preferences_platform_interface
|
||||
sha256: "57cbf196c486bc2cf1f02b85784932c6094376284b3ad5779d1b1c6c6a816b80"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "2.4.1"
|
||||
shared_preferences_web:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: shared_preferences_web
|
||||
sha256: c49bd060261c9a3f0ff445892695d6212ff603ef3115edbb448509d407600019
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "2.4.3"
|
||||
shared_preferences_windows:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: shared_preferences_windows
|
||||
sha256: "94ef0f72b2d71bc3e700e025db3710911bd51a71cefb65cc609dd0d9a982e3c1"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "2.4.1"
|
||||
shelf:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: shelf
|
||||
sha256: e7dd780a7ffb623c57850b33f43309312fc863fb6aa3d276a754bb299839ef12
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "1.4.2"
|
||||
sky_engine:
|
||||
dependency: transitive
|
||||
description: flutter
|
||||
@ -597,14 +509,6 @@ packages:
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "2.4.0"
|
||||
sse:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: sse
|
||||
sha256: fcc97470240bb37377f298e2bd816f09fd7216c07928641c0560719f50603643
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "4.1.8"
|
||||
stack_trace:
|
||||
dependency: transitive
|
||||
description:
|
||||
@ -661,14 +565,6 @@ packages:
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "1.4.0"
|
||||
unified_analytics:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: unified_analytics
|
||||
sha256: c8abdcad84b55b78f860358aae90077b8f54f98169a75e16d97796a1b3c95590
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "8.0.1"
|
||||
url_launcher_linux:
|
||||
dependency: transitive
|
||||
description:
|
||||
@ -765,30 +661,6 @@ packages:
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "1.1.1"
|
||||
web_socket:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: web_socket
|
||||
sha256: "34d64019aa8e36bf9842ac014bb5d2f5586ca73df5e4d9bf5c936975cae6982c"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "1.0.1"
|
||||
web_socket_channel:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: web_socket_channel
|
||||
sha256: d645757fb0f4773d602444000a8131ff5d48c9e47adfe9772652dd1a4f2d45c8
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "3.0.3"
|
||||
webkit_inspection_protocol:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: webkit_inspection_protocol
|
||||
sha256: "87d3f2333bb240704cd3f1c6b5b7acd8a10e7f0bc28c28dcf14e782014f4a572"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "1.2.1"
|
||||
win32:
|
||||
dependency: transitive
|
||||
description:
|
||||
@ -805,22 +677,6 @@ packages:
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "1.1.0"
|
||||
yaml:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: yaml
|
||||
sha256: b9da305ac7c39faa3f030eccd175340f968459dae4af175130b3fc47e40d76ce
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "3.1.3"
|
||||
yaml_edit:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: yaml_edit
|
||||
sha256: fb38626579fb345ad00e674e2af3a5c9b0cc4b9bfb8fd7f7ff322c7c9e62aef5
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "2.2.2"
|
||||
sdks:
|
||||
dart: ">=3.9.0-100.2.beta <4.0.0"
|
||||
flutter: ">=3.29.0"
|
||||
|
10
pubspec.yaml
10
pubspec.yaml
@ -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.3.2+58
|
||||
version: 1.2.0+54
|
||||
|
||||
environment:
|
||||
sdk: ^3.9.0-100.2.beta
|
||||
@ -32,10 +32,14 @@ dependencies:
|
||||
sdk: flutter
|
||||
http: ^1.4.0
|
||||
|
||||
# The following adds the Cupertino Icons font to your application.
|
||||
# Use with the CupertinoIcons class for iOS style icons.
|
||||
cupertino_icons: ^1.0.8
|
||||
cached_network_image: ^3.4.1
|
||||
cached_video_player_plus: ^3.0.3
|
||||
package_info_plus: ^8.3.0
|
||||
share_plus: ^11.0.0
|
||||
encrypt_shared_preferences: ^0.9.9
|
||||
flutter_secure_storage: ^9.2.4
|
||||
get: ^4.7.2
|
||||
|
||||
dev_dependencies:
|
||||
@ -63,8 +67,6 @@ flutter:
|
||||
# To add assets to your application, add an assets section, like this:
|
||||
assets:
|
||||
- assets/images/
|
||||
- assets/i18n/
|
||||
- pubspec.yaml
|
||||
# - images/a_dot_burr.jpeg
|
||||
# - images/a_dot_ham.jpeg
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user