Skip to content

Commit

Permalink
publish version 2.0.0 nullsafety
Browse files Browse the repository at this point in the history
  • Loading branch information
gabuldev committed Mar 1, 2021
1 parent f8f39b7 commit 6cd043b
Show file tree
Hide file tree
Showing 11 changed files with 66 additions and 118 deletions.
36 changes: 23 additions & 13 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,61 +1,71 @@
## 2.0.0-beta
# 2.0.0-nullsafety.2

- Add example on nullsafety

# 2.0.0-nullsafety

- Migration for nullsafety

# 2.0.0-beta

- Add Feature Zoom!
- Add Feature FlashMode
- Add Feature Change Camera, and seletec the CameraSide your prefer activated!
- CallBack for return File your photo, onFile(File yourFile)
- Removed return using Navigator.pop(context,file)
- Refactor in internal structure
## 1.1.1-beta

# 1.1.1-beta

- Update camera for 0.7.0+1
- Update path_provider for 1.6.27
- Update rxdart for 0.25.0
- Update video_player for 1.0.1
- Update wakelock for 2.1+1

## 1.1.0-beta
# 1.1.0-beta

- Update camera for 0.0.7

## 1.0.35
# 1.0.35

- upgrade packages

## 1.0.34
# 1.0.34

- disable button to switch camera
new parameters
- enableCameraChange
- initialCamera

## 1.0.33
# 1.0.33

- Front camera does not work when rotate icon is tapped

## 1.0.32
# 1.0.32

- Update rxDart

## 1.0.31
# 1.0.31

- Add site

## 1.0.30
# 1.0.30

- Fix Error when using CameraMode.normal

## 1.0.29
# 1.0.29

- Format Files.

## 1.0.28
# 1.0.28

- Migrate to AndroidX.

## 1.0.26
# 1.0.26

- Migrate from `screen` to `wakelock`.

## 1.0.24
# 1.0.24

- Update interval for use path_provider
67 changes: 32 additions & 35 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,35 +1,39 @@
# Camera_Camera 2.0


## New Features!
- Add Feature Zoom!
- Add Feature FlashMode
- Add Feature Change Camera, and seletec the CameraSide your prefer activated!
- CallBack for return File your photo, onFile(File yourFile)
- Removed return using Navigator.pop(context,file)
- Refactor in internal structure

