Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions lib/widgets/base.dart
Original file line number Diff line number Diff line change
Expand Up @@ -89,8 +89,10 @@ abstract class DocumentSelfieVerificationState
return;
}
await rotateCamera(controller!);

unawaited(controller?.setFlashMode(FlashMode.off));
bool isTorchAvailable = await TorchLight.isTorchAvailable();
if (isTorchAvailable) {
unawaited(controller?.setFlashMode(FlashMode.off));
}
unawaited(controller?.setFocusMode(FocusMode.auto));
if (!isSelfie) {
unawaited(controller?.setZoomLevel(_currentScale));
Expand Down
3 changes: 2 additions & 1 deletion lib/widgets/widgets.dart
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,10 @@ import 'package:camera/camera.dart';
import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart';
import 'package:flutter_svg/flutter_svg.dart';
import '../enums/enums.dart';
import 'package:flutter/services.dart';
import 'package:logger/logger.dart';
import 'package:torch_light/torch_light.dart';
import '../enums/enums.dart';

part 'custom_paint.dart';
part 'document_selfie_verification.dart';
Expand Down
13 changes: 8 additions & 5 deletions pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
name: document_selfie_verification
description: This widget provides a comprehensive solution for capturing and verifying both documents and selfies within a Flutter application. It seamlessly integrates camera access, image processing, and validation features to ensure a smooth user experience.
version: 0.0.42
description: This widget provides a comprehensive solution for capturing and
verifying both documents and selfies within a Flutter application. It
seamlessly integrates camera access, image processing, and validation features
to ensure a smooth user experience.
version: 0.0.43
homepage: https://github.com/tyba-co/document_selfie_verification

environment:
Expand All @@ -15,16 +18,16 @@ dependencies:
flutter_svg: ^2.0.9
image: ^4.1.6
logger: ^2.0.2+1
torch_light: ^1.1.0

dev_dependencies:
flutter_lints: ^2.0.0
flutter_test:
sdk: flutter
flutter_lints: ^2.0.0

# For information on the generic Dart part of this file, see the
# following page: https://dart.dev/tools/pub/pubspec

# The following section is specific to Flutter packages.
flutter:
assets:
- assets/
- assets/