diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..7272b82 --- /dev/null +++ b/.gitignore @@ -0,0 +1,31 @@ +# Miscellaneous +*.class +*.log +*.pyc +*.swp +.DS_Store +.atom/ +.buildlog/ +.history +.svn/ +migrate_working_dir/ + +# IntelliJ related +*.iml +*.ipr +*.iws +.idea/ + +# The .vscode folder contains launch configuration and tasks you configure in +# VS Code which you may wish to be included in version control, so this line +# is commented out by default. +#.vscode/ + +# Flutter/Dart/Pub related +# Libraries should not include pubspec.lock, per https://dart.dev/guides/libraries/private-files#pubspeclock. +/pubspec.lock +**/doc/api/ +.dart_tool/ +build/ + +.fvm/ diff --git a/.metadata b/.metadata new file mode 100644 index 0000000..24472f1 --- /dev/null +++ b/.metadata @@ -0,0 +1,10 @@ +# 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: "2663184aa79047d0a33a14a3b607954f8fdd8730" + channel: "stable" + +project_type: package diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..32f490b --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,3 @@ +## 1.0.0 + +* Initial release diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..cb89983 --- /dev/null +++ b/LICENSE @@ -0,0 +1,7 @@ +Copyright 2024 LunaONE GmbH + +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. \ No newline at end of file diff --git a/README.md b/README.md new file mode 100644 index 0000000..838a657 --- /dev/null +++ b/README.md @@ -0,0 +1 @@ +A base interface for `ValueListenable`-implementing classes which need to be `dispose`d after usage. \ No newline at end of file diff --git a/analysis_options.yaml b/analysis_options.yaml new file mode 100644 index 0000000..a5744c1 --- /dev/null +++ b/analysis_options.yaml @@ -0,0 +1,4 @@ +include: package:flutter_lints/flutter.yaml + +# Additional information about this file can be found at +# https://dart.dev/guides/language/analysis-options diff --git a/lib/disposable_value_listenable.dart b/lib/disposable_value_listenable.dart new file mode 100644 index 0000000..f9a3c85 --- /dev/null +++ b/lib/disposable_value_listenable.dart @@ -0,0 +1 @@ +export './src/disposable_value_listenable.dart'; diff --git a/lib/src/disposable_value_listenable.dart b/lib/src/disposable_value_listenable.dart new file mode 100644 index 0000000..cb3a755 --- /dev/null +++ b/lib/src/disposable_value_listenable.dart @@ -0,0 +1,6 @@ +import 'package:flutter/foundation.dart'; + +abstract class DisposableValueListenable implements ValueListenable { + @mustCallSuper + void dispose(); +} diff --git a/pubspec.yaml b/pubspec.yaml new file mode 100644 index 0000000..6117a50 --- /dev/null +++ b/pubspec.yaml @@ -0,0 +1,18 @@ +name: disposable_value_listenable +description: "Base interface for `ValueListenable`-implementing classes which need to be `dispose`d after usage." +version: 1.0.0 +repository: https://github.com/LunaONE/disposable_value_listenable + +environment: + sdk: ^3.0.0 + flutter: ">=1.17.0" + +dependencies: + flutter: + sdk: flutter + +dev_dependencies: + flutter_test: + sdk: flutter + + flutter_lints: ^4.0.0