@@ -52,13 +52,23 @@ class _PdfViewerPageState extends State<PdfViewerPage> {
5252 Widget build (BuildContext context) {
5353 return Scaffold (
5454 appBar: AppBar (
55+ bottom: PreferredSize (
56+ preferredSize: const Size .fromHeight (0 ),
57+ child: Container (
58+ color: Theme .of (context).colorScheme.outlineVariant,
59+ height: 1 ,
60+ ),
61+ ),
5562 actions: [
56- TextButton (
57- style: TextButton .styleFrom (
58- backgroundColor: Theme .of (context).colorScheme.onInverseSurface,
63+ Padding (
64+ padding: const EdgeInsets .only (right: 6 ),
65+ child: TextButton (
66+ style: TextButton .styleFrom (
67+ backgroundColor: Theme .of (context).colorScheme.onInverseSurface,
68+ ),
69+ onPressed: () => _performSpellCheck (),
70+ child: const Text ('Perform Spell Check' ),
5971 ),
60- onPressed: () => _performSpellCheck (),
61- child: const Text ('Perform Spell Check' ),
6272 ),
6373 ],
6474 ),
@@ -116,14 +126,20 @@ class _PdfViewerPageState extends State<PdfViewerPage> {
116126 }
117127 }
118128
129+ /// Get the total count of misspelled words
130+ int count = 0 ;
131+ for (final MapEntry <int , List <TextWord >> entry in errorWords.entries) {
132+ count += entry.value.length;
133+ }
134+
119135 showDialog (
120136 context: context,
121137 builder: (BuildContext context) {
122138 return AlertDialog .adaptive (
123139 title: const Text ('Spell Check Completed' ),
124140 content: errorWords.isEmpty
125- ? const Text ('No spell errors found' )
126- : const Text ('Spell errors found' ),
141+ ? const Text ('No spell errors found. ' )
142+ : Text ('$ count spelling errors found. ' ),
127143 actions: [
128144 TextButton (
129145 onPressed: () {
0 commit comments