# Sign PDF with Flutter

This guide will assist you in integrating DocuSeal document e-signing capabilities into your Flutter app. With DocuSeal, you can create document templates from your PDF files, send them to the signers, and receive signed copies. Templates can be created either using our [web UI](https://docuseal.com/sign_up) or through the [API](https://www.docuseal.com/docs/api.md). For instance, you can design a document template with various field types using [HTML and CSS](https://www.docuseal.com/blog/creating-fillable-pdf-document-forms-with-html.md) or [PDF upload](https://www.docuseal.com/guides/use-embedded-text-field-tags-in-the-pdf-to-create-a-fillable-form.md). More information on this can be found in our [guides](https://www.docuseal.com/guides.md).

## How to sign PDFs with Flutter

- Create a [DocuSeal account](https://docuseal.com/sign_up).
- Create a document template using [web UI](https://docuseal.com/sign_up) or [API](https://www.docuseal.com/docs/api.md).
- Embed a signing form in your app.

### Embedded Signing Form

To embed a signing form in your Flutter app, you need to use a WebView. The WebView will load the script, and the user can sign the document using the DocuSeal Signing Form. Therefore, you first need to add dependencies to your project's **pubspec.yaml** file.

To do this, open the **pubspec.yaml** file in the **app** folder of your project and add the following code to the **dependencies** block:

 
```
webview_flutter: ^4.10.0
```

Now you need to allow your app to use the internet. To do this, open the **AndroidManifest.xml** file in the **app/src/main** folder and add the following code:

 
```
<uses-permission android:name="android.permission.INTERNET"/>
```

This is all you need to create the layout. Below is the code that you can use as an example to add a signing form to your app:

 
```
import'package:flutter/material.dart';import'package:webview_flutter/webview_flutter.dart';voidmain(){runApp(constDocuSealDemoApp());}classDocuSealDemoAppextendsStatelessWidget{constDocuSealDemoApp({super.key});@overrideWidgetbuild(BuildContextcontext){returnMaterialApp(title:'DocuSeal Demo',theme:ThemeData(colorScheme:ColorScheme.fromSeed(seedColor:Colors.blue),useMaterial3:true,),home:constWebviewPage(),);}}classWebviewPageextendsStatefulWidget{constWebviewPage({Key?key}):super(key:key);@overrideState\<WebviewPage\>createState()=\>\_WebviewPageState();}class_WebviewPageStateextendsState\<WebviewPage\>{WebViewController?\_controller;@overridevoidinitState(){Stringhtml=''' \<html\> \<head\> \<meta name="viewport" content="width=device-width, initial-scale=1.0"\> \<script src="https://cdn.docuseal.com/js/form.js"\>\</script\> \</head\> \<body\> \<docuseal-form id="docusealForm" data-src="https://docuseal.com/d/LEVGR9rhZYf86M" data-email="signer@example.com"\> \</docuseal-form\> \</body\> \</html\> ''';super.initState();\_controller=WebViewController()..setJavaScriptMode(JavaScriptMode.unrestricted)..setBackgroundColor(constColor(0x00000000))..setNavigationDelegate(NavigationDelegate(onNavigationRequest:(NavigationRequestrequest){returnNavigationDecision.navigate;},),)..loadHtmlString(html);}@overrideWidgetbuild(BuildContextcontext){returnScaffold(appBar:AppBar(title:constText("DocuSeal Demo"),actions:const[],),body:WebViewWidget(controller:\_controller!));}}
```

After adding this code to your app, you will see such a signing form in your app. However, you can customize its appearance and behavior using many parameters. You can read more about this in our [documentation](https://www.docuseal.com/docs/embedded/form.md).

### Conclusions

In this guide, we have only covered the most basic example of using DocuSeal in a Flutter app. DocuSeal has many other capabilities that you can use to enhance your app. For example, you can embed not only the Signing form on your app but also the [Form builder](https://www.docuseal.com/docs/embedded/builder.md). You can also use the API to fully automate the [process of generating custom documents using HTML](https://www.docuseal.com/blog/creating-fillable-pdf-document-forms-with-html.md) and then sending them for signing without using the DocuSeal web UI.

### Related Links

- [Embed PDF signing in Flutter App](https://www.docuseal.com/guides/embed-document-signing-into-flutter-app.md)
- [API Documentation](https://www.docuseal.com/docs/api.md)
- [Webhooks Documentation](https://www.docuseal.com/docs/api/form-webhook.md)
- [Developer Guides](https://www.docuseal.com/guides.md)
- [Creating Fillable PDF Document Forms with HTML](https://www.docuseal.com/blog/creating-fillable-pdf-document-forms-with-html.md)