Question: So basically I am using the `showModalBottomSheet` widget to show a full screen container that has a `GestureDetector` that runs this onTap:

```
onTap: () {
  final String testText = "Sup";
  Navigator.of(context).pop(testText);
}

```

This obviously returns the text when I `await` the result when I call `showModalBottomSheet` however, I would also like to set `enableDrag: true` so that we can swipe the modal away.

**My question is:**

How can I pass an argument/result back when doing a swipe to dismiss? With a function, I can simple do `Navigator.of(context).pop(...)` but when we swipe, there is no function and so therefore I can't figure out a way to pass arguments when we swipe to dismiss.

Thank you!

Answer: 
you only need 1 statement, another statement doestn't do anything

```
if (textBox3.Text == "Short") positions = -positions;

```

or you can put everytning in one line

```
double positions =  textBox3.Text == "Short" ?
 - Convert.ToDouble(textBox2.Text) : Convert.ToDouble(textBox2.Text);

```
You can negate the `position`. This way you only need 1 operation.

`if (textBox3.Text == "Long" || textBox3.Text == "Short") { positions = positions * -1; }`

Ideally you want to do this in a method and pass a string parameter.