Question: I am building an app using flutter where I want to scan an image(that includes QR image). I am using packages available to read QR codes, but not working for me. Is there any package/solution to read a QR code from an image?

I Tried package:

qr\_code\_tools: ^0.0.6`

```
Future _getPhotoByGallery() async {
     var image = await ImagePicker.pickImage(source: ImageSource.gallery);
 String path = image.path;
 decode(path); 
}

Future decode(String path) async {
  print(path);
  String data = await QrCodeToolsPlugin.decodeFrom(path);
  setState(() {
    _data = data;
  });
}

```

I expect the output of QRCode from the selected image of Gallery.

But getting error "Null".

Answer: 
`Filter` the `data.table` and `rbind`

```
library(data.table)
rbindlist(Filter(is.data.table, list_df))

#    ID  a
# 1:  b  1
# 2:  b  2
# 3:  b  3
# 4:  a  4
# 5:  a  5
# 6:  c  6
# 7:  b 11
# 8:  b 12
# 9:  b 13
#10:  a 14
#11:  a 15
#12:  c 16

```

**data**

```
list_df <- list(DT1,DT2,"string")

```
Using `sapply()` to generate a logical vector to subset your `list`

```
rbindlist(list[sapply(list, is.data.table)])

```