Toggle navigation
Toggle navigation
This project
Loading...
Sign in
flutter_package
/
mobile_scanner
Go to a project
Toggle navigation
Projects
Groups
Snippets
Help
Toggle navigation pinning
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Authored by
Navaron Bracke
2023-11-07 15:22:25 +0100
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
5948daed13022d2e4f879c3f774bd96b28f1b0f3
5948daed
1 parent
ac9da02b
replace mobile_scanner_arguments with a platform agnostic equivalent
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
53 additions
and
31 deletions
lib/mobile_scanner.dart
lib/src/method_channel/mobile_scanner_texture_view_attributes.dart
lib/src/mobile_scanner_view_attributes.dart
lib/src/objects/mobile_scanner_arguments.dart
lib/src/web/mobile_scanner_html_view_attributes.dart
lib/mobile_scanner.dart
View file @
5948dae
...
...
@@ -21,7 +21,6 @@ export 'src/objects/contact_info.dart';
export
'src/objects/driver_license.dart'
;
export
'src/objects/email.dart'
;
export
'src/objects/geo_point.dart'
;
export
'src/objects/mobile_scanner_arguments.dart'
;
export
'src/objects/person_name.dart'
;
export
'src/objects/phone.dart'
;
export
'src/objects/sms.dart'
;
...
...
lib/src/method_channel/mobile_scanner_texture_view_attributes.dart
0 → 100644
View file @
5948dae
import
'package:flutter/widgets.dart'
;
import
'package:mobile_scanner/src/mobile_scanner_view_attributes.dart'
;
/// An implementation for [MobileScannerViewAttributes] for platforms that provide a [Texture].
class
MobileScannerTextureViewAttributes
implements
MobileScannerViewAttributes
{
const
MobileScannerTextureViewAttributes
({
required
this
.
textureId
,
required
this
.
hasTorch
,
required
this
.
size
,
});
/// The id of the [Texture].
final
int
textureId
;
@override
final
bool
hasTorch
;
@override
final
Size
size
;
}
...
...
lib/src/mobile_scanner_view_attributes.dart
0 → 100644
View file @
5948dae
import
'dart:ui'
;
/// This interface defines the attributes for the mobile scanner view.
abstract
class
MobileScannerViewAttributes
{
/// Whether the current active camera has a torch.
bool
get
hasTorch
;
/// The size of the camera output.
Size
get
size
;
}
...
...
lib/src/objects/mobile_scanner_arguments.dart
deleted
100644 → 0
View file @
ac9da02
import
'package:flutter/material.dart'
;
/// The start arguments of the scanner.
class
MobileScannerArguments
{
/// The output size of the camera.
/// This value can be used to draw a box in the image.
final
Size
size
;
/// A bool which is true if the device has a torch.
final
bool
hasTorch
;
/// The texture id of the capture used internally.
final
int
?
textureId
;
/// The texture id of the capture used internally if device is web.
final
String
?
webId
;
/// Indicates how many cameras are available.
///
/// Currently only supported on Android.
final
int
?
numberOfCameras
;
MobileScannerArguments
({
required
this
.
size
,
required
this
.
hasTorch
,
this
.
textureId
,
this
.
webId
,
this
.
numberOfCameras
,
});
}
lib/src/web/mobile_scanner_html_view_attributes.dart
0 → 100644
View file @
5948dae
import
'package:flutter/widgets.dart'
;
import
'package:mobile_scanner/src/mobile_scanner_view_attributes.dart'
;
/// An implementation for [MobileScannerViewAttributes] for the web.
class
MobileScannerHtmlViewAttributes
implements
MobileScannerViewAttributes
{
const
MobileScannerHtmlViewAttributes
({
required
this
.
htmlElementViewType
,
required
this
.
hasTorch
,
required
this
.
size
,
});
@override
final
bool
hasTorch
;
/// The [HtmlElementView.viewType] for the underlying [HtmlElementView].
final
String
htmlElementViewType
;
@override
final
Size
size
;
}
...
...
Please
register
or
login
to post a comment