0

The argument type 'QrImage' can't be assigned to the parameter type 'Widget?'.

Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text('QR Code Generator'),
      ),
      body: Center(
        child: Container(
          child: QrImage(
            data: websiteUrl,
            version: QrVersions.auto,
            size: 200.0,
          ),
        ),
      ),
    );
  }

pubspec.yaml

qr_flutter: ^4.0.0 sdk: '>=3.0.6 <4.0.0'

Lowered sdk to below 2.12.0 to remove null check but error remains the same

0 Answers0