diff --git a/lib/bloc/dashboard_bloc/dashboard_bloc.dart b/lib/bloc/dashboard_bloc/dashboard_bloc.dart index c15408d..a70eb9b 100644 --- a/lib/bloc/dashboard_bloc/dashboard_bloc.dart +++ b/lib/bloc/dashboard_bloc/dashboard_bloc.dart @@ -1,6 +1,7 @@ import 'dart:async'; import 'package:bloc/bloc.dart'; +import 'package:bloc_concurrency/bloc_concurrency.dart'; import 'package:equatable/equatable.dart'; import 'package:file_selector/file_selector.dart'; @@ -9,9 +10,12 @@ part 'dashboard_state.dart'; /// Handles selecting and removing files. class DashboardBloc extends Bloc { - DashboardBloc() : super(DashboardState(files: [], alreadyPresent: false)); - @override - Stream mapEventToState(DashboardEvent event) async* { + DashboardBloc() : super(DashboardState(files: [], alreadyPresent: false)) { + on(_onEvent, transformer: sequential()); + } + FutureOr _onEvent( + DashboardEvent event, Emitter emit) async { + // TODO: logic goes here... if (event is NewFileAdded) { List finalEventList = List.from(event.files); bool alreadyPresent = false; @@ -25,21 +29,21 @@ class DashboardBloc extends Bloc { } } if (alreadyPresent) { - yield state.copyWith( + emit(state.copyWith( files: List.from(state.files)..addAll(finalEventList), - alreadyPresent: true); + alreadyPresent: true)); } else { - yield state.copyWith( + emit(state.copyWith( files: List.from(state.files)..addAll(event.files), - alreadyPresent: false); + alreadyPresent: false)); ; } } else if (event is FileRemoved) { - yield state.copyWith( + emit(state.copyWith( files: List.from(state.files)..remove(event.file), - alreadyPresent: false); + alreadyPresent: false)); } else if (event is RemoveAllFiles) { - yield state.copyWith(files: [], alreadyPresent: false); + emit(state.copyWith(files: [], alreadyPresent: false)); } } } diff --git a/lib/bloc/process_bloc/process_bloc.dart b/lib/bloc/process_bloc/process_bloc.dart index 4046499..5dc0306 100644 --- a/lib/bloc/process_bloc/process_bloc.dart +++ b/lib/bloc/process_bloc/process_bloc.dart @@ -1,7 +1,9 @@ +import 'dart:async'; + +import 'package:bloc_concurrency/bloc_concurrency.dart'; import 'package:equatable/equatable.dart'; import 'package:file_selector/file_selector.dart'; import 'package:flutter_bloc/flutter_bloc.dart'; -import 'package:pedantic/pedantic.dart'; import 'package:ccxgui/repositories/ccextractor.dart'; @@ -22,9 +24,11 @@ class ProcessBloc extends Bloc { progress: '0', current: null, version: '0', - )); + )) { + on(_onEvent, transformer: sequential()); + } - Stream _extractNext() async* { + Stream _extractNext(Emitter emit) async* { if (!state.started || state.current != null || state.queue.isEmpty) { if (state.queue.isEmpty) { // We need to show user that all files have finished processing @@ -75,8 +79,8 @@ class ProcessBloc extends Bloc { ); } - Stream _extractOnNetwork( - String type, String location, String tcppassword, String tcpdesc) async* { + Stream _extractOnNetwork(String type, String location, + String tcppassword, String tcpdesc, Emitter emit) async* { unawaited( _extractor .extractFileOverNetwork( @@ -100,7 +104,8 @@ class ProcessBloc extends Bloc { ); } - Stream _extractFilesInSplitMode() async* { + Stream _extractFilesInSplitMode( + Emitter emit) async* { unawaited( _extractor .extractFilesInSplitMode( @@ -122,10 +127,10 @@ class ProcessBloc extends Bloc { ); } - @override - Stream mapEventToState(ProcessEvent event) async* { + FutureOr _onEvent( + ProcessEvent event, Emitter emit) async { if (event is StartAllProcess) { - yield state.copyWith( + emit(state.copyWith( current: state.current, // This equality checks if the queue and originalList are same which // means that the user has not added any new y files or they have been @@ -137,39 +142,39 @@ class ProcessBloc extends Bloc { // proccessed x files as it is. processed: state.queue == state.orignalList ? [] : state.processed, started: true, - ); - yield* _extractNext(); + )); + _extractNext(emit); } else if (event is StartProcessInSplitMode) { - yield state.copyWith(current: state.current, started: true); - yield* _extractFilesInSplitMode(); + emit(state.copyWith(current: state.current, started: true)); + _extractFilesInSplitMode(emit); } else if (event is StopAllProcess) { // stops everything try { _extractor.cancelRun(); } catch (_) {} - yield state.copyWith( + emit(state.copyWith( current: null, queue: state.orignalList, processed: [], // We don't need ticks when we stop so discard processed files list. progress: '0', started: false, - ); + )); } else if (event is ProcessKill) { try { _extractor.cancelRun(); } catch (_) {} - yield state.copyWith( + emit(state.copyWith( current: state.current, orignalList: state.orignalList .where((element) => element != event.file) .toList(), queue: state.queue.where((element) => element != event.file).toList(), - ); + )); } else if (event is ProcessRemoveAll) { try { _extractor.cancelRun(); } catch (_) {} - yield state.copyWith( + emit(state.copyWith( current: null, progress: '0', processed: [], @@ -179,36 +184,36 @@ class ProcessBloc extends Bloc { exitCode: null, log: [], videoDetails: [], - ); + )); } else if (event is ProcessFileExtractorProgress) { - yield state.copyWith(current: state.current, progress: event.progress); + emit(state.copyWith(current: state.current, progress: event.progress)); } else if (event is ProcessFileVideoDetails) { - yield state.copyWith( - current: state.current, videoDetails: event.videoDetails); + emit(state.copyWith( + current: state.current, videoDetails: event.videoDetails)); } else if (event is ProcessFileExtractorOutput) { - yield state.copyWith( + emit(state.copyWith( current: state.current, log: state.log.followedBy([event.log]).toList(), - ); + )); } else if (event is ProcessFileComplete) { if (state.current == event.file) { - yield state.copyWith( + emit(state.copyWith( current: null, log: state.queue.isNotEmpty ? [] : state.log, processed: state.processed.followedBy([event.file]).toList(), exitCode: null, - ); - yield* _extractNext(); + )); + _extractNext(emit); } } else if (event is SplitModeProcessComplete) { - yield state.copyWith( + emit(state.copyWith( current: null, log: state.log, exitCode: null, started: false, - progress: '100'); + progress: '100')); } else if (event is ProcessFilesSubmitted) { - yield state.copyWith( + emit(state.copyWith( current: state.current, orignalList: List.from(state.orignalList)..addAll(event.files), processed: state.processed, @@ -234,28 +239,28 @@ class ProcessBloc extends Bloc { queue: state.started || state.processed.isEmpty ? state.queue.followedBy(event.files).toList() : event.files, - ); + )); } else if (event is ProcessFileRemoved) { - yield state.copyWith( + emit(state.copyWith( current: state.current, orignalList: state.orignalList .where((element) => element != event.file) .toList(), queue: state.queue.where((element) => element != event.file).toList(), - ); + )); } else if (event is GetCCExtractorVersion) { String ccxVersion = await _extractor.getCCExtractorVersion; - yield state.copyWith( + emit(state.copyWith( current: state.current, version: ccxVersion, - ); + )); } else if (event is ProcessError) { - yield state.copyWith(current: state.current, exitCode: event.exitCode); + emit(state.copyWith(current: state.current, exitCode: event.exitCode)); } else if (event is ResetProcessError) { - yield state.copyWith(current: state.current, exitCode: null); + emit(state.copyWith(current: state.current, exitCode: null)); } else if (event is ProcessOnNetwork) { - yield* _extractOnNetwork( - event.type, event.location, event.tcppassword, event.tcpdesc); + _extractOnNetwork( + event.type, event.location, event.tcppassword, event.tcpdesc, emit); } } } diff --git a/lib/bloc/settings_bloc/settings_bloc.dart b/lib/bloc/settings_bloc/settings_bloc.dart index 46f99d1..215eaad 100644 --- a/lib/bloc/settings_bloc/settings_bloc.dart +++ b/lib/bloc/settings_bloc/settings_bloc.dart @@ -1,6 +1,7 @@ import 'dart:async'; import 'package:bloc/bloc.dart'; +import 'package:bloc_concurrency/bloc_concurrency.dart'; import 'package:equatable/equatable.dart'; import 'package:ccxgui/models/settings_model.dart'; @@ -11,33 +12,33 @@ part 'settings_state.dart'; class SettingsBloc extends Bloc { final SettingsRepository _settingsRepository; - SettingsBloc(this._settingsRepository) : super(SettingsInitial()); - - @override - Stream mapEventToState( - SettingsEvent event, - ) async* { + SettingsBloc(this._settingsRepository) : super(SettingsInitial()) { + on(_onEvent, transformer: sequential()); + } + FutureOr _onEvent( + SettingsEvent event, Emitter emit) async { + // TODO: logic goes here... if (event is CheckSettingsEvent) { bool settingsStatus = await _settingsRepository.checkValidJSON(); if (settingsStatus) { add(GetSettingsEvent()); } else { - yield SettingsErrorState("Couldn't parse json file"); + emit(SettingsErrorState("Couldn't parse json file")); } } else if (event is GetSettingsEvent) { try { final _settings = await _settingsRepository.getSettings(); - yield CurrentSettingsState(_settings); + emit(CurrentSettingsState(_settings)); } catch (e) { - yield SettingsErrorState('Error getting settings.'); + emit(SettingsErrorState('Error getting settings.')); } } else if (event is ResetSettingsEvent) { await _settingsRepository.resetSettings(); final _settings = await _settingsRepository.getSettings(); - yield CurrentSettingsState(_settings); + emit(CurrentSettingsState(_settings)); } else if (event is SettingsUpdatedEvent) { - yield CurrentSettingsState(event.settingsModel); + emit(CurrentSettingsState(event.settingsModel)); add(SaveSettingsEvent(event.settingsModel)); // improve } else if (event is SaveSettingsEvent) { @@ -45,15 +46,15 @@ class SettingsBloc extends Bloc { try { await _settingsRepository.saveSettings(event.settingsModel); final _settings = await _settingsRepository.getSettings(); - yield CurrentSettingsState(_settings); + emit(CurrentSettingsState(_settings)); } catch (e) { - yield SettingsErrorState('Error saving settings.'); + emit(SettingsErrorState('Error saving settings.')); } } else { // only possible when app is open and use manually messes up config.json. - yield SettingsErrorState('Corrupted config.json detected, rewriting.'); + emit(SettingsErrorState('Corrupted config.json detected, rewriting.')); final _settings = await _settingsRepository.getSettings(); - yield CurrentSettingsState(_settings); + emit(CurrentSettingsState(_settings)); } } } diff --git a/lib/bloc/updater_bloc/updater_bloc.dart b/lib/bloc/updater_bloc/updater_bloc.dart index 32555da..3474d98 100644 --- a/lib/bloc/updater_bloc/updater_bloc.dart +++ b/lib/bloc/updater_bloc/updater_bloc.dart @@ -2,6 +2,7 @@ import 'dart:async'; import 'dart:convert'; import 'package:bloc/bloc.dart'; +import 'package:bloc_concurrency/bloc_concurrency.dart'; import 'package:equatable/equatable.dart'; import 'package:http/http.dart' as http; import 'package:url_launcher/url_launcher.dart'; @@ -10,13 +11,13 @@ part 'updater_event.dart'; part 'updater_state.dart'; class UpdaterBloc extends Bloc { - UpdaterBloc() : super(UpdaterState('0.0', '0.0', false, '', '')); + UpdaterBloc() : super(UpdaterState('0.0', '0.0', false, '', '')) { + on(_onEvent, transformer: sequential()); + } static const URL = 'https://api.github.com/repos/CCExtractor/ccextractor/releases'; - @override - Stream mapEventToState( - UpdaterEvent event, - ) async* { + FutureOr _onEvent( + UpdaterEvent event, Emitter emit) async { if (event is CheckForUpdates) { var url = Uri.parse(URL); String changelog = ''; @@ -38,13 +39,13 @@ class UpdaterBloc extends Bloc { bool updateAvailable = double.parse(latestVersion) > double.parse(event.currentVersion); - yield state.copyWith( + emit(state.copyWith( currentVersion: event.currentVersion, latestVersion: latestVersion, updateAvailable: updateAvailable, downloadURL: downloadURL, changelog: changelog, - ); + )); } if (event is DownloadUpdate) { await launch(event.downloadURl); diff --git a/lib/main.dart b/lib/main.dart index 270a111..a323869 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -16,14 +16,18 @@ import 'bloc_observer.dart'; void main() async { WidgetsFlutterBinding.ensureInitialized(); - Bloc.observer = SimpleBlocObserver(); if (Platform.isWindows || Platform.isLinux || Platform.isMacOS) { setWindowTitle('CCExtractor'); setWindowMinSize(const Size(800, 800)); setWindowMaxSize(const Size(10000, 10000)); } - runApp( - MyApp(), + BlocOverrides.runZoned( + () { + runApp( + MyApp(), + ); + }, + blocObserver: SimpleBlocObserver(), ); } diff --git a/pubspec.lock b/pubspec.lock index e902447..7b6d467 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -7,21 +7,21 @@ packages: name: _fe_analyzer_shared url: "https://pub.dartlang.org" source: hosted - version: "21.0.0" + version: "31.0.0" analyzer: dependency: transitive description: name: analyzer url: "https://pub.dartlang.org" source: hosted - version: "1.5.0" + version: "2.8.0" args: dependency: transitive description: name: args url: "https://pub.dartlang.org" source: hosted - version: "2.0.0" + version: "2.3.0" async: dependency: transitive description: @@ -35,14 +35,21 @@ packages: name: bloc url: "https://pub.dartlang.org" source: hosted - version: "7.0.0" + version: "8.0.2" + bloc_concurrency: + dependency: "direct main" + description: + name: bloc_concurrency + url: "https://pub.dartlang.org" + source: hosted + version: "0.2.0" bloc_test: dependency: "direct main" description: name: bloc_test url: "https://pub.dartlang.org" source: hosted - version: "8.1.0" + version: "9.0.2" boolean_selector: dependency: transitive description: @@ -56,7 +63,7 @@ packages: name: build url: "https://pub.dartlang.org" source: hosted - version: "2.1.0" + version: "2.2.1" build_config: dependency: transitive description: @@ -70,42 +77,42 @@ packages: name: build_daemon url: "https://pub.dartlang.org" source: hosted - version: "3.0.0" + version: "3.0.1" build_resolvers: dependency: transitive description: name: build_resolvers url: "https://pub.dartlang.org" source: hosted - version: "2.0.1" + version: "2.0.6" build_runner: dependency: "direct dev" description: name: build_runner url: "https://pub.dartlang.org" source: hosted - version: "2.1.0" + version: "2.1.7" build_runner_core: dependency: transitive description: name: build_runner_core url: "https://pub.dartlang.org" source: hosted - version: "7.1.0" + version: "7.2.3" built_collection: dependency: transitive description: name: built_collection url: "https://pub.dartlang.org" source: hosted - version: "5.0.0" + version: "5.1.1" built_value: dependency: transitive description: name: built_value url: "https://pub.dartlang.org" source: hosted - version: "8.0.4" + version: "8.1.4" characters: dependency: transitive description: @@ -133,7 +140,7 @@ packages: name: cli_util url: "https://pub.dartlang.org" source: hosted - version: "0.3.0" + version: "0.3.5" clock: dependency: transitive description: @@ -147,7 +154,7 @@ packages: name: code_builder url: "https://pub.dartlang.org" source: hosted - version: "4.0.0" + version: "4.1.0" collection: dependency: transitive description: @@ -161,7 +168,7 @@ packages: name: convert url: "https://pub.dartlang.org" source: hosted - version: "3.0.0" + version: "3.0.1" coverage: dependency: transitive description: @@ -175,7 +182,7 @@ packages: name: cross_file url: "https://pub.dartlang.org" source: hosted - version: "0.3.1+1" + version: "0.3.2" crypto: dependency: transitive description: @@ -189,14 +196,21 @@ packages: name: cupertino_icons url: "https://pub.dartlang.org" source: hosted - version: "1.0.2" + version: "1.0.4" dart_style: dependency: transitive description: name: dart_style url: "https://pub.dartlang.org" source: hosted - version: "2.0.0" + version: "2.2.1" + diff_match_patch: + dependency: transitive + description: + name: diff_match_patch + url: "https://pub.dartlang.org" + source: hosted + version: "0.4.1" equatable: dependency: "direct main" description: @@ -224,21 +238,21 @@ packages: name: ffi url: "https://pub.dartlang.org" source: hosted - version: "1.0.0" + version: "1.1.2" file: dependency: transitive description: name: file url: "https://pub.dartlang.org" source: hosted - version: "6.1.0" + version: "6.1.2" file_selector: dependency: "direct main" description: name: file_selector url: "https://pub.dartlang.org" source: hosted - version: "0.8.2" + version: "0.8.2+1" file_selector_linux: dependency: "direct main" description: @@ -259,14 +273,14 @@ packages: name: file_selector_platform_interface url: "https://pub.dartlang.org" source: hosted - version: "2.0.2" + version: "2.0.4" file_selector_web: dependency: transitive description: name: file_selector_web url: "https://pub.dartlang.org" source: hosted - version: "0.8.1" + version: "0.8.1+3" file_selector_windows: dependency: "direct main" description: @@ -292,14 +306,14 @@ packages: name: flutter_bloc url: "https://pub.dartlang.org" source: hosted - version: "7.1.0" + version: "8.0.1" flutter_markdown: dependency: "direct main" description: name: flutter_markdown url: "https://pub.dartlang.org" source: hosted - version: "0.6.3" + version: "0.6.9" flutter_svg: dependency: "direct main" description: @@ -323,49 +337,49 @@ packages: name: frontend_server_client url: "https://pub.dartlang.org" source: hosted - version: "2.1.0" + version: "2.1.2" glob: dependency: transitive description: name: glob url: "https://pub.dartlang.org" source: hosted - version: "2.0.1" + version: "2.0.2" graphs: dependency: transitive description: name: graphs url: "https://pub.dartlang.org" source: hosted - version: "2.0.0" + version: "2.1.0" hive: dependency: transitive description: name: hive url: "https://pub.dartlang.org" source: hosted - version: "2.0.4" + version: "2.0.5" hive_generator: dependency: "direct dev" description: name: hive_generator url: "https://pub.dartlang.org" source: hosted - version: "1.1.0" + version: "1.1.2" http: dependency: "direct main" description: name: http url: "https://pub.dartlang.org" source: hosted - version: "0.13.3" + version: "0.13.4" http_multi_server: dependency: transitive description: name: http_multi_server url: "https://pub.dartlang.org" source: hosted - version: "3.0.0" + version: "3.2.0" http_parser: dependency: transitive description: @@ -386,7 +400,7 @@ packages: name: io url: "https://pub.dartlang.org" source: hosted - version: "1.0.0" + version: "1.0.3" js: dependency: transitive description: @@ -400,13 +414,13 @@ packages: name: json_annotation url: "https://pub.dartlang.org" source: hosted - version: "4.0.1" + version: "4.4.0" localstorage: dependency: "direct main" description: path: "." ref: HEAD - resolved-ref: "08a12e657de9ee43159f01abb79135e54ad82546" + resolved-ref: "13d667d5022b9e5d88b8585481f77016e31fe63d" url: "git://github.com/Techno-Disaster/flutter_localstorage.git" source: git version: "4.0.0+1" @@ -416,14 +430,14 @@ packages: name: logging url: "https://pub.dartlang.org" source: hosted - version: "1.0.1" + version: "1.0.2" markdown: dependency: transitive description: name: markdown url: "https://pub.dartlang.org" source: hosted - version: "4.0.0" + version: "4.0.1" matcher: dependency: transitive description: @@ -431,6 +445,13 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "0.12.11" + material_color_utilities: + dependency: transitive + description: + name: material_color_utilities + url: "https://pub.dartlang.org" + source: hosted + version: "0.1.3" meta: dependency: transitive description: @@ -444,14 +465,14 @@ packages: name: mime url: "https://pub.dartlang.org" source: hosted - version: "1.0.0" + version: "1.0.1" mocktail: dependency: transitive description: name: mocktail url: "https://pub.dartlang.org" source: hosted - version: "0.1.4" + version: "0.2.0" navigation_rail: dependency: "direct main" description: @@ -481,7 +502,7 @@ packages: name: package_config url: "https://pub.dartlang.org" source: hosted - version: "2.0.0" + version: "2.0.2" path: dependency: transitive description: @@ -495,7 +516,7 @@ packages: name: path_drawing url: "https://pub.dartlang.org" source: hosted - version: "0.5.1" + version: "0.5.1+1" path_parsing: dependency: transitive description: @@ -509,70 +530,77 @@ packages: name: path_provider url: "https://pub.dartlang.org" source: hosted - version: "2.0.2" + version: "2.0.9" + path_provider_android: + dependency: transitive + description: + name: path_provider_android + url: "https://pub.dartlang.org" + source: hosted + version: "2.0.11" + path_provider_ios: + dependency: transitive + description: + name: path_provider_ios + url: "https://pub.dartlang.org" + source: hosted + version: "2.0.7" path_provider_linux: dependency: transitive description: name: path_provider_linux url: "https://pub.dartlang.org" source: hosted - version: "2.0.0" + version: "2.1.5" path_provider_macos: dependency: transitive description: name: path_provider_macos url: "https://pub.dartlang.org" source: hosted - version: "2.0.0" + version: "2.0.5" path_provider_platform_interface: dependency: transitive description: name: path_provider_platform_interface url: "https://pub.dartlang.org" source: hosted - version: "2.0.1" + version: "2.0.3" path_provider_windows: dependency: transitive description: name: path_provider_windows url: "https://pub.dartlang.org" source: hosted - version: "2.0.0" - pedantic: - dependency: transitive - description: - name: pedantic - url: "https://pub.dartlang.org" - source: hosted - version: "1.11.0" + version: "2.0.5" percent_indicator: dependency: "direct main" description: name: percent_indicator url: "https://pub.dartlang.org" source: hosted - version: "3.3.0-nullsafety.1" + version: "3.4.0" petitparser: dependency: transitive description: name: petitparser url: "https://pub.dartlang.org" source: hosted - version: "4.0.2" + version: "4.4.0" platform: dependency: transitive description: name: platform url: "https://pub.dartlang.org" source: hosted - version: "3.0.0" + version: "3.1.0" plugin_platform_interface: dependency: transitive description: name: plugin_platform_interface url: "https://pub.dartlang.org" source: hosted - version: "2.0.0" + version: "2.1.2" pool: dependency: transitive description: @@ -586,35 +614,35 @@ packages: name: process url: "https://pub.dartlang.org" source: hosted - version: "4.2.1" + version: "4.2.4" provider: dependency: transitive description: name: provider url: "https://pub.dartlang.org" source: hosted - version: "5.0.0" + version: "6.0.2" pub_semver: dependency: transitive description: name: pub_semver url: "https://pub.dartlang.org" source: hosted - version: "2.0.0" + version: "2.1.0" pubspec_parse: dependency: transitive description: name: pubspec_parse url: "https://pub.dartlang.org" source: hosted - version: "1.0.0" + version: "1.2.0" shelf: dependency: transitive description: name: shelf url: "https://pub.dartlang.org" source: hosted - version: "1.1.0" + version: "1.2.0" shelf_packages_handler: dependency: transitive description: @@ -628,7 +656,7 @@ packages: name: shelf_static url: "https://pub.dartlang.org" source: hosted - version: "1.0.0" + version: "1.1.0" shelf_web_socket: dependency: transitive description: @@ -647,14 +675,14 @@ packages: name: source_gen url: "https://pub.dartlang.org" source: hosted - version: "1.0.0" + version: "1.2.1" source_helper: dependency: transitive description: name: source_helper url: "https://pub.dartlang.org" source: hosted - version: "1.1.0" + version: "1.3.1" source_map_stack_trace: dependency: transitive description: @@ -717,21 +745,21 @@ packages: name: test url: "https://pub.dartlang.org" source: hosted - version: "1.17.12" + version: "1.19.5" test_api: dependency: transitive description: name: test_api url: "https://pub.dartlang.org" source: hosted - version: "0.4.3" + version: "0.4.8" test_core: dependency: transitive description: name: test_core url: "https://pub.dartlang.org" source: hosted - version: "0.4.2" + version: "0.4.9" timing: dependency: transitive description: @@ -759,42 +787,56 @@ packages: name: url_launcher url: "https://pub.dartlang.org" source: hosted - version: "6.0.9" + version: "6.0.20" + url_launcher_android: + dependency: transitive + description: + name: url_launcher_android + url: "https://pub.dartlang.org" + source: hosted + version: "6.0.15" + url_launcher_ios: + dependency: transitive + description: + name: url_launcher_ios + url: "https://pub.dartlang.org" + source: hosted + version: "6.0.15" url_launcher_linux: dependency: transitive description: name: url_launcher_linux url: "https://pub.dartlang.org" source: hosted - version: "2.0.0" + version: "3.0.0" url_launcher_macos: dependency: transitive description: name: url_launcher_macos url: "https://pub.dartlang.org" source: hosted - version: "2.0.0" + version: "3.0.0" url_launcher_platform_interface: dependency: transitive description: name: url_launcher_platform_interface url: "https://pub.dartlang.org" source: hosted - version: "2.0.4" + version: "2.0.5" url_launcher_web: dependency: transitive description: name: url_launcher_web url: "https://pub.dartlang.org" source: hosted - version: "2.0.1" + version: "2.0.8" url_launcher_windows: dependency: transitive description: name: url_launcher_windows url: "https://pub.dartlang.org" source: hosted - version: "2.0.0" + version: "3.0.0" vector_math: dependency: transitive description: @@ -808,21 +850,21 @@ packages: name: vm_service url: "https://pub.dartlang.org" source: hosted - version: "6.2.0" + version: "7.5.0" watcher: dependency: transitive description: name: watcher url: "https://pub.dartlang.org" source: hosted - version: "1.0.0" + version: "1.0.1" web_socket_channel: dependency: transitive description: name: web_socket_channel url: "https://pub.dartlang.org" source: hosted - version: "2.0.0" + version: "2.1.0" webkit_inspection_protocol: dependency: transitive description: @@ -836,13 +878,13 @@ packages: name: win32 url: "https://pub.dartlang.org" source: hosted - version: "2.0.5" + version: "2.4.0" window_size: dependency: "direct main" description: path: "plugins/window_size" ref: HEAD - resolved-ref: "3da6d7b8011be38412c815c6a1832377b7d47a78" + resolved-ref: "89c350f787e1d7bff12b3517e5671146211ee70e" url: "git://github.com/google/flutter-desktop-embedding.git" source: git version: "0.1.0" @@ -852,14 +894,14 @@ packages: name: xdg_directories url: "https://pub.dartlang.org" source: hosted - version: "0.2.0" + version: "0.2.0+1" xml: dependency: transitive description: name: xml url: "https://pub.dartlang.org" source: hosted - version: "5.0.2" + version: "5.3.1" yaml: dependency: transitive description: @@ -868,5 +910,5 @@ packages: source: hosted version: "3.1.0" sdks: - dart: ">=2.14.0 <3.0.0" - flutter: ">=2.0.0" + dart: ">=2.15.0 <3.0.0" + flutter: ">=2.10.0" diff --git a/pubspec.yaml b/pubspec.yaml index 26b0ab2..23ac2c5 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -8,8 +8,9 @@ environment: sdk: ">=2.12.0 <3.0.0" dependencies: - bloc: ^7.0.0 - bloc_test: ^8.1.0 + bloc: ^8.0.0 + bloc_concurrency: ^0.2.0 + bloc_test: ^9.0.2 cupertino_icons: ^1.0.2 equatable: ^2.0.3 expandable: ^5.0.1 @@ -19,7 +20,7 @@ dependencies: file_selector_windows: ^0.0.2+1 flutter: sdk: flutter - flutter_bloc: ^7.1.0 + flutter_bloc: ^8.0.1 flutter_markdown: ^0.6.3 flutter_svg: ^0.22.0 http: ^0.13.3 diff --git a/windows/flutter/generated_plugin_registrant.cc b/windows/flutter/generated_plugin_registrant.cc index c0376c6..0e70fe4 100644 --- a/windows/flutter/generated_plugin_registrant.cc +++ b/windows/flutter/generated_plugin_registrant.cc @@ -7,14 +7,14 @@ #include "generated_plugin_registrant.h" #include -#include +#include #include void RegisterPlugins(flutter::PluginRegistry* registry) { FileSelectorPluginRegisterWithRegistrar( registry->GetRegistrarForPlugin("FileSelectorPlugin")); - UrlLauncherPluginRegisterWithRegistrar( - registry->GetRegistrarForPlugin("UrlLauncherPlugin")); + UrlLauncherWindowsRegisterWithRegistrar( + registry->GetRegistrarForPlugin("UrlLauncherWindows")); WindowSizePluginRegisterWithRegistrar( registry->GetRegistrarForPlugin("WindowSizePlugin")); }