From 20d794bbca672c0c8576d19a0aa2d2e307ee5c47 Mon Sep 17 00:00:00 2001 From: Rody Davis Date: Thu, 15 Jan 2026 17:28:55 -0800 Subject: [PATCH] update undo package --- LICENSE | 202 ++++++++++ deprecated/undo/LICENSE | 21 - deprecated/undo/README.md | 140 ------- deprecated/undo/example/.metadata | 45 --- .../undo/example/android/app/build.gradle | 67 ---- .../com/example/example/MainActivity.kt | 6 - deprecated/undo/example/android/build.gradle | 31 -- .../undo/example/android/gradle.properties | 3 - .../undo/example/android/settings.gradle | 25 -- deprecated/undo/example/lib/main.dart | 89 ----- .../undo/example/lib/samples/set_state.dart | 89 ----- .../undo/example/lib/samples/stream.dart | 179 --------- .../example/lib/samples/value_notifer.dart | 100 ----- deprecated/undo/example/web/index.html | 10 - deprecated/undo/pubspec.yaml | 14 - packages/app_review/LICENSE | 215 ++++++++++- packages/breakpoint/LICENSE | 215 ++++++++++- packages/flutter_sms/LICENSE | 215 ++++++++++- packages/flutter_whatsnew/LICENSE | 215 ++++++++++- .../example/.flutter-plugins-dependencies | 2 +- packages/flutter_whatsnew/pubspec.yaml | 5 +- {deprecated => packages}/undo/.gitattributes | 0 .../undo/.github/workflows/main.yml | 0 .../undo/.github/workflows/test.yml | 0 {deprecated => packages}/undo/.gitignore | 0 {deprecated => packages}/undo/.metadata | 0 .../undo/.vscode/launch.json | 0 {deprecated => packages}/undo/CHANGELOG.md | 6 + packages/undo/LICENSE | 202 ++++++++++ packages/undo/README.md | 169 ++++++++ .../undo/example/.gitignore | 0 packages/undo/example/.metadata | 45 +++ .../undo/example/README.md | 0 .../undo/example/analysis_options.yaml | 0 .../undo/example/android/.gitignore | 3 +- .../undo/example/android/app/build.gradle.kts | 44 +++ .../android/app/src/debug/AndroidManifest.xml | 0 .../android/app/src/main/AndroidManifest.xml | 14 +- .../com/example/undo_example/MainActivity.kt | 5 + .../res/drawable-v21/launch_background.xml | 0 .../main/res/drawable/launch_background.xml | 0 .../src/main/res/mipmap-hdpi/ic_launcher.png | Bin .../src/main/res/mipmap-mdpi/ic_launcher.png | Bin .../src/main/res/mipmap-xhdpi/ic_launcher.png | Bin .../main/res/mipmap-xxhdpi/ic_launcher.png | Bin .../main/res/mipmap-xxxhdpi/ic_launcher.png | Bin .../app/src/main/res/values-night/styles.xml | 0 .../app/src/main/res/values/styles.xml | 0 .../app/src/profile/AndroidManifest.xml | 0 .../undo/example/android/build.gradle.kts | 24 ++ .../undo/example/android/gradle.properties | 2 + .../gradle/wrapper/gradle-wrapper.properties | 2 +- .../undo/example/android/settings.gradle.kts | 26 ++ .../undo/example/ios/.gitignore | 0 .../ios/Flutter/AppFrameworkInfo.plist | 2 +- .../undo/example/ios/Flutter/Debug.xcconfig | 0 .../undo/example/ios/Flutter/Release.xcconfig | 0 .../ios/Runner.xcodeproj/project.pbxproj | 55 +-- .../contents.xcworkspacedata | 0 .../xcshareddata/IDEWorkspaceChecks.plist | 0 .../xcshareddata/WorkspaceSettings.xcsettings | 0 .../xcshareddata/xcschemes/Runner.xcscheme | 5 +- .../contents.xcworkspacedata | 0 .../xcshareddata/IDEWorkspaceChecks.plist | 0 .../xcshareddata/WorkspaceSettings.xcsettings | 0 .../undo/example/ios/Runner/AppDelegate.swift | 4 +- .../AppIcon.appiconset/Contents.json | 0 .../Icon-App-1024x1024@1x.png | Bin .../AppIcon.appiconset/Icon-App-20x20@1x.png | Bin .../AppIcon.appiconset/Icon-App-20x20@2x.png | Bin .../AppIcon.appiconset/Icon-App-20x20@3x.png | Bin .../AppIcon.appiconset/Icon-App-29x29@1x.png | Bin .../AppIcon.appiconset/Icon-App-29x29@2x.png | Bin .../AppIcon.appiconset/Icon-App-29x29@3x.png | Bin .../AppIcon.appiconset/Icon-App-40x40@1x.png | Bin .../AppIcon.appiconset/Icon-App-40x40@2x.png | Bin .../AppIcon.appiconset/Icon-App-40x40@3x.png | Bin .../AppIcon.appiconset/Icon-App-60x60@2x.png | Bin .../AppIcon.appiconset/Icon-App-60x60@3x.png | Bin .../AppIcon.appiconset/Icon-App-76x76@1x.png | Bin .../AppIcon.appiconset/Icon-App-76x76@2x.png | Bin .../Icon-App-83.5x83.5@2x.png | Bin .../LaunchImage.imageset/Contents.json | 0 .../LaunchImage.imageset/LaunchImage.png | Bin .../LaunchImage.imageset/LaunchImage@2x.png | Bin .../LaunchImage.imageset/LaunchImage@3x.png | Bin .../LaunchImage.imageset/README.md | 0 .../Runner/Base.lproj/LaunchScreen.storyboard | 0 .../ios/Runner/Base.lproj/Main.storyboard | 0 .../undo/example/ios/Runner/Info.plist | 4 +- .../ios/Runner/Runner-Bridging-Header.h | 0 .../example/ios/RunnerTests/RunnerTests.swift | 0 packages/undo/example/lib/main.dart | 364 ++++++++++++++++++ .../undo/example/linux/.gitignore | 0 .../undo/example/linux/CMakeLists.txt | 27 +- .../undo/example/linux/flutter/CMakeLists.txt | 0 .../flutter/generated_plugin_registrant.cc | 0 .../flutter/generated_plugin_registrant.h | 0 .../linux/flutter/generated_plugins.cmake | 0 .../undo/example/linux/runner/CMakeLists.txt | 26 ++ .../undo/example/linux/runner}/main.cc | 0 .../example/linux/runner}/my_application.cc | 52 ++- .../example/linux/runner}/my_application.h | 5 +- .../undo/example/macos/.gitignore | 0 .../macos/Flutter/Flutter-Debug.xcconfig | 0 .../macos/Flutter/Flutter-Release.xcconfig | 0 .../Flutter/GeneratedPluginRegistrant.swift | 0 .../macos/Runner.xcodeproj/project.pbxproj | 36 +- .../xcshareddata/IDEWorkspaceChecks.plist | 0 .../xcshareddata/xcschemes/Runner.xcscheme | 11 +- .../contents.xcworkspacedata | 0 .../xcshareddata/IDEWorkspaceChecks.plist | 0 .../example/macos/Runner/AppDelegate.swift | 6 +- .../AppIcon.appiconset/Contents.json | 0 .../AppIcon.appiconset/app_icon_1024.png | Bin .../AppIcon.appiconset/app_icon_128.png | Bin .../AppIcon.appiconset/app_icon_16.png | Bin .../AppIcon.appiconset/app_icon_256.png | Bin .../AppIcon.appiconset/app_icon_32.png | Bin .../AppIcon.appiconset/app_icon_512.png | Bin .../AppIcon.appiconset/app_icon_64.png | Bin .../macos/Runner/Base.lproj/MainMenu.xib | 0 .../macos/Runner/Configs/AppInfo.xcconfig | 6 +- .../macos/Runner/Configs/Debug.xcconfig | 0 .../macos/Runner/Configs/Release.xcconfig | 0 .../macos/Runner/Configs/Warnings.xcconfig | 0 .../macos/Runner/DebugProfile.entitlements | 0 .../undo/example/macos/Runner/Info.plist | 0 .../macos/Runner/MainFlutterWindow.swift | 0 .../example/macos/Runner/Release.entitlements | 0 .../macos/RunnerTests/RunnerTests.swift | 2 +- .../undo/example/pubspec.yaml | 9 +- .../undo/example/web/favicon.png | Bin .../undo/example/web/icons/Icon-192.png | Bin .../undo/example/web/icons/Icon-512.png | Bin .../example/web/icons/Icon-maskable-192.png | Bin .../example/web/icons/Icon-maskable-512.png | Bin packages/undo/example/web/index.html | 38 ++ .../undo/example/web/manifest.json | 4 +- .../undo/example/windows/.gitignore | 0 .../undo/example/windows/CMakeLists.txt | 0 .../example/windows/flutter/CMakeLists.txt | 0 .../flutter/generated_plugin_registrant.cc | 0 .../flutter/generated_plugin_registrant.h | 0 .../windows/flutter/generated_plugins.cmake | 0 .../example/windows/runner/CMakeLists.txt | 0 .../undo/example/windows/runner/Runner.rc | 0 .../example/windows/runner/flutter_window.cpp | 0 .../example/windows/runner/flutter_window.h | 0 .../undo/example/windows/runner/main.cpp | 0 .../undo/example/windows/runner/resource.h | 0 .../windows/runner/resources/app_icon.ico | Bin .../windows/runner/runner.exe.manifest | 0 .../undo/example/windows/runner/utils.cpp | 0 .../undo/example/windows/runner/utils.h | 0 .../example/windows/runner/win32_window.cpp | 0 .../example/windows/runner/win32_window.h | 0 .../undo/lib/src/change.dart | 0 .../undo/lib/src/simple_stack.dart | 0 .../undo/lib/src/undo_stack.dart | 0 {deprecated => packages}/undo/lib/undo.dart | 0 packages/undo/pubspec.yaml | 14 + .../undo/test/undo_test.dart | 0 pubspec.lock | 246 +----------- pubspec.yaml | 3 +- 165 files changed, 2119 insertions(+), 1230 deletions(-) create mode 100644 LICENSE delete mode 100644 deprecated/undo/LICENSE delete mode 100644 deprecated/undo/README.md delete mode 100644 deprecated/undo/example/.metadata delete mode 100644 deprecated/undo/example/android/app/build.gradle delete mode 100644 deprecated/undo/example/android/app/src/main/kotlin/com/example/example/MainActivity.kt delete mode 100644 deprecated/undo/example/android/build.gradle delete mode 100644 deprecated/undo/example/android/gradle.properties delete mode 100644 deprecated/undo/example/android/settings.gradle delete mode 100644 deprecated/undo/example/lib/main.dart delete mode 100644 deprecated/undo/example/lib/samples/set_state.dart delete mode 100644 deprecated/undo/example/lib/samples/stream.dart delete mode 100644 deprecated/undo/example/lib/samples/value_notifer.dart delete mode 100644 deprecated/undo/example/web/index.html delete mode 100644 deprecated/undo/pubspec.yaml rename {deprecated => packages}/undo/.gitattributes (100%) rename {deprecated => packages}/undo/.github/workflows/main.yml (100%) rename {deprecated => packages}/undo/.github/workflows/test.yml (100%) rename {deprecated => packages}/undo/.gitignore (100%) rename {deprecated => packages}/undo/.metadata (100%) rename {deprecated => packages}/undo/.vscode/launch.json (100%) rename {deprecated => packages}/undo/CHANGELOG.md (88%) create mode 100644 packages/undo/LICENSE create mode 100644 packages/undo/README.md rename {deprecated => packages}/undo/example/.gitignore (100%) create mode 100644 packages/undo/example/.metadata rename {deprecated => packages}/undo/example/README.md (100%) rename {deprecated => packages}/undo/example/analysis_options.yaml (100%) rename {deprecated => packages}/undo/example/android/.gitignore (69%) create mode 100644 packages/undo/example/android/app/build.gradle.kts rename {deprecated => packages}/undo/example/android/app/src/debug/AndroidManifest.xml (100%) rename {deprecated => packages}/undo/example/android/app/src/main/AndroidManifest.xml (72%) create mode 100644 packages/undo/example/android/app/src/main/kotlin/com/example/undo_example/MainActivity.kt rename {deprecated => packages}/undo/example/android/app/src/main/res/drawable-v21/launch_background.xml (100%) rename {deprecated => packages}/undo/example/android/app/src/main/res/drawable/launch_background.xml (100%) rename {deprecated => packages}/undo/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png (100%) rename {deprecated => packages}/undo/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png (100%) rename {deprecated => packages}/undo/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png (100%) rename {deprecated => packages}/undo/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png (100%) rename {deprecated => packages}/undo/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png (100%) rename {deprecated => packages}/undo/example/android/app/src/main/res/values-night/styles.xml (100%) rename {deprecated => packages}/undo/example/android/app/src/main/res/values/styles.xml (100%) rename {deprecated => packages}/undo/example/android/app/src/profile/AndroidManifest.xml (100%) create mode 100644 packages/undo/example/android/build.gradle.kts create mode 100644 packages/undo/example/android/gradle.properties rename {deprecated => packages}/undo/example/android/gradle/wrapper/gradle-wrapper.properties (92%) create mode 100644 packages/undo/example/android/settings.gradle.kts rename {deprecated => packages}/undo/example/ios/.gitignore (100%) rename {deprecated => packages}/undo/example/ios/Flutter/AppFrameworkInfo.plist (96%) rename {deprecated => packages}/undo/example/ios/Flutter/Debug.xcconfig (100%) rename {deprecated => packages}/undo/example/ios/Flutter/Release.xcconfig (100%) rename {deprecated => packages}/undo/example/ios/Runner.xcodeproj/project.pbxproj (95%) rename {deprecated => packages}/undo/example/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata (100%) rename {deprecated => packages}/undo/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist (100%) rename {deprecated => packages}/undo/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings (100%) rename {deprecated => packages}/undo/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme (94%) rename {deprecated => packages}/undo/example/ios/Runner.xcworkspace/contents.xcworkspacedata (100%) rename {deprecated => packages}/undo/example/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist (100%) rename {deprecated => packages}/undo/example/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings (100%) rename {deprecated => packages}/undo/example/ios/Runner/AppDelegate.swift (95%) rename {deprecated => packages}/undo/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json (100%) rename {deprecated => packages}/undo/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png (100%) rename {deprecated => packages}/undo/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png (100%) rename {deprecated => packages}/undo/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png (100%) rename {deprecated => packages}/undo/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png (100%) rename {deprecated => packages}/undo/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png (100%) rename {deprecated => packages}/undo/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png (100%) rename {deprecated => packages}/undo/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png (100%) rename {deprecated => packages}/undo/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png (100%) rename {deprecated => packages}/undo/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png (100%) rename {deprecated => packages}/undo/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png (100%) rename {deprecated => packages}/undo/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png (100%) rename {deprecated => packages}/undo/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png (100%) rename {deprecated => packages}/undo/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png (100%) rename {deprecated => packages}/undo/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png (100%) rename {deprecated => packages}/undo/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png (100%) rename {deprecated => packages}/undo/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json (100%) rename {deprecated => packages}/undo/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png (100%) rename {deprecated => packages}/undo/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png (100%) rename {deprecated => packages}/undo/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png (100%) rename {deprecated => packages}/undo/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md (100%) rename {deprecated => packages}/undo/example/ios/Runner/Base.lproj/LaunchScreen.storyboard (100%) rename {deprecated => packages}/undo/example/ios/Runner/Base.lproj/Main.storyboard (100%) rename {deprecated => packages}/undo/example/ios/Runner/Info.plist (96%) rename {deprecated => packages}/undo/example/ios/Runner/Runner-Bridging-Header.h (100%) rename {deprecated => packages}/undo/example/ios/RunnerTests/RunnerTests.swift (100%) create mode 100644 packages/undo/example/lib/main.dart rename {deprecated => packages}/undo/example/linux/.gitignore (100%) rename {deprecated => packages}/undo/example/linux/CMakeLists.txt (84%) rename {deprecated => packages}/undo/example/linux/flutter/CMakeLists.txt (100%) rename {deprecated => packages}/undo/example/linux/flutter/generated_plugin_registrant.cc (100%) rename {deprecated => packages}/undo/example/linux/flutter/generated_plugin_registrant.h (100%) rename {deprecated => packages}/undo/example/linux/flutter/generated_plugins.cmake (100%) create mode 100644 packages/undo/example/linux/runner/CMakeLists.txt rename {deprecated/undo/example/linux => packages/undo/example/linux/runner}/main.cc (100%) rename {deprecated/undo/example/linux => packages/undo/example/linux/runner}/my_application.cc (68%) rename {deprecated/undo/example/linux => packages/undo/example/linux/runner}/my_application.h (70%) rename {deprecated => packages}/undo/example/macos/.gitignore (100%) rename {deprecated => packages}/undo/example/macos/Flutter/Flutter-Debug.xcconfig (100%) rename {deprecated => packages}/undo/example/macos/Flutter/Flutter-Release.xcconfig (100%) rename {deprecated => packages}/undo/example/macos/Flutter/GeneratedPluginRegistrant.swift (100%) rename {deprecated => packages}/undo/example/macos/Runner.xcodeproj/project.pbxproj (94%) rename {deprecated => packages}/undo/example/macos/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist (100%) rename {deprecated => packages}/undo/example/macos/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme (93%) rename {deprecated => packages}/undo/example/macos/Runner.xcworkspace/contents.xcworkspacedata (100%) rename {deprecated => packages}/undo/example/macos/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist (100%) rename {deprecated => packages}/undo/example/macos/Runner/AppDelegate.swift (62%) rename {deprecated => packages}/undo/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json (100%) rename {deprecated => packages}/undo/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_1024.png (100%) rename {deprecated => packages}/undo/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_128.png (100%) rename {deprecated => packages}/undo/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_16.png (100%) rename {deprecated => packages}/undo/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_256.png (100%) rename {deprecated => packages}/undo/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_32.png (100%) rename {deprecated => packages}/undo/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_512.png (100%) rename {deprecated => packages}/undo/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_64.png (100%) rename {deprecated => packages}/undo/example/macos/Runner/Base.lproj/MainMenu.xib (100%) rename {deprecated => packages}/undo/example/macos/Runner/Configs/AppInfo.xcconfig (76%) rename {deprecated => packages}/undo/example/macos/Runner/Configs/Debug.xcconfig (100%) rename {deprecated => packages}/undo/example/macos/Runner/Configs/Release.xcconfig (100%) rename {deprecated => packages}/undo/example/macos/Runner/Configs/Warnings.xcconfig (100%) rename {deprecated => packages}/undo/example/macos/Runner/DebugProfile.entitlements (100%) rename {deprecated => packages}/undo/example/macos/Runner/Info.plist (100%) rename {deprecated => packages}/undo/example/macos/Runner/MainFlutterWindow.swift (100%) rename {deprecated => packages}/undo/example/macos/Runner/Release.entitlements (100%) rename {deprecated => packages}/undo/example/macos/RunnerTests/RunnerTests.swift (100%) rename {deprecated => packages}/undo/example/pubspec.yaml (92%) rename {deprecated => packages}/undo/example/web/favicon.png (100%) rename {deprecated => packages}/undo/example/web/icons/Icon-192.png (100%) rename {deprecated => packages}/undo/example/web/icons/Icon-512.png (100%) rename {deprecated => packages}/undo/example/web/icons/Icon-maskable-192.png (100%) rename {deprecated => packages}/undo/example/web/icons/Icon-maskable-512.png (100%) create mode 100644 packages/undo/example/web/index.html rename {deprecated => packages}/undo/example/web/manifest.json (93%) rename {deprecated => packages}/undo/example/windows/.gitignore (100%) rename {deprecated => packages}/undo/example/windows/CMakeLists.txt (100%) rename {deprecated => packages}/undo/example/windows/flutter/CMakeLists.txt (100%) rename {deprecated => packages}/undo/example/windows/flutter/generated_plugin_registrant.cc (100%) rename {deprecated => packages}/undo/example/windows/flutter/generated_plugin_registrant.h (100%) rename {deprecated => packages}/undo/example/windows/flutter/generated_plugins.cmake (100%) rename {deprecated => packages}/undo/example/windows/runner/CMakeLists.txt (100%) rename {deprecated => packages}/undo/example/windows/runner/Runner.rc (100%) rename {deprecated => packages}/undo/example/windows/runner/flutter_window.cpp (100%) rename {deprecated => packages}/undo/example/windows/runner/flutter_window.h (100%) rename {deprecated => packages}/undo/example/windows/runner/main.cpp (100%) rename {deprecated => packages}/undo/example/windows/runner/resource.h (100%) rename {deprecated => packages}/undo/example/windows/runner/resources/app_icon.ico (100%) rename {deprecated => packages}/undo/example/windows/runner/runner.exe.manifest (100%) rename {deprecated => packages}/undo/example/windows/runner/utils.cpp (100%) rename {deprecated => packages}/undo/example/windows/runner/utils.h (100%) rename {deprecated => packages}/undo/example/windows/runner/win32_window.cpp (100%) rename {deprecated => packages}/undo/example/windows/runner/win32_window.h (100%) rename {deprecated => packages}/undo/lib/src/change.dart (100%) rename {deprecated => packages}/undo/lib/src/simple_stack.dart (100%) rename {deprecated => packages}/undo/lib/src/undo_stack.dart (100%) rename {deprecated => packages}/undo/lib/undo.dart (100%) create mode 100644 packages/undo/pubspec.yaml rename {deprecated => packages}/undo/test/undo_test.dart (100%) diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..d645695 --- /dev/null +++ b/LICENSE @@ -0,0 +1,202 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/deprecated/undo/LICENSE b/deprecated/undo/LICENSE deleted file mode 100644 index 7c6a676..0000000 --- a/deprecated/undo/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright (c) 2019 Rody Davis - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/deprecated/undo/README.md b/deprecated/undo/README.md deleted file mode 100644 index 19402a3..0000000 --- a/deprecated/undo/README.md +++ /dev/null @@ -1,140 +0,0 @@ -# undo - -[![Buy Me A Coffee](https://img.shields.io/badge/Donate-Buy%20Me%20A%20Coffee-yellow.svg)](https://www.buymeacoffee.com/rodydavis) -[![Donate](https://img.shields.io/badge/Donate-PayPal-green.svg)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=WSH3GVC49GNNJ) -![github pages](https://github.com/rodydavis/undo/workflows/github%20pages/badge.svg) -![tests](https://github.com/rodydavis/undo/workflows/test/badge.svg) -[![GitHub stars](https://img.shields.io/github/stars/rodydavis/undo?color=blue)](https://github.com/rodydavis/undo) -[![undo](https://img.shields.io/pub/v/undo.svg)](https://pub.dev/packages/undo) - -An undo redo library for Dart/Flutter. Forked from [here](https://github.com/Mixbook/undo.dart) and updated for Flutter. Demo can be viewed [here](https://rodydavis.github.io/undo/). - -## Usage - -Create an ChangeStack to store changes - -```dart -import 'package:undo/undo.dart'; - -var changes = ChangeStack(); -``` - -Add new undo, redo commands using `ChangeStack.add()`. When a change is added, it calls the change's `execute()` method. Use `Change()` for simple inline changes. - -```dart -var count = 0; - -changes.add( - Change(count, () => count++, (val) => count = val); - name: "Increase" -); -``` - -Use `Change()` when changing a field on an object. This will store the field's old value so it can be reverted. - -```dart -var person = new Person() - ..firstName = "John" - ..lastName = "Doe"; - -changes.add( - Change( - person.firstName, - () => person.firstName = "Jane", - (oldValue) = person.firstName = oldValue - ) -) -``` - -Undo a change with `undo()`. - -```dart -print(person.firstName); // Jane -changes.undo(); -print(person.firstName); // John -``` - -Redo the change with `redo()`. - -```dart -changes.redo(); -print(person.firstName); // Jane -``` - -### Simple Stack Example - -```dart - -class HomeScreen extends StatefulWidget { - @override - _HomeScreenState createState() => _HomeScreenState(); -} - -class _HomeScreenState extends State { - SimpleStack _controller; - - @override - void initState() { - _controller = SimpleStack( - 0, - onUpdate: (val) { - if (mounted) - setState(() { - print('New Value -> $val'); - }); - }, - ); - super.initState(); - } - - @override - Widget build(BuildContext context) { - final count = _controller.state; - return Scaffold( - appBar: AppBar( - title: Text('Undo/Redo Example'), - ), - body: Center( - child: Text('Count: $count'), - ), - bottomNavigationBar: BottomAppBar( - child: Row( - children: [ - IconButton( - icon: Icon(Icons.arrow_back), - onPressed: !_controller.canUndo - ? null - : () { - if (mounted) - setState(() { - _controller.undo(); - }); - }, - ), - IconButton( - icon: Icon(Icons.arrow_forward), - onPressed: !_controller.canRedo - ? null - : () { - if (mounted) - setState(() { - _controller.redo(); - }); - }, - ), - ], - ), - ), - floatingActionButtonLocation: FloatingActionButtonLocation.endDocked, - floatingActionButton: FloatingActionButton( - heroTag: ValueKey('add_button'), - child: Icon(Icons.add), - onPressed: () { - _controller.modify(count + 1); - }, - ), - ); - } -} - -``` diff --git a/deprecated/undo/example/.metadata b/deprecated/undo/example/.metadata deleted file mode 100644 index 13149e5..0000000 --- a/deprecated/undo/example/.metadata +++ /dev/null @@ -1,45 +0,0 @@ -# This file tracks properties of this Flutter project. -# Used by Flutter tool to assess capabilities and perform upgrades etc. -# -# This file should be version controlled and should not be manually edited. - -version: - revision: "0b591f2c82e9f59276ed68c7d4cbd63196f7c865" - channel: "beta" - -project_type: app - -# Tracks metadata for the flutter migrate command -migration: - platforms: - - platform: root - create_revision: 0b591f2c82e9f59276ed68c7d4cbd63196f7c865 - base_revision: 0b591f2c82e9f59276ed68c7d4cbd63196f7c865 - - platform: android - create_revision: 0b591f2c82e9f59276ed68c7d4cbd63196f7c865 - base_revision: 0b591f2c82e9f59276ed68c7d4cbd63196f7c865 - - platform: ios - create_revision: 0b591f2c82e9f59276ed68c7d4cbd63196f7c865 - base_revision: 0b591f2c82e9f59276ed68c7d4cbd63196f7c865 - - platform: linux - create_revision: 0b591f2c82e9f59276ed68c7d4cbd63196f7c865 - base_revision: 0b591f2c82e9f59276ed68c7d4cbd63196f7c865 - - platform: macos - create_revision: 0b591f2c82e9f59276ed68c7d4cbd63196f7c865 - base_revision: 0b591f2c82e9f59276ed68c7d4cbd63196f7c865 - - platform: web - create_revision: 0b591f2c82e9f59276ed68c7d4cbd63196f7c865 - base_revision: 0b591f2c82e9f59276ed68c7d4cbd63196f7c865 - - platform: windows - create_revision: 0b591f2c82e9f59276ed68c7d4cbd63196f7c865 - base_revision: 0b591f2c82e9f59276ed68c7d4cbd63196f7c865 - - # User provided section - - # List of Local paths (relative to this file) that should be - # ignored by the migrate tool. - # - # Files that are not part of the templates will be ignored by default. - unmanaged_files: - - 'lib/main.dart' - - 'ios/Runner.xcodeproj/project.pbxproj' diff --git a/deprecated/undo/example/android/app/build.gradle b/deprecated/undo/example/android/app/build.gradle deleted file mode 100644 index e28b4e7..0000000 --- a/deprecated/undo/example/android/app/build.gradle +++ /dev/null @@ -1,67 +0,0 @@ -plugins { - id "com.android.application" - id "kotlin-android" - id "dev.flutter.flutter-gradle-plugin" -} - -def localProperties = new Properties() -def localPropertiesFile = rootProject.file('local.properties') -if (localPropertiesFile.exists()) { - localPropertiesFile.withReader('UTF-8') { reader -> - localProperties.load(reader) - } -} - -def flutterVersionCode = localProperties.getProperty('flutter.versionCode') -if (flutterVersionCode == null) { - flutterVersionCode = '1' -} - -def flutterVersionName = localProperties.getProperty('flutter.versionName') -if (flutterVersionName == null) { - flutterVersionName = '1.0' -} - -android { - namespace "com.example.example" - compileSdk flutter.compileSdkVersion - ndkVersion flutter.ndkVersion - - compileOptions { - sourceCompatibility JavaVersion.VERSION_1_8 - targetCompatibility JavaVersion.VERSION_1_8 - } - - kotlinOptions { - jvmTarget = '1.8' - } - - sourceSets { - main.java.srcDirs += 'src/main/kotlin' - } - - defaultConfig { - // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). - applicationId "com.example.example" - // You can update the following values to match your application needs. - // For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-gradle-build-configuration. - minSdkVersion flutter.minSdkVersion - targetSdkVersion flutter.targetSdkVersion - versionCode flutterVersionCode.toInteger() - versionName flutterVersionName - } - - buildTypes { - release { - // TODO: Add your own signing config for the release build. - // Signing with the debug keys for now, so `flutter run --release` works. - signingConfig signingConfigs.debug - } - } -} - -flutter { - source '../..' -} - -dependencies {} diff --git a/deprecated/undo/example/android/app/src/main/kotlin/com/example/example/MainActivity.kt b/deprecated/undo/example/android/app/src/main/kotlin/com/example/example/MainActivity.kt deleted file mode 100644 index e793a00..0000000 --- a/deprecated/undo/example/android/app/src/main/kotlin/com/example/example/MainActivity.kt +++ /dev/null @@ -1,6 +0,0 @@ -package com.example.example - -import io.flutter.embedding.android.FlutterActivity - -class MainActivity: FlutterActivity() { -} diff --git a/deprecated/undo/example/android/build.gradle b/deprecated/undo/example/android/build.gradle deleted file mode 100644 index b3a090a..0000000 --- a/deprecated/undo/example/android/build.gradle +++ /dev/null @@ -1,31 +0,0 @@ -buildscript { - ext.kotlin_version = '1.7.10' - repositories { - google() - mavenCentral() - } - - dependencies { - // AGP version is set in settings.gradle. - classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" - } -} - -allprojects { - repositories { - google() - mavenCentral() - } -} - -rootProject.buildDir = '../build' -subprojects { - project.buildDir = "${rootProject.buildDir}/${project.name}" -} -subprojects { - project.evaluationDependsOn(':app') -} - -tasks.register("clean", Delete) { - delete rootProject.buildDir -} diff --git a/deprecated/undo/example/android/gradle.properties b/deprecated/undo/example/android/gradle.properties deleted file mode 100644 index 598d13f..0000000 --- a/deprecated/undo/example/android/gradle.properties +++ /dev/null @@ -1,3 +0,0 @@ -org.gradle.jvmargs=-Xmx4G -android.useAndroidX=true -android.enableJetifier=true diff --git a/deprecated/undo/example/android/settings.gradle b/deprecated/undo/example/android/settings.gradle deleted file mode 100644 index 0d47ff5..0000000 --- a/deprecated/undo/example/android/settings.gradle +++ /dev/null @@ -1,25 +0,0 @@ -pluginManagement { - def flutterSdkPath = { - def properties = new Properties() - file("local.properties").withInputStream { properties.load(it) } - def flutterSdkPath = properties.getProperty("flutter.sdk") - assert flutterSdkPath != null, "flutter.sdk not set in local.properties" - return flutterSdkPath - } - settings.ext.flutterSdkPath = flutterSdkPath() - - includeBuild("${settings.ext.flutterSdkPath}/packages/flutter_tools/gradle") - - repositories { - google() - mavenCentral() - gradlePluginPortal() - } -} - -plugins { - id "dev.flutter.flutter-plugin-loader" version "1.0.0" - id "com.android.application" version "7.3.0" apply false -} - -include ":app" diff --git a/deprecated/undo/example/lib/main.dart b/deprecated/undo/example/lib/main.dart deleted file mode 100644 index 24e9aea..0000000 --- a/deprecated/undo/example/lib/main.dart +++ /dev/null @@ -1,89 +0,0 @@ -import 'package:flutter/material.dart'; - -import 'package:undo/undo.dart'; - -void main() => runApp(MyApp()); - -class MyApp extends StatelessWidget { - @override - Widget build(BuildContext context) { - return MaterialApp( - theme: ThemeData.light(), - darkTheme: ThemeData.dark(), - debugShowCheckedModeBanner: false, - home: HomeScreen(), - ); - } -} - -class HomeScreen extends StatefulWidget { - @override - _HomeScreenState createState() => _HomeScreenState(); -} - -class _HomeScreenState extends State { - late SimpleStack _controller; - - @override - void initState() { - _controller = SimpleStack( - 0, - onUpdate: (val) { - if (mounted) - setState(() { - print('New Value -> $val'); - }); - }, - ); - super.initState(); - } - - @override - Widget build(BuildContext context) { - final count = _controller.state; - return Scaffold( - appBar: AppBar( - title: Text('Undo/Redo Example'), - ), - body: Center( - child: Text('Count: $count'), - ), - bottomNavigationBar: BottomAppBar( - child: Row( - children: [ - IconButton( - icon: Icon(Icons.arrow_back), - onPressed: !_controller.canUndo - ? null - : () { - if (mounted) - setState(() { - _controller.undo(); - }); - }, - ), - IconButton( - icon: Icon(Icons.arrow_forward), - onPressed: !_controller.canRedo - ? null - : () { - if (mounted) - setState(() { - _controller.redo(); - }); - }, - ), - ], - ), - ), - floatingActionButtonLocation: FloatingActionButtonLocation.endDocked, - floatingActionButton: FloatingActionButton( - heroTag: ValueKey('add_button'), - child: Icon(Icons.add), - onPressed: () { - _controller.modify(count + 1); - }, - ), - ); - } -} diff --git a/deprecated/undo/example/lib/samples/set_state.dart b/deprecated/undo/example/lib/samples/set_state.dart deleted file mode 100644 index 24e9aea..0000000 --- a/deprecated/undo/example/lib/samples/set_state.dart +++ /dev/null @@ -1,89 +0,0 @@ -import 'package:flutter/material.dart'; - -import 'package:undo/undo.dart'; - -void main() => runApp(MyApp()); - -class MyApp extends StatelessWidget { - @override - Widget build(BuildContext context) { - return MaterialApp( - theme: ThemeData.light(), - darkTheme: ThemeData.dark(), - debugShowCheckedModeBanner: false, - home: HomeScreen(), - ); - } -} - -class HomeScreen extends StatefulWidget { - @override - _HomeScreenState createState() => _HomeScreenState(); -} - -class _HomeScreenState extends State { - late SimpleStack _controller; - - @override - void initState() { - _controller = SimpleStack( - 0, - onUpdate: (val) { - if (mounted) - setState(() { - print('New Value -> $val'); - }); - }, - ); - super.initState(); - } - - @override - Widget build(BuildContext context) { - final count = _controller.state; - return Scaffold( - appBar: AppBar( - title: Text('Undo/Redo Example'), - ), - body: Center( - child: Text('Count: $count'), - ), - bottomNavigationBar: BottomAppBar( - child: Row( - children: [ - IconButton( - icon: Icon(Icons.arrow_back), - onPressed: !_controller.canUndo - ? null - : () { - if (mounted) - setState(() { - _controller.undo(); - }); - }, - ), - IconButton( - icon: Icon(Icons.arrow_forward), - onPressed: !_controller.canRedo - ? null - : () { - if (mounted) - setState(() { - _controller.redo(); - }); - }, - ), - ], - ), - ), - floatingActionButtonLocation: FloatingActionButtonLocation.endDocked, - floatingActionButton: FloatingActionButton( - heroTag: ValueKey('add_button'), - child: Icon(Icons.add), - onPressed: () { - _controller.modify(count + 1); - }, - ), - ); - } -} diff --git a/deprecated/undo/example/lib/samples/stream.dart b/deprecated/undo/example/lib/samples/stream.dart deleted file mode 100644 index 3a52428..0000000 --- a/deprecated/undo/example/lib/samples/stream.dart +++ /dev/null @@ -1,179 +0,0 @@ -import 'dart:async'; - -import 'package:flutter/material.dart'; - -import 'package:undo/undo.dart'; - -void main() => runApp(MyApp()); - -class MyApp extends StatelessWidget { - @override - Widget build(BuildContext context) { - return MaterialApp( - theme: ThemeData.light(), - darkTheme: ThemeData.dark(), - debugShowCheckedModeBanner: false, - home: HomeScreen(), - ); - } -} - -class HomeScreen extends StatefulWidget { - @override - _HomeScreenState createState() => _HomeScreenState(); -} - -class _HomeScreenState extends State { - late TrackedStreamController _controller = TrackedStreamController( - 0, - ); - - @override - Widget build(BuildContext context) { - return StreamBuilder( - initialData: 0, - stream: _controller.stream, - builder: (context, snapshot) { - final count = snapshot.data!; - return Scaffold( - appBar: AppBar( - title: Text('Undo/Redo Example'), - ), - body: Center( - child: Text('Count: $count'), - ), - bottomNavigationBar: BottomAppBar( - child: Row( - children: [ - IconButton( - icon: Icon(Icons.arrow_back), - onPressed: !_controller.canUndo - ? null - : () { - if (mounted) - setState(() { - _controller.undo(); - }); - }, - ), - IconButton( - icon: Icon(Icons.arrow_forward), - onPressed: !_controller.canRedo - ? null - : () { - if (mounted) - setState(() { - _controller.redo(); - }); - }, - ), - ], - ), - ), - floatingActionButtonLocation: FloatingActionButtonLocation.endDocked, - floatingActionButton: FloatingActionButton( - heroTag: ValueKey('add_button'), - child: Icon(Icons.add), - onPressed: () { - _controller.add(count + 1); - }, - ), - ); - }, - ); - } -} - -class TrackedStreamController implements StreamController { - late SimpleStack _simpleStack; - late StreamController _streamController; - - TrackedStreamController( - T value, { - int? limit, - this.onCancel, - this.onListen, - this.onPause, - this.onResume, - bool sync = false, - }) { - _streamController = StreamController( - onCancel: onCancel, - onListen: onListen, - onPause: onPause, - onResume: onResume, - sync: sync, - ); - _simpleStack = SimpleStack(value, limit: limit, onUpdate: (newVal) { - _streamController.add(newVal); - }); - } - - Stream get stream => _streamController.stream; - void add(T value) => _simpleStack.modify(value); - - bool get canUndo => _simpleStack.canUndo; - bool get canRedo => _simpleStack.canRedo; - void redo() => _simpleStack.redo(); - void undo() => _simpleStack.undo(); - - @override - final FutureOr Function()? onCancel; - - @override - final void Function()? onListen; - - @override - final void Function()? onPause; - - @override - final void Function()? onResume; - - @override - void addError(Object error, [StackTrace? stackTrace]) { - _streamController.addError(error, stackTrace); - } - - @override - Future addStream(Stream source, {bool? cancelOnError}) { - return _streamController.addStream(source, cancelOnError: cancelOnError); - } - - @override - Future get done => _streamController.done; - - @override - bool get hasListener => _streamController.hasListener; - - @override - bool get isClosed => _streamController.isClosed; - - @override - bool get isPaused => _streamController.isPaused; - - @override - StreamSink get sink => _streamController.sink; - - @override - Future close() => _streamController.close(); - - @override - set onCancel(FutureOr Function()? _onCancel) { - onCancel = _onCancel!; - } - - @override - set onListen(void Function()? _onListen) { - onListen = _onListen!; - } - - @override - set onPause(void Function()? _onPause) { - onPause = _onPause!; - } - - @override - set onResume(void Function()? _onResume) { - onResume = _onResume!; - } -} diff --git a/deprecated/undo/example/lib/samples/value_notifer.dart b/deprecated/undo/example/lib/samples/value_notifer.dart deleted file mode 100644 index 301b8d7..0000000 --- a/deprecated/undo/example/lib/samples/value_notifer.dart +++ /dev/null @@ -1,100 +0,0 @@ -import 'package:flutter/material.dart'; - -import 'package:undo/undo.dart'; - -void main() => runApp(MyApp()); - -class MyApp extends StatelessWidget { - @override - Widget build(BuildContext context) { - return MaterialApp( - theme: ThemeData.light(), - darkTheme: ThemeData.dark(), - debugShowCheckedModeBanner: false, - home: HomeScreen(), - ); - } -} - -class HomeScreen extends StatefulWidget { - @override - _HomeScreenState createState() => _HomeScreenState(); -} - -class _HomeScreenState extends State { - TrackedValueNotifier _controller = TrackedValueNotifier(0); - - @override - Widget build(BuildContext context) { - return ValueListenableBuilder( - valueListenable: _controller, - builder: (context, count, child) => Scaffold( - appBar: AppBar( - title: Text('Undo/Redo Example'), - ), - body: Center( - child: Text('Count: $count'), - ), - bottomNavigationBar: BottomAppBar( - child: Row( - children: [ - IconButton( - icon: Icon(Icons.arrow_back), - onPressed: !_controller.canUndo - ? null - : () { - if (mounted) - setState(() { - _controller.undo(); - }); - }, - ), - IconButton( - icon: Icon(Icons.arrow_forward), - onPressed: !_controller.canRedo - ? null - : () { - if (mounted) - setState(() { - _controller.redo(); - }); - }, - ), - ], - ), - ), - floatingActionButtonLocation: FloatingActionButtonLocation.endDocked, - floatingActionButton: FloatingActionButton( - heroTag: ValueKey('add_button'), - child: Icon(Icons.add), - onPressed: () { - _controller.value = count + 1; - }, - ), - ), - ); - } -} - -class TrackedValueNotifier extends ValueNotifier { - late SimpleStack _simpleStack; - - TrackedValueNotifier(T val, {int? limit}) : super(val) { - _simpleStack = SimpleStack(val, limit: limit, onUpdate: (newVal) { - value = newVal; - notifyListeners(); - }); - } - - @override - // ignore: avoid_return_types_on_setters - void set value(T newValue) { - _simpleStack.modify(newValue); - super.value = newValue; - } - - bool get canUndo => _simpleStack.canUndo; - bool get canRedo => _simpleStack.canRedo; - void redo() => _simpleStack.redo(); - void undo() => _simpleStack.undo(); -} diff --git a/deprecated/undo/example/web/index.html b/deprecated/undo/example/web/index.html deleted file mode 100644 index d8b6f34..0000000 --- a/deprecated/undo/example/web/index.html +++ /dev/null @@ -1,10 +0,0 @@ - - - - - undo_example - - - - - diff --git a/deprecated/undo/pubspec.yaml b/deprecated/undo/pubspec.yaml deleted file mode 100644 index 82066c9..0000000 --- a/deprecated/undo/pubspec.yaml +++ /dev/null @@ -1,14 +0,0 @@ -name: undo -description: A Undo/Redo Library for Flutter -version: 1.5.0 -# authors: -# - Rody Davis -# - Dan Shultz -homepage: https://github.com/rodydavis/undo -repository: https://github.com/rodydavis/undo - -environment: - sdk: ">=3.0.0 <4.0.0" - -dev_dependencies: - test: ^1.24.9 diff --git a/packages/app_review/LICENSE b/packages/app_review/LICENSE index 720fbd9..d645695 100644 --- a/packages/app_review/LICENSE +++ b/packages/app_review/LICENSE @@ -1,21 +1,202 @@ -MIT License -Copyright (c) 2018 Rody Davis + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. + 1. Definitions. -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. \ No newline at end of file + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/packages/breakpoint/LICENSE b/packages/breakpoint/LICENSE index 84122d1..d645695 100644 --- a/packages/breakpoint/LICENSE +++ b/packages/breakpoint/LICENSE @@ -1,21 +1,202 @@ -MIT License -Copyright (c) 2019 Rody Davis + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. + 1. Definitions. -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. \ No newline at end of file + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/packages/flutter_sms/LICENSE b/packages/flutter_sms/LICENSE index 720fbd9..d645695 100644 --- a/packages/flutter_sms/LICENSE +++ b/packages/flutter_sms/LICENSE @@ -1,21 +1,202 @@ -MIT License -Copyright (c) 2018 Rody Davis + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. + 1. Definitions. -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. \ No newline at end of file + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/packages/flutter_whatsnew/LICENSE b/packages/flutter_whatsnew/LICENSE index d7d1c0f..d645695 100644 --- a/packages/flutter_whatsnew/LICENSE +++ b/packages/flutter_whatsnew/LICENSE @@ -1,21 +1,202 @@ -MIT License -Copyright (c) 2018 Rhodes Davis Jr. + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. + 1. Definitions. -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. \ No newline at end of file + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/packages/flutter_whatsnew/example/.flutter-plugins-dependencies b/packages/flutter_whatsnew/example/.flutter-plugins-dependencies index 6132ddd..72c62b2 100644 --- a/packages/flutter_whatsnew/example/.flutter-plugins-dependencies +++ b/packages/flutter_whatsnew/example/.flutter-plugins-dependencies @@ -1 +1 @@ -{"info":"This is a generated file; do not edit or check into version control.","plugins":{"ios":[{"name":"shared_preferences_foundation","path":"/Users/rodydavis/.pub-cache/hosted/pub.dev/shared_preferences_foundation-2.5.6/","shared_darwin_source":true,"native_build":true,"dependencies":[],"dev_dependency":false}],"android":[{"name":"shared_preferences_android","path":"/Users/rodydavis/.pub-cache/hosted/pub.dev/shared_preferences_android-2.4.18/","native_build":true,"dependencies":[],"dev_dependency":false}],"macos":[{"name":"shared_preferences_foundation","path":"/Users/rodydavis/.pub-cache/hosted/pub.dev/shared_preferences_foundation-2.5.6/","shared_darwin_source":true,"native_build":true,"dependencies":[],"dev_dependency":false}],"linux":[{"name":"path_provider_linux","path":"/Users/rodydavis/.pub-cache/hosted/pub.dev/path_provider_linux-2.1.7/","native_build":false,"dependencies":[],"dev_dependency":false},{"name":"shared_preferences_linux","path":"/Users/rodydavis/.pub-cache/hosted/pub.dev/shared_preferences_linux-2.4.1/","native_build":false,"dependencies":["path_provider_linux"],"dev_dependency":false}],"windows":[{"name":"path_provider_windows","path":"/Users/rodydavis/.pub-cache/hosted/pub.dev/path_provider_windows-2.1.3/","native_build":false,"dependencies":[],"dev_dependency":false},{"name":"shared_preferences_windows","path":"/Users/rodydavis/.pub-cache/hosted/pub.dev/shared_preferences_windows-2.4.1/","native_build":false,"dependencies":["path_provider_windows"],"dev_dependency":false}],"web":[{"name":"shared_preferences_web","path":"/Users/rodydavis/.pub-cache/hosted/pub.dev/shared_preferences_web-2.4.3/","dependencies":[],"dev_dependency":false}]},"dependencyGraph":[{"name":"path_provider_linux","dependencies":[]},{"name":"path_provider_windows","dependencies":[]},{"name":"shared_preferences","dependencies":["shared_preferences_android","shared_preferences_foundation","shared_preferences_linux","shared_preferences_web","shared_preferences_windows"]},{"name":"shared_preferences_android","dependencies":[]},{"name":"shared_preferences_foundation","dependencies":[]},{"name":"shared_preferences_linux","dependencies":["path_provider_linux"]},{"name":"shared_preferences_web","dependencies":[]},{"name":"shared_preferences_windows","dependencies":["path_provider_windows"]}],"date_created":"2026-01-14 01:09:20.169336","version":"3.38.5","swift_package_manager_enabled":{"ios":false,"macos":false}} \ No newline at end of file +{"info":"This is a generated file; do not edit or check into version control.","plugins":{"ios":[{"name":"shared_preferences_foundation","path":"/Users/rodydavis/.pub-cache/hosted/pub.dev/shared_preferences_foundation-2.5.6/","shared_darwin_source":true,"native_build":true,"dependencies":[],"dev_dependency":false}],"android":[{"name":"shared_preferences_android","path":"/Users/rodydavis/.pub-cache/hosted/pub.dev/shared_preferences_android-2.4.18/","native_build":true,"dependencies":[],"dev_dependency":false}],"macos":[{"name":"shared_preferences_foundation","path":"/Users/rodydavis/.pub-cache/hosted/pub.dev/shared_preferences_foundation-2.5.6/","shared_darwin_source":true,"native_build":true,"dependencies":[],"dev_dependency":false}],"linux":[{"name":"path_provider_linux","path":"/Users/rodydavis/.pub-cache/hosted/pub.dev/path_provider_linux-2.2.1/","native_build":false,"dependencies":[],"dev_dependency":false},{"name":"shared_preferences_linux","path":"/Users/rodydavis/.pub-cache/hosted/pub.dev/shared_preferences_linux-2.4.1/","native_build":false,"dependencies":["path_provider_linux"],"dev_dependency":false}],"windows":[{"name":"path_provider_windows","path":"/Users/rodydavis/.pub-cache/hosted/pub.dev/path_provider_windows-2.3.0/","native_build":false,"dependencies":[],"dev_dependency":false},{"name":"shared_preferences_windows","path":"/Users/rodydavis/.pub-cache/hosted/pub.dev/shared_preferences_windows-2.4.1/","native_build":false,"dependencies":["path_provider_windows"],"dev_dependency":false}],"web":[{"name":"shared_preferences_web","path":"/Users/rodydavis/.pub-cache/hosted/pub.dev/shared_preferences_web-2.4.3/","dependencies":[],"dev_dependency":false}]},"dependencyGraph":[{"name":"path_provider_linux","dependencies":[]},{"name":"path_provider_windows","dependencies":[]},{"name":"shared_preferences","dependencies":["shared_preferences_android","shared_preferences_foundation","shared_preferences_linux","shared_preferences_web","shared_preferences_windows"]},{"name":"shared_preferences_android","dependencies":[]},{"name":"shared_preferences_foundation","dependencies":[]},{"name":"shared_preferences_linux","dependencies":["path_provider_linux"]},{"name":"shared_preferences_web","dependencies":[]},{"name":"shared_preferences_windows","dependencies":["path_provider_windows"]}],"date_created":"2026-01-15 17:05:21.433136","version":"3.38.5","swift_package_manager_enabled":{"ios":false,"macos":false}} \ No newline at end of file diff --git a/packages/flutter_whatsnew/pubspec.yaml b/packages/flutter_whatsnew/pubspec.yaml index 4a89016..4bb463a 100644 --- a/packages/flutter_whatsnew/pubspec.yaml +++ b/packages/flutter_whatsnew/pubspec.yaml @@ -1,7 +1,8 @@ name: flutter_whatsnew description: A new Flutter package to show updates to users. -version: 1.1.0 -homepage: https://github.com/fluttercommunity/flutter_whatsnew +version: 1.1.0+1 +homepage: https://github.com/rodydavis/packages.dart +repository: https://github.com/rodydavis/packages.dart maintainer: Rody Davis (@rodydavis) resolution: workspace diff --git a/deprecated/undo/.gitattributes b/packages/undo/.gitattributes similarity index 100% rename from deprecated/undo/.gitattributes rename to packages/undo/.gitattributes diff --git a/deprecated/undo/.github/workflows/main.yml b/packages/undo/.github/workflows/main.yml similarity index 100% rename from deprecated/undo/.github/workflows/main.yml rename to packages/undo/.github/workflows/main.yml diff --git a/deprecated/undo/.github/workflows/test.yml b/packages/undo/.github/workflows/test.yml similarity index 100% rename from deprecated/undo/.github/workflows/test.yml rename to packages/undo/.github/workflows/test.yml diff --git a/deprecated/undo/.gitignore b/packages/undo/.gitignore similarity index 100% rename from deprecated/undo/.gitignore rename to packages/undo/.gitignore diff --git a/deprecated/undo/.metadata b/packages/undo/.metadata similarity index 100% rename from deprecated/undo/.metadata rename to packages/undo/.metadata diff --git a/deprecated/undo/.vscode/launch.json b/packages/undo/.vscode/launch.json similarity index 100% rename from deprecated/undo/.vscode/launch.json rename to packages/undo/.vscode/launch.json diff --git a/deprecated/undo/CHANGELOG.md b/packages/undo/CHANGELOG.md similarity index 88% rename from deprecated/undo/CHANGELOG.md rename to packages/undo/CHANGELOG.md index e6165a3..a7205e0 100644 --- a/deprecated/undo/CHANGELOG.md +++ b/packages/undo/CHANGELOG.md @@ -1,3 +1,9 @@ +## 1.6.0 +- Updated SDK constraints to `^3.5.0` +- Updated `dev_dependencies` +- Modernized example application +- Updated documentation + ## 1.5.0 - Updating to Dart 3.0.0 diff --git a/packages/undo/LICENSE b/packages/undo/LICENSE new file mode 100644 index 0000000..d645695 --- /dev/null +++ b/packages/undo/LICENSE @@ -0,0 +1,202 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/packages/undo/README.md b/packages/undo/README.md new file mode 100644 index 0000000..be91e90 --- /dev/null +++ b/packages/undo/README.md @@ -0,0 +1,169 @@ +# undo + +A clean, robust, and easy-to-use Undo/Redo library for Dart and Flutter. It leverages the Command Pattern to manage state changes, allowing you to easily roll back or replay actions in your application. + +## Features + +* 🔄 **Undo/Redo**: Simple stack-based undo/redo history. +* 📦 **Batched Changes**: Group multiple changes into a single undoable action (e.g., a multi-field form update). +* 🎨 **Flexible**: Works with any architecture (ChangeNotifier, Bloc, Riverpod, etc.). +* ⚡ **Lightweight**: Minimal overhead, zero dependencies. + +## Installation + +Add dependencies to your `pubspec.yaml`: + +```yaml +dependencies: + undo: ^1.6.0 +``` + +Run `pub get` or `flutter pub get`. + +## Usage + +### Basic Usage + +Create a `ChangeStack` to manage your changes. A `Change` consists of: +1. The **old state** (to revert to). +2. The **execute** logic (to perform the change). +3. The **undo** logic (to revert the change). + +```dart +import 'package:undo/undo.dart'; + +void main() { + final changes = ChangeStack(); + var count = 0; + + // Perform a change + changes.add( + Change( + count, // Old value (0) + () => count++, // Execute: increment + (oldVal) => count = oldVal, // Undo: set back to old val + description: 'Increment count', + ), + ); + + print(count); // 1 + + // Undo the change + changes.undo(); + print(count); // 0 + + // Redo the change + changes.redo(); + print(count); // 1 +} +``` + +### Working with Objects + +When modifying objects, capture the specific field value *before* the change so you can restore it. + +```dart +class User { + String name = 'John'; +} + +void main() { + final user = User(); + final changes = ChangeStack(); + + // Capture the OLD name before changing it + final oldName = user.name; + + changes.add( + Change( + oldName, + () => user.name = 'Jane', // New name + (val) => user.name = val, // Restore old name + description: 'Update name', + ), + ); + + print(user.name); // Jane + changes.undo(); + print(user.name); // John +} +``` + +### SimpleStack (Quick Start) + +`SimpleStack` is a wrapper around `ChangeStack` that makes it easier to track a single state object. It's great for simple use cases. + +```dart +final stack = SimpleStack(0); // Initial state is 0 + +// Modifying state automatically creates a change history +stack.modify(1); +print(stack.state); // 1 + +stack.undo(); +print(stack.state); // 0 +``` + +### Grouping Changes + +Sometimes you want multiple operations to be undone as a single step. Use `addGroup` (or manual `group` logic in 1.6.0+). + +```dart +changes.add( + Change.group([ + Change( + user.firstName, + () => user.firstName = 'Jane', + (val) => user.firstName = val, + ), + Change( + user.lastName, + () => user.lastName = 'Doe', + (val) => user.lastName = val, + ), + ]), +); +``` + +## Flutter Integration + +`ChangeStack` works seamlessly with `ChangeNotifier` to rebuild your UI when undo/redo state changes. + +```dart +class MyController extends ChangeNotifier { + final ChangeStack _changes = ChangeStack(); + int _count = 0; + + int get count => _count; + bool get canUndo => _changes.canUndo; + bool get canRedo => _changes.canRedo; + + void increment() { + _changes.add( + Change( + _count, + () { + _count++; + notifyListeners(); + }, + (oldVal) { + _count = oldVal; + notifyListeners(); + }, + ), + ); + } + + void undo() { + _changes.undo(); + notifyListeners(); + } + + void redo() { + _changes.redo(); + notifyListeners(); + } +} +``` + +See the [example](example/lib/main.dart) folder for a complete Flutter Todo List application. diff --git a/deprecated/undo/example/.gitignore b/packages/undo/example/.gitignore similarity index 100% rename from deprecated/undo/example/.gitignore rename to packages/undo/example/.gitignore diff --git a/packages/undo/example/.metadata b/packages/undo/example/.metadata new file mode 100644 index 0000000..83b34eb --- /dev/null +++ b/packages/undo/example/.metadata @@ -0,0 +1,45 @@ +# This file tracks properties of this Flutter project. +# Used by Flutter tool to assess capabilities and perform upgrades etc. +# +# This file should be version controlled and should not be manually edited. + +version: + revision: "f6ff1529fd6d8af5f706051d9251ac9231c83407" + channel: "stable" + +project_type: app + +# Tracks metadata for the flutter migrate command +migration: + platforms: + - platform: root + create_revision: f6ff1529fd6d8af5f706051d9251ac9231c83407 + base_revision: f6ff1529fd6d8af5f706051d9251ac9231c83407 + - platform: android + create_revision: f6ff1529fd6d8af5f706051d9251ac9231c83407 + base_revision: f6ff1529fd6d8af5f706051d9251ac9231c83407 + - platform: ios + create_revision: f6ff1529fd6d8af5f706051d9251ac9231c83407 + base_revision: f6ff1529fd6d8af5f706051d9251ac9231c83407 + - platform: linux + create_revision: f6ff1529fd6d8af5f706051d9251ac9231c83407 + base_revision: f6ff1529fd6d8af5f706051d9251ac9231c83407 + - platform: macos + create_revision: f6ff1529fd6d8af5f706051d9251ac9231c83407 + base_revision: f6ff1529fd6d8af5f706051d9251ac9231c83407 + - platform: web + create_revision: f6ff1529fd6d8af5f706051d9251ac9231c83407 + base_revision: f6ff1529fd6d8af5f706051d9251ac9231c83407 + - platform: windows + create_revision: f6ff1529fd6d8af5f706051d9251ac9231c83407 + base_revision: f6ff1529fd6d8af5f706051d9251ac9231c83407 + + # User provided section + + # List of Local paths (relative to this file) that should be + # ignored by the migrate tool. + # + # Files that are not part of the templates will be ignored by default. + unmanaged_files: + - 'lib/main.dart' + - 'ios/Runner.xcodeproj/project.pbxproj' diff --git a/deprecated/undo/example/README.md b/packages/undo/example/README.md similarity index 100% rename from deprecated/undo/example/README.md rename to packages/undo/example/README.md diff --git a/deprecated/undo/example/analysis_options.yaml b/packages/undo/example/analysis_options.yaml similarity index 100% rename from deprecated/undo/example/analysis_options.yaml rename to packages/undo/example/analysis_options.yaml diff --git a/deprecated/undo/example/android/.gitignore b/packages/undo/example/android/.gitignore similarity index 69% rename from deprecated/undo/example/android/.gitignore rename to packages/undo/example/android/.gitignore index 6f56801..be3943c 100644 --- a/deprecated/undo/example/android/.gitignore +++ b/packages/undo/example/android/.gitignore @@ -5,9 +5,10 @@ gradle-wrapper.jar /gradlew.bat /local.properties GeneratedPluginRegistrant.java +.cxx/ # Remember to never publicly share your keystore. -# See https://flutter.dev/docs/deployment/android#reference-the-keystore-from-the-app +# See https://flutter.dev/to/reference-keystore key.properties **/*.keystore **/*.jks diff --git a/packages/undo/example/android/app/build.gradle.kts b/packages/undo/example/android/app/build.gradle.kts new file mode 100644 index 0000000..b6d9fcc --- /dev/null +++ b/packages/undo/example/android/app/build.gradle.kts @@ -0,0 +1,44 @@ +plugins { + id("com.android.application") + id("kotlin-android") + // The Flutter Gradle Plugin must be applied after the Android and Kotlin Gradle plugins. + id("dev.flutter.flutter-gradle-plugin") +} + +android { + namespace = "com.example.undo_example" + compileSdk = flutter.compileSdkVersion + ndkVersion = flutter.ndkVersion + + compileOptions { + sourceCompatibility = JavaVersion.VERSION_17 + targetCompatibility = JavaVersion.VERSION_17 + } + + kotlinOptions { + jvmTarget = JavaVersion.VERSION_17.toString() + } + + defaultConfig { + // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). + applicationId = "com.example.undo_example" + // You can update the following values to match your application needs. + // For more information, see: https://flutter.dev/to/review-gradle-config. + minSdk = flutter.minSdkVersion + targetSdk = flutter.targetSdkVersion + versionCode = flutter.versionCode + versionName = flutter.versionName + } + + buildTypes { + release { + // TODO: Add your own signing config for the release build. + // Signing with the debug keys for now, so `flutter run --release` works. + signingConfig = signingConfigs.getByName("debug") + } + } +} + +flutter { + source = "../.." +} diff --git a/deprecated/undo/example/android/app/src/debug/AndroidManifest.xml b/packages/undo/example/android/app/src/debug/AndroidManifest.xml similarity index 100% rename from deprecated/undo/example/android/app/src/debug/AndroidManifest.xml rename to packages/undo/example/android/app/src/debug/AndroidManifest.xml diff --git a/deprecated/undo/example/android/app/src/main/AndroidManifest.xml b/packages/undo/example/android/app/src/main/AndroidManifest.xml similarity index 72% rename from deprecated/undo/example/android/app/src/main/AndroidManifest.xml rename to packages/undo/example/android/app/src/main/AndroidManifest.xml index 19b862e..43f78de 100644 --- a/deprecated/undo/example/android/app/src/main/AndroidManifest.xml +++ b/packages/undo/example/android/app/src/main/AndroidManifest.xml @@ -1,12 +1,13 @@ + + + + + + + diff --git a/packages/undo/example/android/app/src/main/kotlin/com/example/undo_example/MainActivity.kt b/packages/undo/example/android/app/src/main/kotlin/com/example/undo_example/MainActivity.kt new file mode 100644 index 0000000..9e351a6 --- /dev/null +++ b/packages/undo/example/android/app/src/main/kotlin/com/example/undo_example/MainActivity.kt @@ -0,0 +1,5 @@ +package com.example.undo_example + +import io.flutter.embedding.android.FlutterActivity + +class MainActivity : FlutterActivity() diff --git a/deprecated/undo/example/android/app/src/main/res/drawable-v21/launch_background.xml b/packages/undo/example/android/app/src/main/res/drawable-v21/launch_background.xml similarity index 100% rename from deprecated/undo/example/android/app/src/main/res/drawable-v21/launch_background.xml rename to packages/undo/example/android/app/src/main/res/drawable-v21/launch_background.xml diff --git a/deprecated/undo/example/android/app/src/main/res/drawable/launch_background.xml b/packages/undo/example/android/app/src/main/res/drawable/launch_background.xml similarity index 100% rename from deprecated/undo/example/android/app/src/main/res/drawable/launch_background.xml rename to packages/undo/example/android/app/src/main/res/drawable/launch_background.xml diff --git a/deprecated/undo/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png b/packages/undo/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png similarity index 100% rename from deprecated/undo/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png rename to packages/undo/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png diff --git a/deprecated/undo/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png b/packages/undo/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png similarity index 100% rename from deprecated/undo/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png rename to packages/undo/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png diff --git a/deprecated/undo/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png b/packages/undo/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png similarity index 100% rename from deprecated/undo/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png rename to packages/undo/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png diff --git a/deprecated/undo/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png b/packages/undo/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png similarity index 100% rename from deprecated/undo/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png rename to packages/undo/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png diff --git a/deprecated/undo/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png b/packages/undo/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png similarity index 100% rename from deprecated/undo/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png rename to packages/undo/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png diff --git a/deprecated/undo/example/android/app/src/main/res/values-night/styles.xml b/packages/undo/example/android/app/src/main/res/values-night/styles.xml similarity index 100% rename from deprecated/undo/example/android/app/src/main/res/values-night/styles.xml rename to packages/undo/example/android/app/src/main/res/values-night/styles.xml diff --git a/deprecated/undo/example/android/app/src/main/res/values/styles.xml b/packages/undo/example/android/app/src/main/res/values/styles.xml similarity index 100% rename from deprecated/undo/example/android/app/src/main/res/values/styles.xml rename to packages/undo/example/android/app/src/main/res/values/styles.xml diff --git a/deprecated/undo/example/android/app/src/profile/AndroidManifest.xml b/packages/undo/example/android/app/src/profile/AndroidManifest.xml similarity index 100% rename from deprecated/undo/example/android/app/src/profile/AndroidManifest.xml rename to packages/undo/example/android/app/src/profile/AndroidManifest.xml diff --git a/packages/undo/example/android/build.gradle.kts b/packages/undo/example/android/build.gradle.kts new file mode 100644 index 0000000..dbee657 --- /dev/null +++ b/packages/undo/example/android/build.gradle.kts @@ -0,0 +1,24 @@ +allprojects { + repositories { + google() + mavenCentral() + } +} + +val newBuildDir: Directory = + rootProject.layout.buildDirectory + .dir("../../build") + .get() +rootProject.layout.buildDirectory.value(newBuildDir) + +subprojects { + val newSubprojectBuildDir: Directory = newBuildDir.dir(project.name) + project.layout.buildDirectory.value(newSubprojectBuildDir) +} +subprojects { + project.evaluationDependsOn(":app") +} + +tasks.register("clean") { + delete(rootProject.layout.buildDirectory) +} diff --git a/packages/undo/example/android/gradle.properties b/packages/undo/example/android/gradle.properties new file mode 100644 index 0000000..fbee1d8 --- /dev/null +++ b/packages/undo/example/android/gradle.properties @@ -0,0 +1,2 @@ +org.gradle.jvmargs=-Xmx8G -XX:MaxMetaspaceSize=4G -XX:ReservedCodeCacheSize=512m -XX:+HeapDumpOnOutOfMemoryError +android.useAndroidX=true diff --git a/deprecated/undo/example/android/gradle/wrapper/gradle-wrapper.properties b/packages/undo/example/android/gradle/wrapper/gradle-wrapper.properties similarity index 92% rename from deprecated/undo/example/android/gradle/wrapper/gradle-wrapper.properties rename to packages/undo/example/android/gradle/wrapper/gradle-wrapper.properties index 3c472b9..e4ef43f 100644 --- a/deprecated/undo/example/android/gradle/wrapper/gradle-wrapper.properties +++ b/packages/undo/example/android/gradle/wrapper/gradle-wrapper.properties @@ -2,4 +2,4 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.14-all.zip diff --git a/packages/undo/example/android/settings.gradle.kts b/packages/undo/example/android/settings.gradle.kts new file mode 100644 index 0000000..ca7fe06 --- /dev/null +++ b/packages/undo/example/android/settings.gradle.kts @@ -0,0 +1,26 @@ +pluginManagement { + val flutterSdkPath = + run { + val properties = java.util.Properties() + file("local.properties").inputStream().use { properties.load(it) } + val flutterSdkPath = properties.getProperty("flutter.sdk") + require(flutterSdkPath != null) { "flutter.sdk not set in local.properties" } + flutterSdkPath + } + + includeBuild("$flutterSdkPath/packages/flutter_tools/gradle") + + repositories { + google() + mavenCentral() + gradlePluginPortal() + } +} + +plugins { + id("dev.flutter.flutter-plugin-loader") version "1.0.0" + id("com.android.application") version "8.11.1" apply false + id("org.jetbrains.kotlin.android") version "2.2.20" apply false +} + +include(":app") diff --git a/deprecated/undo/example/ios/.gitignore b/packages/undo/example/ios/.gitignore similarity index 100% rename from deprecated/undo/example/ios/.gitignore rename to packages/undo/example/ios/.gitignore diff --git a/deprecated/undo/example/ios/Flutter/AppFrameworkInfo.plist b/packages/undo/example/ios/Flutter/AppFrameworkInfo.plist similarity index 96% rename from deprecated/undo/example/ios/Flutter/AppFrameworkInfo.plist rename to packages/undo/example/ios/Flutter/AppFrameworkInfo.plist index 9625e10..1dc6cf7 100644 --- a/deprecated/undo/example/ios/Flutter/AppFrameworkInfo.plist +++ b/packages/undo/example/ios/Flutter/AppFrameworkInfo.plist @@ -21,6 +21,6 @@ CFBundleVersion 1.0 MinimumOSVersion - 11.0 + 13.0 diff --git a/deprecated/undo/example/ios/Flutter/Debug.xcconfig b/packages/undo/example/ios/Flutter/Debug.xcconfig similarity index 100% rename from deprecated/undo/example/ios/Flutter/Debug.xcconfig rename to packages/undo/example/ios/Flutter/Debug.xcconfig diff --git a/deprecated/undo/example/ios/Flutter/Release.xcconfig b/packages/undo/example/ios/Flutter/Release.xcconfig similarity index 100% rename from deprecated/undo/example/ios/Flutter/Release.xcconfig rename to packages/undo/example/ios/Flutter/Release.xcconfig diff --git a/deprecated/undo/example/ios/Runner.xcodeproj/project.pbxproj b/packages/undo/example/ios/Runner.xcodeproj/project.pbxproj similarity index 95% rename from deprecated/undo/example/ios/Runner.xcodeproj/project.pbxproj rename to packages/undo/example/ios/Runner.xcodeproj/project.pbxproj index 75c0e50..5c6e412 100644 --- a/deprecated/undo/example/ios/Runner.xcodeproj/project.pbxproj +++ b/packages/undo/example/ios/Runner.xcodeproj/project.pbxproj @@ -8,12 +8,12 @@ /* Begin PBXBuildFile section */ 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; }; + 331C808B294A63AB00263BE5 /* RunnerTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 331C807B294A618700263BE5 /* RunnerTests.swift */; }; 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; }; 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74858FAE1ED2DC5600515810 /* AppDelegate.swift */; }; 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; }; 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; }; 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; }; - 331C808B294A63AB00263BE5 /* RunnerTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 331C807B294A618700263BE5 /* RunnerTests.swift */; }; /* End PBXBuildFile section */ /* Begin PBXContainerItemProxy section */ @@ -42,6 +42,8 @@ /* Begin PBXFileReference section */ 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = ""; }; 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = ""; }; + 331C807B294A618700263BE5 /* RunnerTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RunnerTests.swift; sourceTree = ""; }; + 331C8081294A63A400263BE5 /* RunnerTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = RunnerTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = ""; }; 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Runner-Bridging-Header.h"; sourceTree = ""; }; 74858FAE1ED2DC5600515810 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; @@ -53,8 +55,6 @@ 97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; 97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - 331C807B294A618700263BE5 /* RunnerTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RunnerTests.swift; sourceTree = ""; }; - 331C8081294A63A400263BE5 /* RunnerTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = RunnerTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -68,6 +68,14 @@ /* End PBXFrameworksBuildPhase section */ /* Begin PBXGroup section */ + 331C8082294A63A400263BE5 /* RunnerTests */ = { + isa = PBXGroup; + children = ( + 331C807B294A618700263BE5 /* RunnerTests.swift */, + ); + path = RunnerTests; + sourceTree = ""; + }; 9740EEB11CF90186004384FC /* Flutter */ = { isa = PBXGroup; children = ( @@ -79,14 +87,6 @@ name = Flutter; sourceTree = ""; }; - 331C8082294A63A400263BE5 /* RunnerTests */ = { - isa = PBXGroup; - children = ( - 331C807B294A618700263BE5 /* RunnerTests.swift */, - ); - path = RunnerTests; - sourceTree = ""; - }; 97C146E51CF9000F007C117D = { isa = PBXGroup; children = ( @@ -129,7 +129,6 @@ buildConfigurationList = 331C8087294A63A400263BE5 /* Build configuration list for PBXNativeTarget "RunnerTests" */; buildPhases = ( 331C807D294A63A400263BE5 /* Sources */, - 331C807E294A63A400263BE5 /* Frameworks */, 331C807F294A63A400263BE5 /* Resources */, ); buildRules = ( @@ -169,7 +168,7 @@ isa = PBXProject; attributes = { BuildIndependentTargetsInParallel = YES; - LastUpgradeCheck = 1430; + LastUpgradeCheck = 1510; ORGANIZATIONNAME = ""; TargetAttributes = { 331C8080294A63A400263BE5 = { @@ -308,6 +307,7 @@ isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; + ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES; CLANG_ANALYZER_NONNULL = YES; CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; CLANG_CXX_LIBRARY = "libc++"; @@ -337,6 +337,7 @@ DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; ENABLE_NS_ASSERTIONS = NO; ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_USER_SCRIPT_SANDBOXING = NO; GCC_C_LANGUAGE_STANDARD = gnu99; GCC_NO_COMMON_BLOCKS = YES; GCC_WARN_64_TO_32_BIT_CONVERSION = YES; @@ -345,7 +346,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 11.0; + IPHONEOS_DEPLOYMENT_TARGET = 13.0; MTL_ENABLE_DEBUG_INFO = NO; SDKROOT = iphoneos; SUPPORTED_PLATFORMS = iphoneos; @@ -361,13 +362,14 @@ ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CLANG_ENABLE_MODULES = YES; CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; + DEVELOPMENT_TEAM = 9FK3425VTA; ENABLE_BITCODE = NO; INFOPLIST_FILE = Runner/Info.plist; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", ); - PRODUCT_BUNDLE_IDENTIFIER = com.example.example; + PRODUCT_BUNDLE_IDENTIFIER = com.example.undoExample; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; SWIFT_VERSION = 5.0; @@ -377,14 +379,13 @@ }; 331C8088294A63A400263BE5 /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = AE0B7B92F70575B8D7E0D07E /* Pods-RunnerTests.debug.xcconfig */; buildSettings = { BUNDLE_LOADER = "$(TEST_HOST)"; CODE_SIGN_STYLE = Automatic; CURRENT_PROJECT_VERSION = 1; GENERATE_INFOPLIST_FILE = YES; MARKETING_VERSION = 1.0; - PRODUCT_BUNDLE_IDENTIFIER = com.example.example.RunnerTests; + PRODUCT_BUNDLE_IDENTIFIER = com.example.undoExample.RunnerTests; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; @@ -395,14 +396,13 @@ }; 331C8089294A63A400263BE5 /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 89B67EB44CE7B6631473024E /* Pods-RunnerTests.release.xcconfig */; buildSettings = { BUNDLE_LOADER = "$(TEST_HOST)"; CODE_SIGN_STYLE = Automatic; CURRENT_PROJECT_VERSION = 1; GENERATE_INFOPLIST_FILE = YES; MARKETING_VERSION = 1.0; - PRODUCT_BUNDLE_IDENTIFIER = com.example.example.RunnerTests; + PRODUCT_BUNDLE_IDENTIFIER = com.example.undoExample.RunnerTests; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_VERSION = 5.0; TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Runner.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/Runner"; @@ -411,14 +411,13 @@ }; 331C808A294A63A400263BE5 /* Profile */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 640959BDD8F10B91D80A66BE /* Pods-RunnerTests.profile.xcconfig */; buildSettings = { BUNDLE_LOADER = "$(TEST_HOST)"; CODE_SIGN_STYLE = Automatic; CURRENT_PROJECT_VERSION = 1; GENERATE_INFOPLIST_FILE = YES; MARKETING_VERSION = 1.0; - PRODUCT_BUNDLE_IDENTIFIER = com.example.example.RunnerTests; + PRODUCT_BUNDLE_IDENTIFIER = com.example.undoExample.RunnerTests; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_VERSION = 5.0; TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Runner.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/Runner"; @@ -429,6 +428,7 @@ isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; + ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES; CLANG_ANALYZER_NONNULL = YES; CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; CLANG_CXX_LIBRARY = "libc++"; @@ -458,6 +458,7 @@ DEBUG_INFORMATION_FORMAT = dwarf; ENABLE_STRICT_OBJC_MSGSEND = YES; ENABLE_TESTABILITY = YES; + ENABLE_USER_SCRIPT_SANDBOXING = NO; GCC_C_LANGUAGE_STANDARD = gnu99; GCC_DYNAMIC_NO_PIC = NO; GCC_NO_COMMON_BLOCKS = YES; @@ -472,7 +473,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 11.0; + IPHONEOS_DEPLOYMENT_TARGET = 13.0; MTL_ENABLE_DEBUG_INFO = YES; ONLY_ACTIVE_ARCH = YES; SDKROOT = iphoneos; @@ -484,6 +485,7 @@ isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; + ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES; CLANG_ANALYZER_NONNULL = YES; CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; CLANG_CXX_LIBRARY = "libc++"; @@ -513,6 +515,7 @@ DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; ENABLE_NS_ASSERTIONS = NO; ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_USER_SCRIPT_SANDBOXING = NO; GCC_C_LANGUAGE_STANDARD = gnu99; GCC_NO_COMMON_BLOCKS = YES; GCC_WARN_64_TO_32_BIT_CONVERSION = YES; @@ -521,7 +524,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 11.0; + IPHONEOS_DEPLOYMENT_TARGET = 13.0; MTL_ENABLE_DEBUG_INFO = NO; SDKROOT = iphoneos; SUPPORTED_PLATFORMS = iphoneos; @@ -539,13 +542,14 @@ ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CLANG_ENABLE_MODULES = YES; CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; + DEVELOPMENT_TEAM = 9FK3425VTA; ENABLE_BITCODE = NO; INFOPLIST_FILE = Runner/Info.plist; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", ); - PRODUCT_BUNDLE_IDENTIFIER = com.example.example; + PRODUCT_BUNDLE_IDENTIFIER = com.example.undoExample; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; @@ -561,13 +565,14 @@ ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CLANG_ENABLE_MODULES = YES; CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; + DEVELOPMENT_TEAM = 9FK3425VTA; ENABLE_BITCODE = NO; INFOPLIST_FILE = Runner/Info.plist; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", ); - PRODUCT_BUNDLE_IDENTIFIER = com.example.example; + PRODUCT_BUNDLE_IDENTIFIER = com.example.undoExample; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; SWIFT_VERSION = 5.0; diff --git a/deprecated/undo/example/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/packages/undo/example/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata similarity index 100% rename from deprecated/undo/example/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata rename to packages/undo/example/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata diff --git a/deprecated/undo/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/packages/undo/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist similarity index 100% rename from deprecated/undo/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist rename to packages/undo/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist diff --git a/deprecated/undo/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings b/packages/undo/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings similarity index 100% rename from deprecated/undo/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings rename to packages/undo/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings diff --git a/deprecated/undo/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme b/packages/undo/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme similarity index 94% rename from deprecated/undo/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme rename to packages/undo/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme index 87131a0..e3773d4 100644 --- a/deprecated/undo/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme +++ b/packages/undo/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme @@ -1,6 +1,6 @@ diff --git a/deprecated/undo/example/ios/Runner.xcworkspace/contents.xcworkspacedata b/packages/undo/example/ios/Runner.xcworkspace/contents.xcworkspacedata similarity index 100% rename from deprecated/undo/example/ios/Runner.xcworkspace/contents.xcworkspacedata rename to packages/undo/example/ios/Runner.xcworkspace/contents.xcworkspacedata diff --git a/deprecated/undo/example/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/packages/undo/example/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist similarity index 100% rename from deprecated/undo/example/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist rename to packages/undo/example/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist diff --git a/deprecated/undo/example/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings b/packages/undo/example/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings similarity index 100% rename from deprecated/undo/example/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings rename to packages/undo/example/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings diff --git a/deprecated/undo/example/ios/Runner/AppDelegate.swift b/packages/undo/example/ios/Runner/AppDelegate.swift similarity index 95% rename from deprecated/undo/example/ios/Runner/AppDelegate.swift rename to packages/undo/example/ios/Runner/AppDelegate.swift index 70693e4..6266644 100644 --- a/deprecated/undo/example/ios/Runner/AppDelegate.swift +++ b/packages/undo/example/ios/Runner/AppDelegate.swift @@ -1,7 +1,7 @@ -import UIKit import Flutter +import UIKit -@UIApplicationMain +@main @objc class AppDelegate: FlutterAppDelegate { override func application( _ application: UIApplication, diff --git a/deprecated/undo/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json b/packages/undo/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json similarity index 100% rename from deprecated/undo/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json rename to packages/undo/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json diff --git a/deprecated/undo/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png b/packages/undo/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png similarity index 100% rename from deprecated/undo/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png rename to packages/undo/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png diff --git a/deprecated/undo/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png b/packages/undo/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png similarity index 100% rename from deprecated/undo/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png rename to packages/undo/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png diff --git a/deprecated/undo/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png b/packages/undo/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png similarity index 100% rename from deprecated/undo/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png rename to packages/undo/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png diff --git a/deprecated/undo/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png b/packages/undo/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png similarity index 100% rename from deprecated/undo/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png rename to packages/undo/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png diff --git a/deprecated/undo/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png b/packages/undo/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png similarity index 100% rename from deprecated/undo/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png rename to packages/undo/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png diff --git a/deprecated/undo/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png b/packages/undo/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png similarity index 100% rename from deprecated/undo/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png rename to packages/undo/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png diff --git a/deprecated/undo/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png b/packages/undo/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png similarity index 100% rename from deprecated/undo/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png rename to packages/undo/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png diff --git a/deprecated/undo/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png b/packages/undo/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png similarity index 100% rename from deprecated/undo/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png rename to packages/undo/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png diff --git a/deprecated/undo/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png b/packages/undo/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png similarity index 100% rename from deprecated/undo/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png rename to packages/undo/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png diff --git a/deprecated/undo/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png b/packages/undo/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png similarity index 100% rename from deprecated/undo/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png rename to packages/undo/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png diff --git a/deprecated/undo/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png b/packages/undo/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png similarity index 100% rename from deprecated/undo/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png rename to packages/undo/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png diff --git a/deprecated/undo/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png b/packages/undo/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png similarity index 100% rename from deprecated/undo/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png rename to packages/undo/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png diff --git a/deprecated/undo/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png b/packages/undo/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png similarity index 100% rename from deprecated/undo/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png rename to packages/undo/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png diff --git a/deprecated/undo/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png b/packages/undo/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png similarity index 100% rename from deprecated/undo/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png rename to packages/undo/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png diff --git a/deprecated/undo/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png b/packages/undo/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png similarity index 100% rename from deprecated/undo/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png rename to packages/undo/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png diff --git a/deprecated/undo/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json b/packages/undo/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json similarity index 100% rename from deprecated/undo/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json rename to packages/undo/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json diff --git a/deprecated/undo/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png b/packages/undo/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png similarity index 100% rename from deprecated/undo/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png rename to packages/undo/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png diff --git a/deprecated/undo/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png b/packages/undo/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png similarity index 100% rename from deprecated/undo/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png rename to packages/undo/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png diff --git a/deprecated/undo/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png b/packages/undo/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png similarity index 100% rename from deprecated/undo/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png rename to packages/undo/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png diff --git a/deprecated/undo/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md b/packages/undo/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md similarity index 100% rename from deprecated/undo/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md rename to packages/undo/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md diff --git a/deprecated/undo/example/ios/Runner/Base.lproj/LaunchScreen.storyboard b/packages/undo/example/ios/Runner/Base.lproj/LaunchScreen.storyboard similarity index 100% rename from deprecated/undo/example/ios/Runner/Base.lproj/LaunchScreen.storyboard rename to packages/undo/example/ios/Runner/Base.lproj/LaunchScreen.storyboard diff --git a/deprecated/undo/example/ios/Runner/Base.lproj/Main.storyboard b/packages/undo/example/ios/Runner/Base.lproj/Main.storyboard similarity index 100% rename from deprecated/undo/example/ios/Runner/Base.lproj/Main.storyboard rename to packages/undo/example/ios/Runner/Base.lproj/Main.storyboard diff --git a/deprecated/undo/example/ios/Runner/Info.plist b/packages/undo/example/ios/Runner/Info.plist similarity index 96% rename from deprecated/undo/example/ios/Runner/Info.plist rename to packages/undo/example/ios/Runner/Info.plist index 5458fc4..7936f4c 100644 --- a/deprecated/undo/example/ios/Runner/Info.plist +++ b/packages/undo/example/ios/Runner/Info.plist @@ -5,7 +5,7 @@ CFBundleDevelopmentRegion $(DEVELOPMENT_LANGUAGE) CFBundleDisplayName - Example + Undo Example CFBundleExecutable $(EXECUTABLE_NAME) CFBundleIdentifier @@ -13,7 +13,7 @@ CFBundleInfoDictionaryVersion 6.0 CFBundleName - example + undo_example CFBundlePackageType APPL CFBundleShortVersionString diff --git a/deprecated/undo/example/ios/Runner/Runner-Bridging-Header.h b/packages/undo/example/ios/Runner/Runner-Bridging-Header.h similarity index 100% rename from deprecated/undo/example/ios/Runner/Runner-Bridging-Header.h rename to packages/undo/example/ios/Runner/Runner-Bridging-Header.h diff --git a/deprecated/undo/example/ios/RunnerTests/RunnerTests.swift b/packages/undo/example/ios/RunnerTests/RunnerTests.swift similarity index 100% rename from deprecated/undo/example/ios/RunnerTests/RunnerTests.swift rename to packages/undo/example/ios/RunnerTests/RunnerTests.swift diff --git a/packages/undo/example/lib/main.dart b/packages/undo/example/lib/main.dart new file mode 100644 index 0000000..16789b0 --- /dev/null +++ b/packages/undo/example/lib/main.dart @@ -0,0 +1,364 @@ +import 'package:flutter/material.dart'; +import 'package:undo/undo.dart'; + +void main() { + runApp(const UndoExampleApp()); +} + +class UndoExampleApp extends StatelessWidget { + const UndoExampleApp({super.key}); + + @override + Widget build(BuildContext context) { + return MaterialApp( + debugShowCheckedModeBanner: false, + theme: ThemeData( + useMaterial3: true, + colorScheme: ColorScheme.fromSeed( + seedColor: Colors.teal, + brightness: Brightness.light, + ), + ), + darkTheme: ThemeData( + useMaterial3: true, + colorScheme: ColorScheme.fromSeed( + seedColor: Colors.teal, + brightness: Brightness.dark, + ), + ), + themeMode: ThemeMode.system, + home: const TodoListScreen(), + ); + } +} + +// ---------------------------------------------------------------------- +// Domain Model +// ---------------------------------------------------------------------- + +class TodoItem { + final String id; + final String description; + final bool isCompleted; + + TodoItem({ + required this.id, + required this.description, + this.isCompleted = false, + }); + + TodoItem copyWith({ + String? description, + bool? isCompleted, + }) { + return TodoItem( + id: id, + description: description ?? this.description, + isCompleted: isCompleted ?? this.isCompleted, + ); + } +} + +// ---------------------------------------------------------------------- +// Controller (Logic) +// ---------------------------------------------------------------------- + +class TodoListController extends ChangeNotifier { + final ChangeStack _changes = ChangeStack(); + + List _items = [ + TodoItem(id: '1', description: 'Buy groceries'), + TodoItem(id: '2', description: 'Walk the dog'), + TodoItem(id: '3', description: 'Read a book'), + ]; + + List get items => List.unmodifiable(_items); + + bool get canUndo => _changes.canUndo; + bool get canRedo => _changes.canRedo; + + void undo() { + if (canUndo) { + _changes.undo(); + notifyListeners(); + } + } + + void redo() { + if (canRedo) { + _changes.redo(); + notifyListeners(); + } + } + + void addItem(String description) { + final newItem = TodoItem( + id: DateTime.now().millisecondsSinceEpoch.toString(), + description: description, + ); + + _changes.add( + Change>( + _items, + () { + _items = List.of(_items)..add(newItem); + notifyListeners(); + }, + (oldList) { + _items = oldList; + notifyListeners(); + }, + description: 'Add item "$description"', + ), + ); + } + + void removeItem(String id) { + final itemToRemove = _items.firstWhere((item) => item.id == id); + + _changes.add( + Change>( + _items, + () { + _items = List.of(_items)..removeWhere((item) => item.id == id); + notifyListeners(); + }, + (oldList) { + _items = oldList; + notifyListeners(); + }, + description: 'Remove item "${itemToRemove.description}"', + ), + ); + } + + void toggleItem(String id) { + final index = _items.indexWhere((item) => item.id == id); + if (index == -1) return; + + final item = _items[index]; + + _changes.add( + Change>( + _items, + () { + _items = List.of(_items); + _items[index] = item.copyWith(isCompleted: !item.isCompleted); + notifyListeners(); + }, + (oldList) { + _items = oldList; + notifyListeners(); + }, + description: 'Toggle "${item.description}"', + ), + ); + } + + void clearHistory() { + _changes.clearHistory(); + notifyListeners(); + } +} + +// ---------------------------------------------------------------------- +// UI +// ---------------------------------------------------------------------- + +class TodoListScreen extends StatefulWidget { + const TodoListScreen({super.key}); + + @override + State createState() => _TodoListScreenState(); +} + +class _TodoListScreenState extends State { + final TodoListController _controller = TodoListController(); + + @override + void initState() { + super.initState(); + // Listen to controller changes to rebuild UI + _controller.addListener(_rebuild); + } + + @override + void dispose() { + _controller.removeListener(_rebuild); + _controller.dispose(); + super.dispose(); + } + + void _rebuild() { + setState(() {}); + } + + void _showAddDialog() { + final textController = TextEditingController(); + showDialog( + context: context, + builder: (context) => AlertDialog( + title: const Text('New Task'), + content: TextField( + controller: textController, + decoration: const InputDecoration( + hintText: 'What needs to be done?', + border: OutlineInputBorder(), + ), + autofocus: true, + onSubmitted: (value) { + if (value.isNotEmpty) { + _controller.addItem(value); + Navigator.of(context).pop(); + } + }, + ), + actions: [ + TextButton( + onPressed: () => Navigator.of(context).pop(), + child: const Text('Cancel'), + ), + FilledButton( + onPressed: () { + if (textController.text.isNotEmpty) { + _controller.addItem(textController.text); + Navigator.of(context).pop(); + } + }, + child: const Text('Add'), + ), + ], + ), + ); + } + + @override + Widget build(BuildContext context) { + return Scaffold( + appBar: AppBar( + title: const Text('Undo/Redo Todos'), + centerTitle: true, + actions: [ + IconButton( + icon: const Icon(Icons.delete_sweep_outlined), + tooltip: 'Clear History', + onPressed: _controller.clearHistory, + ), + ], + ), + body: Column( + children: [ + _buildUndoRedoBar(), + Expanded( + child: _controller.items.isEmpty + ? _buildEmptyState() + : ListView.builder( + itemCount: _controller.items.length, + padding: const EdgeInsets.only(bottom: 80), + itemBuilder: (context, index) { + final item = _controller.items[index]; + return _buildTodoItem(item); + }, + ), + ), + ], + ), + floatingActionButton: FloatingActionButton.extended( + onPressed: _showAddDialog, + icon: const Icon(Icons.add), + label: const Text('Add Task'), + ), + ); + } + + Widget _buildUndoRedoBar() { + return Padding( + padding: const EdgeInsets.symmetric(horizontal: 16, vertical: 8), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceEvenly, + children: [ + Expanded( + child: FilledButton.icon( + onPressed: _controller.canUndo ? _controller.undo : null, + icon: const Icon(Icons.undo), + label: const Text('Undo'), + ), + ), + const SizedBox(width: 16), + Expanded( + child: FilledButton.icon( + onPressed: _controller.canRedo ? _controller.redo : null, + icon: const Icon(Icons.redo), + label: const Text('Redo'), + ), + ), + ], + ), + ); + } + + Widget _buildEmptyState() { + return Center( + child: Column( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + Icon( + Icons.check_circle_outline, + size: 64, + color: Theme.of(context).disabledColor, + ), + const SizedBox(height: 16), + Text( + 'All items completed!', + style: Theme.of(context).textTheme.titleLarge?.copyWith( + color: Theme.of(context).disabledColor, + ), + ), + ], + ), + ); + } + + Widget _buildTodoItem(TodoItem item) { + return Dismissible( + key: Key(item.id), + background: Container( + color: Theme.of(context).colorScheme.errorContainer, + alignment: Alignment.centerRight, + padding: const EdgeInsets.only(right: 16), + child: Icon( + Icons.delete_outline, + color: Theme.of(context).colorScheme.onErrorContainer, + ), + ), + direction: DismissDirection.endToStart, + onDismissed: (_) => _controller.removeItem(item.id), + child: Card( + margin: const EdgeInsets.symmetric(horizontal: 16, vertical: 4), + elevation: 0, + shape: RoundedRectangleBorder( + borderRadius: BorderRadius.circular(12), + side: BorderSide( + color: Theme.of(context).colorScheme.outlineVariant, + ), + ), + child: ListTile( + leading: Checkbox( + value: item.isCompleted, + onChanged: (_) => _controller.toggleItem(item.id), + ), + title: Text( + item.description, + style: TextStyle( + decoration: item.isCompleted ? TextDecoration.lineThrough : null, + color: item.isCompleted + ? Theme.of(context).disabledColor + : Theme.of(context).textTheme.bodyLarge?.color, + ), + ), + onTap: () => _controller.toggleItem(item.id), + ), + ), + ); + } +} diff --git a/deprecated/undo/example/linux/.gitignore b/packages/undo/example/linux/.gitignore similarity index 100% rename from deprecated/undo/example/linux/.gitignore rename to packages/undo/example/linux/.gitignore diff --git a/deprecated/undo/example/linux/CMakeLists.txt b/packages/undo/example/linux/CMakeLists.txt similarity index 84% rename from deprecated/undo/example/linux/CMakeLists.txt rename to packages/undo/example/linux/CMakeLists.txt index 9cb0d1d..1a7bca0 100644 --- a/deprecated/undo/example/linux/CMakeLists.txt +++ b/packages/undo/example/linux/CMakeLists.txt @@ -1,13 +1,13 @@ # Project-level configuration. -cmake_minimum_required(VERSION 3.10) +cmake_minimum_required(VERSION 3.13) project(runner LANGUAGES CXX) # The name of the executable created for the application. Change this to change # the on-disk name of your application. -set(BINARY_NAME "example") +set(BINARY_NAME "undo_example") # The unique GTK application identifier for this application. See: # https://wiki.gnome.org/HowDoI/ChooseApplicationID -set(APPLICATION_ID "com.example.example") +set(APPLICATION_ID "com.example.undo_example") # Explicitly opt in to modern CMake behaviors to avoid warnings with recent # versions of CMake. @@ -54,25 +54,8 @@ add_subdirectory(${FLUTTER_MANAGED_DIR}) find_package(PkgConfig REQUIRED) pkg_check_modules(GTK REQUIRED IMPORTED_TARGET gtk+-3.0) -add_definitions(-DAPPLICATION_ID="${APPLICATION_ID}") - -# Define the application target. To change its name, change BINARY_NAME above, -# not the value here, or `flutter run` will no longer work. -# -# Any new source files that you add to the application should be added here. -add_executable(${BINARY_NAME} - "main.cc" - "my_application.cc" - "${FLUTTER_MANAGED_DIR}/generated_plugin_registrant.cc" -) - -# Apply the standard set of build settings. This can be removed for applications -# that need different build settings. -apply_standard_settings(${BINARY_NAME}) - -# Add dependency libraries. Add any application-specific dependencies here. -target_link_libraries(${BINARY_NAME} PRIVATE flutter) -target_link_libraries(${BINARY_NAME} PRIVATE PkgConfig::GTK) +# Application build; see runner/CMakeLists.txt. +add_subdirectory("runner") # Run the Flutter tool portions of the build. This must not be removed. add_dependencies(${BINARY_NAME} flutter_assemble) diff --git a/deprecated/undo/example/linux/flutter/CMakeLists.txt b/packages/undo/example/linux/flutter/CMakeLists.txt similarity index 100% rename from deprecated/undo/example/linux/flutter/CMakeLists.txt rename to packages/undo/example/linux/flutter/CMakeLists.txt diff --git a/deprecated/undo/example/linux/flutter/generated_plugin_registrant.cc b/packages/undo/example/linux/flutter/generated_plugin_registrant.cc similarity index 100% rename from deprecated/undo/example/linux/flutter/generated_plugin_registrant.cc rename to packages/undo/example/linux/flutter/generated_plugin_registrant.cc diff --git a/deprecated/undo/example/linux/flutter/generated_plugin_registrant.h b/packages/undo/example/linux/flutter/generated_plugin_registrant.h similarity index 100% rename from deprecated/undo/example/linux/flutter/generated_plugin_registrant.h rename to packages/undo/example/linux/flutter/generated_plugin_registrant.h diff --git a/deprecated/undo/example/linux/flutter/generated_plugins.cmake b/packages/undo/example/linux/flutter/generated_plugins.cmake similarity index 100% rename from deprecated/undo/example/linux/flutter/generated_plugins.cmake rename to packages/undo/example/linux/flutter/generated_plugins.cmake diff --git a/packages/undo/example/linux/runner/CMakeLists.txt b/packages/undo/example/linux/runner/CMakeLists.txt new file mode 100644 index 0000000..e97dabc --- /dev/null +++ b/packages/undo/example/linux/runner/CMakeLists.txt @@ -0,0 +1,26 @@ +cmake_minimum_required(VERSION 3.13) +project(runner LANGUAGES CXX) + +# Define the application target. To change its name, change BINARY_NAME in the +# top-level CMakeLists.txt, not the value here, or `flutter run` will no longer +# work. +# +# Any new source files that you add to the application should be added here. +add_executable(${BINARY_NAME} + "main.cc" + "my_application.cc" + "${FLUTTER_MANAGED_DIR}/generated_plugin_registrant.cc" +) + +# Apply the standard set of build settings. This can be removed for applications +# that need different build settings. +apply_standard_settings(${BINARY_NAME}) + +# Add preprocessor definitions for the application ID. +add_definitions(-DAPPLICATION_ID="${APPLICATION_ID}") + +# Add dependency libraries. Add any application-specific dependencies here. +target_link_libraries(${BINARY_NAME} PRIVATE flutter) +target_link_libraries(${BINARY_NAME} PRIVATE PkgConfig::GTK) + +target_include_directories(${BINARY_NAME} PRIVATE "${CMAKE_SOURCE_DIR}") diff --git a/deprecated/undo/example/linux/main.cc b/packages/undo/example/linux/runner/main.cc similarity index 100% rename from deprecated/undo/example/linux/main.cc rename to packages/undo/example/linux/runner/main.cc diff --git a/deprecated/undo/example/linux/my_application.cc b/packages/undo/example/linux/runner/my_application.cc similarity index 68% rename from deprecated/undo/example/linux/my_application.cc rename to packages/undo/example/linux/runner/my_application.cc index c0530d4..55794b3 100644 --- a/deprecated/undo/example/linux/my_application.cc +++ b/packages/undo/example/linux/runner/my_application.cc @@ -14,6 +14,11 @@ struct _MyApplication { G_DEFINE_TYPE(MyApplication, my_application, GTK_TYPE_APPLICATION) +// Called when first Flutter frame received. +static void first_frame_cb(MyApplication* self, FlView* view) { + gtk_widget_show(gtk_widget_get_toplevel(GTK_WIDGET(view))); +} + // Implements GApplication::activate. static void my_application_activate(GApplication* application) { MyApplication* self = MY_APPLICATION(application); @@ -40,39 +45,52 @@ static void my_application_activate(GApplication* application) { if (use_header_bar) { GtkHeaderBar* header_bar = GTK_HEADER_BAR(gtk_header_bar_new()); gtk_widget_show(GTK_WIDGET(header_bar)); - gtk_header_bar_set_title(header_bar, "example"); + gtk_header_bar_set_title(header_bar, "undo_example"); gtk_header_bar_set_show_close_button(header_bar, TRUE); gtk_window_set_titlebar(window, GTK_WIDGET(header_bar)); } else { - gtk_window_set_title(window, "example"); + gtk_window_set_title(window, "undo_example"); } gtk_window_set_default_size(window, 1280, 720); - gtk_widget_show(GTK_WIDGET(window)); g_autoptr(FlDartProject) project = fl_dart_project_new(); - fl_dart_project_set_dart_entrypoint_arguments(project, self->dart_entrypoint_arguments); + fl_dart_project_set_dart_entrypoint_arguments( + project, self->dart_entrypoint_arguments); FlView* view = fl_view_new(project); + GdkRGBA background_color; + // Background defaults to black, override it here if necessary, e.g. #00000000 + // for transparent. + gdk_rgba_parse(&background_color, "#000000"); + fl_view_set_background_color(view, &background_color); gtk_widget_show(GTK_WIDGET(view)); gtk_container_add(GTK_CONTAINER(window), GTK_WIDGET(view)); + // Show the window when Flutter renders. + // Requires the view to be realized so we can start rendering. + g_signal_connect_swapped(view, "first-frame", G_CALLBACK(first_frame_cb), + self); + gtk_widget_realize(GTK_WIDGET(view)); + fl_register_plugins(FL_PLUGIN_REGISTRY(view)); gtk_widget_grab_focus(GTK_WIDGET(view)); } // Implements GApplication::local_command_line. -static gboolean my_application_local_command_line(GApplication* application, gchar*** arguments, int* exit_status) { +static gboolean my_application_local_command_line(GApplication* application, + gchar*** arguments, + int* exit_status) { MyApplication* self = MY_APPLICATION(application); // Strip out the first argument as it is the binary name. self->dart_entrypoint_arguments = g_strdupv(*arguments + 1); g_autoptr(GError) error = nullptr; if (!g_application_register(application, nullptr, &error)) { - g_warning("Failed to register: %s", error->message); - *exit_status = 1; - return TRUE; + g_warning("Failed to register: %s", error->message); + *exit_status = 1; + return TRUE; } g_application_activate(application); @@ -83,7 +101,7 @@ static gboolean my_application_local_command_line(GApplication* application, gch // Implements GApplication::startup. static void my_application_startup(GApplication* application) { - //MyApplication* self = MY_APPLICATION(object); + // MyApplication* self = MY_APPLICATION(object); // Perform any actions required at application startup. @@ -92,7 +110,7 @@ static void my_application_startup(GApplication* application) { // Implements GApplication::shutdown. static void my_application_shutdown(GApplication* application) { - //MyApplication* self = MY_APPLICATION(object); + // MyApplication* self = MY_APPLICATION(object); // Perform any actions required at application shutdown. @@ -108,7 +126,8 @@ static void my_application_dispose(GObject* object) { static void my_application_class_init(MyApplicationClass* klass) { G_APPLICATION_CLASS(klass)->activate = my_application_activate; - G_APPLICATION_CLASS(klass)->local_command_line = my_application_local_command_line; + G_APPLICATION_CLASS(klass)->local_command_line = + my_application_local_command_line; G_APPLICATION_CLASS(klass)->startup = my_application_startup; G_APPLICATION_CLASS(klass)->shutdown = my_application_shutdown; G_OBJECT_CLASS(klass)->dispose = my_application_dispose; @@ -117,8 +136,13 @@ static void my_application_class_init(MyApplicationClass* klass) { static void my_application_init(MyApplication* self) {} MyApplication* my_application_new() { + // Set the program name to the application ID, which helps various systems + // like GTK and desktop environments map this running application to its + // corresponding .desktop file. This ensures better integration by allowing + // the application to be recognized beyond its binary name. + g_set_prgname(APPLICATION_ID); + return MY_APPLICATION(g_object_new(my_application_get_type(), - "application-id", APPLICATION_ID, - "flags", G_APPLICATION_NON_UNIQUE, - nullptr)); + "application-id", APPLICATION_ID, "flags", + G_APPLICATION_NON_UNIQUE, nullptr)); } diff --git a/deprecated/undo/example/linux/my_application.h b/packages/undo/example/linux/runner/my_application.h similarity index 70% rename from deprecated/undo/example/linux/my_application.h rename to packages/undo/example/linux/runner/my_application.h index 72271d5..db16367 100644 --- a/deprecated/undo/example/linux/my_application.h +++ b/packages/undo/example/linux/runner/my_application.h @@ -3,7 +3,10 @@ #include -G_DECLARE_FINAL_TYPE(MyApplication, my_application, MY, APPLICATION, +G_DECLARE_FINAL_TYPE(MyApplication, + my_application, + MY, + APPLICATION, GtkApplication) /** diff --git a/deprecated/undo/example/macos/.gitignore b/packages/undo/example/macos/.gitignore similarity index 100% rename from deprecated/undo/example/macos/.gitignore rename to packages/undo/example/macos/.gitignore diff --git a/deprecated/undo/example/macos/Flutter/Flutter-Debug.xcconfig b/packages/undo/example/macos/Flutter/Flutter-Debug.xcconfig similarity index 100% rename from deprecated/undo/example/macos/Flutter/Flutter-Debug.xcconfig rename to packages/undo/example/macos/Flutter/Flutter-Debug.xcconfig diff --git a/deprecated/undo/example/macos/Flutter/Flutter-Release.xcconfig b/packages/undo/example/macos/Flutter/Flutter-Release.xcconfig similarity index 100% rename from deprecated/undo/example/macos/Flutter/Flutter-Release.xcconfig rename to packages/undo/example/macos/Flutter/Flutter-Release.xcconfig diff --git a/deprecated/undo/example/macos/Flutter/GeneratedPluginRegistrant.swift b/packages/undo/example/macos/Flutter/GeneratedPluginRegistrant.swift similarity index 100% rename from deprecated/undo/example/macos/Flutter/GeneratedPluginRegistrant.swift rename to packages/undo/example/macos/Flutter/GeneratedPluginRegistrant.swift diff --git a/deprecated/undo/example/macos/Runner.xcodeproj/project.pbxproj b/packages/undo/example/macos/Runner.xcodeproj/project.pbxproj similarity index 94% rename from deprecated/undo/example/macos/Runner.xcodeproj/project.pbxproj rename to packages/undo/example/macos/Runner.xcodeproj/project.pbxproj index 27e0f50..32f4a5f 100644 --- a/deprecated/undo/example/macos/Runner.xcodeproj/project.pbxproj +++ b/packages/undo/example/macos/Runner.xcodeproj/project.pbxproj @@ -64,7 +64,7 @@ 331C80D7294CF71000263BE5 /* RunnerTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RunnerTests.swift; sourceTree = ""; }; 333000ED22D3DE5D00554162 /* Warnings.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = Warnings.xcconfig; sourceTree = ""; }; 335BBD1A22A9A15E00E9071D /* GeneratedPluginRegistrant.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = GeneratedPluginRegistrant.swift; sourceTree = ""; }; - 33CC10ED2044A3C60003C045 /* example.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "example.app"; sourceTree = BUILT_PRODUCTS_DIR; }; + 33CC10ED2044A3C60003C045 /* undo_example.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "undo_example.app"; sourceTree = BUILT_PRODUCTS_DIR; }; 33CC10F02044A3C60003C045 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; 33CC10F22044A3C60003C045 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; name = Assets.xcassets; path = Runner/Assets.xcassets; sourceTree = ""; }; 33CC10F52044A3C60003C045 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/MainMenu.xib; sourceTree = ""; }; @@ -131,7 +131,7 @@ 33CC10EE2044A3C60003C045 /* Products */ = { isa = PBXGroup; children = ( - 33CC10ED2044A3C60003C045 /* example.app */, + 33CC10ED2044A3C60003C045 /* undo_example.app */, 331C80D5294CF71000263BE5 /* RunnerTests.xctest */, ); name = Products; @@ -217,7 +217,7 @@ ); name = Runner; productName = Runner; - productReference = 33CC10ED2044A3C60003C045 /* example.app */; + productReference = 33CC10ED2044A3C60003C045 /* undo_example.app */; productType = "com.apple.product-type.application"; }; /* End PBXNativeTarget section */ @@ -226,8 +226,9 @@ 33CC10E52044A3C60003C045 /* Project object */ = { isa = PBXProject; attributes = { + BuildIndependentTargetsInParallel = YES; LastSwiftUpdateCheck = 0920; - LastUpgradeCheck = 1430; + LastUpgradeCheck = 1510; ORGANIZATIONNAME = ""; TargetAttributes = { 331C80D4294CF70F00263BE5 = { @@ -384,10 +385,10 @@ CURRENT_PROJECT_VERSION = 1; GENERATE_INFOPLIST_FILE = YES; MARKETING_VERSION = 1.0; - PRODUCT_BUNDLE_IDENTIFIER = com.example.example.RunnerTests; + PRODUCT_BUNDLE_IDENTIFIER = com.example.undoExample.RunnerTests; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_VERSION = 5.0; - TEST_HOST = "$(BUILT_PRODUCTS_DIR)/example.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/example"; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/undo_example.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/undo_example"; }; name = Debug; }; @@ -398,10 +399,10 @@ CURRENT_PROJECT_VERSION = 1; GENERATE_INFOPLIST_FILE = YES; MARKETING_VERSION = 1.0; - PRODUCT_BUNDLE_IDENTIFIER = com.example.example.RunnerTests; + PRODUCT_BUNDLE_IDENTIFIER = com.example.undoExample.RunnerTests; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_VERSION = 5.0; - TEST_HOST = "$(BUILT_PRODUCTS_DIR)/example.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/example"; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/undo_example.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/undo_example"; }; name = Release; }; @@ -412,10 +413,10 @@ CURRENT_PROJECT_VERSION = 1; GENERATE_INFOPLIST_FILE = YES; MARKETING_VERSION = 1.0; - PRODUCT_BUNDLE_IDENTIFIER = com.example.example.RunnerTests; + PRODUCT_BUNDLE_IDENTIFIER = com.example.undoExample.RunnerTests; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_VERSION = 5.0; - TEST_HOST = "$(BUILT_PRODUCTS_DIR)/example.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/example"; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/undo_example.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/undo_example"; }; name = Profile; }; @@ -424,6 +425,7 @@ baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; + ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES; CLANG_ANALYZER_NONNULL = YES; CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; @@ -447,9 +449,11 @@ CLANG_WARN_SUSPICIOUS_MOVE = YES; CODE_SIGN_IDENTITY = "-"; COPY_PHASE_STRIP = NO; + DEAD_CODE_STRIPPING = YES; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; ENABLE_NS_ASSERTIONS = NO; ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_USER_SCRIPT_SANDBOXING = NO; GCC_C_LANGUAGE_STANDARD = gnu11; GCC_NO_COMMON_BLOCKS = YES; GCC_WARN_64_TO_32_BIT_CONVERSION = YES; @@ -457,7 +461,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - MACOSX_DEPLOYMENT_TARGET = 10.14; + MACOSX_DEPLOYMENT_TARGET = 10.15; MTL_ENABLE_DEBUG_INFO = NO; SDKROOT = macosx; SWIFT_COMPILATION_MODE = wholemodule; @@ -497,6 +501,7 @@ baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; + ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES; CLANG_ANALYZER_NONNULL = YES; CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; @@ -520,9 +525,11 @@ CLANG_WARN_SUSPICIOUS_MOVE = YES; CODE_SIGN_IDENTITY = "-"; COPY_PHASE_STRIP = NO; + DEAD_CODE_STRIPPING = YES; DEBUG_INFORMATION_FORMAT = dwarf; ENABLE_STRICT_OBJC_MSGSEND = YES; ENABLE_TESTABILITY = YES; + ENABLE_USER_SCRIPT_SANDBOXING = NO; GCC_C_LANGUAGE_STANDARD = gnu11; GCC_DYNAMIC_NO_PIC = NO; GCC_NO_COMMON_BLOCKS = YES; @@ -536,7 +543,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - MACOSX_DEPLOYMENT_TARGET = 10.14; + MACOSX_DEPLOYMENT_TARGET = 10.15; MTL_ENABLE_DEBUG_INFO = YES; ONLY_ACTIVE_ARCH = YES; SDKROOT = macosx; @@ -550,6 +557,7 @@ baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; + ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES; CLANG_ANALYZER_NONNULL = YES; CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; @@ -573,9 +581,11 @@ CLANG_WARN_SUSPICIOUS_MOVE = YES; CODE_SIGN_IDENTITY = "-"; COPY_PHASE_STRIP = NO; + DEAD_CODE_STRIPPING = YES; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; ENABLE_NS_ASSERTIONS = NO; ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_USER_SCRIPT_SANDBOXING = NO; GCC_C_LANGUAGE_STANDARD = gnu11; GCC_NO_COMMON_BLOCKS = YES; GCC_WARN_64_TO_32_BIT_CONVERSION = YES; @@ -583,7 +593,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - MACOSX_DEPLOYMENT_TARGET = 10.14; + MACOSX_DEPLOYMENT_TARGET = 10.15; MTL_ENABLE_DEBUG_INFO = NO; SDKROOT = macosx; SWIFT_COMPILATION_MODE = wholemodule; diff --git a/deprecated/undo/example/macos/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/packages/undo/example/macos/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist similarity index 100% rename from deprecated/undo/example/macos/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist rename to packages/undo/example/macos/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist diff --git a/deprecated/undo/example/macos/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme b/packages/undo/example/macos/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme similarity index 93% rename from deprecated/undo/example/macos/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme rename to packages/undo/example/macos/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme index 397f3d3..c148830 100644 --- a/deprecated/undo/example/macos/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme +++ b/packages/undo/example/macos/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme @@ -1,6 +1,6 @@ @@ -31,7 +31,7 @@ @@ -59,13 +59,14 @@ ignoresPersistentStateOnLaunch = "NO" debugDocumentVersioning = "YES" debugServiceExtension = "internal" + enableGPUValidationMode = "1" allowLocationSimulation = "YES"> @@ -82,7 +83,7 @@ diff --git a/deprecated/undo/example/macos/Runner.xcworkspace/contents.xcworkspacedata b/packages/undo/example/macos/Runner.xcworkspace/contents.xcworkspacedata similarity index 100% rename from deprecated/undo/example/macos/Runner.xcworkspace/contents.xcworkspacedata rename to packages/undo/example/macos/Runner.xcworkspace/contents.xcworkspacedata diff --git a/deprecated/undo/example/macos/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/packages/undo/example/macos/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist similarity index 100% rename from deprecated/undo/example/macos/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist rename to packages/undo/example/macos/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist diff --git a/deprecated/undo/example/macos/Runner/AppDelegate.swift b/packages/undo/example/macos/Runner/AppDelegate.swift similarity index 62% rename from deprecated/undo/example/macos/Runner/AppDelegate.swift rename to packages/undo/example/macos/Runner/AppDelegate.swift index d53ef64..b3c1761 100644 --- a/deprecated/undo/example/macos/Runner/AppDelegate.swift +++ b/packages/undo/example/macos/Runner/AppDelegate.swift @@ -1,9 +1,13 @@ import Cocoa import FlutterMacOS -@NSApplicationMain +@main class AppDelegate: FlutterAppDelegate { override func applicationShouldTerminateAfterLastWindowClosed(_ sender: NSApplication) -> Bool { return true } + + override func applicationSupportsSecureRestorableState(_ app: NSApplication) -> Bool { + return true + } } diff --git a/deprecated/undo/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json b/packages/undo/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json similarity index 100% rename from deprecated/undo/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json rename to packages/undo/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json diff --git a/deprecated/undo/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_1024.png b/packages/undo/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_1024.png similarity index 100% rename from deprecated/undo/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_1024.png rename to packages/undo/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_1024.png diff --git a/deprecated/undo/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_128.png b/packages/undo/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_128.png similarity index 100% rename from deprecated/undo/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_128.png rename to packages/undo/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_128.png diff --git a/deprecated/undo/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_16.png b/packages/undo/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_16.png similarity index 100% rename from deprecated/undo/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_16.png rename to packages/undo/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_16.png diff --git a/deprecated/undo/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_256.png b/packages/undo/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_256.png similarity index 100% rename from deprecated/undo/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_256.png rename to packages/undo/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_256.png diff --git a/deprecated/undo/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_32.png b/packages/undo/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_32.png similarity index 100% rename from deprecated/undo/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_32.png rename to packages/undo/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_32.png diff --git a/deprecated/undo/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_512.png b/packages/undo/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_512.png similarity index 100% rename from deprecated/undo/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_512.png rename to packages/undo/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_512.png diff --git a/deprecated/undo/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_64.png b/packages/undo/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_64.png similarity index 100% rename from deprecated/undo/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_64.png rename to packages/undo/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_64.png diff --git a/deprecated/undo/example/macos/Runner/Base.lproj/MainMenu.xib b/packages/undo/example/macos/Runner/Base.lproj/MainMenu.xib similarity index 100% rename from deprecated/undo/example/macos/Runner/Base.lproj/MainMenu.xib rename to packages/undo/example/macos/Runner/Base.lproj/MainMenu.xib diff --git a/deprecated/undo/example/macos/Runner/Configs/AppInfo.xcconfig b/packages/undo/example/macos/Runner/Configs/AppInfo.xcconfig similarity index 76% rename from deprecated/undo/example/macos/Runner/Configs/AppInfo.xcconfig rename to packages/undo/example/macos/Runner/Configs/AppInfo.xcconfig index dda192b..a806f1e 100644 --- a/deprecated/undo/example/macos/Runner/Configs/AppInfo.xcconfig +++ b/packages/undo/example/macos/Runner/Configs/AppInfo.xcconfig @@ -5,10 +5,10 @@ // 'flutter create' template. // The application's name. By default this is also the title of the Flutter window. -PRODUCT_NAME = example +PRODUCT_NAME = undo_example // The application's bundle identifier -PRODUCT_BUNDLE_IDENTIFIER = com.example.example +PRODUCT_BUNDLE_IDENTIFIER = com.example.undoExample // The copyright displayed in application information -PRODUCT_COPYRIGHT = Copyright © 2023 com.example. All rights reserved. +PRODUCT_COPYRIGHT = Copyright © 2026 com.example. All rights reserved. diff --git a/deprecated/undo/example/macos/Runner/Configs/Debug.xcconfig b/packages/undo/example/macos/Runner/Configs/Debug.xcconfig similarity index 100% rename from deprecated/undo/example/macos/Runner/Configs/Debug.xcconfig rename to packages/undo/example/macos/Runner/Configs/Debug.xcconfig diff --git a/deprecated/undo/example/macos/Runner/Configs/Release.xcconfig b/packages/undo/example/macos/Runner/Configs/Release.xcconfig similarity index 100% rename from deprecated/undo/example/macos/Runner/Configs/Release.xcconfig rename to packages/undo/example/macos/Runner/Configs/Release.xcconfig diff --git a/deprecated/undo/example/macos/Runner/Configs/Warnings.xcconfig b/packages/undo/example/macos/Runner/Configs/Warnings.xcconfig similarity index 100% rename from deprecated/undo/example/macos/Runner/Configs/Warnings.xcconfig rename to packages/undo/example/macos/Runner/Configs/Warnings.xcconfig diff --git a/deprecated/undo/example/macos/Runner/DebugProfile.entitlements b/packages/undo/example/macos/Runner/DebugProfile.entitlements similarity index 100% rename from deprecated/undo/example/macos/Runner/DebugProfile.entitlements rename to packages/undo/example/macos/Runner/DebugProfile.entitlements diff --git a/deprecated/undo/example/macos/Runner/Info.plist b/packages/undo/example/macos/Runner/Info.plist similarity index 100% rename from deprecated/undo/example/macos/Runner/Info.plist rename to packages/undo/example/macos/Runner/Info.plist diff --git a/deprecated/undo/example/macos/Runner/MainFlutterWindow.swift b/packages/undo/example/macos/Runner/MainFlutterWindow.swift similarity index 100% rename from deprecated/undo/example/macos/Runner/MainFlutterWindow.swift rename to packages/undo/example/macos/Runner/MainFlutterWindow.swift diff --git a/deprecated/undo/example/macos/Runner/Release.entitlements b/packages/undo/example/macos/Runner/Release.entitlements similarity index 100% rename from deprecated/undo/example/macos/Runner/Release.entitlements rename to packages/undo/example/macos/Runner/Release.entitlements diff --git a/deprecated/undo/example/macos/RunnerTests/RunnerTests.swift b/packages/undo/example/macos/RunnerTests/RunnerTests.swift similarity index 100% rename from deprecated/undo/example/macos/RunnerTests/RunnerTests.swift rename to packages/undo/example/macos/RunnerTests/RunnerTests.swift index 5418c9f..61f3bd1 100644 --- a/deprecated/undo/example/macos/RunnerTests/RunnerTests.swift +++ b/packages/undo/example/macos/RunnerTests/RunnerTests.swift @@ -1,5 +1,5 @@ -import FlutterMacOS import Cocoa +import FlutterMacOS import XCTest class RunnerTests: XCTestCase { diff --git a/deprecated/undo/example/pubspec.yaml b/packages/undo/example/pubspec.yaml similarity index 92% rename from deprecated/undo/example/pubspec.yaml rename to packages/undo/example/pubspec.yaml index afd7e00..63d9c4d 100644 --- a/deprecated/undo/example/pubspec.yaml +++ b/packages/undo/example/pubspec.yaml @@ -10,13 +10,14 @@ dependencies: flutter: sdk: flutter -dev_dependencies: - flutter_test: - sdk: flutter - undo: path: ../ +dev_dependencies: + flutter_lints: ^6.0.0 + flutter_test: + sdk: flutter + flutter: uses-material-design: true diff --git a/deprecated/undo/example/web/favicon.png b/packages/undo/example/web/favicon.png similarity index 100% rename from deprecated/undo/example/web/favicon.png rename to packages/undo/example/web/favicon.png diff --git a/deprecated/undo/example/web/icons/Icon-192.png b/packages/undo/example/web/icons/Icon-192.png similarity index 100% rename from deprecated/undo/example/web/icons/Icon-192.png rename to packages/undo/example/web/icons/Icon-192.png diff --git a/deprecated/undo/example/web/icons/Icon-512.png b/packages/undo/example/web/icons/Icon-512.png similarity index 100% rename from deprecated/undo/example/web/icons/Icon-512.png rename to packages/undo/example/web/icons/Icon-512.png diff --git a/deprecated/undo/example/web/icons/Icon-maskable-192.png b/packages/undo/example/web/icons/Icon-maskable-192.png similarity index 100% rename from deprecated/undo/example/web/icons/Icon-maskable-192.png rename to packages/undo/example/web/icons/Icon-maskable-192.png diff --git a/deprecated/undo/example/web/icons/Icon-maskable-512.png b/packages/undo/example/web/icons/Icon-maskable-512.png similarity index 100% rename from deprecated/undo/example/web/icons/Icon-maskable-512.png rename to packages/undo/example/web/icons/Icon-maskable-512.png diff --git a/packages/undo/example/web/index.html b/packages/undo/example/web/index.html new file mode 100644 index 0000000..d9291fd --- /dev/null +++ b/packages/undo/example/web/index.html @@ -0,0 +1,38 @@ + + + + + + + + + + + + + + + + + + + + undo_example + + + + + + diff --git a/deprecated/undo/example/web/manifest.json b/packages/undo/example/web/manifest.json similarity index 93% rename from deprecated/undo/example/web/manifest.json rename to packages/undo/example/web/manifest.json index 096edf8..b88ba2e 100644 --- a/deprecated/undo/example/web/manifest.json +++ b/packages/undo/example/web/manifest.json @@ -1,6 +1,6 @@ { - "name": "example", - "short_name": "example", + "name": "undo_example", + "short_name": "undo_example", "start_url": ".", "display": "standalone", "background_color": "#0175C2", diff --git a/deprecated/undo/example/windows/.gitignore b/packages/undo/example/windows/.gitignore similarity index 100% rename from deprecated/undo/example/windows/.gitignore rename to packages/undo/example/windows/.gitignore diff --git a/deprecated/undo/example/windows/CMakeLists.txt b/packages/undo/example/windows/CMakeLists.txt similarity index 100% rename from deprecated/undo/example/windows/CMakeLists.txt rename to packages/undo/example/windows/CMakeLists.txt diff --git a/deprecated/undo/example/windows/flutter/CMakeLists.txt b/packages/undo/example/windows/flutter/CMakeLists.txt similarity index 100% rename from deprecated/undo/example/windows/flutter/CMakeLists.txt rename to packages/undo/example/windows/flutter/CMakeLists.txt diff --git a/deprecated/undo/example/windows/flutter/generated_plugin_registrant.cc b/packages/undo/example/windows/flutter/generated_plugin_registrant.cc similarity index 100% rename from deprecated/undo/example/windows/flutter/generated_plugin_registrant.cc rename to packages/undo/example/windows/flutter/generated_plugin_registrant.cc diff --git a/deprecated/undo/example/windows/flutter/generated_plugin_registrant.h b/packages/undo/example/windows/flutter/generated_plugin_registrant.h similarity index 100% rename from deprecated/undo/example/windows/flutter/generated_plugin_registrant.h rename to packages/undo/example/windows/flutter/generated_plugin_registrant.h diff --git a/deprecated/undo/example/windows/flutter/generated_plugins.cmake b/packages/undo/example/windows/flutter/generated_plugins.cmake similarity index 100% rename from deprecated/undo/example/windows/flutter/generated_plugins.cmake rename to packages/undo/example/windows/flutter/generated_plugins.cmake diff --git a/deprecated/undo/example/windows/runner/CMakeLists.txt b/packages/undo/example/windows/runner/CMakeLists.txt similarity index 100% rename from deprecated/undo/example/windows/runner/CMakeLists.txt rename to packages/undo/example/windows/runner/CMakeLists.txt diff --git a/deprecated/undo/example/windows/runner/Runner.rc b/packages/undo/example/windows/runner/Runner.rc similarity index 100% rename from deprecated/undo/example/windows/runner/Runner.rc rename to packages/undo/example/windows/runner/Runner.rc diff --git a/deprecated/undo/example/windows/runner/flutter_window.cpp b/packages/undo/example/windows/runner/flutter_window.cpp similarity index 100% rename from deprecated/undo/example/windows/runner/flutter_window.cpp rename to packages/undo/example/windows/runner/flutter_window.cpp diff --git a/deprecated/undo/example/windows/runner/flutter_window.h b/packages/undo/example/windows/runner/flutter_window.h similarity index 100% rename from deprecated/undo/example/windows/runner/flutter_window.h rename to packages/undo/example/windows/runner/flutter_window.h diff --git a/deprecated/undo/example/windows/runner/main.cpp b/packages/undo/example/windows/runner/main.cpp similarity index 100% rename from deprecated/undo/example/windows/runner/main.cpp rename to packages/undo/example/windows/runner/main.cpp diff --git a/deprecated/undo/example/windows/runner/resource.h b/packages/undo/example/windows/runner/resource.h similarity index 100% rename from deprecated/undo/example/windows/runner/resource.h rename to packages/undo/example/windows/runner/resource.h diff --git a/deprecated/undo/example/windows/runner/resources/app_icon.ico b/packages/undo/example/windows/runner/resources/app_icon.ico similarity index 100% rename from deprecated/undo/example/windows/runner/resources/app_icon.ico rename to packages/undo/example/windows/runner/resources/app_icon.ico diff --git a/deprecated/undo/example/windows/runner/runner.exe.manifest b/packages/undo/example/windows/runner/runner.exe.manifest similarity index 100% rename from deprecated/undo/example/windows/runner/runner.exe.manifest rename to packages/undo/example/windows/runner/runner.exe.manifest diff --git a/deprecated/undo/example/windows/runner/utils.cpp b/packages/undo/example/windows/runner/utils.cpp similarity index 100% rename from deprecated/undo/example/windows/runner/utils.cpp rename to packages/undo/example/windows/runner/utils.cpp diff --git a/deprecated/undo/example/windows/runner/utils.h b/packages/undo/example/windows/runner/utils.h similarity index 100% rename from deprecated/undo/example/windows/runner/utils.h rename to packages/undo/example/windows/runner/utils.h diff --git a/deprecated/undo/example/windows/runner/win32_window.cpp b/packages/undo/example/windows/runner/win32_window.cpp similarity index 100% rename from deprecated/undo/example/windows/runner/win32_window.cpp rename to packages/undo/example/windows/runner/win32_window.cpp diff --git a/deprecated/undo/example/windows/runner/win32_window.h b/packages/undo/example/windows/runner/win32_window.h similarity index 100% rename from deprecated/undo/example/windows/runner/win32_window.h rename to packages/undo/example/windows/runner/win32_window.h diff --git a/deprecated/undo/lib/src/change.dart b/packages/undo/lib/src/change.dart similarity index 100% rename from deprecated/undo/lib/src/change.dart rename to packages/undo/lib/src/change.dart diff --git a/deprecated/undo/lib/src/simple_stack.dart b/packages/undo/lib/src/simple_stack.dart similarity index 100% rename from deprecated/undo/lib/src/simple_stack.dart rename to packages/undo/lib/src/simple_stack.dart diff --git a/deprecated/undo/lib/src/undo_stack.dart b/packages/undo/lib/src/undo_stack.dart similarity index 100% rename from deprecated/undo/lib/src/undo_stack.dart rename to packages/undo/lib/src/undo_stack.dart diff --git a/deprecated/undo/lib/undo.dart b/packages/undo/lib/undo.dart similarity index 100% rename from deprecated/undo/lib/undo.dart rename to packages/undo/lib/undo.dart diff --git a/packages/undo/pubspec.yaml b/packages/undo/pubspec.yaml new file mode 100644 index 0000000..1ff0cb3 --- /dev/null +++ b/packages/undo/pubspec.yaml @@ -0,0 +1,14 @@ +name: undo +description: A Undo/Redo Library for Flutter +version: 1.6.0 +homepage: https://github.com/rodydavis/packages.dart +repository: https://github.com/rodydavis/packages.dart +maintainer: Rody Davis (@rodydavis) +resolution: workspace + +environment: + sdk: ^3.5.0 + +dev_dependencies: + lints: ^6.0.0 + test: ^1.24.9 diff --git a/deprecated/undo/test/undo_test.dart b/packages/undo/test/undo_test.dart similarity index 100% rename from deprecated/undo/test/undo_test.dart rename to packages/undo/test/undo_test.dart diff --git a/pubspec.lock b/pubspec.lock index 3c88e5b..47325c7 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -17,14 +17,6 @@ packages: url: "https://pub.dev" source: hosted version: "8.4.1" - archive: - dependency: transitive - description: - name: archive - sha256: "2fde1607386ab523f7a36bb3e7edb43bd58e6edaf2ffb29d8a6d578b297fdbbd" - url: "https://pub.dev" - source: hosted - version: "4.0.7" args: dependency: transitive description: @@ -49,38 +41,6 @@ packages: url: "https://pub.dev" source: hosted version: "2.1.2" - build: - dependency: transitive - description: - name: build - sha256: "275bf6bb2a00a9852c28d4e0b410da1d833a734d57d39d44f94bfc895a484ec3" - url: "https://pub.dev" - source: hosted - version: "4.0.4" - build_config: - dependency: transitive - description: - name: build_config - sha256: "4f64382b97504dc2fcdf487d5aae33418e08b4703fc21249e4db6d804a4d0187" - url: "https://pub.dev" - source: hosted - version: "1.2.0" - build_daemon: - dependency: transitive - description: - name: build_daemon - sha256: bf05f6e12cfea92d3c09308d7bcdab1906cd8a179b023269eed00c071004b957 - url: "https://pub.dev" - source: hosted - version: "4.1.1" - build_runner: - dependency: transitive - description: - name: build_runner - sha256: b4d854962a32fd9f8efc0b76f98214790b833af8b2e9b2df6bfc927c0415a072 - url: "https://pub.dev" - source: hosted - version: "2.10.5" built_collection: dependency: transitive description: @@ -93,10 +53,10 @@ packages: dependency: transitive description: name: built_value - sha256: "120df83d4a4ce6bed06ad653c0a3e85737e0f66664f31e17a55136ff5a738cde" + sha256: "7931c90b84bc573fef103548e354258ae4c9d28d140e41961df6843c5d60d4d8" url: "https://pub.dev" source: hosted - version: "8.12.2" + version: "8.12.3" characters: dependency: transitive description: @@ -105,22 +65,6 @@ packages: url: "https://pub.dev" source: hosted version: "1.4.0" - charcode: - dependency: transitive - description: - name: charcode - sha256: fb0f1107cac15a5ea6ef0a6ef71a807b9e4267c713bb93e00e92d737cc8dbd8a - url: "https://pub.dev" - source: hosted - version: "1.4.0" - checked_yaml: - dependency: transitive - description: - name: checked_yaml - sha256: "959525d3162f249993882720d52b7e0c833978df229be20702b33d48d91de70f" - url: "https://pub.dev" - source: hosted - version: "2.0.4" cli_config: dependency: transitive description: @@ -129,14 +73,6 @@ packages: url: "https://pub.dev" source: hosted version: "0.2.0" - cli_util: - dependency: transitive - description: - name: cli_util - sha256: ff6785f7e9e3c38ac98b2fb035701789de90154024a75b6cb926445e83197d1c - url: "https://pub.dev" - source: hosted - version: "0.4.2" clock: dependency: transitive description: @@ -185,14 +121,6 @@ packages: url: "https://pub.dev" source: hosted version: "3.0.7" - cupertino_icons: - dependency: transitive - description: - name: cupertino_icons - sha256: ba631d1c7f7bef6b729a622b7b752645a2d076dba9976925b8f25725a30e1ee6 - url: "https://pub.dev" - source: hosted - version: "1.0.8" dart_style: dependency: transitive description: @@ -201,30 +129,6 @@ packages: url: "https://pub.dev" source: hosted version: "3.1.3" - diff_match_patch: - dependency: transitive - description: - name: diff_match_patch - sha256: "2efc9e6e8f449d0abe15be240e2c2a3bcd977c8d126cfd70598aee60af35c0a4" - url: "https://pub.dev" - source: hosted - version: "0.4.1" - drift: - dependency: transitive - description: - name: drift - sha256: "5ea2f718558c0b31d4b8c36a3d8e5b7016f1265f46ceb5a5920e16117f0c0d6a" - url: "https://pub.dev" - source: hosted - version: "2.30.1" - drift_dev: - dependency: transitive - description: - name: drift_dev - sha256: "892dfb5d69d9e604bdcd102a9376de8b41768cf7be93fd26b63cfc4d8f91ad5f" - url: "https://pub.dev" - source: hosted - version: "2.30.1" fake_async: dependency: transitive description: @@ -233,22 +137,6 @@ packages: url: "https://pub.dev" source: hosted version: "1.3.3" - fetch_api: - dependency: transitive - description: - name: fetch_api - sha256: "24cbd5616f3d4008c335c197bb90bfa0eb43b9e55c6de5c60d1f805092636034" - url: "https://pub.dev" - source: hosted - version: "2.3.1" - fetch_client: - dependency: transitive - description: - name: fetch_client - sha256: "3766964cc49ad1d007c261d7acecea61a73581e31fdbd948b446025851766bc8" - url: "https://pub.dev" - source: hosted - version: "1.2.0" ffi: dependency: transitive description: @@ -312,14 +200,6 @@ packages: url: "https://pub.dev" source: hosted version: "4.0.0" - glados: - dependency: transitive - description: - name: glados - sha256: c39446c0c4fe83a6ee6ee4fdee5a1afa27050619c7df390bf4c3b77b6f1acb33 - url: "https://pub.dev" - source: hosted - version: "1.1.7" glob: dependency: transitive description: @@ -336,30 +216,6 @@ packages: url: "https://pub.dev" source: hosted version: "2.3.2" - hlc_dart: - dependency: transitive - description: - name: hlc_dart - sha256: dfc02210151e98a42a762df00e669b7e2654614b59ccc664e50ac9573bbacc5e - url: "https://pub.dev" - source: hosted - version: "1.0.0" - http: - dependency: transitive - description: - name: http - sha256: "87721a4a50b19c7f1d49001e51409bddc46303966ce89a65af4f4e6004896412" - url: "https://pub.dev" - source: hosted - version: "1.6.0" - http_interceptor: - dependency: transitive - description: - name: http_interceptor - sha256: "288c6ded4a2c66de2730a16b30cbd29d05d042a5e61304d9b4be0e16378f4082" - url: "https://pub.dev" - source: hosted - version: "2.0.0" http_multi_server: dependency: transitive description: @@ -392,14 +248,6 @@ packages: url: "https://pub.dev" source: hosted version: "0.7.2" - json_annotation: - dependency: transitive - description: - name: json_annotation - sha256: "1ce844379ca14835a50d2f019a3099f419082cfdd231cd86a142af94dd5c6bb1" - url: "https://pub.dev" - source: hosted - version: "4.9.0" leak_tracker: dependency: transitive description: @@ -476,18 +324,10 @@ packages: dependency: transitive description: name: mime - sha256: "801fd0b26f14a4a58ccb09d5892c3fbdeff209594300a542492cf13fba9d247a" + sha256: "41a20518f0cb1256669420fdba0cd90d21561e560ac240f26ef8322e45bb7ed6" url: "https://pub.dev" source: hosted - version: "1.0.6" - mockito: - dependency: transitive - description: - name: mockito - sha256: a45d1aa065b796922db7b9e7e7e45f921aed17adf3a8318a1f47097e7e695566 - url: "https://pub.dev" - source: hosted - version: "5.6.3" + version: "2.0.0" node_preamble: dependency: transitive description: @@ -560,14 +400,6 @@ packages: url: "https://pub.dev" source: hosted version: "2.1.8" - pocketbase: - dependency: transitive - description: - name: pocketbase - sha256: b94e63f00ce29c5f465e8122ae63cdf4e3c37f9b3dc6d04f0dfe6625bcdb8839 - url: "https://pub.dev" - source: hosted - version: "0.23.2" pool: dependency: transitive description: @@ -576,14 +408,6 @@ packages: url: "https://pub.dev" source: hosted version: "1.5.2" - posix: - dependency: transitive - description: - name: posix - sha256: "6323a5b0fa688b6a010df4905a56b00181479e6d10534cecfecede2aa55add61" - url: "https://pub.dev" - source: hosted - version: "6.0.3" pub_semver: dependency: transitive description: @@ -592,22 +416,6 @@ packages: url: "https://pub.dev" source: hosted version: "2.2.0" - pubspec_parse: - dependency: transitive - description: - name: pubspec_parse - sha256: "0560ba233314abbed0a48a2956f7f022cce7c3e1e73df540277da7544cad4082" - url: "https://pub.dev" - source: hosted - version: "1.5.0" - recase: - dependency: transitive - description: - name: recase - sha256: e4eb4ec2dcdee52dcf99cb4ceabaffc631d7424ee55e56f280bc039737f89213 - url: "https://pub.dev" - source: hosted - version: "4.1.0" shared_preferences: dependency: transitive description: @@ -701,14 +509,6 @@ packages: description: flutter source: sdk version: "0.0.0" - source_gen: - dependency: transitive - description: - name: source_gen - sha256: "585bc140f20da42c584ece2df28f4d9ef2566955332b626f655957b3a8c8ad54" - url: "https://pub.dev" - source: hosted - version: "4.1.2" source_map_stack_trace: dependency: transitive description: @@ -733,22 +533,6 @@ packages: url: "https://pub.dev" source: hosted version: "1.10.1" - sqlite3: - dependency: transitive - description: - name: sqlite3 - sha256: "3145bd74dcdb4fd6f5c6dda4d4e4490a8087d7f286a14dee5d37087290f0f8a2" - url: "https://pub.dev" - source: hosted - version: "2.9.4" - sqlparser: - dependency: transitive - description: - name: sqlparser - sha256: f52f5d5649dcc13ed198c4176ddef74bf6851c30f4f31603f1b37788695b93e2 - url: "https://pub.dev" - source: hosted - version: "0.43.0" stack_trace: dependency: transitive description: @@ -765,14 +549,6 @@ packages: url: "https://pub.dev" source: hosted version: "2.1.4" - stream_transform: - dependency: transitive - description: - name: stream_transform - sha256: ad47125e588cfd37a9a7f86c7d6356dde8dfe89d071d293f80ca9e9273a33871 - url: "https://pub.dev" - source: hosted - version: "2.1.1" string_scanner: dependency: transitive description: @@ -873,10 +649,10 @@ packages: dependency: transitive description: name: url_launcher_web - sha256: "4bd2b7b4dc4d4d0b94e5babfffbca8eac1a126c7f3d6ecbc1a11013faa3abba2" + sha256: d0412fcf4c6b31ecfdb7762359b7206ffba3bbffd396c6d9f9c4616ece476c1f url: "https://pub.dev" source: hosted - version: "2.4.1" + version: "2.4.2" url_launcher_windows: dependency: transitive description: @@ -885,14 +661,6 @@ packages: url: "https://pub.dev" source: hosted version: "3.1.5" - uuid: - dependency: transitive - description: - name: uuid - sha256: a11b666489b1954e01d992f3d601b1804a33937b5a8fe677bd26b8a9f96f96e8 - url: "https://pub.dev" - source: hosted - version: "4.5.2" vector_math: dependency: transitive description: @@ -966,5 +734,5 @@ packages: source: hosted version: "3.1.3" sdks: - dart: ">=3.9.0 <4.0.0" + dart: ">=3.10.0 <4.0.0" flutter: ">=3.38.5" diff --git a/pubspec.yaml b/pubspec.yaml index 66fe264..7c52484 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -9,4 +9,5 @@ workspace: - packages/flutter_sms - packages/flutter_whatsnew - packages/breakpoint - - packages/app_review \ No newline at end of file + - packages/app_review + - packages/undo \ No newline at end of file