@@ -2,6 +2,7 @@ import 'package:flutter/material.dart';
22import 'package:flutter_svg/flutter_svg.dart' ;
33import 'package:provider/provider.dart' ;
44import 'package:settings/view/pages/appearance/appearance_model.dart' ;
5+ import 'package:settings/view/selectable_svg_image.dart' ;
56import 'package:yaru_widgets/yaru_widgets.dart' ;
67
78class DockSection extends StatelessWidget {
@@ -60,6 +61,61 @@ class DockSection extends StatelessWidget {
6061 ),
6162 ],
6263 ),
64+ YaruSection (headline: 'Dock Position' , children: [
65+ Row (
66+ mainAxisAlignment: MainAxisAlignment .spaceBetween,
67+ children: [
68+ Column (
69+ crossAxisAlignment: CrossAxisAlignment .start,
70+ children: [
71+ const Padding (
72+ padding: EdgeInsets .all (8.0 ),
73+ child: Text ('Left' ),
74+ ),
75+ SelectableSvgImage (
76+ padding: 8.0 ,
77+ path: model.getLeftSideAsset (),
78+ selected: model.getDockPosition () == DockPosition .left,
79+ height: assetHeight,
80+ onTap: () => model.setDockPosition (DockPosition .left),
81+ ),
82+ ],
83+ ),
84+ Column (
85+ crossAxisAlignment: CrossAxisAlignment .start,
86+ children: [
87+ const Padding (
88+ padding: EdgeInsets .all (8.0 ),
89+ child: Text ('Right' ),
90+ ),
91+ SelectableSvgImage (
92+ padding: 8.0 ,
93+ path: model.getRightSideAsset (),
94+ selected: model.getDockPosition () == DockPosition .right,
95+ height: assetHeight,
96+ onTap: () => model.setDockPosition (DockPosition .right),
97+ ),
98+ ],
99+ ),
100+ Column (
101+ crossAxisAlignment: CrossAxisAlignment .start,
102+ children: [
103+ const Padding (
104+ padding: EdgeInsets .all (8.0 ),
105+ child: Text ('Bottom' ),
106+ ),
107+ SelectableSvgImage (
108+ padding: 8.0 ,
109+ path: model.getBottomAsset (),
110+ selected: model.getDockPosition () == DockPosition .bottom,
111+ height: assetHeight,
112+ onTap: () => model.setDockPosition (DockPosition .bottom),
113+ ),
114+ ],
115+ ),
116+ ],
117+ )
118+ ]),
63119 YaruSection (
64120 headline: 'Dock options' ,
65121 children: [
@@ -126,66 +182,6 @@ class DockSection extends StatelessWidget {
126182 ),
127183 ],
128184 ),
129- YaruSection (headline: 'Dock Position' , children: [
130- YaruRow (
131- trailingWidget: const Text ('Left' ),
132- description: 'Your dock appears on the left side of your screen.' ,
133- actionWidget: Radio <DockPosition >(
134- value: DockPosition .left,
135- groupValue: model.getDockPosition (),
136- onChanged: (value) => model.setDockPosition (value! )),
137- enabled: model.extendDock != null ),
138- Padding (
139- padding: const EdgeInsets .all (assetPadding),
140- child: SvgPicture .asset (
141- model.getLeftSideAsset (),
142- color: model.getDockPosition () == DockPosition .left
143- ? Theme .of (context).primaryColor.withOpacity (0.1 )
144- : Theme .of (context).backgroundColor,
145- colorBlendMode: BlendMode .color,
146- height: assetHeight,
147- ),
148- ),
149- YaruRow (
150- trailingWidget: const Text ('Right' ),
151- description:
152- 'Your dock appears on the right side of your screen.' ,
153- actionWidget: Radio <DockPosition >(
154- value: DockPosition .bottom,
155- groupValue: model.getDockPosition (),
156- onChanged: (value) => model.setDockPosition (value! )),
157- enabled: model.extendDock != null ),
158- Padding (
159- padding: const EdgeInsets .all (assetPadding),
160- child: SvgPicture .asset (
161- model.getRightSideAsset (),
162- color: model.getDockPosition () == DockPosition .bottom
163- ? Theme .of (context).primaryColor.withOpacity (0.1 )
164- : Theme .of (context).backgroundColor,
165- colorBlendMode: BlendMode .color,
166- height: assetHeight,
167- ),
168- ),
169- YaruRow (
170- trailingWidget: const Text ('Bottom' ),
171- description: 'Your dock appears on bottom side of your screen.' ,
172- actionWidget: Radio <DockPosition >(
173- value: DockPosition .right,
174- groupValue: model.getDockPosition (),
175- onChanged: (value) => model.setDockPosition (value! )),
176- enabled: model.extendDock != null ),
177- Padding (
178- padding: const EdgeInsets .all (assetPadding),
179- child: SvgPicture .asset (
180- model.getBottomAsset (),
181- color: model.getDockPosition () == DockPosition .right
182- ? Theme .of (context).primaryColor.withOpacity (0.1 )
183- : Theme .of (context).backgroundColor,
184- colorBlendMode: BlendMode .color,
185- height: assetHeight,
186- ),
187- ),
188- ])
189185 ],
190186 );
191187 }
0 commit comments