Skip to content

Commit

Permalink
Bump version
Browse files Browse the repository at this point in the history
  • Loading branch information
djade007 committed Sep 21, 2022
1 parent bf7ea73 commit bb1c280
Show file tree
Hide file tree
Showing 7 changed files with 13 additions and 10 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
## 0.13.0
- add public_id option

## 0.12.0
- Update dependencies

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ secretKey.

## Getting started

Add the dependency `cloudinary_public: ^0.11.0` to your project:
Add the dependency `cloudinary_public: ^0.13.0` to your project:

```dart
import 'package:cloudinary_public/cloudinary_public.dart';
Expand Down
12 changes: 7 additions & 5 deletions example/lib/src/image_picker_example.dart
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,12 @@ class ImagePickerExample extends StatefulWidget {

class _ImagePickerExampleState extends State<ImagePickerExample> {
final picker = ImagePicker();
PickedFile _pickedFile;
XFile? _pickedFile;
bool _uploading = false;
double _uploadingPercentage = 0.0;

Future getImage() async {
final image = await picker.getImage(source: ImageSource.gallery);
final image = await picker.pickImage(source: ImageSource.gallery);

setState(() {
if (image != null) {
Expand Down Expand Up @@ -64,14 +64,16 @@ class _ImagePickerExampleState extends State<ImagePickerExample> {
}

Future<void> _upload() async {
if(_pickedFile == null) return;

setState(() {
_uploading = true;
});

try {
final res = await cloudinary.uploadFile(
CloudinaryFile.fromFile(
_pickedFile.path,
_pickedFile!.path,
folder: 'hello-folder',
context: {
'alt': 'Hello',
Expand All @@ -98,8 +100,8 @@ class _ImagePickerExampleState extends State<ImagePickerExample> {

Widget _buildImage() {
if (kIsWeb) {
return Image.network(_pickedFile.path);
return Image.network(_pickedFile!.path);
}
return Image.file(File(_pickedFile.path));
return Image.file(File(_pickedFile!.path));
}
}
2 changes: 1 addition & 1 deletion example/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev
version: 1.0.0+1

environment:
sdk: ">=2.7.0 <3.0.0"
sdk: ">=2.12.0 <3.0.0"

dependencies:
flutter:
Expand Down
1 change: 0 additions & 1 deletion lib/src/cloudinary_file.dart
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import 'package:cloudinary_public/cloudinary_public.dart';
import 'package:flutter/foundation.dart';
import 'package:flutter/services.dart';
import 'package:http/http.dart' as http;

/// The recognised file class to be used for this package
Expand Down
1 change: 0 additions & 1 deletion lib/src/cloudinary_public.dart
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import 'package:cloudinary_public/src/progress_callback.dart';
import 'package:flutter/foundation.dart';
import 'package:http/http.dart' as http;

import '../cloudinary_public.dart';
import 'multipart_request.dart';

/// The base class for this package
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: cloudinary_public
description: This package allows you to upload media files directly to cloudinary, without exposing your apiKey or secretKey.
version: 0.12.0
version: 0.13.0
homepage: https://github.com/djade007/cloudinary_public

environment:
Expand Down

0 comments on commit bb1c280

Please sign in to comment.