@@ -21,14 +21,15 @@ class DeviceGroupSelectionSheet extends StatelessWidget {
2121 Widget build (BuildContext context) {
2222 final String ? effectiveExcludeGroupId = excludeGroupId;
2323 final filteredGroups = availableGroups.where ((g) => g.id != effectiveExcludeGroupId).toList ();
24+ final theme = Theme .of (context);
2425
2526 final tiles =
2627 < Widget > [
2728 if (effectiveExcludeGroupId != '' )
2829 ListTile (
2930 dense: true ,
3031 tileColor: Colors .transparent,
31- title: Text (context.translate ('No group' )),
32+ title: Text (context.translate ('No group' ), style : theme.textTheme.bodyLarge ),
3233 onTap: () {
3334 Navigator .pop (context);
3435 onTapGroup (null );
@@ -40,7 +41,7 @@ class DeviceGroupSelectionSheet extends StatelessWidget {
4041 return ListTile (
4142 dense: true ,
4243 tileColor: Colors .transparent,
43- title: Text (g.name),
44+ title: Text (g.name, style : theme.textTheme.bodyLarge ),
4445 onTap: () {
4546 Navigator .pop (context);
4647 onTapGroup (g);
@@ -49,36 +50,39 @@ class DeviceGroupSelectionSheet extends StatelessWidget {
4950 }),
5051 )
5152 .toList ();
52- return Column (
53- crossAxisAlignment: CrossAxisAlignment .stretch,
54- mainAxisSize: MainAxisSize .min,
55- children: [
56- Container (
57- padding: const EdgeInsets .fromLTRB (16 , 16 , 16 , 8 ),
58- child: Text (title, textAlign: TextAlign .center),
59- ),
60- if (subtitle != null )
53+ return SafeArea (
54+ child: Column (
55+ crossAxisAlignment: CrossAxisAlignment .stretch,
56+ mainAxisSize: MainAxisSize .min,
57+ children: [
6158 Container (
62- padding: EdgeInsets .fromLTRB (16 , 8 , 16 , 0 ),
63- child: Text (
64- subtitle! ,
65- textAlign: TextAlign .start,
66- style: Theme .of (context).textTheme.bodyMedium? .copyWith (color: Theme .of (context).hintColor),
67- ),
59+ padding: const EdgeInsets .fromLTRB (16 , 16 , 16 , 8 ),
60+ child: Text (title, style: Theme .of (context).textTheme.titleMedium? .copyWith (fontWeight: FontWeight .w600)),
6861 ),
69- const SizedBox (height: 8 ),
70- Flexible (
71- child: ListView .separated (
72- padding: const EdgeInsets .all (0 ),
73- shrinkWrap: true ,
74- physics: const ClampingScrollPhysics (),
75- itemBuilder: (BuildContext context, int index) => tiles[index],
76- separatorBuilder: (BuildContext context, int index) => const Divider (indent: 16 , height: 1 , thickness: 1 ),
77- itemCount: tiles.length,
62+ if (subtitle != null )
63+ Container (
64+ padding: EdgeInsets .fromLTRB (16 , 8 , 16 , 0 ),
65+ child: Text (
66+ subtitle! ,
67+ textAlign: TextAlign .start,
68+ style: Theme .of (context).textTheme.bodyMedium? .copyWith (color: Theme .of (context).hintColor),
69+ ),
70+ ),
71+ const SizedBox (height: 8 ),
72+ Flexible (
73+ child: ListView .separated (
74+ padding: const EdgeInsets .all (0 ),
75+ shrinkWrap: true ,
76+ physics: const ClampingScrollPhysics (),
77+ itemBuilder: (BuildContext context, int index) => tiles[index],
78+ separatorBuilder: (BuildContext context, int index) => const Divider (indent: 16 , height: 1 , thickness: 1 ),
79+ itemCount: tiles.length,
80+ ),
7881 ),
79- ),
80- const SizedBox (height: 16 ),
81- ],
82+ const Divider (indent: 16 , height: 1 , thickness: 1 ),
83+ const SizedBox (height: 16 ),
84+ ],
85+ ),
8286 );
8387 }
8488}
0 commit comments