Showing
1 changed file
with
6 additions
and
6 deletions
@@ -16,16 +16,16 @@ class MyApp extends StatelessWidget { | @@ -16,16 +16,16 @@ class MyApp extends StatelessWidget { | ||
16 | return MaterialApp( | 16 | return MaterialApp( |
17 | home: Scaffold( | 17 | home: Scaffold( |
18 | appBar: AppBar( | 18 | appBar: AppBar( |
19 | - title: Text('Printing Demo'), | 19 | + title: const Text('Printing Demo'), |
20 | ), | 20 | ), |
21 | - body: Center( | ||
22 | - child: FlatButton( | ||
23 | - child: Text("Print Document"), | 21 | + floatingActionButton: FloatingActionButton( |
22 | + child: const Icon(Icons.print), | ||
23 | + tooltip: 'Print Document', | ||
24 | onPressed: () { | 24 | onPressed: () { |
25 | Printing.layoutPdf(onLayout: buildPdf); | 25 | Printing.layoutPdf(onLayout: buildPdf); |
26 | }, | 26 | }, |
27 | ), | 27 | ), |
28 | - ), | 28 | + body: Center(child: const Text('Click on the print button below')), |
29 | ), | 29 | ), |
30 | ); | 30 | ); |
31 | } | 31 | } |
@@ -39,7 +39,7 @@ class MyApp extends StatelessWidget { | @@ -39,7 +39,7 @@ class MyApp extends StatelessWidget { | ||
39 | constraints: const Pdf.BoxConstraints.expand(), | 39 | constraints: const Pdf.BoxConstraints.expand(), |
40 | child: Pdf.FittedBox( | 40 | child: Pdf.FittedBox( |
41 | child: Pdf.Text( | 41 | child: Pdf.Text( |
42 | - "Hello World", | 42 | + 'Hello World', |
43 | )), | 43 | )), |
44 | ); | 44 | ); |
45 | })); | 45 | })); |
-
Please register or login to post a comment