diff --git a/api/pubspec.lock b/api/pubspec.lock index 8c35c3375b5a..56bf54e85073 100644 --- a/api/pubspec.lock +++ b/api/pubspec.lock @@ -314,8 +314,8 @@ packages: dependency: "direct main" description: path: "packages/lw_file_system_api" - ref: d4c91a63b34f6efc5827a90f5c59cf9421ed6868 - resolved-ref: d4c91a63b34f6efc5827a90f5c59cf9421ed6868 + ref: dfda6c2e3cef2e29511f97e9470fd4deb8e0c573 + resolved-ref: dfda6c2e3cef2e29511f97e9470fd4deb8e0c573 url: "https://github.com/LinwoodDev/dart_pkgs" source: git version: "1.0.0" diff --git a/api/pubspec.yaml b/api/pubspec.yaml index 4cb591b361b2..e5651c85cf01 100644 --- a/api/pubspec.yaml +++ b/api/pubspec.yaml @@ -19,7 +19,7 @@ dependencies: git: url: https://github.com/LinwoodDev/dart_pkgs path: packages/lw_file_system_api - ref: d4c91a63b34f6efc5827a90f5c59cf9421ed6868 + ref: dfda6c2e3cef2e29511f97e9470fd4deb8e0c573 dev_dependencies: test: ^1.25.3 diff --git a/app/lib/api/close_html.dart b/app/lib/api/close_html.dart index 99cb09b0c8b8..5af28def134f 100644 --- a/app/lib/api/close_html.dart +++ b/app/lib/api/close_html.dart @@ -13,9 +13,10 @@ class WebCloseSubscription extends CloseSubscription { final StreamSubscription _subscription; WebCloseSubscription(OnCloseCallback onClose) - : _subscription = EventStreamProvider('onbeforeunload') - .forTarget(window) - .listen((event) { + : _subscription = + const EventStreamProvider('onbeforeunload') + .forTarget(window) + .listen((event) { final message = onClose(); if (message == null) return; event.returnValue = message; diff --git a/app/lib/bloc/document_bloc.dart b/app/lib/bloc/document_bloc.dart index 1a5c39b4ba74..919d0fe7afc2 100644 --- a/app/lib/bloc/document_bloc.dart +++ b/app/lib/bloc/document_bloc.dart @@ -39,6 +39,7 @@ class DocumentBloc extends ReplayBloc { AssetService? assetService, DocumentPage? page, String? pageName, + bool absolute = false, ]) : super(DocumentLoadSuccess( initial, page: page, diff --git a/app/lib/bloc/document_state.dart b/app/lib/bloc/document_state.dart index 79ef0cda465c..04fc73affb7d 100644 --- a/app/lib/bloc/document_state.dart +++ b/app/lib/bloc/document_state.dart @@ -96,8 +96,9 @@ abstract class DocumentLoaded extends DocumentState { Area? get currentArea => null; AssetLocation get location => currentIndexCubit.state.location; + bool get absolute => currentIndexCubit.state.absolute; SaveState get saved => - location.absolute ? SaveState.unsaved : currentIndexCubit.state.saved; + absolute ? SaveState.unsaved : currentIndexCubit.state.saved; @override CurrentIndexCubit get currentIndexCubit; @@ -140,13 +141,14 @@ class DocumentLoadSuccess extends DocumentLoaded { super.metadata, super.info, AssetLocation? location, + bool absolute = false, this.storageType = StorageType.local, required this.currentIndexCubit, this.currentAreaName = '', this.currentLayer = '', this.invisibleLayers = const []}) { if (location != null) { - currentIndexCubit.setSaveState(location: location); + currentIndexCubit.setSaveState(location: location, absolute: absolute); } } @@ -198,6 +200,7 @@ class DocumentLoadSuccess extends DocumentLoaded { windowCubit: windowCubit, currentIndexCubit: currentIndexCubit, location: location, + absolute: absolute, ); bool isLayerVisible(String layer) => !invisibleLayers.contains(layer); @@ -207,7 +210,7 @@ class DocumentLoadSuccess extends DocumentLoaded { (networkingService.isActive || !(embedding?.save ?? true) || (!kIsWeb && - !location.absolute && + !absolute && (location.fileType == AssetFileType.note || location.fileType == null) && (location.remote.isEmpty || diff --git a/app/lib/cubits/current_index.dart b/app/lib/cubits/current_index.dart index 01ca524af7a9..1b72cd57a278 100644 --- a/app/lib/cubits/current_index.dart +++ b/app/lib/cubits/current_index.dart @@ -32,7 +32,7 @@ import '../view_painter.dart'; part 'current_index.freezed.dart'; -enum SaveState { saved, saving, unsaved } +enum SaveState { saved, saving, unsaved, absoluteRead } enum HideState { visible, keyboard, touch } @@ -79,6 +79,8 @@ class CurrentIndex with _$CurrentIndex { bool get moveEnabled => settingsCubit.state.inputGestures && pointers.length > 1; + bool get absolute => saved == SaveState.absoluteRead; + MouseCursor get currentCursor => temporaryCursor ?? cursor; UtilitiesState get utilitiesState => cameraViewport.utilities.element; @@ -663,11 +665,14 @@ class CurrentIndexCubit extends Cubit { cameraViewport: state.cameraViewport.withUnbaked(unbakedElements))); } - void setSaveState({AssetLocation? location, SaveState? saved}) => + void setSaveState( + {AssetLocation? location, SaveState? saved, bool absolute = false}) => emit(state.copyWith( location: location ?? state.location, - saved: - saved ?? (location != null ? SaveState.unsaved : state.saved))); + saved: absolute + ? SaveState.absoluteRead + : (saved ?? + (location != null ? SaveState.unsaved : state.saved)))); Future renderPDF( NoteData document, @@ -874,7 +879,7 @@ class CurrentIndexCubit extends Cubit { if (currentData == null) return AssetLocation.empty; if (blocState.embedding != null) return AssetLocation.empty; if (!location.path.endsWith('.bfly') || - location.absolute || + state.absolute || location.fileType != AssetFileType.note) { final document = await fileSystem.createFile(currentData.name ?? '', currentData); diff --git a/app/lib/cubits/settings.dart b/app/lib/cubits/settings.dart index f8d52afc4d3b..63728a4a1586 100644 --- a/app/lib/cubits/settings.dart +++ b/app/lib/cubits/settings.dart @@ -552,7 +552,7 @@ class SettingsCubit extends Cubit final history = state.history.toList(); history.removeWhere((element) => element.remote == location.remote && - element.pathWithLeadingSlash.startsWith(location.pathWithLeadingSlash)); + element.path.startsWith(location.path)); emit(state.copyWith(history: history)); return save(); } diff --git a/app/lib/dialogs/file_system/move.dart b/app/lib/dialogs/file_system/move.dart index 01f94892f054..cd4341cca947 100644 --- a/app/lib/dialogs/file_system/move.dart +++ b/app/lib/dialogs/file_system/move.dart @@ -43,11 +43,9 @@ class _FileSystemAssetMoveDialogState extends State { newPath += _nameController.text; newPath += '.${widget.asset.fileExtension}'; if (duplicate) { - await widget.fileSystem - .duplicateAsset(widget.asset.pathWithLeadingSlash, newPath); + await widget.fileSystem.duplicateAsset(widget.asset.path, newPath); } else { - await widget.fileSystem - .moveAsset(widget.asset.pathWithLeadingSlash, newPath); + await widget.fileSystem.moveAsset(widget.asset.path, newPath); } navigator.pop(newPath); } diff --git a/app/lib/dialogs/file_system/tree.dart b/app/lib/dialogs/file_system/tree.dart index cc6a5048aa43..7f94f53ce7ea 100644 --- a/app/lib/dialogs/file_system/tree.dart +++ b/app/lib/dialogs/file_system/tree.dart @@ -69,7 +69,7 @@ class FileSystemDirectoryTreeViewState if (snapshot.hasData) { var directory = snapshot.data!; var children = directory.assets.whereType(); - var name = directory.pathWithLeadingSlash.split('/').last; + var name = directory.path.split('/').last; if (name.isEmpty) { name = '/'; } @@ -94,7 +94,7 @@ class FileSystemDirectoryTreeViewState _expanded = true; _selected = widget.path; }); - widget.onPathSelected(directory.pathWithLeadingSlash); + widget.onPathSelected(directory.path); } }, selected: _selected == widget.path, @@ -110,7 +110,7 @@ class FileSystemDirectoryTreeViewState var current = children.elementAt(index); return FileSystemDirectoryTreeView( fileSystem: widget.fileSystem, - path: current.pathWithLeadingSlash, + path: current.path, selectedPath: _selected, onPathSelected: (value) { setState(() { diff --git a/app/lib/dialogs/packs/dialog.dart b/app/lib/dialogs/packs/dialog.dart index c17bbec8caec..425a2be2bcaf 100644 --- a/app/lib/dialogs/packs/dialog.dart +++ b/app/lib/dialogs/packs/dialog.dart @@ -6,6 +6,7 @@ import 'package:butterfly_api/butterfly_api.dart'; import 'package:flutter/material.dart'; import 'package:flutter_bloc/flutter_bloc.dart'; import 'package:flutter_gen/gen_l10n/app_localizations.dart'; +import 'package:lw_file_system/lw_file_system.dart'; import 'package:material_leap/material_leap.dart'; import 'package:phosphor_flutter/phosphor_flutter.dart'; @@ -188,7 +189,7 @@ class _PacksDialogState extends State }, ); }), - FutureBuilder>( + FutureBuilder>>( future: _packSystem .initialize() .then((value) => _packSystem.getFiles()), @@ -202,15 +203,14 @@ class _PacksDialogState extends State child: CircularProgressIndicator(), ); } - final globalPacks = List.from( - snapshot.data?.values ?? []); + final globalPacks = snapshot.data ?? []; return StatefulBuilder( builder: (context, setInnerState) { return ListView.builder( shrinkWrap: true, itemCount: globalPacks.length, itemBuilder: (context, index) { - final pack = globalPacks[index]; + final pack = globalPacks[index].data!; final metadata = pack.getMetadata(); if (metadata == null) return Container(); return Dismissible( diff --git a/app/lib/dialogs/sync.dart b/app/lib/dialogs/sync.dart index deeb6aafc752..ae2a7608d0c4 100644 --- a/app/lib/dialogs/sync.dart +++ b/app/lib/dialogs/sync.dart @@ -130,16 +130,16 @@ class _RemoteSyncView extends StatelessWidget { children: [ TextButton( onPressed: () { - sync.resolve(file.location.pathWithLeadingSlash, - FileSyncStatus.localLatest); + sync.resolve( + file.location.path, FileSyncStatus.localLatest); }, child: Text(AppLocalizations.of(context).keepLocal), ), const SizedBox(width: 8), TextButton( onPressed: () { - sync.resolve(file.location.pathWithLeadingSlash, - FileSyncStatus.remoteLatest); + sync.resolve( + file.location.path, FileSyncStatus.remoteLatest); }, child: Text(AppLocalizations.of(context).keepConnection), @@ -147,8 +147,8 @@ class _RemoteSyncView extends StatelessWidget { const SizedBox(width: 8), TextButton( onPressed: () { - sync.resolve(file.location.pathWithLeadingSlash, - FileSyncStatus.conflict); + sync.resolve( + file.location.path, FileSyncStatus.conflict); }, child: Text(AppLocalizations.of(context).keepBoth), ), diff --git a/app/lib/dialogs/template.dart b/app/lib/dialogs/template.dart index 976f6648aa0a..43c31d71ab9b 100644 --- a/app/lib/dialogs/template.dart +++ b/app/lib/dialogs/template.dart @@ -42,7 +42,8 @@ class _TemplateDialogState extends State { void load() { setState(() { _templatesFuture = _templateSystem.initialize().then((value) async { - var templates = (await _templateSystem.getFiles()).values.toList(); + var templates = + (await _templateSystem.getFiles()).map((e) => e.data!).toList(); templates = templates .where((element) => element.name @@ -81,11 +82,11 @@ class _TemplateDialogState extends State { tooltip: AppLocalizations.of(context).export, onPressed: () async { final archive = Archive(); - for (final template - in (await _templateSystem.getFiles()).entries) { - final data = template.value.save(); + for (final template in (await _templateSystem.getFiles())) { + final data = template.data!.save(); archive.addFile( - ArchiveFile('${template.key}.bfly', data.length, data), + ArchiveFile( + '${template.fileName}.bfly', data.length, data), ); } final encoder = ZipEncoder(); diff --git a/app/lib/embed/action_web.dart b/app/lib/embed/action_web.dart index abbdca1d8d9a..d8f007b83f80 100644 --- a/app/lib/embed/action_web.dart +++ b/app/lib/embed/action_web.dart @@ -41,6 +41,6 @@ EventListener onEmbedMessage(String type, EmbedMessageHandler callback) { } void removeEmbedMessageListener(EventListener listener) { - if (listener is JSFunction) - html.window.removeEventListener('receive', listener); + if (listener is! JSFunction) return; + html.window.removeEventListener('receive', listener); } diff --git a/app/lib/main.dart b/app/lib/main.dart index bfdcc332c2d1..43ae1debc92e 100644 --- a/app/lib/main.dart +++ b/app/lib/main.dart @@ -280,7 +280,8 @@ class ButterflyApp extends StatelessWidget { final path = state.uri.queryParameters['path'] ?? ''; final data = state.extra; return ProjectPage( - location: AssetLocation.local(path, true), + location: AssetLocation.local(path), + absolute: true, type: type, data: data, ); diff --git a/app/lib/services/sync.dart b/app/lib/services/sync.dart index 26c3dddd39c5..8cdf019cccdb 100644 --- a/app/lib/services/sync.dart +++ b/app/lib/services/sync.dart @@ -153,8 +153,7 @@ class RemoteSync { for (final file in currentFiles) { switch (file.status) { case FileSyncStatus.localLatest: - await remoteSystem - .uploadCachedContent(file.location.pathWithLeadingSlash); + await remoteSystem.uploadCachedContent(file.location.path); final syncedFile = SyncFile( isDirectory: file.isDirectory, location: file.location, @@ -166,7 +165,7 @@ class RemoteSync { break; case FileSyncStatus.remoteLatest: if (!hasError) { - await remoteSystem.cache(file.location.pathWithLeadingSlash); + await remoteSystem.cache(file.location.path); final syncedFile = SyncFile( isDirectory: file.isDirectory, location: file.location, @@ -224,8 +223,7 @@ class RemoteSync { final last = List.from(files ?? []); final remoteSystem = buildRemoteSystem(); if (remoteSystem == null) return; - last.removeWhere( - (element) => element.location.pathWithLeadingSlash == path); + last.removeWhere((element) => element.location.path == path); _filesSubject.add(last); switch (status) { case FileSyncStatus.localLatest: @@ -243,8 +241,7 @@ class RemoteSync { if (remoteAsset is RawFileSystemFile) { final doc = remoteAsset.data; if (doc == null) return; - await remoteSystem.createFile(remoteAsset.pathWithLeadingSlash, doc, - forceSync: true); + await remoteSystem.createFile(remoteAsset.path, doc, forceSync: true); await remoteSystem.uploadCachedContent(path); } break; diff --git a/app/lib/views/app_bar.dart b/app/lib/views/app_bar.dart index 365f51e62556..4d9d98c06213 100644 --- a/app/lib/views/app_bar.dart +++ b/app/lib/views/app_bar.dart @@ -225,7 +225,7 @@ class _AppBarTitle extends StatelessWidget { Tooltip( message: currentIndex.location.identifier, child: Text( - ((currentIndex.location.absolute && + ((currentIndex.absolute && currentIndex.location.path.isEmpty) ? currentIndex.location.fileType ?.getLocalizedName(context) @@ -248,7 +248,9 @@ class _AppBarTitle extends StatelessWidget { child: Builder(builder: (context) { Widget icon = PhosphorIcon(switch (currentIndex.saved) { SaveState.saved => PhosphorIconsFill.floppyDisk, - SaveState.unsaved => PhosphorIconsLight.floppyDisk, + SaveState.unsaved || + SaveState.absoluteRead => + PhosphorIconsLight.floppyDisk, SaveState.saving => PhosphorIconsDuotone.floppyDisk, }); return IconButton( @@ -271,7 +273,7 @@ class _AppBarTitle extends StatelessWidget { .add(const CurrentAreaChanged('')); }, ), - if (state.location.absolute) + if (state.absolute) IconButton( icon: PhosphorIcon( state.location.fileType.icon(PhosphorIconsStyle.light)), diff --git a/app/lib/views/files/entity.dart b/app/lib/views/files/entity.dart index b65628cb47e7..84e98b1ccdd2 100644 --- a/app/lib/views/files/entity.dart +++ b/app/lib/views/files/entity.dart @@ -139,7 +139,7 @@ class _FileEntityItemState extends State { ); final draggable = LongPressDraggable( - data: widget.entity.pathWithLeadingSlash, + data: widget.entity.path, feedback: Material( elevation: 5, child: SizedBox( diff --git a/app/lib/views/files/grid.dart b/app/lib/views/files/grid.dart index 00bbd33d110b..4cca206fdc5b 100644 --- a/app/lib/views/files/grid.dart +++ b/app/lib/views/files/grid.dart @@ -303,9 +303,8 @@ class FilesActionMenu extends StatelessWidget { stream: syncService.getSync(remote!.identifier)?.filesStream, builder: (context, snapshot) { final currentStatus = snapshot.data - ?.lastWhereOrNull((element) => entity - .location.pathWithLeadingSlash - .startsWith(element.location.pathWithLeadingSlash)) + ?.lastWhereOrNull((element) => + entity.location.path.startsWith(element.location.path)) ?.status; return MenuItemButton( leadingIcon: PhosphorIcon(currentStatus.getIcon(), diff --git a/app/lib/views/files/list.dart b/app/lib/views/files/list.dart index 0a5d24c2017f..636adf9a03be 100644 --- a/app/lib/views/files/list.dart +++ b/app/lib/views/files/list.dart @@ -199,9 +199,8 @@ class FileEntityListTile extends StatelessWidget { builder: (context, snapshot) { final currentStatus = snapshot.data ?.lastWhereOrNull((element) => entity - .location.pathWithLeadingSlash - .startsWith(element - .location.pathWithLeadingSlash)) + .location.path + .startsWith(element.location.path)) ?.status; return IconButton( icon: PhosphorIcon(currentStatus.getIcon(), diff --git a/app/lib/views/files/view.dart b/app/lib/views/files/view.dart index c9b47575bb78..276087a22a8c 100644 --- a/app/lib/views/files/view.dart +++ b/app/lib/views/files/view.dart @@ -348,16 +348,17 @@ class FilesViewState extends State { PhosphorIconsLight.filePlus), child: Text(AppLocalizations.of(context).newFile), ), - FutureBuilder>( + FutureBuilder>>( future: _templateSystem .initialize() .then((_) => _templateSystem.getFiles()), builder: (context, snapshot) => SubmenuButton( leadingIcon: const PhosphorIcon(PhosphorIconsLight.file), - menuChildren: snapshot.data?.values.map((e) { - final metadata = e.getMetadata(); - final thumbnail = e.getThumbnail(); + menuChildren: snapshot.data?.map((e) { + final data = e.data!; + final metadata = data.getMetadata(); + final thumbnail = data.getThumbnail(); return MenuItemButton( leadingIcon: thumbnail == null ? null @@ -369,7 +370,7 @@ class FilesViewState extends State { cacheHeight: 18, ), child: Text(metadata?.name ?? ''), - onPressed: () => _createFile(e), + onPressed: () => _createFile(data), ); }).toList() ?? [], @@ -582,9 +583,7 @@ class FilesViewState extends State { crossAxisAlignment: WrapCrossAlignment.start, children: assets.map( (e) { - final active = - widget.activeAsset?.isSame(e.location) ?? - false; + final active = widget.activeAsset == e.location; return FileEntityItem( entity: e, isMobile: widget.isMobile, @@ -609,8 +608,7 @@ class FilesViewState extends State { physics: const NeverScrollableScrollPhysics(), itemBuilder: (context, index) { final e = assets[index]; - final active = - widget.activeAsset?.isSame(e.location) ?? false; + final active = widget.activeAsset == e.location; return FileEntityItem( entity: e, active: active, diff --git a/app/lib/views/home.dart b/app/lib/views/home.dart index ac24bc11653d..7f51c5d6a381 100644 --- a/app/lib/views/home.dart +++ b/app/lib/views/home.dart @@ -455,8 +455,9 @@ class _QuickstartHomeViewState extends State<_QuickstartHomeView> { } Future> _fetchTemplates() => - _templateSystem.initialize().then((value) => - _templateSystem.getFiles().then((value) => value.values.toList())); + _templateSystem.initialize().then((value) => _templateSystem + .getFiles() + .then((value) => value.map((e) => e.data!).toList())); @override Widget build(BuildContext context) { diff --git a/app/lib/views/main.dart b/app/lib/views/main.dart index a837d73e6e1f..04c1264b4cf2 100644 --- a/app/lib/views/main.dart +++ b/app/lib/views/main.dart @@ -59,6 +59,7 @@ import 'view.dart'; import 'zoom.dart'; class ProjectPage extends StatefulWidget { + final bool absolute; final AssetLocation? location; final Embedding? embedding; final String type; @@ -72,6 +73,7 @@ class ProjectPage extends StatefulWidget { this.type = '', this.data, this.uri, + this.absolute = false, }); @override @@ -169,6 +171,7 @@ class _ProjectPageState extends State { try { final globalImportService = ImportService(context); var location = widget.location; + final absolute = widget.absolute; _remote = location != null ? settingsCubit.state.getRemote(location.remote) : settingsCubit.state.getDefaultRemote(); @@ -186,7 +189,7 @@ class _ProjectPageState extends State { type: widget.type.isEmpty ? (fileType ?? widget.type) : widget.type, data: data); } - final name = (location?.absolute ?? false) ? location!.fileName : ''; + final name = absolute ? location!.fileName : ''; NoteData? defaultDocument; if (document == null && prefs.containsKey('default_template')) { var template = await fileSystem @@ -203,7 +206,7 @@ class _ProjectPageState extends State { name: name, ); if (location != null && location.path.isNotEmpty && document == null) { - if (!location.absolute) { + if (!absolute) { final asset = await documentSystem.getAsset(location.path); if (!mounted) return; if (location.fileType == AssetFileType.note) { @@ -223,7 +226,7 @@ class _ProjectPageState extends State { } if (!mounted) return; var documentOpened = document != null; - if (!documentOpened && !(location?.absolute ?? false)) { + if (!documentOpened && !absolute) { location = null; } if (!mounted) { @@ -245,11 +248,12 @@ class _ProjectPageState extends State { setState(() { _transformCubit = TransformCubit(); _currentIndexCubit = CurrentIndexCubit( - settingsCubit, - _transformCubit!, - CameraViewport.unbaked(UtilitiesRenderer(), backgrounds), - null, - networkingService); + settingsCubit, + _transformCubit!, + CameraViewport.unbaked(UtilitiesRenderer(), backgrounds), + null, + networkingService, + ); _bloc = DocumentBloc(fileSystem, _currentIndexCubit!, windowCubit, document!, location!, renderers, assetService, page, pageName); networkingService.setup(_bloc!); diff --git a/app/pubspec.lock b/app/pubspec.lock index f618dc7a64fa..6cf4a5baf7a0 100644 --- a/app/pubspec.lock +++ b/app/pubspec.lock @@ -313,8 +313,8 @@ packages: dependency: transitive description: path: "packages/dart_leap" - ref: d45bd54f2efd6a861d6f44a8b833575b0482dc4c - resolved-ref: d45bd54f2efd6a861d6f44a8b833575b0482dc4c + ref: dfda6c2e3cef2e29511f97e9470fd4deb8e0c573 + resolved-ref: dfda6c2e3cef2e29511f97e9470fd4deb8e0c573 url: "https://github.com/LinwoodDev/dart_pkgs" source: git version: "1.0.0" @@ -823,8 +823,8 @@ packages: dependency: "direct main" description: path: "packages/lw_file_system" - ref: "21808e89bb6239f0b39367d0c00b0b14f5273992" - resolved-ref: "21808e89bb6239f0b39367d0c00b0b14f5273992" + ref: "3c975be33c84052c1b96f8646ad7ea2270bb9d34" + resolved-ref: "3c975be33c84052c1b96f8646ad7ea2270bb9d34" url: "https://github.com/LinwoodDev/dart_pkgs.git" source: git version: "1.0.0" @@ -832,8 +832,8 @@ packages: dependency: transitive description: path: "packages/lw_file_system_api" - ref: d4c91a63b34f6efc5827a90f5c59cf9421ed6868 - resolved-ref: d4c91a63b34f6efc5827a90f5c59cf9421ed6868 + ref: dfda6c2e3cef2e29511f97e9470fd4deb8e0c573 + resolved-ref: dfda6c2e3cef2e29511f97e9470fd4deb8e0c573 url: "https://github.com/LinwoodDev/dart_pkgs" source: git version: "1.0.0" @@ -882,8 +882,8 @@ packages: dependency: "direct main" description: path: "packages/material_leap" - ref: a29a889a9cb9be8cf753a52482406bdcecfa924d - resolved-ref: a29a889a9cb9be8cf753a52482406bdcecfa924d + ref: e844798751461be17a633fc98565a1aa9003a297 + resolved-ref: e844798751461be17a633fc98565a1aa9003a297 url: "https://github.com/LinwoodDev/dart_pkgs.git" source: git version: "0.0.1" diff --git a/app/pubspec.yaml b/app/pubspec.yaml index 9815d3762f70..79ca5af456ff 100644 --- a/app/pubspec.yaml +++ b/app/pubspec.yaml @@ -71,7 +71,7 @@ dependencies: material_leap: git: url: https://github.com/LinwoodDev/dart_pkgs.git - ref: a29a889a9cb9be8cf753a52482406bdcecfa924d + ref: e844798751461be17a633fc98565a1aa9003a297 path: packages/material_leap lw_sysapi: git: @@ -91,7 +91,7 @@ dependencies: lw_file_system: git: url: https://github.com/LinwoodDev/dart_pkgs.git - ref: 21808e89bb6239f0b39367d0c00b0b14f5273992 + ref: 3c975be33c84052c1b96f8646ad7ea2270bb9d34 path: packages/lw_file_system flutter_localized_locales: ^2.0.5 dynamic_color: ^1.7.0 diff --git a/app/scripts/build.sh b/app/scripts/build.sh index 3350c57d04b5..1dd9e9742f9a 100644 --- a/app/scripts/build.sh +++ b/app/scripts/build.sh @@ -1,3 +1,3 @@ FLUTTER_VERSION=$(cat ../FLUTTER_VERSION) BUTTERFLY_FLAVOR=$([[ "$BUTTERFLY_NIGHTLY" == "true" ]] && echo "nightly" || echo "stable") -if [ "$BUTTERFLY_NIGHTLY" = "true" ]; then cp -r web_nightly/** web; fi && if cd flutter; then git pull && cd ..; else git clone https://github.com/flutter/flutter.git -b $FLUTTER_VERSION; fi && flutter/bin/flutter config --enable-web && flutter/bin/flutter build web --release --dart-define=FLUTTER_WEB_CANVASKIT_URL=/canvaskit/ --dart-define=flavor=$BUTTERFLY_FLAVOR \ No newline at end of file +if [ "$BUTTERFLY_NIGHTLY" = "true" ]; then cp -r web_nightly/** web; fi && if cd flutter; then git pull && cd ..; else git clone https://github.com/flutter/flutter.git -b $FLUTTER_VERSION; fi && flutter/bin/flutter config --enable-web && flutter/bin/flutter build web --wasm --release --dart-define=FLUTTER_WEB_CANVASKIT_URL=/canvaskit/ --dart-define=flavor=$BUTTERFLY_FLAVOR \ No newline at end of file