mirror of
https://github.com/KRTirtho/spotube.git
synced 2025-12-06 07:29:42 +00:00
Compare commits
2 Commits
3209c75144
...
834445eda3
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
834445eda3 | ||
|
|
f10a3d4976 |
1
.gitignore
vendored
1
.gitignore
vendored
@ -9,6 +9,7 @@
|
|||||||
.history
|
.history
|
||||||
.svn/
|
.svn/
|
||||||
|
|
||||||
|
|
||||||
# IntelliJ related
|
# IntelliJ related
|
||||||
*.iml
|
*.iml
|
||||||
*.ipr
|
*.ipr
|
||||||
|
|||||||
@ -39,6 +39,7 @@ class TrackTile extends HookConsumerWidget {
|
|||||||
final int? index;
|
final int? index;
|
||||||
final SpotubeTrackObject track;
|
final SpotubeTrackObject track;
|
||||||
final bool selected;
|
final bool selected;
|
||||||
|
final bool selectionMode;
|
||||||
final ValueChanged<bool?>? onChanged;
|
final ValueChanged<bool?>? onChanged;
|
||||||
final Future<void> Function()? onTap;
|
final Future<void> Function()? onTap;
|
||||||
final VoidCallback? onLongPress;
|
final VoidCallback? onLongPress;
|
||||||
@ -53,6 +54,7 @@ class TrackTile extends HookConsumerWidget {
|
|||||||
this.index,
|
this.index,
|
||||||
required this.track,
|
required this.track,
|
||||||
this.selected = false,
|
this.selected = false,
|
||||||
|
this.selectionMode = false,
|
||||||
required this.playlist,
|
required this.playlist,
|
||||||
this.onTap,
|
this.onTap,
|
||||||
this.onLongPress,
|
this.onLongPress,
|
||||||
@ -81,6 +83,12 @@ class TrackTile extends HookConsumerWidget {
|
|||||||
[track.album.images],
|
[track.album.images],
|
||||||
);
|
);
|
||||||
|
|
||||||
|
// Treat either explicit selectionMode or presence of onChanged as selection
|
||||||
|
// context. Some lists enable selection by providing `onChanged` without
|
||||||
|
// toggling a dedicated `selectionMode` flag (e.g. playlists), so we must
|
||||||
|
// disable inner navigation in both cases.
|
||||||
|
final effectiveSelection = selectionMode || onChanged != null;
|
||||||
|
|
||||||
return LayoutBuilder(builder: (context, constrains) {
|
return LayoutBuilder(builder: (context, constrains) {
|
||||||
return Listener(
|
return Listener(
|
||||||
onPointerDown: (event) {
|
onPointerDown: (event) {
|
||||||
@ -222,7 +230,9 @@ class TrackTile extends HookConsumerWidget {
|
|||||||
children: [
|
children: [
|
||||||
Expanded(
|
Expanded(
|
||||||
flex: 6,
|
flex: 6,
|
||||||
child: switch (track) {
|
child: AbsorbPointer(
|
||||||
|
absorbing: selectionMode,
|
||||||
|
child: switch (track) {
|
||||||
SpotubeLocalTrackObject() => Text(
|
SpotubeLocalTrackObject() => Text(
|
||||||
track.name,
|
track.name,
|
||||||
maxLines: 1,
|
maxLines: 1,
|
||||||
@ -232,15 +242,17 @@ class TrackTile extends HookConsumerWidget {
|
|||||||
mainAxisSize: MainAxisSize.min,
|
mainAxisSize: MainAxisSize.min,
|
||||||
children: [
|
children: [
|
||||||
Flexible(
|
Flexible(
|
||||||
child: Button(
|
child: Button(
|
||||||
style: ButtonVariance.link.copyWith(
|
style: ButtonVariance.link.copyWith(
|
||||||
padding: (context, states, value) =>
|
padding: (context, states, value) =>
|
||||||
EdgeInsets.zero,
|
EdgeInsets.zero,
|
||||||
),
|
),
|
||||||
onPressed: () {
|
onPressed: effectiveSelection
|
||||||
context
|
? null
|
||||||
.navigateTo(TrackRoute(trackId: track.id));
|
: () {
|
||||||
},
|
context
|
||||||
|
.navigateTo(TrackRoute(trackId: track.id));
|
||||||
|
},
|
||||||
child: Text(
|
child: Text(
|
||||||
track.name,
|
track.name,
|
||||||
maxLines: 1,
|
maxLines: 1,
|
||||||
@ -251,6 +263,7 @@ class TrackTile extends HookConsumerWidget {
|
|||||||
],
|
],
|
||||||
),
|
),
|
||||||
},
|
},
|
||||||
|
),
|
||||||
),
|
),
|
||||||
if (constrains.mdAndUp) ...[
|
if (constrains.mdAndUp) ...[
|
||||||
const SizedBox(width: 8),
|
const SizedBox(width: 8),
|
||||||
@ -281,20 +294,25 @@ class TrackTile extends HookConsumerWidget {
|
|||||||
),
|
),
|
||||||
subtitle: Align(
|
subtitle: Align(
|
||||||
alignment: Alignment.centerLeft,
|
alignment: Alignment.centerLeft,
|
||||||
child: track is SpotubeLocalTrackObject
|
child: track is SpotubeLocalTrackObject
|
||||||
? Text(
|
? Text(
|
||||||
track.artists.asString(),
|
track.artists.asString(),
|
||||||
)
|
)
|
||||||
: ClipRect(
|
: ClipRect(
|
||||||
child: ConstrainedBox(
|
child: ConstrainedBox(
|
||||||
constraints: const BoxConstraints(maxHeight: 40),
|
constraints: const BoxConstraints(maxHeight: 40),
|
||||||
child: ArtistLink(
|
child: AbsorbPointer(
|
||||||
artists: track.artists,
|
absorbing: effectiveSelection,
|
||||||
onOverflowArtistClick: () {
|
child: ArtistLink(
|
||||||
context.navigateTo(
|
artists: track.artists,
|
||||||
TrackRoute(trackId: track.id),
|
onOverflowArtistClick: effectiveSelection
|
||||||
);
|
? () {}
|
||||||
},
|
: () {
|
||||||
|
context.navigateTo(
|
||||||
|
TrackRoute(trackId: track.id),
|
||||||
|
);
|
||||||
|
},
|
||||||
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|||||||
@ -9,13 +9,16 @@ import 'package:scroll_to_index/scroll_to_index.dart';
|
|||||||
import 'package:shadcn_flutter/shadcn_flutter.dart';
|
import 'package:shadcn_flutter/shadcn_flutter.dart';
|
||||||
import 'package:spotube/collections/spotube_icons.dart';
|
import 'package:spotube/collections/spotube_icons.dart';
|
||||||
import 'package:spotube/components/button/back_button.dart';
|
import 'package:spotube/components/button/back_button.dart';
|
||||||
|
import 'package:spotube/components/dialogs/playlist_add_track_dialog.dart';
|
||||||
import 'package:spotube/components/fallbacks/not_found.dart';
|
import 'package:spotube/components/fallbacks/not_found.dart';
|
||||||
import 'package:spotube/components/inter_scrollbar/inter_scrollbar.dart';
|
import 'package:spotube/components/inter_scrollbar/inter_scrollbar.dart';
|
||||||
import 'package:spotube/components/track_tile/track_tile.dart';
|
import 'package:spotube/components/track_tile/track_tile.dart';
|
||||||
|
import 'package:spotube/components/ui/button_tile.dart';
|
||||||
import 'package:spotube/extensions/constrains.dart';
|
import 'package:spotube/extensions/constrains.dart';
|
||||||
import 'package:spotube/extensions/context.dart';
|
import 'package:spotube/extensions/context.dart';
|
||||||
import 'package:spotube/hooks/controllers/use_auto_scroll_controller.dart';
|
import 'package:spotube/hooks/controllers/use_auto_scroll_controller.dart';
|
||||||
import 'package:spotube/models/metadata/metadata.dart';
|
import 'package:spotube/models/metadata/metadata.dart';
|
||||||
|
import 'package:spotube/modules/player/player_queue_actions.dart';
|
||||||
import 'package:spotube/provider/audio_player/audio_player.dart';
|
import 'package:spotube/provider/audio_player/audio_player.dart';
|
||||||
import 'package:spotube/provider/audio_player/state.dart';
|
import 'package:spotube/provider/audio_player/state.dart';
|
||||||
|
|
||||||
@ -55,6 +58,9 @@ class PlayerQueue extends HookConsumerWidget {
|
|||||||
final controller = useAutoScrollController();
|
final controller = useAutoScrollController();
|
||||||
final searchText = useState('');
|
final searchText = useState('');
|
||||||
|
|
||||||
|
final selectionMode = useState(false);
|
||||||
|
final selectedTrackIds = useState(<String>{});
|
||||||
|
|
||||||
final isSearching = useState(false);
|
final isSearching = useState(false);
|
||||||
|
|
||||||
final tracks = playlist.tracks;
|
final tracks = playlist.tracks;
|
||||||
@ -131,6 +137,91 @@ class PlayerQueue extends HookConsumerWidget {
|
|||||||
surfaceOpacity: 0,
|
surfaceOpacity: 0,
|
||||||
child: searchBar,
|
child: searchBar,
|
||||||
)
|
)
|
||||||
|
else if (selectionMode.value)
|
||||||
|
AppBar(
|
||||||
|
backgroundColor: Colors.transparent,
|
||||||
|
surfaceBlur: 0,
|
||||||
|
surfaceOpacity: 0,
|
||||||
|
leading: [
|
||||||
|
IconButton.ghost(
|
||||||
|
icon: const Icon(SpotubeIcons.close),
|
||||||
|
onPressed: () {
|
||||||
|
selectedTrackIds.value = {};
|
||||||
|
selectionMode.value = false;
|
||||||
|
},
|
||||||
|
)
|
||||||
|
],
|
||||||
|
title: SizedBox(
|
||||||
|
height: 30,
|
||||||
|
child: AutoSizeText(
|
||||||
|
'${selectedTrackIds.value.length} selected',
|
||||||
|
maxLines: 1,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
trailing: [
|
||||||
|
PlayerQueueActionButton(
|
||||||
|
builder: (context, close) => Column(
|
||||||
|
mainAxisSize: MainAxisSize.min,
|
||||||
|
children: [
|
||||||
|
const Gap(12),
|
||||||
|
ButtonTile(
|
||||||
|
style: const ButtonStyle.ghost(),
|
||||||
|
leading:
|
||||||
|
const Icon(SpotubeIcons.selectionCheck),
|
||||||
|
title: Text(context.l10n.select_all),
|
||||||
|
onPressed: () {
|
||||||
|
selectedTrackIds.value =
|
||||||
|
filteredTracks.map((t) => t.id).toSet();
|
||||||
|
Navigator.pop(context);
|
||||||
|
},
|
||||||
|
),
|
||||||
|
ButtonTile(
|
||||||
|
style: const ButtonStyle.ghost(),
|
||||||
|
leading: const Icon(SpotubeIcons.playlistAdd),
|
||||||
|
title: Text(context.l10n.add_to_playlist),
|
||||||
|
onPressed: () async {
|
||||||
|
final selected = filteredTracks
|
||||||
|
.where((t) =>
|
||||||
|
selectedTrackIds.value.contains(t.id))
|
||||||
|
.toList();
|
||||||
|
close();
|
||||||
|
if (selected.isEmpty) return;
|
||||||
|
final res = await showDialog<bool?>(
|
||||||
|
context: context,
|
||||||
|
builder: (context) =>
|
||||||
|
PlaylistAddTrackDialog(
|
||||||
|
tracks: selected,
|
||||||
|
openFromPlaylist: null,
|
||||||
|
),
|
||||||
|
);
|
||||||
|
if (res == true) {
|
||||||
|
selectedTrackIds.value = {};
|
||||||
|
selectionMode.value = false;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
),
|
||||||
|
ButtonTile(
|
||||||
|
style: const ButtonStyle.ghost(),
|
||||||
|
leading: const Icon(SpotubeIcons.trash),
|
||||||
|
title: Text(context.l10n.remove_from_queue),
|
||||||
|
onPressed: () async {
|
||||||
|
final ids = selectedTrackIds.value.toList();
|
||||||
|
close();
|
||||||
|
if (ids.isEmpty) return;
|
||||||
|
await Future.wait(
|
||||||
|
ids.map((id) => onRemove(id)));
|
||||||
|
if (context.mounted) {
|
||||||
|
selectedTrackIds.value = {};
|
||||||
|
selectionMode.value = false;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
),
|
||||||
|
const Gap(12),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
)
|
||||||
else
|
else
|
||||||
AppBar(
|
AppBar(
|
||||||
trailingGap: 0,
|
trailingGap: 0,
|
||||||
@ -195,6 +286,20 @@ class PlayerQueue extends HookConsumerWidget {
|
|||||||
},
|
},
|
||||||
itemBuilder: (context, i) {
|
itemBuilder: (context, i) {
|
||||||
final track = filteredTracks.elementAt(i);
|
final track = filteredTracks.elementAt(i);
|
||||||
|
|
||||||
|
void toggleSelection(String id) {
|
||||||
|
final s = {...selectedTrackIds.value};
|
||||||
|
if (s.contains(id)) {
|
||||||
|
s.remove(id);
|
||||||
|
} else {
|
||||||
|
s.add(id);
|
||||||
|
}
|
||||||
|
selectedTrackIds.value = s;
|
||||||
|
if (selectedTrackIds.value.isEmpty) {
|
||||||
|
selectionMode.value = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return AutoScrollTag(
|
return AutoScrollTag(
|
||||||
key: ValueKey<int>(i),
|
key: ValueKey<int>(i),
|
||||||
controller: controller,
|
controller: controller,
|
||||||
@ -203,15 +308,34 @@ class PlayerQueue extends HookConsumerWidget {
|
|||||||
playlist: playlist,
|
playlist: playlist,
|
||||||
index: i,
|
index: i,
|
||||||
track: track,
|
track: track,
|
||||||
|
selectionMode: selectionMode.value,
|
||||||
|
selected:
|
||||||
|
selectedTrackIds.value.contains(track.id),
|
||||||
|
onChanged: selectionMode.value
|
||||||
|
? (_) => toggleSelection(track.id)
|
||||||
|
: null,
|
||||||
onTap: () async {
|
onTap: () async {
|
||||||
|
if (selectionMode.value) {
|
||||||
|
toggleSelection(track.id);
|
||||||
|
return;
|
||||||
|
}
|
||||||
if (playlist.activeTrack?.id == track.id) {
|
if (playlist.activeTrack?.id == track.id) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
await onJump(track);
|
await onJump(track);
|
||||||
},
|
},
|
||||||
|
onLongPress: () {
|
||||||
|
if (!selectionMode.value) {
|
||||||
|
selectionMode.value = true;
|
||||||
|
selectedTrackIds.value = {track.id};
|
||||||
|
} else {
|
||||||
|
toggleSelection(track.id);
|
||||||
|
}
|
||||||
|
},
|
||||||
leadingActions: [
|
leadingActions: [
|
||||||
if (!isSearching.value &&
|
if (!isSearching.value &&
|
||||||
searchText.value.isEmpty)
|
searchText.value.isEmpty &&
|
||||||
|
!selectionMode.value)
|
||||||
Padding(
|
Padding(
|
||||||
padding:
|
padding:
|
||||||
const EdgeInsets.only(left: 8.0),
|
const EdgeInsets.only(left: 8.0),
|
||||||
|
|||||||
44
lib/modules/player/player_queue_actions.dart
Normal file
44
lib/modules/player/player_queue_actions.dart
Normal file
@ -0,0 +1,44 @@
|
|||||||
|
import 'package:shadcn_flutter/shadcn_flutter.dart';
|
||||||
|
import 'package:shadcn_flutter/shadcn_flutter_extension.dart';
|
||||||
|
import 'package:spotube/collections/spotube_icons.dart';
|
||||||
|
import 'package:spotube/extensions/constrains.dart';
|
||||||
|
|
||||||
|
class PlayerQueueActionButton extends StatelessWidget {
|
||||||
|
final Widget Function(BuildContext context, VoidCallback close) builder;
|
||||||
|
|
||||||
|
const PlayerQueueActionButton({
|
||||||
|
super.key,
|
||||||
|
required this.builder,
|
||||||
|
});
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
return IconButton.ghost(
|
||||||
|
onPressed: () {
|
||||||
|
final mediaQuery = MediaQuery.sizeOf(context);
|
||||||
|
|
||||||
|
if (mediaQuery.lgAndUp) {
|
||||||
|
showDropdown(
|
||||||
|
context: context,
|
||||||
|
builder: (context) {
|
||||||
|
return SizedBox(
|
||||||
|
width: 220 * context.theme.scaling,
|
||||||
|
child: Card(
|
||||||
|
padding: EdgeInsets.zero,
|
||||||
|
child: builder(context, () => closeOverlay(context)),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
},
|
||||||
|
);
|
||||||
|
} else {
|
||||||
|
openSheet(
|
||||||
|
context: context,
|
||||||
|
builder: (context) => builder(context, () => closeSheet(context)),
|
||||||
|
position: OverlayPosition.bottom,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
icon: const Icon(SpotubeIcons.moreHorizontal),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -64,7 +64,7 @@ class BlackListPage extends HookConsumerWidget {
|
|||||||
child: TextField(
|
child: TextField(
|
||||||
onChanged: (value) => searchText.value = value,
|
onChanged: (value) => searchText.value = value,
|
||||||
placeholder: Text(context.l10n.search),
|
placeholder: Text(context.l10n.search),
|
||||||
leading: const Icon(SpotubeIcons.search),
|
// prefixIcon: const Icon(SpotubeIcons.search),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
InterScrollbar(
|
InterScrollbar(
|
||||||
|
|||||||
@ -1,167 +1,167 @@
|
|||||||
import 'dart:async';
|
// import 'dart:async';
|
||||||
import 'dart:collection';
|
// import 'dart:collection';
|
||||||
import 'dart:convert';
|
// import 'dart:convert';
|
||||||
import 'package:flutter/foundation.dart';
|
// import 'package:flutter/foundation.dart';
|
||||||
import 'package:http/http.dart' as http;
|
// import 'package:http/http.dart' as http;
|
||||||
import 'package:youtube_explode_dart/js_challenge.dart';
|
// import 'package:youtube_explode_dart/js_challenge.dart';
|
||||||
// ignore: implementation_imports
|
// // ignore: implementation_imports
|
||||||
import 'package:youtube_explode_dart/src/reverse_engineering/challenges/ejs/ejs.dart';
|
// import 'package:youtube_explode_dart/src/reverse_engineering/challenges/ejs/ejs.dart';
|
||||||
import 'package:jsf/jsf.dart';
|
// import 'package:jsf/jsf.dart';
|
||||||
|
|
||||||
/// [WIP]
|
// /// [WIP]
|
||||||
class QuickJSEJSSolver extends BaseJSChallengeSolver {
|
// class QuickJSEJSSolver extends BaseJSChallengeSolver {
|
||||||
final _playerCache = <String, String>{};
|
// final _playerCache = <String, String>{};
|
||||||
final _sigCache = <(String, String, JSChallengeType), String>{};
|
// final _sigCache = <(String, String, JSChallengeType), String>{};
|
||||||
final QuickJSRuntime qjs;
|
// final QuickJSRuntime qjs;
|
||||||
QuickJSEJSSolver._(this.qjs);
|
// QuickJSEJSSolver._(this.qjs);
|
||||||
|
|
||||||
static Future<QuickJSEJSSolver> init() async {
|
// static Future<QuickJSEJSSolver> init() async {
|
||||||
final modules = await EJSBuilder.getJSModules();
|
// final modules = await EJSBuilder.getJSModules();
|
||||||
final deno = await QuickJSRuntime.init(modules);
|
// final deno = await QuickJSRuntime.init(modules);
|
||||||
return QuickJSEJSSolver._(deno);
|
// return QuickJSEJSSolver._(deno);
|
||||||
}
|
// }
|
||||||
|
|
||||||
@override
|
// @override
|
||||||
Future<String> solve(
|
// Future<String> solve(
|
||||||
String playerUrl, JSChallengeType type, String challenge) async {
|
// String playerUrl, JSChallengeType type, String challenge) async {
|
||||||
final key = (playerUrl, challenge, type);
|
// final key = (playerUrl, challenge, type);
|
||||||
if (_sigCache.containsKey(key)) {
|
// if (_sigCache.containsKey(key)) {
|
||||||
return _sigCache[key]!;
|
// return _sigCache[key]!;
|
||||||
}
|
// }
|
||||||
|
|
||||||
var playerScript = _playerCache[playerUrl];
|
// var playerScript = _playerCache[playerUrl];
|
||||||
if (playerScript == null) {
|
// if (playerScript == null) {
|
||||||
final resp = await http.get(Uri.parse(playerUrl));
|
// final resp = await http.get(Uri.parse(playerUrl));
|
||||||
playerScript = _playerCache[playerUrl] = resp.body;
|
// playerScript = _playerCache[playerUrl] = resp.body;
|
||||||
}
|
// }
|
||||||
final jsCall = EJSBuilder.buildJSCall(playerScript, {
|
// final jsCall = EJSBuilder.buildJSCall(playerScript, {
|
||||||
type: [challenge],
|
// type: [challenge],
|
||||||
});
|
// });
|
||||||
|
|
||||||
final result = await qjs.eval(jsCall);
|
// final result = await qjs.eval(jsCall);
|
||||||
// Trim the first and last characters (' delimiters of the JS string)
|
// // Trim the first and last characters (' delimiters of the JS string)
|
||||||
final data = json.decode(result.substring(1, result.length - 1))
|
// final data = json.decode(result.substring(1, result.length - 1))
|
||||||
as Map<String, dynamic>;
|
// as Map<String, dynamic>;
|
||||||
|
|
||||||
if (data['type'] != 'result') {
|
// if (data['type'] != 'result') {
|
||||||
throw Exception('Unexpected response type: ${data['type']}');
|
// throw Exception('Unexpected response type: ${data['type']}');
|
||||||
}
|
// }
|
||||||
final response = data['responses'][0];
|
// final response = data['responses'][0];
|
||||||
if (response['type'] != 'result') {
|
// if (response['type'] != 'result') {
|
||||||
throw Exception('Unexpected item response type: ${response['type']}');
|
// throw Exception('Unexpected item response type: ${response['type']}');
|
||||||
}
|
// }
|
||||||
final decoded = response['data'][challenge];
|
// final decoded = response['data'][challenge];
|
||||||
if (decoded == null) {
|
// if (decoded == null) {
|
||||||
throw Exception('No data for challenge: $challenge');
|
// throw Exception('No data for challenge: $challenge');
|
||||||
}
|
// }
|
||||||
|
|
||||||
_sigCache[key] = decoded;
|
// _sigCache[key] = decoded;
|
||||||
|
|
||||||
return decoded;
|
// return decoded;
|
||||||
}
|
// }
|
||||||
|
|
||||||
@override
|
// @override
|
||||||
void dispose() {
|
// void dispose() {
|
||||||
qjs.dispose();
|
// qjs.dispose();
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
|
|
||||||
class _EvalRequest {
|
// class _EvalRequest {
|
||||||
final String code;
|
// final String code;
|
||||||
final Completer<String> completer;
|
// final Completer<String> completer;
|
||||||
|
|
||||||
_EvalRequest(this.code, this.completer);
|
// _EvalRequest(this.code, this.completer);
|
||||||
}
|
// }
|
||||||
|
|
||||||
class QuickJSRuntime {
|
// class QuickJSRuntime {
|
||||||
final JsRuntime _runtime;
|
// final JsRuntime _runtime;
|
||||||
final StreamController<String> _stdoutController =
|
// final StreamController<String> _stdoutController =
|
||||||
StreamController.broadcast();
|
// StreamController.broadcast();
|
||||||
|
|
||||||
// Queue for incoming eval requests
|
// // Queue for incoming eval requests
|
||||||
final Queue<_EvalRequest> _evalQueue = Queue<_EvalRequest>();
|
// final Queue<_EvalRequest> _evalQueue = Queue<_EvalRequest>();
|
||||||
bool _isProcessing = false; // Flag to indicate if an eval is currently active
|
// bool _isProcessing = false; // Flag to indicate if an eval is currently active
|
||||||
|
|
||||||
QuickJSRuntime(this._runtime);
|
// QuickJSRuntime(this._runtime);
|
||||||
|
|
||||||
/// Disposes the Deno process.
|
// /// Disposes the Deno process.
|
||||||
void dispose() {
|
// void dispose() {
|
||||||
_stdoutController.close();
|
// _stdoutController.close();
|
||||||
_runtime.dispose();
|
// _runtime.dispose();
|
||||||
}
|
// }
|
||||||
|
|
||||||
/// Sends JavaScript code to Deno for evaluation.
|
// /// Sends JavaScript code to Deno for evaluation.
|
||||||
/// Assumes single-line input produces single-line output.
|
// /// Assumes single-line input produces single-line output.
|
||||||
Future<String> eval(String code) {
|
// Future<String> eval(String code) {
|
||||||
final completer = Completer<String>();
|
// final completer = Completer<String>();
|
||||||
final request = _EvalRequest(code, completer);
|
// final request = _EvalRequest(code, completer);
|
||||||
_evalQueue.addLast(request); // Add request to the end of the queue
|
// _evalQueue.addLast(request); // Add request to the end of the queue
|
||||||
_processQueue(); // Attempt to process the queue
|
// _processQueue(); // Attempt to process the queue
|
||||||
|
|
||||||
return completer.future;
|
// return completer.future;
|
||||||
}
|
// }
|
||||||
|
|
||||||
// Processes the eval queue.
|
// // Processes the eval queue.
|
||||||
void _processQueue() {
|
// void _processQueue() {
|
||||||
if (_isProcessing || _evalQueue.isEmpty) {
|
// if (_isProcessing || _evalQueue.isEmpty) {
|
||||||
return; // Already processing or nothing in queue
|
// return; // Already processing or nothing in queue
|
||||||
}
|
// }
|
||||||
|
|
||||||
_isProcessing = true;
|
// _isProcessing = true;
|
||||||
final request =
|
// final request =
|
||||||
_evalQueue.first; // Get the next request without removing it yet
|
// _evalQueue.first; // Get the next request without removing it yet
|
||||||
|
|
||||||
StreamSubscription? currentOutputSubscription;
|
// StreamSubscription? currentOutputSubscription;
|
||||||
Completer<void> lineReceived = Completer<void>();
|
// Completer<void> lineReceived = Completer<void>();
|
||||||
|
|
||||||
currentOutputSubscription = _stdoutController.stream.listen((data) {
|
// currentOutputSubscription = _stdoutController.stream.listen((data) {
|
||||||
if (!lineReceived.isCompleted) {
|
// if (!lineReceived.isCompleted) {
|
||||||
// Assuming single line output per eval.
|
// // Assuming single line output per eval.
|
||||||
// This will capture the first full line or chunk received after sending the code.
|
// // This will capture the first full line or chunk received after sending the code.
|
||||||
request.completer.complete(data.trim());
|
// request.completer.complete(data.trim());
|
||||||
lineReceived.complete();
|
// lineReceived.complete();
|
||||||
currentOutputSubscription
|
// currentOutputSubscription
|
||||||
?.cancel(); // Cancel subscription for this request
|
// ?.cancel(); // Cancel subscription for this request
|
||||||
_evalQueue.removeFirst(); // Remove the processed request
|
// _evalQueue.removeFirst(); // Remove the processed request
|
||||||
_isProcessing = false; // Mark as no longer processing
|
// _isProcessing = false; // Mark as no longer processing
|
||||||
_processQueue(); // Attempt to process next item in queue
|
// _processQueue(); // Attempt to process next item in queue
|
||||||
}
|
// }
|
||||||
}, onError: (e) {
|
// }, onError: (e) {
|
||||||
if (!request.completer.isCompleted) {
|
// if (!request.completer.isCompleted) {
|
||||||
request.completer.completeError(e);
|
// request.completer.completeError(e);
|
||||||
lineReceived.completeError(e);
|
// lineReceived.completeError(e);
|
||||||
currentOutputSubscription?.cancel();
|
// currentOutputSubscription?.cancel();
|
||||||
_evalQueue.removeFirst();
|
// _evalQueue.removeFirst();
|
||||||
_isProcessing = false;
|
// _isProcessing = false;
|
||||||
_processQueue();
|
// _processQueue();
|
||||||
}
|
// }
|
||||||
}, onDone: () {
|
// }, onDone: () {
|
||||||
if (!request.completer.isCompleted) {
|
// if (!request.completer.isCompleted) {
|
||||||
request.completer.completeError(
|
// request.completer.completeError(
|
||||||
StateError('Deno process closed while awaiting eval result.'));
|
// StateError('Deno process closed while awaiting eval result.'));
|
||||||
lineReceived.completeError(
|
// lineReceived.completeError(
|
||||||
StateError('Deno process closed while awaiting eval result.'));
|
// StateError('Deno process closed while awaiting eval result.'));
|
||||||
currentOutputSubscription?.cancel();
|
// currentOutputSubscription?.cancel();
|
||||||
_evalQueue.removeFirst();
|
// _evalQueue.removeFirst();
|
||||||
_isProcessing = false;
|
// _isProcessing = false;
|
||||||
_processQueue();
|
// _processQueue();
|
||||||
}
|
// }
|
||||||
});
|
// });
|
||||||
|
|
||||||
debugPrint("[QuickJS Solver] Evaluate ${request.code}");
|
// debugPrint("[QuickJS Solver] Evaluate ${request.code}");
|
||||||
final result = _runtime.eval(request.code);
|
// final result = _runtime.eval(request.code);
|
||||||
debugPrint("[QuickJS Solver] Evaluation Result $result");
|
// debugPrint("[QuickJS Solver] Evaluation Result $result");
|
||||||
_stdoutController.add(result);
|
// _stdoutController.add(result);
|
||||||
}
|
// }
|
||||||
|
|
||||||
static Future<QuickJSRuntime> init(String initCode) async {
|
// static Future<QuickJSRuntime> init(String initCode) async {
|
||||||
debugPrint("[QuickJS Solver] Initializing");
|
// debugPrint("[QuickJS Solver] Initializing");
|
||||||
debugPrint("[QuickJS Solver] script $initCode");
|
// debugPrint("[QuickJS Solver] script $initCode");
|
||||||
|
|
||||||
final runtime = JsRuntime();
|
// final runtime = JsRuntime();
|
||||||
|
|
||||||
runtime.execInitScript(initCode);
|
// runtime.execInitScript(initCode);
|
||||||
|
|
||||||
return QuickJSRuntime(runtime);
|
// return QuickJSRuntime(runtime);
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
|
|||||||
@ -12,13 +12,11 @@
|
|||||||
#include <flutter_secure_storage_linux/flutter_secure_storage_linux_plugin.h>
|
#include <flutter_secure_storage_linux/flutter_secure_storage_linux_plugin.h>
|
||||||
#include <flutter_timezone/flutter_timezone_plugin.h>
|
#include <flutter_timezone/flutter_timezone_plugin.h>
|
||||||
#include <gtk/gtk_plugin.h>
|
#include <gtk/gtk_plugin.h>
|
||||||
#include <irondash_engine_context/irondash_engine_context_plugin.h>
|
|
||||||
#include <local_notifier/local_notifier_plugin.h>
|
#include <local_notifier/local_notifier_plugin.h>
|
||||||
#include <media_kit_libs_linux/media_kit_libs_linux_plugin.h>
|
#include <media_kit_libs_linux/media_kit_libs_linux_plugin.h>
|
||||||
#include <open_file_linux/open_file_linux_plugin.h>
|
#include <open_file_linux/open_file_linux_plugin.h>
|
||||||
#include <screen_retriever_linux/screen_retriever_linux_plugin.h>
|
#include <screen_retriever_linux/screen_retriever_linux_plugin.h>
|
||||||
#include <sqlite3_flutter_libs/sqlite3_flutter_libs_plugin.h>
|
#include <sqlite3_flutter_libs/sqlite3_flutter_libs_plugin.h>
|
||||||
#include <super_native_extensions/super_native_extensions_plugin.h>
|
|
||||||
#include <system_theme/system_theme_plugin.h>
|
#include <system_theme/system_theme_plugin.h>
|
||||||
#include <tray_manager/tray_manager_plugin.h>
|
#include <tray_manager/tray_manager_plugin.h>
|
||||||
#include <url_launcher_linux/url_launcher_plugin.h>
|
#include <url_launcher_linux/url_launcher_plugin.h>
|
||||||
@ -43,9 +41,6 @@ void fl_register_plugins(FlPluginRegistry* registry) {
|
|||||||
g_autoptr(FlPluginRegistrar) gtk_registrar =
|
g_autoptr(FlPluginRegistrar) gtk_registrar =
|
||||||
fl_plugin_registry_get_registrar_for_plugin(registry, "GtkPlugin");
|
fl_plugin_registry_get_registrar_for_plugin(registry, "GtkPlugin");
|
||||||
gtk_plugin_register_with_registrar(gtk_registrar);
|
gtk_plugin_register_with_registrar(gtk_registrar);
|
||||||
g_autoptr(FlPluginRegistrar) irondash_engine_context_registrar =
|
|
||||||
fl_plugin_registry_get_registrar_for_plugin(registry, "IrondashEngineContextPlugin");
|
|
||||||
irondash_engine_context_plugin_register_with_registrar(irondash_engine_context_registrar);
|
|
||||||
g_autoptr(FlPluginRegistrar) local_notifier_registrar =
|
g_autoptr(FlPluginRegistrar) local_notifier_registrar =
|
||||||
fl_plugin_registry_get_registrar_for_plugin(registry, "LocalNotifierPlugin");
|
fl_plugin_registry_get_registrar_for_plugin(registry, "LocalNotifierPlugin");
|
||||||
local_notifier_plugin_register_with_registrar(local_notifier_registrar);
|
local_notifier_plugin_register_with_registrar(local_notifier_registrar);
|
||||||
@ -61,9 +56,6 @@ void fl_register_plugins(FlPluginRegistry* registry) {
|
|||||||
g_autoptr(FlPluginRegistrar) sqlite3_flutter_libs_registrar =
|
g_autoptr(FlPluginRegistrar) sqlite3_flutter_libs_registrar =
|
||||||
fl_plugin_registry_get_registrar_for_plugin(registry, "Sqlite3FlutterLibsPlugin");
|
fl_plugin_registry_get_registrar_for_plugin(registry, "Sqlite3FlutterLibsPlugin");
|
||||||
sqlite3_flutter_libs_plugin_register_with_registrar(sqlite3_flutter_libs_registrar);
|
sqlite3_flutter_libs_plugin_register_with_registrar(sqlite3_flutter_libs_registrar);
|
||||||
g_autoptr(FlPluginRegistrar) super_native_extensions_registrar =
|
|
||||||
fl_plugin_registry_get_registrar_for_plugin(registry, "SuperNativeExtensionsPlugin");
|
|
||||||
super_native_extensions_plugin_register_with_registrar(super_native_extensions_registrar);
|
|
||||||
g_autoptr(FlPluginRegistrar) system_theme_registrar =
|
g_autoptr(FlPluginRegistrar) system_theme_registrar =
|
||||||
fl_plugin_registry_get_registrar_for_plugin(registry, "SystemThemePlugin");
|
fl_plugin_registry_get_registrar_for_plugin(registry, "SystemThemePlugin");
|
||||||
system_theme_plugin_register_with_registrar(system_theme_registrar);
|
system_theme_plugin_register_with_registrar(system_theme_registrar);
|
||||||
|
|||||||
@ -9,13 +9,11 @@ list(APPEND FLUTTER_PLUGIN_LIST
|
|||||||
flutter_secure_storage_linux
|
flutter_secure_storage_linux
|
||||||
flutter_timezone
|
flutter_timezone
|
||||||
gtk
|
gtk
|
||||||
irondash_engine_context
|
|
||||||
local_notifier
|
local_notifier
|
||||||
media_kit_libs_linux
|
media_kit_libs_linux
|
||||||
open_file_linux
|
open_file_linux
|
||||||
screen_retriever_linux
|
screen_retriever_linux
|
||||||
sqlite3_flutter_libs
|
sqlite3_flutter_libs
|
||||||
super_native_extensions
|
|
||||||
system_theme
|
system_theme
|
||||||
tray_manager
|
tray_manager
|
||||||
url_launcher_linux
|
url_launcher_linux
|
||||||
@ -24,7 +22,6 @@ list(APPEND FLUTTER_PLUGIN_LIST
|
|||||||
|
|
||||||
list(APPEND FLUTTER_FFI_PLUGIN_LIST
|
list(APPEND FLUTTER_FFI_PLUGIN_LIST
|
||||||
flutter_discord_rpc
|
flutter_discord_rpc
|
||||||
jsf
|
|
||||||
metadata_god
|
metadata_god
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@ -18,7 +18,6 @@ import flutter_inappwebview_macos
|
|||||||
import flutter_new_pipe_extractor
|
import flutter_new_pipe_extractor
|
||||||
import flutter_secure_storage_macos
|
import flutter_secure_storage_macos
|
||||||
import flutter_timezone
|
import flutter_timezone
|
||||||
import irondash_engine_context
|
|
||||||
import local_notifier
|
import local_notifier
|
||||||
import media_kit_libs_macos_audio
|
import media_kit_libs_macos_audio
|
||||||
import open_file_mac
|
import open_file_mac
|
||||||
@ -28,7 +27,6 @@ import screen_retriever_macos
|
|||||||
import shared_preferences_foundation
|
import shared_preferences_foundation
|
||||||
import sqflite_darwin
|
import sqflite_darwin
|
||||||
import sqlite3_flutter_libs
|
import sqlite3_flutter_libs
|
||||||
import super_native_extensions
|
|
||||||
import system_theme
|
import system_theme
|
||||||
import tray_manager
|
import tray_manager
|
||||||
import url_launcher_macos
|
import url_launcher_macos
|
||||||
@ -48,7 +46,6 @@ func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) {
|
|||||||
FlutterNewPipeExtractorPlugin.register(with: registry.registrar(forPlugin: "FlutterNewPipeExtractorPlugin"))
|
FlutterNewPipeExtractorPlugin.register(with: registry.registrar(forPlugin: "FlutterNewPipeExtractorPlugin"))
|
||||||
FlutterSecureStoragePlugin.register(with: registry.registrar(forPlugin: "FlutterSecureStoragePlugin"))
|
FlutterSecureStoragePlugin.register(with: registry.registrar(forPlugin: "FlutterSecureStoragePlugin"))
|
||||||
FlutterTimezonePlugin.register(with: registry.registrar(forPlugin: "FlutterTimezonePlugin"))
|
FlutterTimezonePlugin.register(with: registry.registrar(forPlugin: "FlutterTimezonePlugin"))
|
||||||
IrondashEngineContextPlugin.register(with: registry.registrar(forPlugin: "IrondashEngineContextPlugin"))
|
|
||||||
LocalNotifierPlugin.register(with: registry.registrar(forPlugin: "LocalNotifierPlugin"))
|
LocalNotifierPlugin.register(with: registry.registrar(forPlugin: "LocalNotifierPlugin"))
|
||||||
MediaKitLibsMacosAudioPlugin.register(with: registry.registrar(forPlugin: "MediaKitLibsMacosAudioPlugin"))
|
MediaKitLibsMacosAudioPlugin.register(with: registry.registrar(forPlugin: "MediaKitLibsMacosAudioPlugin"))
|
||||||
OpenFilePlugin.register(with: registry.registrar(forPlugin: "OpenFilePlugin"))
|
OpenFilePlugin.register(with: registry.registrar(forPlugin: "OpenFilePlugin"))
|
||||||
@ -58,7 +55,6 @@ func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) {
|
|||||||
SharedPreferencesPlugin.register(with: registry.registrar(forPlugin: "SharedPreferencesPlugin"))
|
SharedPreferencesPlugin.register(with: registry.registrar(forPlugin: "SharedPreferencesPlugin"))
|
||||||
SqflitePlugin.register(with: registry.registrar(forPlugin: "SqflitePlugin"))
|
SqflitePlugin.register(with: registry.registrar(forPlugin: "SqflitePlugin"))
|
||||||
Sqlite3FlutterLibsPlugin.register(with: registry.registrar(forPlugin: "Sqlite3FlutterLibsPlugin"))
|
Sqlite3FlutterLibsPlugin.register(with: registry.registrar(forPlugin: "Sqlite3FlutterLibsPlugin"))
|
||||||
SuperNativeExtensionsPlugin.register(with: registry.registrar(forPlugin: "SuperNativeExtensionsPlugin"))
|
|
||||||
SystemThemePlugin.register(with: registry.registrar(forPlugin: "SystemThemePlugin"))
|
SystemThemePlugin.register(with: registry.registrar(forPlugin: "SystemThemePlugin"))
|
||||||
TrayManagerPlugin.register(with: registry.registrar(forPlugin: "TrayManagerPlugin"))
|
TrayManagerPlugin.register(with: registry.registrar(forPlugin: "TrayManagerPlugin"))
|
||||||
UrlLauncherPlugin.register(with: registry.registrar(forPlugin: "UrlLauncherPlugin"))
|
UrlLauncherPlugin.register(with: registry.registrar(forPlugin: "UrlLauncherPlugin"))
|
||||||
|
|||||||
66
pubspec.lock
66
pubspec.lock
@ -422,10 +422,10 @@ packages:
|
|||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: country_flags
|
name: country_flags
|
||||||
sha256: "78a7bf8aabd7ae1a90087f0c517471ac9ebfe07addc652692f58da0f0f833196"
|
sha256: "714f2d415e74828eb08787d552a05e94cdf2cbe0607a5656f3e70087cd7bb7e0"
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "3.3.0"
|
version: "4.1.0"
|
||||||
coverage:
|
coverage:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
@ -1399,22 +1399,6 @@ packages:
|
|||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.0.5"
|
version: "1.0.5"
|
||||||
irondash_engine_context:
|
|
||||||
dependency: transitive
|
|
||||||
description:
|
|
||||||
name: irondash_engine_context
|
|
||||||
sha256: "2bb0bc13dfda9f5aaef8dde06ecc5feb1379f5bb387d59716d799554f3f305d7"
|
|
||||||
url: "https://pub.dev"
|
|
||||||
source: hosted
|
|
||||||
version: "0.5.5"
|
|
||||||
irondash_message_channel:
|
|
||||||
dependency: transitive
|
|
||||||
description:
|
|
||||||
name: irondash_message_channel
|
|
||||||
sha256: b4101669776509c76133b8917ab8cfc704d3ad92a8c450b92934dd8884a2f060
|
|
||||||
url: "https://pub.dev"
|
|
||||||
source: hosted
|
|
||||||
version: "0.7.0"
|
|
||||||
jovial_misc:
|
jovial_misc:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
@ -1439,14 +1423,6 @@ packages:
|
|||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "0.6.7"
|
version: "0.6.7"
|
||||||
jsf:
|
|
||||||
dependency: "direct main"
|
|
||||||
description:
|
|
||||||
name: jsf
|
|
||||||
sha256: "189ba3b9216702f9b6f2d8ea90fa5acaca13bbe5dd2f72fb38618005b41a737f"
|
|
||||||
url: "https://pub.dev"
|
|
||||||
source: hosted
|
|
||||||
version: "0.6.1"
|
|
||||||
json_annotation:
|
json_annotation:
|
||||||
dependency: "direct main"
|
dependency: "direct main"
|
||||||
description:
|
description:
|
||||||
@ -1910,14 +1886,6 @@ packages:
|
|||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "0.0.4"
|
version: "0.0.4"
|
||||||
pixel_snap:
|
|
||||||
dependency: transitive
|
|
||||||
description:
|
|
||||||
name: pixel_snap
|
|
||||||
sha256: "677410ea37b07cd37ecb6d5e6c0d8d7615a7cf3bd92ba406fd1ac57e937d1fb0"
|
|
||||||
url: "https://pub.dev"
|
|
||||||
source: hosted
|
|
||||||
version: "0.1.5"
|
|
||||||
platform:
|
platform:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
@ -2107,10 +2075,10 @@ packages:
|
|||||||
dependency: "direct main"
|
dependency: "direct main"
|
||||||
description:
|
description:
|
||||||
name: shadcn_flutter
|
name: shadcn_flutter
|
||||||
sha256: af83de199b7c3a965ab24e293cfcafe2764c12b7f911f5b1a427c332029262d9
|
sha256: "1fd4f798c39d6308dc8f7e94d9e870b5db39fbf417ea95c423c7555ce8227a1c"
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "0.0.44"
|
version: "0.0.47"
|
||||||
shared_preferences:
|
shared_preferences:
|
||||||
dependency: "direct main"
|
dependency: "direct main"
|
||||||
description:
|
description:
|
||||||
@ -2428,22 +2396,6 @@ packages:
|
|||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "0.0.3"
|
version: "0.0.3"
|
||||||
super_clipboard:
|
|
||||||
dependency: transitive
|
|
||||||
description:
|
|
||||||
name: super_clipboard
|
|
||||||
sha256: e73f3bb7e66cc9260efa1dc507f979138e7e106c3521e2dda2d0311f6d728a16
|
|
||||||
url: "https://pub.dev"
|
|
||||||
source: hosted
|
|
||||||
version: "0.9.1"
|
|
||||||
super_native_extensions:
|
|
||||||
dependency: transitive
|
|
||||||
description:
|
|
||||||
name: super_native_extensions
|
|
||||||
sha256: b9611dcb68f1047d6f3ef11af25e4e68a21b1a705bbcc3eb8cb4e9f5c3148569
|
|
||||||
url: "https://pub.dev"
|
|
||||||
source: hosted
|
|
||||||
version: "0.9.1"
|
|
||||||
sync_http:
|
sync_http:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
@ -2460,14 +2412,6 @@ packages:
|
|||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "3.4.0"
|
version: "3.4.0"
|
||||||
syntax_highlight:
|
|
||||||
dependency: transitive
|
|
||||||
description:
|
|
||||||
name: syntax_highlight
|
|
||||||
sha256: "4d3ba40658cadba6ba55d697f29f00b43538ebb6eb4a0ca0e895c568eaced138"
|
|
||||||
url: "https://pub.dev"
|
|
||||||
source: hosted
|
|
||||||
version: "0.5.0"
|
|
||||||
system_theme:
|
system_theme:
|
||||||
dependency: "direct main"
|
dependency: "direct main"
|
||||||
description:
|
description:
|
||||||
@ -2863,4 +2807,4 @@ packages:
|
|||||||
version: "1.0.0"
|
version: "1.0.0"
|
||||||
sdks:
|
sdks:
|
||||||
dart: ">=3.9.0 <4.0.0"
|
dart: ">=3.9.0 <4.0.0"
|
||||||
flutter: ">=3.35.1"
|
flutter: ">=3.32.3"
|
||||||
|
|||||||
@ -104,7 +104,7 @@ dependencies:
|
|||||||
ref: dart-3-support
|
ref: dart-3-support
|
||||||
url: https://github.com/KRTirtho/scrobblenaut.git
|
url: https://github.com/KRTirtho/scrobblenaut.git
|
||||||
scroll_to_index: ^3.0.1
|
scroll_to_index: ^3.0.1
|
||||||
shadcn_flutter: ^0.0.42
|
shadcn_flutter: ^0.0.47
|
||||||
shared_preferences: ^2.2.3
|
shared_preferences: ^2.2.3
|
||||||
shelf: ^1.4.1
|
shelf: ^1.4.1
|
||||||
shelf_router: ^1.1.4
|
shelf_router: ^1.1.4
|
||||||
@ -161,7 +161,6 @@ dependencies:
|
|||||||
flutter_markdown_plus: ^1.0.3
|
flutter_markdown_plus: ^1.0.3
|
||||||
pub_semver: ^2.2.0
|
pub_semver: ^2.2.0
|
||||||
change_case: ^1.1.0
|
change_case: ^1.1.0
|
||||||
jsf: ^0.6.1
|
|
||||||
|
|
||||||
dev_dependencies:
|
dev_dependencies:
|
||||||
build_runner: ^2.4.13
|
build_runner: ^2.4.13
|
||||||
|
|||||||
@ -15,13 +15,11 @@
|
|||||||
#include <flutter_new_pipe_extractor/flutter_new_pipe_extractor_plugin_c_api.h>
|
#include <flutter_new_pipe_extractor/flutter_new_pipe_extractor_plugin_c_api.h>
|
||||||
#include <flutter_secure_storage_windows/flutter_secure_storage_windows_plugin.h>
|
#include <flutter_secure_storage_windows/flutter_secure_storage_windows_plugin.h>
|
||||||
#include <flutter_timezone/flutter_timezone_plugin_c_api.h>
|
#include <flutter_timezone/flutter_timezone_plugin_c_api.h>
|
||||||
#include <irondash_engine_context/irondash_engine_context_plugin_c_api.h>
|
|
||||||
#include <local_notifier/local_notifier_plugin.h>
|
#include <local_notifier/local_notifier_plugin.h>
|
||||||
#include <media_kit_libs_windows_audio/media_kit_libs_windows_audio_plugin_c_api.h>
|
#include <media_kit_libs_windows_audio/media_kit_libs_windows_audio_plugin_c_api.h>
|
||||||
#include <permission_handler_windows/permission_handler_windows_plugin.h>
|
#include <permission_handler_windows/permission_handler_windows_plugin.h>
|
||||||
#include <screen_retriever_windows/screen_retriever_windows_plugin_c_api.h>
|
#include <screen_retriever_windows/screen_retriever_windows_plugin_c_api.h>
|
||||||
#include <sqlite3_flutter_libs/sqlite3_flutter_libs_plugin.h>
|
#include <sqlite3_flutter_libs/sqlite3_flutter_libs_plugin.h>
|
||||||
#include <super_native_extensions/super_native_extensions_plugin_c_api.h>
|
|
||||||
#include <system_theme/system_theme_plugin.h>
|
#include <system_theme/system_theme_plugin.h>
|
||||||
#include <tray_manager/tray_manager_plugin.h>
|
#include <tray_manager/tray_manager_plugin.h>
|
||||||
#include <url_launcher_windows/url_launcher_windows.h>
|
#include <url_launcher_windows/url_launcher_windows.h>
|
||||||
@ -46,8 +44,6 @@ void RegisterPlugins(flutter::PluginRegistry* registry) {
|
|||||||
registry->GetRegistrarForPlugin("FlutterSecureStorageWindowsPlugin"));
|
registry->GetRegistrarForPlugin("FlutterSecureStorageWindowsPlugin"));
|
||||||
FlutterTimezonePluginCApiRegisterWithRegistrar(
|
FlutterTimezonePluginCApiRegisterWithRegistrar(
|
||||||
registry->GetRegistrarForPlugin("FlutterTimezonePluginCApi"));
|
registry->GetRegistrarForPlugin("FlutterTimezonePluginCApi"));
|
||||||
IrondashEngineContextPluginCApiRegisterWithRegistrar(
|
|
||||||
registry->GetRegistrarForPlugin("IrondashEngineContextPluginCApi"));
|
|
||||||
LocalNotifierPluginRegisterWithRegistrar(
|
LocalNotifierPluginRegisterWithRegistrar(
|
||||||
registry->GetRegistrarForPlugin("LocalNotifierPlugin"));
|
registry->GetRegistrarForPlugin("LocalNotifierPlugin"));
|
||||||
MediaKitLibsWindowsAudioPluginCApiRegisterWithRegistrar(
|
MediaKitLibsWindowsAudioPluginCApiRegisterWithRegistrar(
|
||||||
@ -58,8 +54,6 @@ void RegisterPlugins(flutter::PluginRegistry* registry) {
|
|||||||
registry->GetRegistrarForPlugin("ScreenRetrieverWindowsPluginCApi"));
|
registry->GetRegistrarForPlugin("ScreenRetrieverWindowsPluginCApi"));
|
||||||
Sqlite3FlutterLibsPluginRegisterWithRegistrar(
|
Sqlite3FlutterLibsPluginRegisterWithRegistrar(
|
||||||
registry->GetRegistrarForPlugin("Sqlite3FlutterLibsPlugin"));
|
registry->GetRegistrarForPlugin("Sqlite3FlutterLibsPlugin"));
|
||||||
SuperNativeExtensionsPluginCApiRegisterWithRegistrar(
|
|
||||||
registry->GetRegistrarForPlugin("SuperNativeExtensionsPluginCApi"));
|
|
||||||
SystemThemePluginRegisterWithRegistrar(
|
SystemThemePluginRegisterWithRegistrar(
|
||||||
registry->GetRegistrarForPlugin("SystemThemePlugin"));
|
registry->GetRegistrarForPlugin("SystemThemePlugin"));
|
||||||
TrayManagerPluginRegisterWithRegistrar(
|
TrayManagerPluginRegisterWithRegistrar(
|
||||||
|
|||||||
@ -12,13 +12,11 @@ list(APPEND FLUTTER_PLUGIN_LIST
|
|||||||
flutter_new_pipe_extractor
|
flutter_new_pipe_extractor
|
||||||
flutter_secure_storage_windows
|
flutter_secure_storage_windows
|
||||||
flutter_timezone
|
flutter_timezone
|
||||||
irondash_engine_context
|
|
||||||
local_notifier
|
local_notifier
|
||||||
media_kit_libs_windows_audio
|
media_kit_libs_windows_audio
|
||||||
permission_handler_windows
|
permission_handler_windows
|
||||||
screen_retriever_windows
|
screen_retriever_windows
|
||||||
sqlite3_flutter_libs
|
sqlite3_flutter_libs
|
||||||
super_native_extensions
|
|
||||||
system_theme
|
system_theme
|
||||||
tray_manager
|
tray_manager
|
||||||
url_launcher_windows
|
url_launcher_windows
|
||||||
@ -27,7 +25,6 @@ list(APPEND FLUTTER_PLUGIN_LIST
|
|||||||
|
|
||||||
list(APPEND FLUTTER_FFI_PLUGIN_LIST
|
list(APPEND FLUTTER_FFI_PLUGIN_LIST
|
||||||
flutter_discord_rpc
|
flutter_discord_rpc
|
||||||
jsf
|
|
||||||
metadata_god
|
metadata_god
|
||||||
smtc_windows
|
smtc_windows
|
||||||
)
|
)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user