![example](https://i.imgur.com/CWbwCoH.png=200x200)
- Add Feature Zoom!
- Add Feature FlashMode
- Add Feature Change Camera, and seletec the CameraSide your prefer activated!
- CallBack for return File your photo, onFile(File yourFile)
- Removed return using Navigator.pop(context,file)
- Refactor in internal structure

![example](https://i.imgur.com/CWbwCoH.png=200x200)

# Guide for instalation
## Android
You need add in **app/build.gradle**

## Android

You need add in **app/build.gradle**

```dart
minSdkVersion 21
```

## IOS
You need add in **info.plist**
```dart
<key>NSCameraUsageDescription</key>
<string>Can I use the camera please?</string>
<key>NSMicrophoneUsageDescription</key>
<string>Can I use the mic please?</string>
```
## IOS

You need add in **info.plist**

```dart
<key>NSCameraUsageDescription</key>
<string>Can I use the camera please?</string>
<key>NSMicrophoneUsageDescription</key>
<string>Can I use the mic please?</string>
```

## Flutter

Add package in pubspec.yaml

```yaml
Expand Down Expand Up @@ -78,29 +82,22 @@ return Scaffold(

## Roadmap 2.0

| Feature | Progress |
| :---------------------------------------- | :------: |
| Zoom ||
| Flash ||
| CameraSide select ||
| nullsafety support | |
| Add Exposure controll | |
| Add Easy Mode Video | |
| Add Gallery | |



| Feature | Progress |
| :-------------------- | :------: |
| Zoom ||
| Flash ||
| CameraSide select ||
| nullsafety support ||
| Add Exposure controll | |
| Add Easy Mode Video | |
| Add Gallery | |

## Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.



Please make sure to update tests as appropriate.



## License

[MIT](https://choosealicense.com/licenses/mit/)
[MIT](https://choosealicense.com/licenses/mit/)
2 changes: 1 addition & 1 deletion example/.flutter-plugins-dependencies
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"info":"This is a generated file; do not edit or check into version control.","plugins":{"ios":[{"name":"camera","path":"/Users/padrao/Developer/Setup/flutter/.pub-cache/hosted/pub.dartlang.org/camera-0.8.0-nullsafety.2/","dependencies":[]}],"android":[{"name":"camera","path":"/Users/padrao/Developer/Setup/flutter/.pub-cache/hosted/pub.dartlang.org/camera-0.8.0-nullsafety.2/","dependencies":[]}],"macos":[],"linux":[],"windows":[],"web":[]},"dependencyGraph":[{"name":"camera","dependencies":[]}],"date_created":"2021-02-28 20:45:36.177162","version":"1.26.0-17.8.pre"}
{"info":"This is a generated file; do not edit or check into version control.","plugins":{"ios":[{"name":"camera","path":"/Users/padrao/Developer/Setup/flutter/.pub-cache/hosted/pub.dartlang.org/camera-0.8.0-nullsafety.2/","dependencies":[]}],"android":[{"name":"camera","path":"/Users/padrao/Developer/Setup/flutter/.pub-cache/hosted/pub.dartlang.org/camera-0.8.0-nullsafety.2/","dependencies":[]}],"macos":[],"linux":[],"windows":[],"web":[]},"dependencyGraph":[{"name":"camera","dependencies":[]}],"date_created":"2021-02-28 23:18:53.353459","version":"1.26.0-17.8.pre"}
2 changes: 1 addition & 1 deletion example/lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ class MyApp extends StatelessWidget {
}

class MyHomePage extends StatefulWidget {
MyHomePage({Key key, this.title}) : super(key: key);
MyHomePage({Key? key, required this.title}) : super(key: key);

final String title;

Expand Down
52 changes: 0 additions & 52 deletions example/lib/widgets/focus_widget.dart

This file was deleted.

8 changes: 4 additions & 4 deletions example/pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@ packages:
camera_camera:
dependency: "direct main"
description:
path: ".."
relative: true
source: path
version: "2.0.0-beta"
name: camera_camera
url: "https://pub.dartlang.org"
source: hosted
version: "2.0.0-nullsafety"
camera_platform_interface:
dependency: transitive
description:
Expand Down
6 changes: 2 additions & 4 deletions example/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ description: A new Flutter project.
version: 1.0.0+1

environment:
sdk: ">=2.1.0 <3.0.0"
sdk: ">=2.12.0-0.0 <3.0.0"

dependencies:
flutter:
Expand All @@ -23,9 +23,7 @@ dependencies:
# The following adds the Cupertino Icons font to your application.
# Use with the CupertinoIcons class for iOS style icons.
cupertino_icons: ^0.1.2
camera_camera:
path: ../

camera_camera: 2.0.0-nullsafety.2
dev_dependencies:
flutter_test:
sdk: flutter
Expand Down
5 changes: 2 additions & 3 deletions lib/src/presentation/controller/camera_camera_controller.dart
Original file line number Diff line number Diff line change
Expand Up @@ -140,9 +140,8 @@ class CameraCameraController {

void takePhoto() async {
final file = await _controller.takePicture();
if (onPath != null) {
onPath(file.path);
}

onPath(file.path);
}

Widget buildPreview() => _controller.buildPreview();
Expand Down
1 change: 0 additions & 1 deletion lib/src/presentation/controller/camera_camera_status.dart
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import 'package:camera/camera.dart';
import 'package:camera_camera/src/shared/entities/camera.dart';
import 'package:flutter/material.dart';

abstract class CameraCameraStatus {}

Expand Down
3 changes: 0 additions & 3 deletions lib/src/shared/entities/camera_side.dart
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,12 @@ extension CameraSideExt on CameraSide {
case CameraSide.back:
return CameraLensDirection.back;

break;
case CameraSide.external:
return CameraLensDirection.external;

break;
case CameraSide.front:
return CameraLensDirection.front;

break;
default:
throw "INVALID CameraLensDirection";
}
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: camera_camera
description: The easy plugin camera for your project, platforms Android and iOS.
version: 2.0.0-beta
version: 2.0.0-nullsafety.2
repository: https://github.com/gabuldev/camera_camera
homepage: https://gabul.dev/

Expand Down

0 comments on commit 6cd043b

Please sign in to comment.