Question: ```
<button type="button" class="btn btn-success" data-toggle="modal" data-target="#myModal">Edit</button>

<button type="button" class="btn btn-success" data-toggle="modal" data-target="#myModal">Edit</button>      <div class="modal fade" id="myModal" role="dialog">

    <div class="modal-dialog">

      <!-- Modal content-->
      <div class="modal-content">
        <div class="modal-header">
          <button type="button" class="close" data-dismiss="modal">&times;</button>
          <h4 class="modal-title">Modal Header</h4>
        </div>
        <div class="modal-body">
          <p>Some text in the modal.</p>
        </div>
        <div class="modal-footer">
          <button type="button" class="btn btn-default" onclick="saveHTML(this)" data-dismiss="modal">Close</button>
        </div>
      </div>

    </div>

```

```
function saveHTML() {
    //code

}

```

I have modal html and along with that I have few button, all of which can trigger the button because the data-target and data-toggle attribute is set. But on clicking the close button inside the modal how can i figure out which button triggered the modal. The buttons that trigger the modal dont have a unique id because i have to make the code dynamic. So have to use 'this' operator.

Answer: 
When using a `plugin`, add your gradle dependencies in `[projectFolder]/android/build.gradle`. At the bottom, below the android section, add a dependencies section like this:

```
android {
    compileSdkVersion 27

    defaultConfig {
        minSdkVersion 16
        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
    }
    lintOptions {
        disable 'InvalidPackage'
    }
}

dependencies {
    implementation('com.amazonaws:aws-android-sdk-mobile-client:2.6.+@aar') { transitive = true }
}

```

Then run the example application provided by the plugin project. Gradle will fetch the dependencies.
You need to create a plugin package for that

```
flutter create --template=plugin hello

```

`--template=package` is for packages that contain only Dart code.