Skip to content

Commit

Permalink
prefer final over var
Browse files Browse the repository at this point in the history
  • Loading branch information
bdlind committed Mar 8, 2021
1 parent 660c0a6 commit 687fef0
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions example/lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ class _MyAppState extends State<MyApp> {
}

Future<void> generateExampleDocument() async {
var htmlContent = """
final htmlContent = """
<!DOCTYPE html>
<html>
<head>
Expand Down Expand Up @@ -68,10 +68,10 @@ class _MyAppState extends State<MyApp> {
""";

Directory appDocDir = await getApplicationDocumentsDirectory();
var targetPath = appDocDir.path;
var targetFileName = "example-pdf";
final targetPath = appDocDir.path;
final targetFileName = "example-pdf";

var generatedPdfFile = await FlutterHtmlToPdf.convertFromHtmlContent(htmlContent, targetPath, targetFileName);
final generatedPdfFile = await FlutterHtmlToPdf.convertFromHtmlContent(htmlContent, targetPath, targetFileName);
generatedPdfFilePath = generatedPdfFile.path;
}

Expand Down

0 comments on commit 687fef0

Please sign in to comment.