diff --git a/.metadata b/.metadata index 2c030f1f..952c907e 100644 --- a/.metadata +++ b/.metadata @@ -1,11 +1,11 @@ # This file tracks properties of this Flutter project. # Used by Flutter tool to assess capabilities and perform upgrades etc. # -# This file should be version controlled. +# This file should be version controlled and should not be manually edited. version: - revision: c251856c895807251bf9d74797ce6c57919282bf - channel: master + revision: "476aa717cd342d11e16439b71f4f4c9209c50712" + channel: "beta" project_type: app @@ -13,26 +13,11 @@ project_type: app migration: platforms: - platform: root - create_revision: c251856c895807251bf9d74797ce6c57919282bf - base_revision: c251856c895807251bf9d74797ce6c57919282bf - - platform: android - create_revision: c251856c895807251bf9d74797ce6c57919282bf - base_revision: c251856c895807251bf9d74797ce6c57919282bf - - platform: ios - create_revision: c251856c895807251bf9d74797ce6c57919282bf - base_revision: c251856c895807251bf9d74797ce6c57919282bf + create_revision: 476aa717cd342d11e16439b71f4f4c9209c50712 + base_revision: 476aa717cd342d11e16439b71f4f4c9209c50712 - platform: linux - create_revision: c251856c895807251bf9d74797ce6c57919282bf - base_revision: c251856c895807251bf9d74797ce6c57919282bf - - platform: macos - create_revision: c251856c895807251bf9d74797ce6c57919282bf - base_revision: c251856c895807251bf9d74797ce6c57919282bf - - platform: web - create_revision: c251856c895807251bf9d74797ce6c57919282bf - base_revision: c251856c895807251bf9d74797ce6c57919282bf - - platform: windows - create_revision: c251856c895807251bf9d74797ce6c57919282bf - base_revision: c251856c895807251bf9d74797ce6c57919282bf + create_revision: 476aa717cd342d11e16439b71f4f4c9209c50712 + base_revision: 476aa717cd342d11e16439b71f4f4c9209c50712 # User provided section diff --git a/.vscode/settings.json b/.vscode/settings.json index 23fd35f0..b08fc125 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,3 +1,7 @@ { - "editor.formatOnSave": true -} \ No newline at end of file + "editor.formatOnSave": true, + "editor.defaultFormatter": "esbenp.prettier-vscode", + "[dart]": { + "editor.defaultFormatter": "Dart-Code.dart-code" + } +} diff --git a/cli/tasks/icon.dart b/cli/tasks/icon.dart index dcf00c07..c82c6d29 100644 --- a/cli/tasks/icon.dart +++ b/cli/tasks/icon.dart @@ -37,14 +37,14 @@ Future main() async { final Image backgroundImage = decodePng(backgroundImageBytes)!; final Image overlayImage = decodePng(overlayImageBytes)!; - final Image iconImage = drawImage( + final Image iconImage = compositeImage( overlayImage, copyCrop( backgroundImage, - 0, - overlayContentSize ~/ 2, - defaultImageSize, - defaultImageSize - overlayContentSize, + x: 0, + y: overlayContentSize ~/ 2, + width: defaultImageSize, + height: defaultImageSize - overlayContentSize, ), ); @@ -52,8 +52,8 @@ Future main() async { final String iconPath = getAndroidIconPath(x.last); final File iconFile = File(iconPath); final List icon = encodeNamedImage( - copyResizeCropSquare(iconImage, x.first), path.basename(iconFile.path), + copyResizeCropSquare(iconImage, size: x.first), )!; await iconFile.writeAsBytes(icon); _logger.info('Generated $iconPath (${x.last})'); diff --git a/lib/core/app/meta.generated.dart b/lib/core/app/meta.generated.dart index 1a8823aa..299c9744 100644 --- a/lib/core/app/meta.generated.dart +++ b/lib/core/app/meta.generated.dart @@ -2,5 +2,5 @@ part of 'meta.dart'; abstract class _GeneratedAppMeta { static const String version = '3.0.0'; - static const int builtAtMs = 1659024927924; + static const int builtAtMs = 1699028756663; } diff --git a/lib/core/player/video_player.dart b/lib/core/player/video_player.dart index 53a962f7..ffc14fe7 100644 --- a/lib/core/player/video_player.dart +++ b/lib/core/player/video_player.dart @@ -1,6 +1,7 @@ import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; -import 'package:flutter_meedu_videoplayer/meedu_player.dart'; +import 'package:media_kit/media_kit.dart' as media_kit; +import 'package:media_kit_video/media_kit_video.dart' as media_kit; class PlayerPage extends StatefulWidget { const PlayerPage({super.key}); @@ -15,36 +16,34 @@ String fileContents = ''; // TODO: Placeholder variable. Subtitles will have to be implemented later. class _PlayerPageState extends State { - late MeeduPlayerController _controller; + late media_kit.Player _player; + late media_kit.VideoController _controller; final ValueNotifier _subtitlesEnabled = ValueNotifier(true); @override void initState() { super.initState(); - _controller = MeeduPlayerController(); + _player = media_kit.Player(); + _controller = media_kit.VideoController(_player); _setDataSource(); } @override void dispose() { - _controller.dispose(); + _player.dispose(); super.dispose(); } Future _setDataSource() async { - await _controller.setDataSource( - DataSource( - source: sourceurl, - type: DataSourceType.network, - closedCaptionFile: _loadCaptions(), - ), + await _player.open( + media_kit.Media(sourceurl), ); - _controller.onClosedCaptionEnabled(true); + // _controller.onClosedCaptionEnabled(true); } - Future _loadCaptions() async => - SubRipCaptionFile(fileContents); + // Future _loadCaptions() async => + // SubRipCaptionFile(fileContents); @override Widget build(final BuildContext context) => Scaffold( @@ -52,41 +51,41 @@ class _PlayerPageState extends State { body: SafeArea( child: AspectRatio( aspectRatio: 16 / 9, - child: MeeduVideoPlayer( + child: media_kit.Video( controller: _controller, - bottomRight: ( - final BuildContext ctx, - final MeeduPlayerController controller, - final Responsive responsive, - ) { - final double fontSize = responsive.ip(3); + // bottomRight: ( + // final BuildContext ctx, + // final MeeduPlayerController controller, + // final Responsive responsive, + // ) { + // final double fontSize = responsive.ip(3); - return CupertinoButton( - padding: const EdgeInsets.all(5), - minSize: 25, - child: ValueListenableBuilder( - valueListenable: _subtitlesEnabled, - builder: ( - final BuildContext context, - final bool enabled, - final _, - ) => - Text( - 'CC', - style: TextStyle( - fontSize: fontSize > 18 ? 18 : fontSize, - color: Colors.white.withOpacity( - enabled ? 1 : 0.4, - ), - ), - ), - ), - onPressed: () { - _subtitlesEnabled.value = !_subtitlesEnabled.value; - _controller.onClosedCaptionEnabled(_subtitlesEnabled.value); - }, - ); - }, + // return CupertinoButton( + // padding: const EdgeInsets.all(5), + // minSize: 25, + // child: ValueListenableBuilder( + // valueListenable: _subtitlesEnabled, + // builder: ( + // final BuildContext context, + // final bool enabled, + // final _, + // ) => + // Text( + // 'CC', + // style: TextStyle( + // fontSize: fontSize > 18 ? 18 : fontSize, + // color: Colors.white.withOpacity( + // enabled ? 1 : 0.4, + // ), + // ), + // ), + // ), + // onPressed: () { + // _subtitlesEnabled.value = !_subtitlesEnabled.value; + // _controller.onClosedCaptionEnabled(_subtitlesEnabled.value); + // }, + // ); + // }, ), ), ), diff --git a/lib/core/tenka/manager.dart b/lib/core/tenka/manager.dart index 9fde2e62..890eec2c 100644 --- a/lib/core/tenka/manager.dart +++ b/lib/core/tenka/manager.dart @@ -21,7 +21,7 @@ abstract class TenkaManager { baseDir: path.join(Paths.docsDir.path, 'tenka'), ); - await repository.initialize(); + // await repository.initialize(); } static Future getExtractor(final TenkaMetadata metadata) async { diff --git a/lib/ui/utils/themer.dart b/lib/ui/utils/themer.dart index 9402d59b..73c33ba8 100644 --- a/lib/ui/utils/themer.dart +++ b/lib/ui/utils/themer.dart @@ -61,30 +61,30 @@ class ThemerThemeData { ? defaultTypography.black : defaultTypography.white; final TextTheme textTheme = defaultTextTheme - .merge( - TextTheme( - displayLarge: TextStyle(fontSize: context.r.size(4.8)), - displayMedium: TextStyle(fontSize: context.r.size(3)), - displaySmall: TextStyle(fontSize: context.r.size(2.4)), - headlineLarge: TextStyle(fontSize: context.r.size(2)), - headlineMedium: TextStyle(fontSize: context.r.size(1.3)), - headlineSmall: TextStyle(fontSize: context.r.size(1.2)), - titleLarge: TextStyle(fontSize: context.r.size(1.1)), - titleMedium: TextStyle(fontSize: context.r.size(0.73)), - titleSmall: TextStyle(fontSize: context.r.size(0.64)), - bodyLarge: TextStyle(fontSize: context.r.size(0.75)), - bodyMedium: TextStyle(fontSize: context.r.size(0.65)), - bodySmall: TextStyle(fontSize: context.r.size(0.55)), - labelLarge: TextStyle(fontSize: context.r.size(0.63)), - labelMedium: TextStyle(fontSize: context.r.size(0.55)), - labelSmall: TextStyle(fontSize: context.r.size(0.5)), - ), - ) + // .merge( + // TextTheme( + // displayLarge: TextStyle(fontSize: context.r.size(4.8)), + // displayMedium: TextStyle(fontSize: context.r.size(3)), + // displaySmall: TextStyle(fontSize: context.r.size(2.4)), + // headlineLarge: TextStyle(fontSize: context.r.size(2)), + // headlineMedium: TextStyle(fontSize: context.r.size(1.3)), + // headlineSmall: TextStyle(fontSize: context.r.size(1.2)), + // titleLarge: TextStyle(fontSize: context.r.size(1.1)), + // titleMedium: TextStyle(fontSize: context.r.size(0.73)), + // titleSmall: TextStyle(fontSize: context.r.size(0.64)), + // bodyLarge: TextStyle(fontSize: context.r.size(0.75)), + // bodyMedium: TextStyle(fontSize: context.r.size(0.65)), + // bodySmall: TextStyle(fontSize: context.r.size(0.55)), + // labelLarge: TextStyle(fontSize: context.r.size(0.63)), + // labelMedium: TextStyle(fontSize: context.r.size(0.55)), + // labelSmall: TextStyle(fontSize: context.r.size(0.5)), + // ), + // ) .apply( - fontFamily: fontFamily, - bodyColor: backgroundContrastColor, - displayColor: backgroundContrastColor, - ); + fontFamily: fontFamily, + bodyColor: backgroundContrastColor, + displayColor: backgroundContrastColor, + ); return ThemeData( colorScheme: ColorScheme( @@ -99,6 +99,7 @@ class ThemerThemeData { onError: foregroundContrastColor, surface: backgroundColorLevel0, onSurface: backgroundContrastColor, + outline: backgroundColorLevel0, ), textTheme: textTheme, useMaterial3: true, diff --git a/linux/.gitignore b/linux/.gitignore new file mode 100644 index 00000000..d3896c98 --- /dev/null +++ b/linux/.gitignore @@ -0,0 +1 @@ +flutter/ephemeral diff --git a/linux/CMakeLists.txt b/linux/CMakeLists.txt new file mode 100644 index 00000000..693ce145 --- /dev/null +++ b/linux/CMakeLists.txt @@ -0,0 +1,145 @@ +# Project-level configuration. +cmake_minimum_required(VERSION 3.10) +project(runner LANGUAGES CXX) + +# The name of the executable created for the application. Change this to change +# the on-disk name of your application. +set(BINARY_NAME "kazahana") +# The unique GTK application identifier for this application. See: +# https://wiki.gnome.org/HowDoI/ChooseApplicationID +set(APPLICATION_ID "io.github.yukino_org.kazahana") + +# Explicitly opt in to modern CMake behaviors to avoid warnings with recent +# versions of CMake. +cmake_policy(SET CMP0063 NEW) + +# Load bundled libraries from the lib/ directory relative to the binary. +set(CMAKE_INSTALL_RPATH "$ORIGIN/lib") + +# Root filesystem for cross-building. +if(FLUTTER_TARGET_PLATFORM_SYSROOT) + set(CMAKE_SYSROOT ${FLUTTER_TARGET_PLATFORM_SYSROOT}) + set(CMAKE_FIND_ROOT_PATH ${CMAKE_SYSROOT}) + set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER) + set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY) + set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY) + set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY) +endif() + +# Define build configuration options. +if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES) + set(CMAKE_BUILD_TYPE "Debug" CACHE + STRING "Flutter build mode" FORCE) + set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS + "Debug" "Profile" "Release") +endif() + +# Compilation settings that should be applied to most targets. +# +# Be cautious about adding new options here, as plugins use this function by +# default. In most cases, you should add new options to specific targets instead +# of modifying this function. +function(APPLY_STANDARD_SETTINGS TARGET) + target_compile_features(${TARGET} PUBLIC cxx_std_14) + target_compile_options(${TARGET} PRIVATE -Wall -Werror) + target_compile_options(${TARGET} PRIVATE "$<$>:-O3>") + target_compile_definitions(${TARGET} PRIVATE "$<$>:NDEBUG>") +endfunction() + +# Flutter library and tool build rules. +set(FLUTTER_MANAGED_DIR "${CMAKE_CURRENT_SOURCE_DIR}/flutter") +add_subdirectory(${FLUTTER_MANAGED_DIR}) + +# System-level dependencies. +find_package(PkgConfig REQUIRED) +pkg_check_modules(GTK REQUIRED IMPORTED_TARGET gtk+-3.0) + +add_definitions(-DAPPLICATION_ID="${APPLICATION_ID}") + +# Define the application target. To change its name, change BINARY_NAME above, +# not the value here, or `flutter run` will no longer work. +# +# Any new source files that you add to the application should be added here. +add_executable(${BINARY_NAME} + "main.cc" + "my_application.cc" + "${FLUTTER_MANAGED_DIR}/generated_plugin_registrant.cc" +) + +# Apply the standard set of build settings. This can be removed for applications +# that need different build settings. +apply_standard_settings(${BINARY_NAME}) + +# Add dependency libraries. Add any application-specific dependencies here. +target_link_libraries(${BINARY_NAME} PRIVATE flutter) +target_link_libraries(${BINARY_NAME} PRIVATE PkgConfig::GTK) + +# Run the Flutter tool portions of the build. This must not be removed. +add_dependencies(${BINARY_NAME} flutter_assemble) + +# Only the install-generated bundle's copy of the executable will launch +# correctly, since the resources must in the right relative locations. To avoid +# people trying to run the unbundled copy, put it in a subdirectory instead of +# the default top-level location. +set_target_properties(${BINARY_NAME} + PROPERTIES + RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/intermediates_do_not_run" +) + + +# Generated plugin build rules, which manage building the plugins and adding +# them to the application. +include(flutter/generated_plugins.cmake) + + +# === Installation === +# By default, "installing" just makes a relocatable bundle in the build +# directory. +set(BUILD_BUNDLE_DIR "${PROJECT_BINARY_DIR}/bundle") +if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT) + set(CMAKE_INSTALL_PREFIX "${BUILD_BUNDLE_DIR}" CACHE PATH "..." FORCE) +endif() + +# Start with a clean build bundle directory every time. +install(CODE " + file(REMOVE_RECURSE \"${BUILD_BUNDLE_DIR}/\") + " COMPONENT Runtime) + +set(INSTALL_BUNDLE_DATA_DIR "${CMAKE_INSTALL_PREFIX}/data") +set(INSTALL_BUNDLE_LIB_DIR "${CMAKE_INSTALL_PREFIX}/lib") + +install(TARGETS ${BINARY_NAME} RUNTIME DESTINATION "${CMAKE_INSTALL_PREFIX}" + COMPONENT Runtime) + +install(FILES "${FLUTTER_ICU_DATA_FILE}" DESTINATION "${INSTALL_BUNDLE_DATA_DIR}" + COMPONENT Runtime) + +install(FILES "${FLUTTER_LIBRARY}" DESTINATION "${INSTALL_BUNDLE_LIB_DIR}" + COMPONENT Runtime) + +foreach(bundled_library ${PLUGIN_BUNDLED_LIBRARIES}) + install(FILES "${bundled_library}" + DESTINATION "${INSTALL_BUNDLE_LIB_DIR}" + COMPONENT Runtime) +endforeach(bundled_library) + +# Copy the native assets provided by the build.dart from all packages. +set(NATIVE_ASSETS_DIR "${PROJECT_BUILD_DIR}native_assets/linux/") +install(DIRECTORY "${NATIVE_ASSETS_DIR}" + DESTINATION "${INSTALL_BUNDLE_LIB_DIR}" + COMPONENT Runtime) + +# Fully re-copy the assets directory on each build to avoid having stale files +# from a previous install. +set(FLUTTER_ASSET_DIR_NAME "flutter_assets") +install(CODE " + file(REMOVE_RECURSE \"${INSTALL_BUNDLE_DATA_DIR}/${FLUTTER_ASSET_DIR_NAME}\") + " COMPONENT Runtime) +install(DIRECTORY "${PROJECT_BUILD_DIR}/${FLUTTER_ASSET_DIR_NAME}" + DESTINATION "${INSTALL_BUNDLE_DATA_DIR}" COMPONENT Runtime) + +# Install the AOT library on non-Debug builds only. +if(NOT CMAKE_BUILD_TYPE MATCHES "Debug") + install(FILES "${AOT_LIBRARY}" DESTINATION "${INSTALL_BUNDLE_LIB_DIR}" + COMPONENT Runtime) +endif() diff --git a/linux/flutter/CMakeLists.txt b/linux/flutter/CMakeLists.txt new file mode 100644 index 00000000..d5bd0164 --- /dev/null +++ b/linux/flutter/CMakeLists.txt @@ -0,0 +1,88 @@ +# This file controls Flutter-level build steps. It should not be edited. +cmake_minimum_required(VERSION 3.10) + +set(EPHEMERAL_DIR "${CMAKE_CURRENT_SOURCE_DIR}/ephemeral") + +# Configuration provided via flutter tool. +include(${EPHEMERAL_DIR}/generated_config.cmake) + +# TODO: Move the rest of this into files in ephemeral. See +# https://github.com/flutter/flutter/issues/57146. + +# Serves the same purpose as list(TRANSFORM ... PREPEND ...), +# which isn't available in 3.10. +function(list_prepend LIST_NAME PREFIX) + set(NEW_LIST "") + foreach(element ${${LIST_NAME}}) + list(APPEND NEW_LIST "${PREFIX}${element}") + endforeach(element) + set(${LIST_NAME} "${NEW_LIST}" PARENT_SCOPE) +endfunction() + +# === Flutter Library === +# System-level dependencies. +find_package(PkgConfig REQUIRED) +pkg_check_modules(GTK REQUIRED IMPORTED_TARGET gtk+-3.0) +pkg_check_modules(GLIB REQUIRED IMPORTED_TARGET glib-2.0) +pkg_check_modules(GIO REQUIRED IMPORTED_TARGET gio-2.0) + +set(FLUTTER_LIBRARY "${EPHEMERAL_DIR}/libflutter_linux_gtk.so") + +# Published to parent scope for install step. +set(FLUTTER_LIBRARY ${FLUTTER_LIBRARY} PARENT_SCOPE) +set(FLUTTER_ICU_DATA_FILE "${EPHEMERAL_DIR}/icudtl.dat" PARENT_SCOPE) +set(PROJECT_BUILD_DIR "${PROJECT_DIR}/build/" PARENT_SCOPE) +set(AOT_LIBRARY "${PROJECT_DIR}/build/lib/libapp.so" PARENT_SCOPE) + +list(APPEND FLUTTER_LIBRARY_HEADERS + "fl_basic_message_channel.h" + "fl_binary_codec.h" + "fl_binary_messenger.h" + "fl_dart_project.h" + "fl_engine.h" + "fl_json_message_codec.h" + "fl_json_method_codec.h" + "fl_message_codec.h" + "fl_method_call.h" + "fl_method_channel.h" + "fl_method_codec.h" + "fl_method_response.h" + "fl_plugin_registrar.h" + "fl_plugin_registry.h" + "fl_standard_message_codec.h" + "fl_standard_method_codec.h" + "fl_string_codec.h" + "fl_value.h" + "fl_view.h" + "flutter_linux.h" +) +list_prepend(FLUTTER_LIBRARY_HEADERS "${EPHEMERAL_DIR}/flutter_linux/") +add_library(flutter INTERFACE) +target_include_directories(flutter INTERFACE + "${EPHEMERAL_DIR}" +) +target_link_libraries(flutter INTERFACE "${FLUTTER_LIBRARY}") +target_link_libraries(flutter INTERFACE + PkgConfig::GTK + PkgConfig::GLIB + PkgConfig::GIO +) +add_dependencies(flutter flutter_assemble) + +# === Flutter tool backend === +# _phony_ is a non-existent file to force this command to run every time, +# since currently there's no way to get a full input/output list from the +# flutter tool. +add_custom_command( + OUTPUT ${FLUTTER_LIBRARY} ${FLUTTER_LIBRARY_HEADERS} + ${CMAKE_CURRENT_BINARY_DIR}/_phony_ + COMMAND ${CMAKE_COMMAND} -E env + ${FLUTTER_TOOL_ENVIRONMENT} + "${FLUTTER_ROOT}/packages/flutter_tools/bin/tool_backend.sh" + ${FLUTTER_TARGET_PLATFORM} ${CMAKE_BUILD_TYPE} + VERBATIM +) +add_custom_target(flutter_assemble DEPENDS + "${FLUTTER_LIBRARY}" + ${FLUTTER_LIBRARY_HEADERS} +) diff --git a/linux/flutter/generated_plugin_registrant.cc b/linux/flutter/generated_plugin_registrant.cc new file mode 100644 index 00000000..e98dc80e --- /dev/null +++ b/linux/flutter/generated_plugin_registrant.cc @@ -0,0 +1,23 @@ +// +// Generated file. Do not edit. +// + +// clang-format off + +#include "generated_plugin_registrant.h" + +#include +#include +#include + +void fl_register_plugins(FlPluginRegistry* registry) { + g_autoptr(FlPluginRegistrar) media_kit_libs_linux_registrar = + fl_plugin_registry_get_registrar_for_plugin(registry, "MediaKitLibsLinuxPlugin"); + media_kit_libs_linux_plugin_register_with_registrar(media_kit_libs_linux_registrar); + g_autoptr(FlPluginRegistrar) media_kit_video_registrar = + fl_plugin_registry_get_registrar_for_plugin(registry, "MediaKitVideoPlugin"); + media_kit_video_plugin_register_with_registrar(media_kit_video_registrar); + g_autoptr(FlPluginRegistrar) url_launcher_linux_registrar = + fl_plugin_registry_get_registrar_for_plugin(registry, "UrlLauncherPlugin"); + url_launcher_plugin_register_with_registrar(url_launcher_linux_registrar); +} diff --git a/linux/flutter/generated_plugin_registrant.h b/linux/flutter/generated_plugin_registrant.h new file mode 100644 index 00000000..e0f0a47b --- /dev/null +++ b/linux/flutter/generated_plugin_registrant.h @@ -0,0 +1,15 @@ +// +// Generated file. Do not edit. +// + +// clang-format off + +#ifndef GENERATED_PLUGIN_REGISTRANT_ +#define GENERATED_PLUGIN_REGISTRANT_ + +#include + +// Registers Flutter plugins. +void fl_register_plugins(FlPluginRegistry* registry); + +#endif // GENERATED_PLUGIN_REGISTRANT_ diff --git a/linux/flutter/generated_plugins.cmake b/linux/flutter/generated_plugins.cmake new file mode 100644 index 00000000..0f64cfb4 --- /dev/null +++ b/linux/flutter/generated_plugins.cmake @@ -0,0 +1,27 @@ +# +# Generated file, do not edit. +# + +list(APPEND FLUTTER_PLUGIN_LIST + media_kit_libs_linux + media_kit_video + url_launcher_linux +) + +list(APPEND FLUTTER_FFI_PLUGIN_LIST + media_kit_native_event_loop +) + +set(PLUGIN_BUNDLED_LIBRARIES) + +foreach(plugin ${FLUTTER_PLUGIN_LIST}) + add_subdirectory(flutter/ephemeral/.plugin_symlinks/${plugin}/linux plugins/${plugin}) + target_link_libraries(${BINARY_NAME} PRIVATE ${plugin}_plugin) + list(APPEND PLUGIN_BUNDLED_LIBRARIES $) + list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${plugin}_bundled_libraries}) +endforeach(plugin) + +foreach(ffi_plugin ${FLUTTER_FFI_PLUGIN_LIST}) + add_subdirectory(flutter/ephemeral/.plugin_symlinks/${ffi_plugin}/linux plugins/${ffi_plugin}) + list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${ffi_plugin}_bundled_libraries}) +endforeach(ffi_plugin) diff --git a/linux/main.cc b/linux/main.cc new file mode 100644 index 00000000..e7c5c543 --- /dev/null +++ b/linux/main.cc @@ -0,0 +1,6 @@ +#include "my_application.h" + +int main(int argc, char** argv) { + g_autoptr(MyApplication) app = my_application_new(); + return g_application_run(G_APPLICATION(app), argc, argv); +} diff --git a/linux/my_application.cc b/linux/my_application.cc new file mode 100644 index 00000000..4e7ec41e --- /dev/null +++ b/linux/my_application.cc @@ -0,0 +1,104 @@ +#include "my_application.h" + +#include +#ifdef GDK_WINDOWING_X11 +#include +#endif + +#include "flutter/generated_plugin_registrant.h" + +struct _MyApplication { + GtkApplication parent_instance; + char** dart_entrypoint_arguments; +}; + +G_DEFINE_TYPE(MyApplication, my_application, GTK_TYPE_APPLICATION) + +// Implements GApplication::activate. +static void my_application_activate(GApplication* application) { + MyApplication* self = MY_APPLICATION(application); + GtkWindow* window = + GTK_WINDOW(gtk_application_window_new(GTK_APPLICATION(application))); + + // Use a header bar when running in GNOME as this is the common style used + // by applications and is the setup most users will be using (e.g. Ubuntu + // desktop). + // If running on X and not using GNOME then just use a traditional title bar + // in case the window manager does more exotic layout, e.g. tiling. + // If running on Wayland assume the header bar will work (may need changing + // if future cases occur). + gboolean use_header_bar = TRUE; +#ifdef GDK_WINDOWING_X11 + GdkScreen* screen = gtk_window_get_screen(window); + if (GDK_IS_X11_SCREEN(screen)) { + const gchar* wm_name = gdk_x11_screen_get_window_manager_name(screen); + if (g_strcmp0(wm_name, "GNOME Shell") != 0) { + use_header_bar = FALSE; + } + } +#endif + if (use_header_bar) { + GtkHeaderBar* header_bar = GTK_HEADER_BAR(gtk_header_bar_new()); + gtk_widget_show(GTK_WIDGET(header_bar)); + gtk_header_bar_set_title(header_bar, "kazahana"); + gtk_header_bar_set_show_close_button(header_bar, TRUE); + gtk_window_set_titlebar(window, GTK_WIDGET(header_bar)); + } else { + gtk_window_set_title(window, "kazahana"); + } + + gtk_window_set_default_size(window, 1280, 720); + gtk_widget_show(GTK_WIDGET(window)); + + g_autoptr(FlDartProject) project = fl_dart_project_new(); + fl_dart_project_set_dart_entrypoint_arguments(project, self->dart_entrypoint_arguments); + + FlView* view = fl_view_new(project); + gtk_widget_show(GTK_WIDGET(view)); + gtk_container_add(GTK_CONTAINER(window), GTK_WIDGET(view)); + + fl_register_plugins(FL_PLUGIN_REGISTRY(view)); + + gtk_widget_grab_focus(GTK_WIDGET(view)); +} + +// Implements GApplication::local_command_line. +static gboolean my_application_local_command_line(GApplication* application, gchar*** arguments, int* exit_status) { + MyApplication* self = MY_APPLICATION(application); + // Strip out the first argument as it is the binary name. + self->dart_entrypoint_arguments = g_strdupv(*arguments + 1); + + g_autoptr(GError) error = nullptr; + if (!g_application_register(application, nullptr, &error)) { + g_warning("Failed to register: %s", error->message); + *exit_status = 1; + return TRUE; + } + + g_application_activate(application); + *exit_status = 0; + + return TRUE; +} + +// Implements GObject::dispose. +static void my_application_dispose(GObject* object) { + MyApplication* self = MY_APPLICATION(object); + g_clear_pointer(&self->dart_entrypoint_arguments, g_strfreev); + G_OBJECT_CLASS(my_application_parent_class)->dispose(object); +} + +static void my_application_class_init(MyApplicationClass* klass) { + G_APPLICATION_CLASS(klass)->activate = my_application_activate; + G_APPLICATION_CLASS(klass)->local_command_line = my_application_local_command_line; + G_OBJECT_CLASS(klass)->dispose = my_application_dispose; +} + +static void my_application_init(MyApplication* self) {} + +MyApplication* my_application_new() { + return MY_APPLICATION(g_object_new(my_application_get_type(), + "application-id", APPLICATION_ID, + "flags", G_APPLICATION_NON_UNIQUE, + nullptr)); +} diff --git a/linux/my_application.h b/linux/my_application.h new file mode 100644 index 00000000..72271d5e --- /dev/null +++ b/linux/my_application.h @@ -0,0 +1,18 @@ +#ifndef FLUTTER_MY_APPLICATION_H_ +#define FLUTTER_MY_APPLICATION_H_ + +#include + +G_DECLARE_FINAL_TYPE(MyApplication, my_application, MY, APPLICATION, + GtkApplication) + +/** + * my_application_new: + * + * Creates a new Flutter-based application. + * + * Returns: a new #MyApplication. + */ +MyApplication* my_application_new(); + +#endif // FLUTTER_MY_APPLICATION_H_ diff --git a/pubspec.lock b/pubspec.lock index 20a6a68b..602fdaf9 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -36,10 +36,10 @@ packages: dependency: transitive description: name: archive - sha256: "49b1fad315e57ab0bbc15bcbb874e83116a1d78f77ebd500a4af6c9407d6b28e" + sha256: "7e0d52067d05f2e0324268097ba723b71cb41ac8a6a2b24d1edf9c536b987b03" url: "https://pub.dev" source: hosted - version: "3.3.8" + version: "3.4.6" args: dependency: transitive description: @@ -64,20 +64,12 @@ packages: url: "https://pub.dev" source: hosted version: "2.11.0" - auto_orientation: - dependency: transitive - description: - name: auto_orientation - sha256: cd56bb59b36fa54cc28ee254bc600524f022a4862f31d5ab20abd7bb1c54e678 - url: "https://pub.dev" - source: hosted - version: "2.3.1" beize_shared: dependency: transitive description: path: "packages/beize_shared" ref: HEAD - resolved-ref: "1c113a77c933378718d702da5209582b5752e8f0" + resolved-ref: "9d087085ae97516c8cedaa94e83f8edaff097714" url: "https://github.com/zyrouge/beize.git" source: git version: "0.0.0" @@ -86,7 +78,7 @@ packages: description: path: "packages/beize_vm" ref: HEAD - resolved-ref: "1c113a77c933378718d702da5209582b5752e8f0" + resolved-ref: "9d087085ae97516c8cedaa94e83f8edaff097714" url: "https://github.com/zyrouge/beize.git" source: git version: "0.0.0" @@ -126,10 +118,10 @@ packages: dependency: transitive description: name: build_resolvers - sha256: a7417cc44d9edb3f2c8760000270c99dba8c72ff66d0146772b8326565780745 + sha256: "64e12b0521812d1684b1917bc80945625391cb9bdd4312536b1d69dcb6133ed8" url: "https://pub.dev" source: hosted - version: "2.3.1" + version: "2.4.1" build_runner: dependency: "direct dev" description: @@ -142,10 +134,10 @@ packages: dependency: transitive description: name: build_runner_core - sha256: "6d6ee4276b1c5f34f21fdf39425202712d2be82019983d52f351c94aafbc2c41" + sha256: c9e32d21dd6626b5c163d48b037ce906bbe428bc23ab77bcd77bb21e593b6185 url: "https://pub.dev" source: hosted - version: "7.2.10" + version: "7.2.11" built_collection: dependency: transitive description: @@ -158,10 +150,10 @@ packages: dependency: transitive description: name: built_value - sha256: ff627b645b28fb8bdb69e645f910c2458fd6b65f6585c3a53e0626024897dedf + sha256: "723b4021e903217dfc445ec4cf5b42e27975aece1fc4ebbc1ca6329c2d9fb54e" url: "https://pub.dev" source: hosted - version: "8.6.2" + version: "8.7.0" characters: dependency: transitive description: @@ -190,18 +182,18 @@ packages: dependency: transitive description: name: code_builder - sha256: "315a598c7fbe77f22de1c9da7cfd6fd21816312f16ffa124453b4fc679e540f1" + sha256: "1be9be30396d7e4c0db42c35ea6ccd7cc6a1e19916b5dc64d6ac216b5544d677" url: "https://pub.dev" source: hosted - version: "4.6.0" + version: "4.7.0" collection: dependency: "direct main" description: name: collection - sha256: f092b211a4319e98e5ff58223576de6c2803db36221657b46c82574721240687 + sha256: ee67cb0715911d28db6bf4af1026078bd6f0128b07a5f66fb2ed94ec6783c09a url: "https://pub.dev" source: hosted - version: "1.17.2" + version: "1.18.0" convert: dependency: transitive description: @@ -230,10 +222,10 @@ packages: dependency: transitive description: name: dart_style - sha256: "1efa911ca7086affd35f463ca2fc1799584fb6aa89883cf0af8e3664d6a02d55" + sha256: abd7625e16f51f554ea244d090292945ec4d4be7bfbaf2ec8cccea568919d334 url: "https://pub.dev" source: hosted - version: "2.3.2" + version: "2.3.3" dbus: dependency: transitive description: @@ -255,10 +247,10 @@ packages: dependency: "direct main" description: name: encrypt - sha256: "4fd4e4fdc21b9d7d4141823e1e6515cd94e7b8d84749504c232999fba25d9bbb" + sha256: "62d9aa4670cc2a8798bab89b39fc71b6dfbacf615de6cf5001fb39f7e4a996a2" url: "https://pub.dev" source: hosted - version: "5.0.1" + version: "5.0.3" ffi: dependency: transitive description: @@ -271,10 +263,10 @@ packages: dependency: transitive description: name: file - sha256: "1b92bec4fc2a72f59a8e15af5f52cd441e4a7860b49499d69dfa817af20e925d" + sha256: "5fc22d7c25582e38ad9a8515372cd9a93834027aacf1801cf01164dac0ffa08c" url: "https://pub.dev" source: hosted - version: "6.1.4" + version: "7.0.0" fixnum: dependency: transitive description: @@ -288,30 +280,6 @@ packages: description: flutter source: sdk version: "0.0.0" - flutter_meedu: - dependency: transitive - description: - name: flutter_meedu - sha256: "7be568c2df5036cd050358b589f2b3de3318562710f9a64ea364da5fd7eeafe7" - url: "https://pub.dev" - source: hosted - version: "8.3.1" - flutter_meedu_videoplayer: - dependency: "direct main" - description: - name: flutter_meedu_videoplayer - sha256: f3b00a0cfc19e62941842a37dac43d8fa86f576fc35a9c1ecdfc69d7d879d0f6 - url: "https://pub.dev" - source: hosted - version: "4.3.1" - flutter_spinkit: - dependency: transitive - description: - name: flutter_spinkit - sha256: b39c753e909d4796906c5696a14daf33639a76e017136c8d82bf3e620ce5bb8e - url: "https://pub.dev" - source: hosted - version: "5.2.0" flutter_web_plugins: dependency: transitive description: flutter @@ -325,22 +293,6 @@ packages: url: "https://pub.dev" source: hosted version: "3.2.0" - fullscreen_window: - dependency: transitive - description: - name: fullscreen_window - sha256: fe3014f91bff16a82d142ba9d834980b8a84b4bb03347a92588d389ad92bd1d3 - url: "https://pub.dev" - source: hosted - version: "1.0.4" - fvp: - dependency: transitive - description: - name: fvp - sha256: "27c4ab8e63817b73e3e01555077a3714f02d85f35c4cf31ae42c9ee581ee84a0" - url: "https://pub.dev" - source: hosted - version: "0.3.0" glob: dependency: transitive description: @@ -393,10 +345,10 @@ packages: dependency: "direct dev" description: name: image - sha256: "8e9d133755c3e84c73288363e6343157c383a0c6c56fc51afcc5d4d7180306d6" + sha256: "028f61960d56f26414eb616b48b04eb37d700cbe477b7fb09bf1d7ce57fd9271" url: "https://pub.dev" source: hosted - version: "3.3.0" + version: "4.1.3" io: dependency: transitive description: @@ -461,22 +413,86 @@ packages: url: "https://pub.dev" source: hosted version: "0.5.0" - meedu: + media_kit: + dependency: "direct main" + description: + name: media_kit + sha256: "3289062540e3b8b9746e5c50d95bd78a9289826b7227e253dff806d002b9e67a" + url: "https://pub.dev" + source: hosted + version: "1.1.10+1" + media_kit_libs_android_video: + dependency: transitive + description: + name: media_kit_libs_android_video + sha256: "9dd8012572e4aff47516e55f2597998f0a378e3d588d0fad0ca1f11a53ae090c" + url: "https://pub.dev" + source: hosted + version: "1.3.6" + media_kit_libs_ios_video: + dependency: transitive + description: + name: media_kit_libs_ios_video + sha256: b5382994eb37a4564c368386c154ad70ba0cc78dacdd3fb0cd9f30db6d837991 + url: "https://pub.dev" + source: hosted + version: "1.1.4" + media_kit_libs_linux: + dependency: transitive + description: + name: media_kit_libs_linux + sha256: e186891c31daa6bedab4d74dcdb4e8adfccc7d786bfed6ad81fe24a3b3010310 + url: "https://pub.dev" + source: hosted + version: "1.1.3" + media_kit_libs_macos_video: + dependency: transitive + description: + name: media_kit_libs_macos_video + sha256: f26aa1452b665df288e360393758f84b911f70ffb3878032e1aabba23aa1032d + url: "https://pub.dev" + source: hosted + version: "1.1.4" + media_kit_libs_video: + dependency: "direct main" + description: + name: media_kit_libs_video + sha256: "3688e0c31482074578652bf038ce6301a5d21e1eda6b54fc3117ffeb4bdba067" + url: "https://pub.dev" + source: hosted + version: "1.0.4" + media_kit_libs_windows_video: + dependency: transitive + description: + name: media_kit_libs_windows_video + sha256: "7bace5f35d9afcc7f9b5cdadb7541d2191a66bb3fc71bfa11c1395b3360f6122" + url: "https://pub.dev" + source: hosted + version: "1.0.9" + media_kit_native_event_loop: dependency: transitive description: - name: meedu - sha256: "2cac0971ea211b1a18e3c4f038369f8ac57401760342da16d9e4e9d043f7de38" + name: media_kit_native_event_loop + sha256: a605cf185499d14d58935b8784955a92a4bf0ff4e19a23de3d17a9106303930e url: "https://pub.dev" source: hosted - version: "8.0.2" + version: "1.0.8" + media_kit_video: + dependency: "direct main" + description: + name: media_kit_video + sha256: c048d11a19e379aebbe810647636e3fc6d18374637e2ae12def4ff8a4b99a882 + url: "https://pub.dev" + source: hosted + version: "1.2.4" meta: dependency: transitive description: name: meta - sha256: "3c74dbf8763d36539f114c799d8a2d87343b5067e9d796ca22b5eb8437090ee3" + sha256: a6e590c838b18133bb482a2745ad77c5bb7715fb0451209e1a7567d416678b8e url: "https://pub.dev" source: hosted - version: "1.9.1" + version: "1.10.0" mime: dependency: transitive description: @@ -505,10 +521,10 @@ packages: dependency: transitive description: name: package_info_plus - sha256: "6ff267fcd9d48cb61c8df74a82680e8b82e940231bb5f68356672fde0397334a" + sha256: "7e76fad405b3e4016cd39d08f455a4eb5199723cf594cd1b8916d47140d93017" url: "https://pub.dev" source: hosted - version: "4.1.0" + version: "4.2.0" package_info_plus_platform_interface: dependency: transitive description: @@ -537,10 +553,10 @@ packages: dependency: transitive description: name: path_provider_android - sha256: "6b8b19bd80da4f11ce91b2d1fb931f3006911477cec227cce23d3253d80df3f1" + sha256: e595b98692943b4881b219f0a9e3945118d3c16bd7e2813f98ec6e532d905f72 url: "https://pub.dev" source: hosted - version: "2.2.0" + version: "2.2.1" path_provider_foundation: dependency: transitive description: @@ -585,18 +601,18 @@ packages: dependency: transitive description: name: petitparser - sha256: cb3798bef7fc021ac45b308f4b51208a152792445cce0448c9a4ba5879dd8750 + sha256: eeb2d1428ee7f4170e2bd498827296a18d4e7fc462b71727d111c0ac7707cfa6 url: "https://pub.dev" source: hosted - version: "5.4.0" + version: "6.0.1" platform: dependency: transitive description: name: platform - sha256: ae68c7bfcd7383af3629daafb32fb4e8681c7154428da4febcff06200585f102 + sha256: "0a279f0707af40c890e80b1e9df8bb761694c074ba7e1d4ab1bc4b728e200b59" url: "https://pub.dev" source: hosted - version: "3.1.2" + version: "3.1.3" plugin_platform_interface: dependency: transitive description: @@ -645,6 +661,14 @@ packages: url: "https://pub.dev" source: hosted version: "1.2.3" + safe_local_storage: + dependency: transitive + description: + name: safe_local_storage + sha256: ede4eb6cb7d88a116b3d3bf1df70790b9e2038bc37cb19112e381217c74d9440 + url: "https://pub.dev" + source: hosted + version: "1.0.2" screen_brightness: dependency: transitive description: @@ -693,14 +717,6 @@ packages: url: "https://pub.dev" source: hosted version: "0.1.3" - screen_retriever: - dependency: transitive - description: - name: screen_retriever - sha256: "6ee02c8a1158e6dae7ca430da79436e3b1c9563c8cf02f524af997c201ac2b90" - url: "https://pub.dev" - source: hosted - version: "0.1.9" shared: dependency: "direct main" description: @@ -708,62 +724,6 @@ packages: relative: true source: path version: "0.0.0" - shared_preferences: - dependency: transitive - description: - name: shared_preferences - sha256: b7f41bad7e521d205998772545de63ff4e6c97714775902c199353f8bf1511ac - url: "https://pub.dev" - source: hosted - version: "2.2.1" - shared_preferences_android: - dependency: transitive - description: - name: shared_preferences_android - sha256: "8568a389334b6e83415b6aae55378e158fbc2314e074983362d20c562780fb06" - url: "https://pub.dev" - source: hosted - version: "2.2.1" - shared_preferences_foundation: - dependency: transitive - description: - name: shared_preferences_foundation - sha256: "7bf53a9f2d007329ee6f3df7268fd498f8373602f943c975598bbb34649b62a7" - url: "https://pub.dev" - source: hosted - version: "2.3.4" - shared_preferences_linux: - dependency: transitive - description: - name: shared_preferences_linux - sha256: c2eb5bf57a2fe9ad6988121609e47d3e07bb3bdca5b6f8444e4cf302428a128a - url: "https://pub.dev" - source: hosted - version: "2.3.1" - shared_preferences_platform_interface: - dependency: transitive - description: - name: shared_preferences_platform_interface - sha256: d4ec5fc9ebb2f2e056c617112aa75dcf92fc2e4faaf2ae999caa297473f75d8a - url: "https://pub.dev" - source: hosted - version: "2.3.1" - shared_preferences_web: - dependency: transitive - description: - name: shared_preferences_web - sha256: d762709c2bbe80626ecc819143013cc820fa49ca5e363620ee20a8b15a3e3daf - url: "https://pub.dev" - source: hosted - version: "2.2.1" - shared_preferences_windows: - dependency: transitive - description: - name: shared_preferences_windows - sha256: f763a101313bd3be87edffe0560037500967de9c394a714cd598d945517f694f - url: "https://pub.dev" - source: hosted - version: "2.3.1" shelf: dependency: transitive description: @@ -809,6 +769,14 @@ packages: url: "https://pub.dev" source: hosted version: "1.10.0" + sprintf: + dependency: transitive + description: + name: sprintf + sha256: "1fc9ffe69d4df602376b52949af107d8f5703b77cda567c4d7d86a0693120f23" + url: "https://pub.dev" + source: hosted + version: "7.0.0" stack_trace: dependency: transitive description: @@ -841,12 +809,20 @@ packages: url: "https://pub.dev" source: hosted version: "1.2.0" + synchronized: + dependency: transitive + description: + name: synchronized + sha256: "5fcbd27688af6082f5abd611af56ee575342c30e87541d0245f7ff99faa02c60" + url: "https://pub.dev" + source: hosted + version: "3.1.0" tenka: dependency: "direct main" description: path: "." ref: dart_tenka - resolved-ref: d9e554a5c82cfca0be40bb6adb79244749530eab + resolved-ref: "99668f89bbfcc63aaaf6d1c04c9447e22805cbc7" url: "https://github.com/yukino-org/packages.git" source: git version: "1.0.5" @@ -855,7 +831,7 @@ packages: description: path: "." ref: dart_tenka_runtime - resolved-ref: f935c7923d639d7cf3204ed20cf7e4524db7d801 + resolved-ref: "88c24830af512495176c1a56f39153e509f783ba" url: "https://github.com/yukino-org/packages.git" source: git version: "0.0.0" @@ -923,70 +899,78 @@ packages: url: "https://pub.dev" source: hosted version: "1.0.0+1" + uri_parser: + dependency: transitive + description: + name: uri_parser + sha256: "6543c9fd86d2862fac55d800a43e67c0dcd1a41677cb69c2f8edfe73bbcf1835" + url: "https://pub.dev" + source: hosted + version: "2.0.2" url_launcher: dependency: "direct main" description: name: url_launcher - sha256: "47e208a6711459d813ba18af120d9663c20bdf6985d6ad39fe165d2538378d27" + sha256: b1c9e98774adf8820c96fbc7ae3601231d324a7d5ebd8babe27b6dfac91357ba url: "https://pub.dev" source: hosted - version: "6.1.14" + version: "6.2.1" url_launcher_android: dependency: transitive description: name: url_launcher_android - sha256: b04af59516ab45762b2ca6da40fa830d72d0f6045cd97744450b73493fa76330 + sha256: "31222ffb0063171b526d3e569079cf1f8b294075ba323443fdc690842bfd4def" url: "https://pub.dev" source: hosted - version: "6.1.0" + version: "6.2.0" url_launcher_ios: dependency: transitive description: name: url_launcher_ios - sha256: "7c65021d5dee51813d652357bc65b8dd4a6177082a9966bc8ba6ee477baa795f" + sha256: "4ac97281cf60e2e8c5cc703b2b28528f9b50c8f7cebc71df6bdf0845f647268a" url: "https://pub.dev" source: hosted - version: "6.1.5" + version: "6.2.0" url_launcher_linux: dependency: transitive description: name: url_launcher_linux - sha256: b651aad005e0cb06a01dbd84b428a301916dc75f0e7ea6165f80057fee2d8e8e + sha256: "9f2d390e096fdbe1e6e6256f97851e51afc2d9c423d3432f1d6a02a8a9a8b9fd" url: "https://pub.dev" source: hosted - version: "3.0.6" + version: "3.1.0" url_launcher_macos: dependency: transitive description: name: url_launcher_macos - sha256: b55486791f666e62e0e8ff825e58a023fd6b1f71c49926483f1128d3bbd8fe88 + sha256: b7244901ea3cf489c5335bdacda07264a6e960b1c1b1a9f91e4bc371d9e68234 url: "https://pub.dev" source: hosted - version: "3.0.7" + version: "3.1.0" url_launcher_platform_interface: dependency: transitive description: name: url_launcher_platform_interface - sha256: "95465b39f83bfe95fcb9d174829d6476216f2d548b79c38ab2506e0458787618" + sha256: "980e8d9af422f477be6948bdfb68df8433be71f5743a188968b0c1b887807e50" url: "https://pub.dev" source: hosted - version: "2.1.5" + version: "2.2.0" url_launcher_web: dependency: transitive description: name: url_launcher_web - sha256: "2942294a500b4fa0b918685aff406773ba0a4cd34b7f42198742a94083020ce5" + sha256: "7fd2f55fe86cea2897b963e864dc01a7eb0719ecc65fcef4c1cc3d686d718bb2" url: "https://pub.dev" source: hosted - version: "2.0.20" + version: "2.2.0" url_launcher_windows: dependency: transitive description: name: url_launcher_windows - sha256: "95fef3129dc7cfaba2bc3d5ba2e16063bb561fc6d78e63eee16162bc70029069" + sha256: "7754a1ad30ee896b265f8d14078b0513a4dba28d358eabb9d5f339886f4a1adc" url: "https://pub.dev" source: hosted - version: "3.0.8" + version: "3.1.0" utilx: dependency: "direct main" description: @@ -996,54 +980,22 @@ packages: url: "https://github.com/yukino-org/packages.git" source: git version: "0.0.0" - vector_math: - dependency: transitive - description: - name: vector_math - sha256: "80b3257d1492ce4d091729e3a67a60407d227c27241d6927be0130c98e741803" - url: "https://pub.dev" - source: hosted - version: "2.1.4" - video_player: - dependency: transitive - description: - name: video_player - sha256: d3910a8cefc0de8a432a4411dcf85030e885d8fef3ddea291f162253a05dbf01 - url: "https://pub.dev" - source: hosted - version: "2.7.1" - video_player_android: + uuid: dependency: transitive description: - name: video_player_android - sha256: "3fe89ab07fdbce786e7eb25b58532d6eaf189ceddc091cb66cba712f8d9e8e55" + name: uuid + sha256: b715b8d3858b6fa9f68f87d20d98830283628014750c2b09b6f516c1da4af2a7 url: "https://pub.dev" source: hosted - version: "2.4.10" - video_player_avfoundation: - dependency: transitive - description: - name: video_player_avfoundation - sha256: c3b123a5a56c9812b9029f840c65b92fd65083eb08d69be016b01e8aa018f77d - url: "https://pub.dev" - source: hosted - version: "2.4.10" - video_player_platform_interface: - dependency: transitive - description: - name: video_player_platform_interface - sha256: be72301bf2c0150ab35a8c34d66e5a99de525f6de1e8d27c0672b836fe48f73a - url: "https://pub.dev" - source: hosted - version: "6.2.1" - video_player_web: + version: "4.1.0" + vector_math: dependency: transitive description: - name: video_player_web - sha256: "68bdd115389d68aea99466259b079a5ef3fa9ca7600ef12b616d8551fa1541a9" + name: vector_math + sha256: "80b3257d1492ce4d091729e3a67a60407d227c27241d6927be0130c98e741803" url: "https://pub.dev" source: hosted - version: "2.0.18" + version: "2.1.4" volume_controller: dependency: transitive description: @@ -1056,10 +1008,10 @@ packages: dependency: transitive description: name: wakelock_plus - sha256: aac3f3258f01781ec9212df94eecef1eb9ba9350e106728def405baa096ba413 + sha256: f45a6c03aa3f8322e0a9d7f4a0482721c8789cb41d555407367650b8f9c26018 url: "https://pub.dev" source: hosted - version: "1.1.1" + version: "1.1.3" wakelock_plus_platform_interface: dependency: transitive description: @@ -1080,10 +1032,10 @@ packages: dependency: transitive description: name: web - sha256: dc8ccd225a2005c1be616fe02951e2e342092edf968cf0844220383757ef8f10 + sha256: "14f1f70c51119012600c5f1f60ca68efda5a9b6077748163c6af2893ec5df8fc" url: "https://pub.dev" source: hosted - version: "0.1.4-beta" + version: "0.2.1-beta" web_socket_channel: dependency: transitive description: @@ -1096,18 +1048,10 @@ packages: dependency: transitive description: name: win32 - sha256: "9e82a402b7f3d518fb9c02d0e9ae45952df31b9bf34d77baf19da2de03fc2aaa" - url: "https://pub.dev" - source: hosted - version: "5.0.7" - window_manager: - dependency: transitive - description: - name: window_manager - sha256: "6ee795be9124f90660ea9d05e581a466de19e1c89ee74fc4bf528f60c8600edd" + sha256: "350a11abd2d1d97e0cc7a28a81b781c08002aa2864d9e3f192ca0ffa18b06ed3" url: "https://pub.dev" source: hosted - version: "0.3.6" + version: "5.0.9" xdg_directories: dependency: transitive description: @@ -1120,10 +1064,10 @@ packages: dependency: transitive description: name: xml - sha256: "5bc72e1e45e941d825fd7468b9b4cc3b9327942649aeb6fc5cdbf135f0a86e84" + sha256: af5e77e9b83f2f4adc5d3f0a4ece1c7f45a2467b695c2540381bac793e34e556 url: "https://pub.dev" source: hosted - version: "6.3.0" + version: "6.4.2" yaml: dependency: transitive description: @@ -1142,5 +1086,5 @@ packages: source: git version: "0.0.0" sdks: - dart: ">=3.1.0 <4.0.0" + dart: ">=3.2.0-157.0.dev <4.0.0" flutter: ">=3.13.0" diff --git a/pubspec.yaml b/pubspec.yaml index 7594a5b2..784a4777 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -14,8 +14,10 @@ dependencies: encrypt: ^5.0.1 flutter: sdk: flutter - flutter_meedu_videoplayer: ^4.3.0 json_annotation: ^4.6.0 + media_kit: ^1.1.10 + media_kit_video: ^1.2.4 + media_kit_libs_video: ^1.0.4 path: ^1.8.2 path_provider: ^2.0.11 perks: ^1.0.0 @@ -43,7 +45,7 @@ dev_dependencies: git: url: https://github.com/yukino-org/packages.git ref: dart_devx - image: ^3.2.0 + image: ^4.1.3 json_serializable: ^6.3.1 flutter: