@@ -10,7 +10,10 @@ import 'package:flutter_unit/painter_system/gallery_unit.dart';
10
10
import 'package:flutter_unit/widget_system/views/widget_system_view.dart' ;
11
11
12
12
import 'package:url_launcher/url_launcher.dart' ;
13
+ import 'package:window_manager/window_manager.dart' ;
13
14
15
+ import '../../app/plateform_adapter/window/windows_adapter.dart' ;
16
+ import '../../widget_system/views/desk_ui/widget_panel/widget_panel.dart' ;
14
17
import '../home_page/home_drawer.dart' ;
15
18
import '../home_page/home_page.dart' ;
16
19
@@ -53,10 +56,10 @@ class _UnitDeskNavigationState extends State<UnitDeskNavigation> {
53
56
Widget build (BuildContext context) {
54
57
return BlocBuilder <ColorChangeCubit , SelectTab >(
55
58
builder: (_, state) => Scaffold (
56
- drawer: HomeDrawer (),
57
- endDrawer: HomeRightDrawer (),
59
+ drawer: const HomeDrawer (),
60
+ endDrawer: const HomeRightDrawer (),
58
61
//右滑页
59
- floatingActionButton: _buildSearchButton (state.tabColor),
62
+ // floatingActionButton: _buildSearchButton(state.tabColor),
60
63
body: Row (
61
64
children: [
62
65
_buildLeftNav (),
@@ -66,8 +69,9 @@ class _UnitDeskNavigationState extends State<UnitDeskNavigation> {
66
69
physics: const NeverScrollableScrollPhysics (),
67
70
//使用PageView实现页面的切换
68
71
controller: _controller,
69
- children: < Widget > [
70
- HomePage (),
72
+ children: const < Widget > [
73
+ // HomePage(),
74
+ DeskWidgetPanel (),
71
75
CollectPage (),
72
76
GalleryUnit (),
73
77
// GalleryPage(),
@@ -100,71 +104,76 @@ class _UnitDeskNavigationState extends State<UnitDeskNavigation> {
100
104
}
101
105
102
106
Widget _buildLeftNav () {
103
- return Container (
104
- padding: EdgeInsets .only (top: 20 ),
105
- alignment: Alignment .topCenter,
106
- margin: EdgeInsets .only (right: 1 ),
107
- width: 120 ,
108
- decoration: BoxDecoration (color: Color (0xff2C3036 ), boxShadow: [
109
- BoxShadow (color: Colors .grey, offset: Offset (1 , 0 ), blurRadius: 2 )
110
- ]),
111
- child: Column (
112
- children: [
113
- Wrap (
114
- direction: Axis .vertical,
115
- spacing: 10 ,
116
- crossAxisAlignment: WrapCrossAlignment .center,
117
- children: [
118
- CircleImage (
119
- image: AssetImage ('assets/images/icon_head.webp' ),
120
- size: 60 ,
121
- ),
122
- Text (
123
- '张风捷特烈' ,
124
- style: TextStyle (color: Colors .white70),
125
- )
126
- ],
127
- ),
128
- buildIcons (),
129
- Divider (
130
- color: Colors .white,
131
- height: 1 ,
132
- endIndent: 20 ,
133
- ),
107
+ return DragToMoveAreaNoDouble (
108
+ child: Container (
109
+ padding: const EdgeInsets .only (top: 20 ),
110
+ alignment: Alignment .topCenter,
111
+ margin: const EdgeInsets .only (right: 1 ),
112
+ width: 120 ,
113
+ decoration: const BoxDecoration (color:
114
+ Color (0xff2C3036 ),
115
+ boxShadow: [
116
+ BoxShadow (color: Colors .grey, offset: Offset (1 , 0 ), blurRadius: 2 )
117
+ ]
118
+ ),
119
+ child: Column (
120
+ children: [
121
+ Wrap (
122
+ direction: Axis .vertical,
123
+ spacing: 10 ,
124
+ crossAxisAlignment: WrapCrossAlignment .center,
125
+ children: const [
126
+ CircleImage (
127
+ image: AssetImage ('assets/images/icon_head.webp' ),
128
+ size: 60 ,
129
+ ),
130
+ Text (
131
+ '张风捷特烈' ,
132
+ style: TextStyle (color: Colors .white70),
133
+ )
134
+ ],
135
+ ),
136
+ buildIcons (),
137
+ const Divider (
138
+ color: Colors .white,
139
+ height: 1 ,
140
+ endIndent: 20 ,
141
+ ),
134
142
// SizedBox(height: 60,),
135
- Expanded (
136
- flex: 5 ,
137
- child: Center (
138
- child: RightNavBar (
139
- itemData: Cons .iconMap,
140
- onItemClick: _onTapNav,
141
- color: Theme .of (context).primaryColor,
143
+ Expanded (
144
+ flex: 5 ,
145
+ child: Center (
146
+ child: RightNavBar (
147
+ itemData: Cons .iconMap,
148
+ onItemClick: _onTapNav,
149
+ color: Theme .of (context).primaryColor,
150
+ ),
142
151
),
143
152
),
144
- ),
145
153
146
- Expanded (
147
- child: Container (),
148
- flex: 1 ,
149
- ),
150
- Divider (
151
- indent: 20 ,
152
- color: Colors .white,
153
- height: 1 ,
154
- ),
155
- Builder (
156
- builder: (ctx) => FeedbackWidget (
157
- onPressed: () => Scaffold .of (ctx).openDrawer (),
158
- child: Padding (
159
- padding: const EdgeInsets .only (bottom: 20 , top: 20 ),
160
- child: Icon (
161
- Icons .settings,
162
- color: Colors .white,
154
+ Expanded (
155
+ child: Container (),
156
+ flex: 1 ,
157
+ ),
158
+ const Divider (
159
+ indent: 20 ,
160
+ color: Colors .white,
161
+ height: 1 ,
162
+ ),
163
+ Builder (
164
+ builder: (ctx) => FeedbackWidget (
165
+ onPressed: () => Scaffold .of (ctx).openDrawer (),
166
+ child: const Padding (
167
+ padding: EdgeInsets .only (bottom: 20 , top: 20 ),
168
+ child: Icon (
169
+ Icons .settings,
170
+ color: Colors .white,
171
+ ),
163
172
),
164
173
),
165
174
),
166
- ) ,
167
- ] ,
175
+ ] ,
176
+ ) ,
168
177
),
169
178
);
170
179
}
@@ -177,23 +186,23 @@ class _UnitDeskNavigationState extends State<UnitDeskNavigation> {
177
186
children: [
178
187
FeedbackWidget (
179
188
onPressed: () => _launchURL ("http://blog.toly1994.com" ),
180
- child: Icon (
189
+ child: const Icon (
181
190
TolyIcon .icon_item,
182
191
color: Colors .white,
183
192
),
184
193
),
185
194
FeedbackWidget (
186
195
onPressed: () =>
187
196
_launchURL ("https://github.com/toly1994328/FlutterUnit" ),
188
- child: Icon (
197
+ child: const Icon (
189
198
TolyIcon .icon_github,
190
199
color: Colors .white,
191
200
),
192
201
),
193
202
FeedbackWidget (
194
203
onPressed: () =>
195
204
_launchURL ("https://juejin.im/user/5b42c0656fb9a04fe727eb37" ),
196
- child: Icon (
205
+ child: const Icon (
197
206
TolyIcon .icon_juejin,
198
207
color: Colors .white,
199
208
),
@@ -250,14 +259,14 @@ class _RightNavBarState extends State<RightNavBar> {
250
259
onTap: () => _tapTab (i),
251
260
child: Container (
252
261
alignment: Alignment .topLeft,
253
- margin: EdgeInsets .only (top: 10 ),
262
+ margin: const EdgeInsets .only (top: 10 ),
254
263
width: widget.itemSize.width,
255
264
child: UnconstrainedBox (
256
265
child: Container (
257
266
alignment: Alignment .center,
258
267
decoration: BoxDecoration (
259
268
color: active ? widget.color : Colors .white.withAlpha (33 ),
260
- borderRadius: BorderRadius .only (
269
+ borderRadius: const BorderRadius .only (
261
270
topRight: Radius .circular (20 ),
262
271
bottomRight: Radius .circular (20 ))),
263
272
width: active
0 commit comments