Very new to Flutter and Dart, so pardon me for the ill-phrased question. 

This is a generic code that I have:

```
// Constructor class
class ctr {
  String i;
  ctr(String a){
    this.a = a; 
}

// New variables based on contsructor
var ctrA = ctr('a');
var ctrB = ctr('b');
var ctrC = ctr('c');

// Storing the variables based on constructor in an array
List ctrList = [ctrA, ctrB, ctrC]

void main() {
  String match = 'ctrB';
  for (var i = 0; i<ctrList.length; i++) {
    if(match == ctrList.toString() {
      print('The string of your match is ${ctrList[i].a}');
    } else {
      print('Error!);
    }
  }
}

```

The current output is `Error!`.
Instead, what I'm looking for is `a`.

As you can see, I'm trying to iterate the variable `match` over the array that stores the variables based on an aforementioned constructor, and if it matches, print out the value in the constructor that it has matched to. `runtimeType` can only get me the name of the origin Class (which will be `ctr`). 

I tried to convert the variable name by using `toString()` but that didn't work either. What I need is a method to convert these variable names to a string and get a match, but I'm not sure what I can do.

Thanks in advance for the help!
['https://Stackoverflow.com/questions/62075043', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/9234811/']
Unlike previous suggestion, you should use `pdfplumber.open` instead of `pdfplumber.load`! [The link](https://github.com/jsvine/pdfplumber) for the repo of pdfplumber.

> 
> Warning: pdfplumber.load is deprecated.Please use pdfplumber.open
> (with same arguments) instead.
> 
> 
> 

Hence, the below code extracts entire pages rather than the first page in addition to using `pdfplumber.open` method.

```
import urllib3
import pdfplumber
import io

def extract_pdf_by_url(url):
    http = urllib3.PoolManager()
    temp = io.BytesIO()
    temp.write(http.request("GET", url).data)
    all_text = ''
    with pdfplumber.open(temp) as pdf:
        for pdf_page in pdf.pages:
            single_page_text = pdf_page.extract_text()
            all_text = all_text + '\n' + single_page_text
    return all_text

url  = 'https://raw.githubusercontent.com/jsvine/pdfplumber/stable/examples/pdfs/background-checks.pdf'
text = extract_pdf_by_url(url)
print(text)

```
Here is an example, which uses `io.BytesIO()` instead of creating any files on the hard drive.  
Note that `pdfplumber.load(...)` is used instead of `pdfplumber.open(...)`.

```
import urllib3
import pdfplumber
import io

def read_pdf(url: str) -> str:
    http = urllib3.PoolManager()
    temp = io.BytesIO()
    temp.write(http.request("GET", url).data)
    with pdfplumber.load(temp) as pdf:
        text = pdf.pages[0].extract_text()
    return text

text = read_pdf('https://sample.com/test.pdf')

```