Julian Steenbakker

style: upgrade and apply lint

... ... @@ -133,9 +133,9 @@ class _BarcodeScannerWithControllerState
icon: const Icon(Icons.image),
iconSize: 32.0,
onPressed: () async {
final ImagePicker _picker = ImagePicker();
final ImagePicker picker = ImagePicker();
// Pick an image
final XFile? image = await _picker.pickImage(
final XFile? image = await picker.pickImage(
source: ImageSource.gallery,
);
if (image != null) {
... ...
... ... @@ -16,7 +16,7 @@ dependencies:
dev_dependencies:
flutter_test:
sdk: flutter
lint: ^1.8.2
lint: ^1.10.0
flutter:
uses-material-design: true
... ...
... ... @@ -29,12 +29,12 @@ class MobileScanner extends StatefulWidget {
/// Create a [MobileScanner] with a [controller], the [controller] must has been initialized.
const MobileScanner({
Key? key,
super.key,
required this.onDetect,
this.controller,
this.fit = BoxFit.cover,
this.allowDuplicates = false,
}) : super(key: key);
});
@override
State<MobileScanner> createState() => _MobileScannerState();
... ... @@ -75,7 +75,7 @@ class _MobileScannerState extends State<MobileScanner>
builder: (context, value, child) {
value = value as MobileScannerArguments?;
if (value == null) {
return Container(color: Colors.black);
return const ColoredBox(color: Colors.black);
} else {
controller.barcodes.listen((barcode) {
if (!widget.allowDuplicates) {
... ...
... ... @@ -17,7 +17,7 @@ dependencies:
dev_dependencies:
flutter_test:
sdk: flutter
lint: ^1.8.2
lint: ^1.10.0
flutter:
plugin:
... ...