Navaron Bracke

revert the addition of platform specific view attributes

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;
}
import 'dart:ui';
/// This interface defines the attributes for the mobile scanner view.
abstract class MobileScannerViewAttributes {
/// This class defines the attributes for the mobile scanner view.
class MobileScannerViewAttributes {
const MobileScannerViewAttributes({
required this.hasTorch,
required this.size,
});
/// Whether the current active camera has a torch.
bool get hasTorch;
final bool hasTorch;
/// The size of the camera output.
Size get size;
final Size size;
}
... ...
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;
}