Skip to content

Commit e69151e

Browse files
committed
Better divider color.
1 parent b2fcb44 commit e69151e

File tree

1 file changed

+14
-11
lines changed

1 file changed

+14
-11
lines changed

example/lib/main.dart

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ const String _formExampleSub = 'Programmatically set and get the value of a form
3737
const String _importInstantJsonExample = 'Import Instant Document JSON';
3838
const String _importInstantJsonExampleSub = 'Shows how to programmatically import Instant Document JSON.';
3939
const String _pspdfkitFor = 'PSPDFKit for';
40-
const double _fontSize = 21.0;
40+
const double _fontSize = 18.0;
4141

4242
void main() => runApp(MyApp());
4343

@@ -60,12 +60,14 @@ class HomePage extends StatefulWidget {
6060
class _HomePageState extends State<HomePage> with WidgetsBindingObserver {
6161
static final ThemeData lightTheme = ThemeData(
6262
backgroundColor: Colors.transparent,
63-
primaryColor: Colors.black
63+
primaryColor: Colors.black,
64+
dividerColor: Colors.grey[400]
6465
);
6566

6667
static final ThemeData darkTheme = ThemeData(
67-
backgroundColor: Colors.grey[900],
68-
primaryColor: Colors.white
68+
backgroundColor: Colors.transparent,
69+
primaryColor: Colors.white,
70+
dividerColor: Colors.grey[800]
6971
);
7072
String _frameworkVersion = '';
7173
ThemeData currentTheme = lightTheme;
@@ -277,6 +279,7 @@ class _HomePageState extends State<HomePage> with WidgetsBindingObserver {
277279
var padding = EdgeInsets.all(16.0);
278280

279281
List<Widget> cupertinoListTiles = <Widget>[
282+
Divider(color: currentTheme.dividerColor),
280283
GestureDetector(
281284
onTap: showDocument,
282285
child: Container(
@@ -287,7 +290,7 @@ class _HomePageState extends State<HomePage> with WidgetsBindingObserver {
287290
Text(_basicExampleSub, style: subhead)
288291
])),
289292
),
290-
Divider(),
293+
Divider(color: currentTheme.dividerColor),
291294
GestureDetector(
292295
onTap: showImage,
293296
child: Container(
@@ -298,7 +301,7 @@ class _HomePageState extends State<HomePage> with WidgetsBindingObserver {
298301
Text(_imageDocumentSub, style: subhead)
299302
])),
300303
),
301-
Divider(),
304+
Divider(color: currentTheme.dividerColor),
302305
GestureDetector(
303306
onTap: applyDarkTheme,
304307
child: Container(
@@ -309,7 +312,7 @@ class _HomePageState extends State<HomePage> with WidgetsBindingObserver {
309312
Text(_darkThemeSub, style: subhead)
310313
])),
311314
),
312-
Divider(),
315+
Divider(color: currentTheme.dividerColor),
313316
GestureDetector(
314317
onTap: applyCustomConfiguration,
315318
child: Container(
@@ -320,7 +323,7 @@ class _HomePageState extends State<HomePage> with WidgetsBindingObserver {
320323
Text(_customConfigurationSub, style: subhead)
321324
])),
322325
),
323-
Divider(),
326+
Divider(color: currentTheme.dividerColor),
324327
GestureDetector(
325328
onTap: unlockPasswordProtectedDocument,
326329
child: Container(
@@ -331,7 +334,7 @@ class _HomePageState extends State<HomePage> with WidgetsBindingObserver {
331334
Text(_passwordProtectedDocumentSub, style: subhead)
332335
])),
333336
),
334-
Divider(),
337+
Divider(color: currentTheme.dividerColor),
335338
GestureDetector(
336339
onTap: showFormDocumentExample,
337340
child: Container(
@@ -342,7 +345,7 @@ class _HomePageState extends State<HomePage> with WidgetsBindingObserver {
342345
Text(_formExampleSub, style: subhead)
343346
])),
344347
),
345-
Divider(),
348+
Divider(color: currentTheme.dividerColor),
346349
GestureDetector(
347350
onTap: importInstantJsonExample,
348351
child: Container(
@@ -353,7 +356,7 @@ class _HomePageState extends State<HomePage> with WidgetsBindingObserver {
353356
Text(_importInstantJsonExampleSub, style: subhead)
354357
])),
355358
),
356-
Divider()
359+
Divider(color: currentTheme.dividerColor)
357360
];
358361
return CupertinoPageScaffold(
359362
navigationBar: CupertinoNavigationBar(

0 commit comments

Comments
 (0)