-
Notifications
You must be signed in to change notification settings - Fork 227
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
π¨ Add melos and support platform interface (#242)
* π¨ Add melos * π¨ Split platform interface * π Fix iOS error * π For build iOS and android CI * π¨ Add ChangeLog/LICENSE/README for repos * π¨ common implement the main plugin * π Update XFile * π¨ Update melos config * π Update CI * π Update CI for publish * π Update CI
- Loading branch information
1 parent
06edaf8
commit 4f849a6
Showing
196 changed files
with
2,154 additions
and
131 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,19 @@ | ||
# CONTRIBUTING | ||
|
||
Please submit changes to the main branch, and make sure your code is willing to comply with MIT style. | ||
|
||
## About development | ||
|
||
The repo is manage by [melos][], so you need to install it first. | ||
|
||
```bash | ||
dart pub global activate melos | ||
``` | ||
|
||
Then you can run `melos bootstrap` to install all dependencies. | ||
|
||
```bash | ||
melos bootstrap | ||
``` | ||
|
||
[melos]: https://melos.invertase.dev |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
name: flutter_image_compress | ||
repository: https://github.com/fluttercandies/flutter_image_compress | ||
|
||
packages: | ||
- packages/** | ||
|
||
scripts: | ||
analyze: | ||
exec: dart analyze . | ||
get: | ||
exec: flutter pub get | ||
test: | ||
exec: flutter test | ||
format: | ||
exec: dart format --set-exit-if-changed . | ||
try_build_apk: | ||
exec: flutter build apk --debug | ||
packageFilters: | ||
fileExists: lib/main.dart | ||
try_build_ios: | ||
exec: | | ||
flutter pub get | ||
flutter build ios --debug --no-codesign | ||
packageFilters: | ||
fileExists: lib/main.dart | ||
cp_files: | ||
exec: | | ||
if [ -f "../../LICENSE" ]; then | ||
cp ../../LICENSE LICENSE | ||
fi | ||
if [ -f "../../README.md" ]; then | ||
cp ../../README.md README.md | ||
fi | ||
sdkPath: auto | ||
|
||
command: | ||
version: | ||
releaseUrl: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
# Migrate document | ||
|
||
## 1.x to 2.x | ||
|
||
There are several changes | ||
|
||
- The return value of `File` is now changed to the `XFile` type of [cross_file][], so you need to change the code to `XFile`. | ||
|
||
1.0: | ||
|
||
```dart | ||
final File file = FlutterImageCompress.compressAndGetFile( | ||
file.absolute.path, | ||
targetPath, | ||
quality: 90, | ||
minWidth: 1024, | ||
minHeight: 1024, | ||
rotate: 90, | ||
); | ||
int length = file.lengthSync(); | ||
Uint8List buffer = file.readAsBytesSync(); | ||
``` | ||
|
||
2.0: | ||
|
||
```dart | ||
final XFile file = await FlutterImageCompress.compressAndGetFile( | ||
file.absolute.path, | ||
targetPath, | ||
quality: 90, | ||
minWidth: 1024, | ||
minHeight: 1024, | ||
rotate: 90, | ||
); | ||
int length = await file.length(); | ||
Uint8List buffer = await file.readAsBytes(); | ||
``` | ||
|
||
Other usage of `XFile` to see [document][xfile] | ||
|
||
[cross_file]: https://pub.dev/packages/cross_file | ||
[xfile]: https://pub.dev/documentation/cross_file/latest/cross_file/XFile-class.html |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
# Miscellaneous | ||
*.class | ||
*.log | ||
*.pyc | ||
*.swp | ||
.DS_Store | ||
.atom/ | ||
.buildlog/ | ||
.history | ||
.svn/ | ||
|
||
# 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 | ||
**/doc/api/ | ||
.dart_tool/ | ||
.flutter-plugins | ||
.flutter-plugins-dependencies | ||
.packages | ||
.pub-cache/ | ||
.pub/ | ||
|
||
# Exceptions to above rules. | ||
!**/ios/**/default.mode1v3 | ||
!**/ios/**/default.mode2v3 | ||
!**/ios/**/default.pbxuser | ||
!**/ios/**/default.perspectivev3 | ||
!/packages/flutter_tools/test/data/dart_dependencies_test/**/.packages | ||
*.lock | ||
.env | ||
example/macos/Flutter/ephemeral/flutter_export_environment.sh |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
MIT License | ||
|
||
Copyright (c) 2023 FlutterCandies | ||
|
||
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. |
Oops, something went wrong.