@@ -25,49 +25,50 @@ class _AnnotationsPdfState extends SampleViewState {
2525 @override
2626 Widget build (BuildContext context) {
2727 return Scaffold (
28- backgroundColor: model.cardThemeColor,
29- body: Padding (
30- padding: const EdgeInsets .fromLTRB (10 , 10 , 10 , 10 ),
31- child: Column (
32- crossAxisAlignment: CrossAxisAlignment .start,
33- children: < Widget > [
34- Text (
35- 'This sample shows how to create annotations such as rectangle, ellipse, polygon, and line in a PDF document. ' ,
36- style: TextStyle (fontSize: 16 , color: model.textColor)),
37- const SizedBox (height: 10 , width: 30 ),
38- Row (
28+ backgroundColor: model.cardThemeColor,
29+ body: SingleChildScrollView (
30+ child: Padding (
31+ padding: const EdgeInsets .fromLTRB (10 , 10 , 10 , 10 ),
32+ child: Column (
33+ crossAxisAlignment: CrossAxisAlignment .start,
3934 children: < Widget > [
40- Checkbox (
41- value: flatten,
42- activeColor: model.backgroundColor,
43- onChanged: (bool ? value) {
44- setState (() {
45- flatten = value! ;
46- });
47- }),
48- Text ('Flatten Annotation' ,
35+ Text (
36+ 'This sample shows how to create annotations such as rectangle, ellipse, polygon, and line in a PDF document. ' ,
4937 style: TextStyle (fontSize: 16 , color: model.textColor)),
38+ const SizedBox (height: 10 , width: 30 ),
39+ Row (
40+ children: < Widget > [
41+ Checkbox (
42+ value: flatten,
43+ activeColor: model.backgroundColor,
44+ onChanged: (bool ? value) {
45+ setState (() {
46+ flatten = value! ;
47+ });
48+ }),
49+ Text ('Flatten Annotation' ,
50+ style: TextStyle (fontSize: 16 , color: model.textColor)),
51+ ],
52+ ),
53+ const SizedBox (height: 10 , width: 30 ),
54+ Align (
55+ child: TextButton (
56+ style: ButtonStyle (
57+ backgroundColor:
58+ MaterialStateProperty .all <Color >(model.backgroundColor),
59+ padding: model.isMobile
60+ ? null
61+ : MaterialStateProperty .all (const EdgeInsets .symmetric (
62+ vertical: 15 , horizontal: 15 )),
63+ ),
64+ onPressed: _generatePDF,
65+ child: const Text ('Generate PDF' ,
66+ style: TextStyle (color: Colors .white)),
67+ ))
5068 ],
5169 ),
52- const SizedBox (height: 10 , width: 30 ),
53- Align (
54- child: TextButton (
55- style: ButtonStyle (
56- backgroundColor:
57- MaterialStateProperty .all <Color >(model.backgroundColor),
58- padding: model.isMobile
59- ? null
60- : MaterialStateProperty .all (const EdgeInsets .symmetric (
61- vertical: 15 , horizontal: 15 )),
62- ),
63- onPressed: _generatePDF,
64- child: const Text ('Generate PDF' ,
65- style: TextStyle (color: Colors .white)),
66- ))
67- ],
68- ),
69- ),
70- );
70+ ),
71+ ));
7172 }
7273
7374 Future <void > _generatePDF () async {
0 commit comments