diff --git a/lib/audio/audio_service.dart b/lib/audio/audio_service.dart index 62805d1..081c1c1 100644 --- a/lib/audio/audio_service.dart +++ b/lib/audio/audio_service.dart @@ -1,10 +1,12 @@ import 'dart:io'; import 'package:audioplayers/audioplayers.dart'; +import 'package:flutter/foundation.dart' show kIsWeb; /// Returns the audio file extension supported by the current platform. -/// Windows Media Foundation doesn't support Ogg Vorbis, so we use MP3 there. -String get _audioExt => Platform.isWindows ? 'mp3' : 'ogg'; +/// Windows Media Foundation doesn't support Ogg Vorbis, so we use MP3 there, +/// and in the browser (MP3 plays everywhere; Ogg Vorbis does not in Safari). +String get _audioExt => kIsWeb || Platform.isWindows ? 'mp3' : 'ogg'; class AudioService { final AudioPlayer _musicPlayer; @@ -67,8 +69,8 @@ class AudioService { Future _initializeMusic() async { await _musicPlayer.setPlayerMode(PlayerMode.mediaPlayer); await _musicPlayer.setReleaseMode(ReleaseMode.loop); - await _musicPlayer.setVolume(Platform.isLinux ? 0.60 : 0.25); - if (Platform.isAndroid) { + await _musicPlayer.setVolume(!kIsWeb && Platform.isLinux ? 0.60 : 0.25); + if (!kIsWeb && Platform.isAndroid) { await _musicPlayer.setAudioContext( AudioContext( android: AudioContextAndroid( @@ -105,7 +107,7 @@ class AudioService { Future _initializeSfx() async { for (final name in sfxNames) { final player = _sfxPlayerFactory?.call() ?? AudioPlayer(); - if (Platform.isAndroid) { + if (!kIsWeb && Platform.isAndroid) { await player.setAudioContext( AudioContext( android: AudioContextAndroid( @@ -119,7 +121,7 @@ class AudioService { ); } final baseVolume = _sfxVolumes[name]!; - final volume = Platform.isLinux + final volume = !kIsWeb && Platform.isLinux ? (baseVolume * 2.5).clamp(0.0, 1.0).toDouble() : baseVolume; await player.setVolume(volume); diff --git a/lib/logging.dart b/lib/logging.dart index d37433c..3a317ca 100644 --- a/lib/logging.dart +++ b/lib/logging.dart @@ -1,56 +1,22 @@ -import 'dart:developer' show log; - import 'package:flutter/foundation.dart'; -import 'package:talker_flutter/talker_flutter.dart'; - -import 'terminal_columns_stub.dart' - if (dart.library.io) 'terminal_columns_io.dart'; -typedef TerminalColumnsProvider = int? Function(); +/// Minimal stand-in for the Talker logger of the original app (removed for the +/// web edition): same call sites, messages only go to the debug console. +class _Talker { + const _Talker(); -class TerminalResponsiveLoggerFormatter implements LoggerFormatter { - const TerminalResponsiveLoggerFormatter({this.terminalColumnsProvider}); + void info(Object? message) => debugPrint('[info] $message'); - final TerminalColumnsProvider? terminalColumnsProvider; + void warning(Object? message) => debugPrint('[warning] $message'); - @override - String fmt(LogDetails details, TalkerLoggerSettings settings) { - final terminalColumns = - (terminalColumnsProvider ?? currentTerminalColumns)(); - final maxLineWidth = terminalColumns != null && terminalColumns > 2 - ? (terminalColumns - 2).clamp(1, settings.maxLineWidth).toInt() - : settings.maxLineWidth; + void error(Object? message, [Object? error, StackTrace? stackTrace]) => + debugPrint('[error] $message ${error ?? ''}'); - return const ExtendedLoggerFormatter().fmt( - details, - settings.copyWith(maxLineWidth: maxLineWidth), - ); - } + void handle(Object error, [StackTrace? stackTrace, Object? message]) => + debugPrint('[error] ${message ?? ''} $error'); } -final talker = TalkerFlutter.init( - logger: TalkerLogger( - formatter: const TerminalResponsiveLoggerFormatter(), - output: _talkerOutput, - ), -); - -void _talkerOutput(String message) { - if (kIsWeb) { - // ignore: avoid_print - print(message); - return; - } - - switch (defaultTargetPlatform) { - case TargetPlatform.iOS: - case TargetPlatform.macOS: - log(message, name: 'Talker'); - break; - default: - debugPrint(message); - } -} +const talker = _Talker(); void installTalkerErrorHandlers() { FlutterError.onError = (details) { diff --git a/lib/screens/block_drop_game_screen.dart b/lib/screens/block_drop_game_screen.dart index 96e2671..37a0df8 100644 --- a/lib/screens/block_drop_game_screen.dart +++ b/lib/screens/block_drop_game_screen.dart @@ -1,13 +1,10 @@ import 'dart:async'; -import 'dart:io'; import 'dart:ui' as ui; import 'package:flutter/foundation.dart'; import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; import 'package:intl/intl.dart'; -import 'package:package_info_plus/package_info_plus.dart'; -import 'package:shared_preferences/shared_preferences.dart'; import '../audio/audio_service.dart'; import '../constants/game_constants.dart'; @@ -15,8 +12,6 @@ import '../game/game_logic.dart'; import '../game/gameplay_settings.dart'; import '../l10n/app_localizations.dart'; import '../settings/settings_provider.dart'; -import '../update_notice.dart'; -import '../update_notice_snackbar.dart'; import '../settings/controller_bindings.dart'; import '../widgets/game_board.dart'; import '../widgets/game_decorations.dart'; @@ -25,7 +20,6 @@ import '../widgets/next_piece_display.dart'; import '../widgets/on_screen_game_controls.dart'; import '../widgets/swipe_detector.dart'; import 'settings_screen.dart'; -import 'whats_new_screen.dart'; class BlockDropGameScreen extends StatefulWidget { final SettingsProvider settings; @@ -83,43 +77,6 @@ class _BlockDropGameScreenState extends State WidgetsBinding.instance.addObserver(this); widget.settings.addListener(_onSettingsChanged); HardwareKeyboard.instance.addHandler(_handleKeyEvent); - WidgetsBinding.instance.addPostFrameCallback((_) => _showUpdateNotice()); - } - - Future _showUpdateNotice() async { - try { - final prefs = await SharedPreferences.getInstance(); - final info = await PackageInfo.fromPlatform(); - final build = int.tryParse(info.buildNumber); - if (build == null) return; - const buildKey = 'last_seen_build_number'; - const noticeKey = 'last_update_notice_ms'; - final previousBuild = prefs.getInt(buildKey); - if (previousBuild == null || build > previousBuild) { - await prefs.setInt(buildKey, build); - } - if (!mounted || prefs.getBool(showUpdateNoticesKey) == false) return; - final now = DateTime.now().millisecondsSinceEpoch; - if (!shouldShowUpdateNotice( - previousBuild: previousBuild, - currentBuild: build, - lastShownAtMs: prefs.getInt(noticeKey), - nowMs: now, - )) return; - await prefs.setInt(noticeKey, now); - if (!mounted) return; - ScaffoldMessenger.of(context).showSnackBar( - newVersionSnackBar( - context, - info.version, - () => Navigator.of(context).push( - MaterialPageRoute(builder: (_) => const WhatsNewScreen()), - ), - ), - ); - } catch (error) { - debugPrint('Unable to show BlockDrop update notice: $error'); - } } bool _handleKeyEvent(KeyEvent event) { @@ -287,12 +244,7 @@ class _BlockDropGameScreenState extends State onRestart: () { gameLogic.startGame(); }, - onQuit: () { - if (defaultTargetPlatform == TargetPlatform.android) - SystemNavigator.pop(); - else - exit(0); - }, + // No "Quit" in the web edition: a browser tab is closed by the visitor. onPractice: () { _pendingPractice = true; }, diff --git a/lib/screens/settings_screen.dart b/lib/screens/settings_screen.dart index ae610a6..97660d8 100644 --- a/lib/screens/settings_screen.dart +++ b/lib/screens/settings_screen.dart @@ -1,23 +1,16 @@ import 'dart:async'; -import 'dart:io'; import 'dart:ui' as ui; -import 'package:file_picker/file_picker.dart'; import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; import 'package:intl/intl.dart'; -import 'package:path_provider/path_provider.dart'; -import 'package:url_launcher/url_launcher.dart'; -import '../audio/audio_service.dart'; import '../game/gameplay_settings.dart'; import '../l10n/app_localizations.dart'; import '../settings/controller_bindings.dart'; import '../settings/settings_provider.dart'; import '../widgets/empty_state.dart'; import '../widgets/game_decorations.dart'; -import 'multiplayer_discovery_screen.dart'; -import 'whats_new_screen.dart'; class SettingsScreen extends StatefulWidget { final SettingsProvider settings; @@ -70,88 +63,6 @@ class _SettingsScreenState extends State { final TextEditingController _searchController = TextEditingController(); final GlobalKey _searchBarKey = GlobalKey(); - Future _pickAndStoreAudio(String slot) async { - try { - final picked = await FilePicker.pickFile(type: FileType.audio); - if (picked == null) return null; - final extension = picked.extension?.toLowerCase(); - final directory = Directory( - '${(await getApplicationSupportDirectory()).path}/custom_audio', - ); - await directory.create(recursive: true); - final targetName = extension == null ? slot : '$slot.$extension'; - final target = File(directory.path + Platform.pathSeparator + targetName); - await target.writeAsBytes(await picked.readAsBytes(), flush: true); - return target.path; - } catch (_) { - if (mounted) { - ScaffoldMessenger.of(context).showSnackBar( - SnackBar(content: Text(context.l10n.text('Unable to import audio'))), - ); - } - return null; - } - } - - Future _chooseCustomMusic() async { - final path = await _pickAndStoreAudio('music'); - if (path != null) await widget.settings.setCustomMusicPath(path); - } - - Future _chooseCustomSfx(String name) async { - final path = await _pickAndStoreAudio('sfx_$name'); - if (path != null) await widget.settings.setCustomSfxPath(name, path); - } - - Future _showCustomSfxDialog() async { - await showDialog( - context: context, - builder: (dialogContext) => AlertDialog( - title: Text(context.l10n.text('Custom sound effects')), - content: SizedBox( - width: 420, - child: ListView( - shrinkWrap: true, - children: AudioService.sfxNames.map((name) { - final customized = widget.settings.customSfxPaths.containsKey( - name, - ); - return ListTile( - title: Text(name.replaceAll('_', ' ')), - subtitle: Text( - context.l10n.text( - customized ? 'Custom audio' : 'Default audio', - ), - ), - trailing: customized - ? IconButton( - tooltip: context.l10n.text('Restore default'), - icon: const Icon(Icons.restore), - onPressed: () async { - await widget.settings.setCustomSfxPath(name, null); - if (dialogContext.mounted) - Navigator.pop(dialogContext); - }, - ) - : const Icon(Icons.chevron_right), - onTap: () async { - Navigator.pop(dialogContext); - await _chooseCustomSfx(name); - }, - ); - }).toList(), - ), - ), - actions: [ - TextButton( - onPressed: () => Navigator.pop(dialogContext), - child: Text(context.l10n.text('Close')), - ), - ], - ), - ); - } - @override void initState() { super.initState(); @@ -169,7 +80,6 @@ class _SettingsScreenState extends State { static const _searchAliases = { 'Controller': 'keybinds remap controls remap keys', - 'Play on LAN': 'wifi wi-fi multiplayer local match', 'Full-screen Layout': 'fullscreen full screen large board big board immersive layout', }; @@ -338,20 +248,15 @@ class _SettingsScreenState extends State { 'System default', ..._languageNames.values, ]); - final showMultiplayer = _sectionMatches('Multiplayer', [ - 'Show Opponent Board', - 'Play on LAN', - ]); final showStats = _sectionMatches('Stats', ['High Score']); final showInstructions = _sectionMatches('Instructions', ['Controls']); - final showAbout = _sectionMatches('About', ['BlockDrop', "What's new"]); + final showAbout = _sectionMatches('About', ['BlockDrop']); final noSearchResults = _searchQuery.isNotEmpty && !showGame && !showSound && !showGameplay && !showController && !showAppearance && - !showMultiplayer && !showStats && !showInstructions && !showAbout; @@ -465,79 +370,6 @@ class _SettingsScreenState extends State { ), ), ], - if (showMultiplayer) - _SectionHeader( - label: 'Multiplayer', - colorScheme: colorScheme, - ), - if (_matchesSearch('Play on LAN', section: 'Multiplayer')) - Container( - margin: const EdgeInsets.symmetric( - horizontal: 16, - vertical: 4, - ), - decoration: panelDecoration( - widget.settings.style, - colorScheme, - ), - child: InkWell( - borderRadius: panelBorderRadius( - widget.settings.style, - ), - onTap: () => Navigator.push( - context, - MaterialPageRoute( - builder: (_) => MultiplayerDiscoveryScreen( - settings: widget.settings, - ), - ), - ), - child: Padding( - padding: const EdgeInsets.symmetric( - horizontal: 16, - vertical: 14, - ), - child: Row( - children: [ - Icon( - Icons.wifi, - color: colorScheme.primary, - size: 20, - ), - const SizedBox(width: 12), - Expanded( - child: Text( - context.l10n.text('Play on LAN'), - style: TextStyle( - fontSize: 15, - color: colorScheme.onSurface, - ), - ), - ), - Icon( - Icons.chevron_right, - color: colorScheme.onSurfaceVariant, - size: 20, - ), - ], - ), - ), - ), - ), - if (_matchesSearch( - 'Show Opponent Board', - section: 'Multiplayer', - )) - _SettingTile( - label: 'Show Opponent Board', - colorScheme: colorScheme, - style: widget.settings.style, - child: Switch( - value: widget.settings.showOpponentBoard, - onChanged: (value) => - widget.settings.setShowOpponentBoard(value), - ), - ), if (showSound) _SectionHeader(label: 'Sound', colorScheme: colorScheme), if (_matchesSearch('Music', section: 'Sound')) @@ -551,28 +383,6 @@ class _SettingsScreenState extends State { mainAxisSize: MainAxisSize.min, mainAxisAlignment: MainAxisAlignment.end, children: [ - if (widget.settings.customMusicPath != null) - IconButton( - tooltip: context.l10n.text('Restore default'), - onPressed: () => - widget.settings.setCustomMusicPath(null), - padding: const EdgeInsets.all(4), - constraints: const BoxConstraints.tightFor( - width: 36, - height: 36, - ), - icon: const Icon(Icons.restore, size: 20), - ), - IconButton( - tooltip: context.l10n.text('Choose audio file'), - onPressed: _chooseCustomMusic, - padding: const EdgeInsets.all(4), - constraints: const BoxConstraints.tightFor( - width: 36, - height: 36, - ), - icon: const Icon(Icons.audio_file, size: 20), - ), SizedBox( width: 48, child: FittedBox( @@ -597,13 +407,6 @@ class _SettingsScreenState extends State { child: Row( mainAxisAlignment: MainAxisAlignment.end, children: [ - IconButton( - tooltip: context.l10n.text( - 'Choose custom sound effects', - ), - onPressed: _showCustomSfxDialog, - icon: const Icon(Icons.library_music), - ), Switch( value: widget.settings.sfxEnabled, onChanged: (value) => @@ -1628,86 +1431,6 @@ class _AboutCard extends StatelessWidget { height: 1.35, ), ), - const SizedBox(height: 8), - _LinkRow( - icon: Icons.code, - label: 'Source Code', - url: 'https://github.com/brandonp2412/BlockDrop', - colorScheme: colorScheme, - ), - Divider( - height: 12, - thickness: 1, - color: colorScheme.outline.withAlpha(30), - ), - _LinkRow( - icon: Icons.new_releases_outlined, - label: "What's new", - onTap: () => Navigator.of(context).push( - MaterialPageRoute(builder: (_) => const WhatsNewScreen()), - ), - colorScheme: colorScheme, - ), - Divider( - height: 12, - thickness: 1, - color: colorScheme.outline.withAlpha(30), - ), - _LinkRow( - icon: Icons.favorite, - label: 'Support Development', - url: 'https://github.com/sponsors/brandonp2412', - colorScheme: colorScheme, - ), - ], - ), - ); - } -} - -class _LinkRow extends StatelessWidget { - final IconData icon; - final String label; - final String? url; - final VoidCallback? onTap; - final ColorScheme colorScheme; - - const _LinkRow({ - required this.icon, - required this.label, - this.url, - this.onTap, - required this.colorScheme, - }); - - @override - Widget build(BuildContext context) { - return InkWell( - key: Key('settings-link-$label'), - onTap: onTap ?? - () => launchUrl( - Uri.parse(url!), - mode: LaunchMode.externalApplication, - ), - child: Row( - children: [ - Icon(icon, size: 16, color: colorScheme.primary), - const SizedBox(width: 10), - Expanded( - child: Text( - context.l10n.text(label), - style: TextStyle( - fontSize: 13, - color: colorScheme.primary, - fontWeight: FontWeight.w500, - ), - ), - ), - Icon( - onTap == null ? Icons.open_in_new : Icons.chevron_right, - size: 14, - color: colorScheme.primary, - ), ], ), ); diff --git a/lib/settings/settings_provider.dart b/lib/settings/settings_provider.dart index 4965dec..668d24d 100644 --- a/lib/settings/settings_provider.dart +++ b/lib/settings/settings_provider.dart @@ -1,6 +1,7 @@ import 'dart:convert'; import 'dart:io'; +import 'package:flutter/foundation.dart' show kIsWeb; import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; import 'package:shared_preferences/shared_preferences.dart'; @@ -202,7 +203,7 @@ class SettingsProvider extends ChangeNotifier { } static Future _detectTelevision() async { - if (!Platform.isAndroid) return false; + if (kIsWeb || !Platform.isAndroid) return false; try { return await _deviceChannel.invokeMethod('isTelevision') ?? false; } on PlatformException { diff --git a/pubspec.lock b/pubspec.lock index 4186d9d..c655b94 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -1,30 +1,6 @@ # Generated by pub # See https://dart.dev/tools/pub/glossary#lockfile packages: - android_file_picker: - dependency: transitive - description: - name: android_file_picker - sha256: e94229cc41c4bb5fb6a2254146340a8b650664c99b5c93b9001f66c3375d0060 - url: "https://pub.dev" - source: hosted - version: "2.1.1" - ansicolor: - dependency: transitive - description: - name: ansicolor - sha256: "50e982d500bc863e1d703448afdbf9e5a72eb48840a4f766fa361ffd6877055f" - url: "https://pub.dev" - source: hosted - version: "2.0.3" - archive: - dependency: transitive - description: - name: archive - sha256: "0d58d1fa1fddf6588251ccf2819f3fb3b6d0452c1b2813ac7413a05592bfbefe" - url: "https://pub.dev" - source: hosted - version: "4.5.2" args: dependency: transitive description: @@ -105,46 +81,6 @@ packages: url: "https://pub.dev" source: hosted version: "2.1.2" - camera: - dependency: transitive - description: - name: camera - sha256: "4a0863bc142f6fbfdca19161205574fd8a8f00d4753b48d214c4dfbdcc534c51" - url: "https://pub.dev" - source: hosted - version: "0.12.2" - camera_android_camerax: - dependency: transitive - description: - name: camera_android_camerax - sha256: b5e0a2a8e63f2788139379926a9abc3a64eed5e309c1384e5db25b74f15b7307 - url: "https://pub.dev" - source: hosted - version: "0.7.6+1" - camera_avfoundation: - dependency: transitive - description: - name: camera_avfoundation - sha256: "971f7b4938ae761797dd667c078af92f1b6a1bb7760774c0cbcf9c9d4a14bdf1" - url: "https://pub.dev" - source: hosted - version: "0.11.1" - camera_platform_interface: - dependency: transitive - description: - name: camera_platform_interface - sha256: b3083b183ef1daa408d5f0c98c8c7ac0325b490695fb4557ff4210fcf04c5984 - url: "https://pub.dev" - source: hosted - version: "2.15.0" - camera_web: - dependency: transitive - description: - name: camera_web - sha256: "45063367478a53aa6f2d6e8a53b70fce3499f2b1e98d294c9e71c72bcd20ebf0" - url: "https://pub.dev" - source: hosted - version: "0.3.5+7" characters: dependency: transitive description: @@ -153,22 +89,6 @@ packages: url: "https://pub.dev" source: hosted version: "1.4.1" - checked_yaml: - dependency: transitive - description: - name: checked_yaml - sha256: "959525d3162f249993882720d52b7e0c833978df229be20702b33d48d91de70f" - url: "https://pub.dev" - source: hosted - version: "2.0.4" - cli_util: - dependency: transitive - description: - name: cli_util - sha256: ff6785f7e9e3c38ac98b2fb035701789de90154024a75b6cb926445e83197d1c - url: "https://pub.dev" - source: hosted - version: "0.4.2" clock: dependency: transitive description: @@ -193,22 +113,6 @@ packages: url: "https://pub.dev" source: hosted version: "1.19.1" - console: - dependency: transitive - description: - name: console - sha256: e04e7824384c5b39389acdd6dc7d33f3efe6b232f6f16d7626f194f6a01ad69a - url: "https://pub.dev" - source: hosted - version: "4.1.0" - cross_file: - dependency: transitive - description: - name: cross_file - sha256: f141ea4f277af142a0356955707f6556f37b03947d39d55585981a06ca437bd6 - url: "https://pub.dev" - source: hosted - version: "0.3.5+5" crypto: dependency: transitive description: @@ -217,30 +121,6 @@ packages: url: "https://pub.dev" source: hosted version: "3.0.7" - dbus: - dependency: transitive - description: - name: dbus - sha256: f7db8504e715b835f5ebe5fe74604ccd961d504c73389a5d8e81bafc2e2f3612 - url: "https://pub.dev" - source: hosted - version: "0.8.0" - dispose_scope: - dependency: transitive - description: - name: dispose_scope - sha256: "48ec38ca2631c53c4f8fa96b294c801e55c335db5e3fb9f82cede150cfe5a2af" - url: "https://pub.dev" - source: hosted - version: "2.1.0" - equatable: - dependency: transitive - description: - name: equatable - sha256: "3bce007a596ff8b3119c45d68aaef631272537c03d30e5d4534dd24bf4c5eaa2" - url: "https://pub.dev" - source: hosted - version: "2.1.0" fake_async: dependency: transitive description: @@ -257,14 +137,6 @@ packages: url: "https://pub.dev" source: hosted version: "2.2.0" - ffi_leak_tracker: - dependency: transitive - description: - name: ffi_leak_tracker - sha256: "4093d4ef9ca06ffe2786e73bfb25e22aa92112b9bb4ec941f11e3e6b61489a97" - url: "https://pub.dev" - source: hosted - version: "0.1.2" file: dependency: transitive description: @@ -273,78 +145,6 @@ packages: url: "https://pub.dev" source: hosted version: "7.0.1" - file_picker: - dependency: "direct main" - description: - name: file_picker - sha256: "98c0b156b6380ba55bc767a14e2e6b3feb246e713ad40092424596fa79005bea" - url: "https://pub.dev" - source: hosted - version: "13.1.0" - file_picker_darwin: - dependency: transitive - description: - name: file_picker_darwin - sha256: a5a48960703e7faa880544ef188491f442a93959b6afb5cae57575e5dc836589 - url: "https://pub.dev" - source: hosted - version: "2.3.2" - file_picker_linux: - dependency: transitive - description: - name: file_picker_linux - sha256: c6562fc7d426db2fb85ea66fe2627953d2709932df5584ceaacf0aa5e39cf4da - url: "https://pub.dev" - source: hosted - version: "2.0.2" - file_picker_platform_interface: - dependency: transitive - description: - name: file_picker_platform_interface - sha256: "336e7168306834a2b68e6168ed768e00d3fabeac23154d5793e277ca9f97cf20" - url: "https://pub.dev" - source: hosted - version: "4.2.0" - file_picker_web: - dependency: transitive - description: - name: file_picker_web - sha256: a2288008280aabe371aff029466b3405e60838e0a1d714767488c59b926c8b8c - url: "https://pub.dev" - source: hosted - version: "4.2.0" - file_selector_linux: - dependency: transitive - description: - name: file_selector_linux - sha256: da76400e7872ce7637ffdce12749ec24169c25f6195c28372208e65a24bcd2ab - url: "https://pub.dev" - source: hosted - version: "0.9.4+1" - file_selector_macos: - dependency: transitive - description: - name: file_selector_macos - sha256: d785431f1910aac8a50e5c492cae912320158030a88703c67b9ef7f1f96fd7ba - url: "https://pub.dev" - source: hosted - version: "0.9.5+2" - file_selector_platform_interface: - dependency: transitive - description: - name: file_selector_platform_interface - sha256: "35e0bd61ebcdb91a3505813b055b09b79dfdc7d0aee9c09a7ba59ae4bb13dc85" - url: "https://pub.dev" - source: hosted - version: "2.7.0" - file_selector_windows: - dependency: transitive - description: - name: file_selector_windows - sha256: fbefc5fb92c6d3cbe8d284a2cd971b593bb07d2cd6da8557b81a862250b4acec - url: "https://pub.dev" - source: hosted - version: "0.9.3+6" fixnum: dependency: transitive description: @@ -358,19 +158,6 @@ packages: description: flutter source: sdk version: "0.0.0" - flutter_driver: - dependency: transitive - description: flutter - source: sdk - version: "0.0.0" - flutter_launcher_icons: - dependency: "direct dev" - description: - name: flutter_launcher_icons - sha256: "10f13781741a2e3972126fae08393d3c4e01fa4cd7473326b94b72cf594195e7" - url: "https://pub.dev" - source: hosted - version: "0.14.4" flutter_lints: dependency: "direct dev" description: @@ -384,14 +171,6 @@ packages: description: flutter source: sdk version: "0.0.0" - flutter_plugin_android_lifecycle: - dependency: transitive - description: - name: flutter_plugin_android_lifecycle - sha256: "3854fe5e3bff0b113c658f260b90c95dea17c92db0f2addeac2e343dd9969785" - url: "https://pub.dev" - source: hosted - version: "2.0.35" flutter_test: dependency: "direct dev" description: flutter @@ -402,35 +181,6 @@ packages: description: flutter source: sdk version: "0.0.0" - flutter_zxing: - dependency: "direct main" - description: - name: flutter_zxing - sha256: ee2b97bf69b01385b91497501c060f4e3b53686709892e005de10f3ad30eee98 - url: "https://pub.dev" - source: hosted - version: "3.1.0" - fuchsia_remote_debug_protocol: - dependency: transitive - description: flutter - source: sdk - version: "0.0.0" - get_it: - dependency: transitive - description: - name: get_it - sha256: d85128a5dae4ea777324730dc65edd9c9f43155c109d5cc0a69cab74139fbac1 - url: "https://pub.dev" - source: hosted - version: "7.7.0" - group_button: - dependency: transitive - description: - name: group_button - sha256: "0610fcf28ed122bfb4b410fce161a390f7f2531d55d1d65c5375982001415940" - url: "https://pub.dev" - source: hosted - version: "5.3.4" hooks: dependency: transitive description: @@ -447,14 +197,6 @@ packages: url: "https://pub.dev" source: hosted version: "1.6.0" - http_multi_server: - dependency: transitive - description: - name: http_multi_server - sha256: aa6199f908078bb1c5efb8d8638d4ae191aac11b311132c3ef48ce352fb52ef8 - url: "https://pub.dev" - source: hosted - version: "3.2.2" http_parser: dependency: transitive description: @@ -463,83 +205,6 @@ packages: url: "https://pub.dev" source: hosted version: "4.1.2" - image: - dependency: transitive - description: - name: image - sha256: "89ed75b2f8231fe676808c5564f9590d728024ded7ac782a7ed8474f1c95b72a" - url: "https://pub.dev" - source: hosted - version: "4.12.0" - image_picker: - dependency: transitive - description: - name: image_picker - sha256: e71b1bd9e40124041128d60fc3034c7b1598e1bba4e570bba0c70301c817013a - url: "https://pub.dev" - source: hosted - version: "1.2.4" - image_picker_android: - dependency: transitive - description: - name: image_picker_android - sha256: "8a7823d5d3e884f7780829d85d92110d072bdcd9ed48e2be158d2abe91a912d4" - url: "https://pub.dev" - source: hosted - version: "0.8.13+25" - image_picker_for_web: - dependency: transitive - description: - name: image_picker_for_web - sha256: "66257a3191ab360d23a55c8241c91a6e329d31e94efa7be9cf7a212e65850214" - url: "https://pub.dev" - source: hosted - version: "3.1.1" - image_picker_ios: - dependency: transitive - description: - name: image_picker_ios - sha256: b8f508306db2bf71141aba2de4ec13456338bf01e13f034bd2594f341a5f8eb2 - url: "https://pub.dev" - source: hosted - version: "0.8.13+14" - image_picker_linux: - dependency: transitive - description: - name: image_picker_linux - sha256: "1f81c5f2046b9ab724f85523e4af65be1d47b038160a8c8deed909762c308ed4" - url: "https://pub.dev" - source: hosted - version: "0.2.2" - image_picker_macos: - dependency: transitive - description: - name: image_picker_macos - sha256: "86f0f15a309de7e1a552c12df9ce5b59fe927e71385329355aec4776c6a8ec91" - url: "https://pub.dev" - source: hosted - version: "0.2.2+1" - image_picker_platform_interface: - dependency: transitive - description: - name: image_picker_platform_interface - sha256: "2dee4b4e3be429db71472c9c559c981498070a61af1ba82e0e4986fc5dadc042" - url: "https://pub.dev" - source: hosted - version: "2.11.2" - image_picker_windows: - dependency: transitive - description: - name: image_picker_windows - sha256: d248c86554a72b5495a31c56f060cf73a41c7ff541689327b1a7dbccc33adfae - url: "https://pub.dev" - source: hosted - version: "0.2.2" - integration_test: - dependency: "direct dev" - description: flutter - source: sdk - version: "0.0.0" intl: dependency: "direct main" description: @@ -572,14 +237,6 @@ packages: url: "https://pub.dev" source: hosted version: "1.0.0" - json_annotation: - dependency: transitive - description: - name: json_annotation - sha256: "2a743920d81b7910627f68ee2c9ac1fc0bfee32b9fc3403587d7c6791ca12f80" - url: "https://pub.dev" - source: hosted - version: "4.12.0" leak_tracker: dependency: transitive description: @@ -644,31 +301,6 @@ packages: url: "https://pub.dev" source: hosted version: "1.19.0" - mime: - dependency: transitive - description: - name: mime - sha256: bd47de35f07e27267e69c8c8b22edf9473bfee170a60d60fcc93730c5144b7f6 - url: "https://pub.dev" - source: hosted - version: "2.1.0" - mocktail: - dependency: "direct dev" - description: - name: mocktail - sha256: "5e1bf53cc7baa8062a33b84424deb61513858ea05c601b8509e683815b5914aa" - url: "https://pub.dev" - source: hosted - version: "1.0.5" - msix: - dependency: "direct dev" - description: - path: "." - ref: msvc_redist - resolved-ref: af6cb56d55bdd1264ab5b2e6ae889e5a51c16c49 - url: "https://github.com/insertjokehere/msix.git" - source: git - version: "3.16.7" objective_c: dependency: transitive description: @@ -685,22 +317,6 @@ packages: url: "https://pub.dev" source: hosted version: "2.2.0" - package_info_plus: - dependency: "direct main" - description: - name: package_info_plus - sha256: "73ef2cd5c11a7548f9b7f6fc2a4f6113de2e64aa2a70de63feede95548822908" - url: "https://pub.dev" - source: hosted - version: "10.2.2" - package_info_plus_platform_interface: - dependency: transitive - description: - name: package_info_plus_platform_interface - sha256: db762cb2f4f25ee60fb6359773861b0f199e00b90d237bd85a76a1e806b46ef4 - url: "https://pub.dev" - source: hosted - version: "4.1.0" path: dependency: transitive description: @@ -710,7 +326,7 @@ packages: source: hosted version: "1.9.1" path_provider: - dependency: "direct main" + dependency: transitive description: name: path_provider sha256: a7f4874f987173da295a61c181b8ee71dab59b332a486b391babf26a1b884825 @@ -757,38 +373,6 @@ packages: url: "https://pub.dev" source: hosted version: "2.3.0" - patrol: - dependency: "direct dev" - description: - name: patrol - sha256: "662c50d517b2f159fedbc359a7fb8d0d30cbefea6d5c2a08392a0593079d64d1" - url: "https://pub.dev" - source: hosted - version: "4.10.0" - patrol_finders: - dependency: transitive - description: - name: patrol_finders - sha256: "8608cdacaab90a3b00ecd7b09df11f13a62b01dea13c211b9f13fd86854e103a" - url: "https://pub.dev" - source: hosted - version: "3.6.0" - patrol_log: - dependency: transitive - description: - name: patrol_log - sha256: "3d91c93e8d0ed19cb12d4b27aa24eca7294e0a48d9d8445505c9775feb5fde2d" - url: "https://pub.dev" - source: hosted - version: "0.10.1" - petitparser: - dependency: transitive - description: - name: petitparser - sha256: "2f1564aadb14215e478563b5406cb80729d022158c01dc50c96013c2f7eb4790" - url: "https://pub.dev" - source: hosted - version: "7.1.0" platform: dependency: transitive description: @@ -805,22 +389,6 @@ packages: url: "https://pub.dev" source: hosted version: "2.1.8" - posix: - dependency: transitive - description: - name: posix - sha256: bc1bad54ad2b735816e31f8d4600cfde6c7839975085ddfbca48b6c9f7c4044e - url: "https://pub.dev" - source: hosted - version: "6.5.2" - process: - dependency: transitive - description: - name: process - sha256: "4242ba3508d37e01808bdf71ad1d5bb93a8d671bf2e7450e6b1b353fb0808891" - url: "https://pub.dev" - source: hosted - version: "5.0.6" pub_semver: dependency: transitive description: @@ -829,22 +397,6 @@ packages: url: "https://pub.dev" source: hosted version: "2.2.1" - qr: - dependency: transitive - description: - name: qr - sha256: "2c0189dca64a3ab08dda7acd7911c89af2374f08eb4eaded3e8ef4609f3b9c8b" - url: "https://pub.dev" - source: hosted - version: "3.0.3" - qr_flutter: - dependency: "direct main" - description: - name: qr_flutter - sha256: "5095f0fc6e3f71d08adef8feccc8cea4f12eec18a2e31c2e8d82cb6019f4b097" - url: "https://pub.dev" - source: hosted - version: "4.1.0" record_use: dependency: transitive description: @@ -853,22 +405,6 @@ packages: url: "https://pub.dev" source: hosted version: "1.1.1" - share_plus: - dependency: transitive - description: - name: share_plus - sha256: db40767f130189d53f3ae8a6393c217ff4a492da1baff718a9873679c0c00224 - url: "https://pub.dev" - source: hosted - version: "13.3.1" - share_plus_platform_interface: - dependency: transitive - description: - name: share_plus_platform_interface - sha256: "365ef7379fc22507256adda3385152942ffce08935452bc972c2e52a0bebae41" - url: "https://pub.dev" - source: hosted - version: "7.2.0" shared_preferences: dependency: "direct main" description: @@ -925,14 +461,6 @@ packages: url: "https://pub.dev" source: hosted version: "2.4.1" - shelf: - dependency: transitive - description: - name: shelf - sha256: e75e9cf311d7fd712048038cc17c25199c38536c20330d53e7db058b543d5a48 - url: "https://pub.dev" - source: hosted - version: "1.4.3" sky_engine: dependency: transitive description: flutter @@ -962,14 +490,6 @@ packages: url: "https://pub.dev" source: hosted version: "2.1.4" - stream_transform: - dependency: transitive - description: - name: stream_transform - sha256: a00e5f18bffc764f923e7dec1038527f7fe7a1791361a7117f0358193f13d53a - url: "https://pub.dev" - source: hosted - version: "2.1.2" string_scanner: dependency: transitive description: @@ -978,14 +498,6 @@ packages: url: "https://pub.dev" source: hosted version: "1.4.1" - sync_http: - dependency: transitive - description: - name: sync_http - sha256: "7f0cd72eca000d2e026bcd6f990b81d0ca06022ef4e32fb257b30d3d1014a961" - url: "https://pub.dev" - source: hosted - version: "0.3.1" synchronized: dependency: transitive description: @@ -994,30 +506,6 @@ packages: url: "https://pub.dev" source: hosted version: "3.5.0" - talker: - dependency: transitive - description: - name: talker - sha256: "57b160b70123fdb28cc1035987e4718bce5715c724a40ff74d6466d1559de68a" - url: "https://pub.dev" - source: hosted - version: "5.1.20" - talker_flutter: - dependency: "direct main" - description: - name: talker_flutter - sha256: "9be092f9661d217edcfb3e2d7e3581a290a69ecfbbd2e19e582ff9d49e7f0e97" - url: "https://pub.dev" - source: hosted - version: "5.1.20" - talker_logger: - dependency: transitive - description: - name: talker_logger - sha256: b24550d115f209a1b84a697d65f5ec0fa9eb483735c802f18077692fa83cb5f8 - url: "https://pub.dev" - source: hosted - version: "5.1.20" term_glyph: dependency: transitive description: @@ -1042,70 +530,6 @@ packages: url: "https://pub.dev" source: hosted version: "1.4.0" - url_launcher: - dependency: "direct main" - description: - name: url_launcher - sha256: e8cc955c97e06df9879140a1fe301f3d493f01b7c62dec7f46834be31d7e9fda - url: "https://pub.dev" - source: hosted - version: "6.3.3" - url_launcher_android: - dependency: transitive - description: - name: url_launcher_android - sha256: "611e87fb320b70d1dd721dc46af89c98aceccea9b31fde49e084591414e0c610" - url: "https://pub.dev" - source: hosted - version: "6.3.33" - url_launcher_ios: - dependency: transitive - description: - name: url_launcher_ios - sha256: "8faa1aab294f1ab4040b43660c887b0418d5fa4f0cffef76a484e6aa1092eb4a" - url: "https://pub.dev" - source: hosted - version: "6.4.2" - url_launcher_linux: - dependency: transitive - description: - name: url_launcher_linux - sha256: "10f86fef4c2c43563fa6c211ff9cf757adf4d3ab762c56bd430664a947d70cd0" - url: "https://pub.dev" - source: hosted - version: "3.2.3" - url_launcher_macos: - dependency: transitive - description: - name: url_launcher_macos - sha256: "5e835a3b869c2d70325349c81c5a45c28e20791265b67b2669da6b08c5cd5201" - url: "https://pub.dev" - source: hosted - version: "3.2.6" - url_launcher_platform_interface: - dependency: transitive - description: - name: url_launcher_platform_interface - sha256: "552f8a1e663569be95a8190206a38187b531910283c3e982193e4f2733f01029" - url: "https://pub.dev" - source: hosted - version: "2.3.2" - url_launcher_web: - dependency: transitive - description: - name: url_launcher_web - sha256: "85c81589622fbc87c1c683aaea164d3604a7777495a79d91e39ffcdec39ddb34" - url: "https://pub.dev" - source: hosted - version: "2.4.3" - url_launcher_windows: - dependency: transitive - description: - name: url_launcher_windows - sha256: "6c5ad3f22cd4c38e089b81963b3cd7bb83b111b2df5dce008bb066162f42e429" - url: "https://pub.dev" - source: hosted - version: "3.1.6" uuid: dependency: transitive description: @@ -1138,30 +562,6 @@ packages: url: "https://pub.dev" source: hosted version: "1.1.1" - webdriver: - dependency: transitive - description: - name: webdriver - sha256: "28b82ec894fed45dd71c23ba62d1af973ed97dd59a4f5790a4d38b0b13e5657e" - url: "https://pub.dev" - source: hosted - version: "3.2.0" - win32: - dependency: transitive - description: - name: win32 - sha256: a0b93865d5644f11cf6a8c3f6db909f1ec168958b5805f6cc684adea957cd63d - url: "https://pub.dev" - source: hosted - version: "6.4.0" - windows_file_picker: - dependency: transitive - description: - name: windows_file_picker - sha256: "18452aa293de3b6961c6d05b0e71b4be7bb90c67635abdd3aa5c4e75dd875072" - url: "https://pub.dev" - source: hosted - version: "2.0.1" xdg_directories: dependency: transitive description: @@ -1170,14 +570,6 @@ packages: url: "https://pub.dev" source: hosted version: "1.1.0" - xml: - dependency: transitive - description: - name: xml - sha256: "0fe8cc98946def31cbcbc8734aa4067031e6f65ea3a78a508060bfed2200bfeb" - url: "https://pub.dev" - source: hosted - version: "7.1.0" yaml: dependency: transitive description: diff --git a/pubspec.yaml b/pubspec.yaml index 73df3e0..8623bf9 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -32,24 +32,14 @@ dependencies: sdk: flutter flutter_localizations: sdk: flutter - talker_flutter: 5.1.20 shared_preferences: ^2.3.0 - package_info_plus: ^10.2.0 audioplayers: ^6.0.0 - file_picker: ^13.1.0 intl: ^0.20.2 - path_provider: ^2.1.6 - url_launcher: ^6.3.2 - qr_flutter: ^4.1.0 - flutter_zxing: ^3.1.0 dev_dependencies: flutter_test: sdk: flutter - integration_test: - sdk: flutter - patrol: ^4.10.0 # The "flutter_lints" package below contains a set of recommended lints to # encourage good coding practices. The lint set provided by the package is @@ -57,18 +47,6 @@ dev_dependencies: # package. See that file for information about deactivating specific lint # rules and activating additional ones. flutter_lints: ^6.0.0 - flutter_launcher_icons: ^0.14.4 - mocktail: ^1.0.0 - msix: - git: - url: https://github.com/insertjokehere/msix.git - ref: msvc_redist - -patrol: - app_name: Block Drop - test_directory: patrol_test - android: - package_name: com.blockdrop.game # For information on the generic Dart part of this file, see the # following page: https://dart.dev/tools/pub/pubspec @@ -83,7 +61,6 @@ flutter: # To add assets to your application, add an assets section, like this: assets: - assets/ - - assets/changelogs/ - assets/audio/sfx/ - assets/audio/music/ @@ -112,26 +89,3 @@ flutter: # # For details regarding fonts from package dependencies, # see https://flutter.dev/to/font-from-package - -# Flutter Launcher Icons configuration -flutter_launcher_icons: - android: "launcher_icon" - image_path: "assets/icon_drop.png" - min_sdk_android: 21 - adaptive_icon_background: "#000000" - adaptive_icon_foreground: "assets/icon_foreground.png" - adaptive_icon_monochrome: "assets/icon_monochrome.png" - windows: - generate: true - image_path: "assets/icon_drop.png" - -msix_config: - msstore_appId: 9N0RZL5X6MDK - display_name: BlockDrop - publisher_display_name: Brandon Dick - identity_name: FrisbeeSoftware.BlockDrop - msix_version: 1.0.75.0 - logo_path: assets/icon_drop.png - trim_logo: false - publisher: CN=BB0811CB-EED5-441C-BE1B-D31F391F76DE - store: true