|
|
@@ -160,59 +160,84 @@ class _PhotoMainPageState extends State<PhotoMainPage>
|
|
160
|
160
|
style: options.theme.textStyle,
|
|
161
|
161
|
child: Scaffold(
|
|
162
|
162
|
appBar: AppBar(
|
|
|
163
|
+ titleSpacing: 0.0,
|
|
163
|
164
|
backgroundColor: options.theme.surfaceColor,
|
|
164
|
|
- leading: IconButton(
|
|
165
|
|
- icon: Text('取消', style: options.theme.textStyle),
|
|
166
|
|
- onPressed: _cancel,
|
|
167
|
|
- ),
|
|
|
165
|
+ automaticallyImplyLeading: false,
|
|
168
|
166
|
centerTitle: true,
|
|
169
|
|
- title: FlatButton(
|
|
170
|
|
- padding: EdgeInsets.zero,
|
|
171
|
|
- onPressed: _showGallerySelectDialog,
|
|
172
|
|
- splashColor: Colors.transparent,
|
|
173
|
|
- highlightColor: Colors.transparent,
|
|
174
|
|
- child: Container(
|
|
175
|
|
- alignment: Alignment.center,
|
|
176
|
|
- height: 44.0,
|
|
177
|
|
- padding: EdgeInsets.zero.copyWith(right: kToolbarHeight),
|
|
178
|
|
- child: Row(
|
|
179
|
|
- mainAxisAlignment: MainAxisAlignment.center,
|
|
180
|
|
- children: [
|
|
181
|
|
- Text(
|
|
182
|
|
- currentGalleryName,
|
|
183
|
|
- style: options.theme.textStyle.apply(
|
|
184
|
|
- fontSizeDelta: 2.0,
|
|
185
|
|
- fontWeightDelta: 1,
|
|
186
|
|
- ),
|
|
187
|
|
- ),
|
|
188
|
|
- Container(
|
|
189
|
|
- width: 18,
|
|
190
|
|
- height: 18,
|
|
191
|
|
- margin: EdgeInsets.only(left: 8),
|
|
192
|
|
- decoration: ShapeDecoration(
|
|
193
|
|
- shape: CircleBorder(
|
|
194
|
|
- side: BorderSide(
|
|
195
|
|
- color: options.theme.onSurfaceColor, width: 1.5),
|
|
196
|
|
- )),
|
|
197
|
|
- child: AnimatedSwitcher(
|
|
198
|
|
- transitionBuilder: (child, animation) {
|
|
199
|
|
- final Tween<double> tween = overlayEntry != null
|
|
200
|
|
- ? Tween(begin: -0.25, end: 0.25)
|
|
201
|
|
- : Tween(begin: 0.25, end: 0.75);
|
|
202
|
|
- //var tween = Tween(begin: -0.5, end: 0.0);
|
|
203
|
|
- return RotationTransition(
|
|
204
|
|
- child: child, turns: tween.animate(animation));
|
|
205
|
|
- },
|
|
206
|
|
- duration: Duration(milliseconds: 200),
|
|
207
|
|
- reverseDuration: Duration(milliseconds: 0),
|
|
208
|
|
- child: Icon(Icons.chevron_left,
|
|
209
|
|
- key: ValueKey(overlayEntry == null ? 0 : 1),
|
|
210
|
|
- size: 14,
|
|
211
|
|
- color: options.theme.onSurfaceColor),
|
|
212
|
|
- ),
|
|
213
|
|
- ),
|
|
214
|
|
- ],
|
|
215
|
|
- )),
|
|
|
167
|
+ title: Row(
|
|
|
168
|
+ mainAxisAlignment: MainAxisAlignment.start,
|
|
|
169
|
+ crossAxisAlignment: CrossAxisAlignment.center,
|
|
|
170
|
+ children: [
|
|
|
171
|
+ GestureDetector(
|
|
|
172
|
+ behavior: HitTestBehavior.opaque,
|
|
|
173
|
+ onTap: _cancel,
|
|
|
174
|
+ child: Container(
|
|
|
175
|
+ height: kToolbarHeight,
|
|
|
176
|
+ padding: kTabLabelPadding,
|
|
|
177
|
+ alignment: Alignment.center,
|
|
|
178
|
+ child: Text(i18nProvider.getCancelText(options), style: options.theme.textStyle),
|
|
|
179
|
+ ),
|
|
|
180
|
+ ),
|
|
|
181
|
+ Expanded(
|
|
|
182
|
+ child: FlatButton(
|
|
|
183
|
+ padding: EdgeInsets.zero,
|
|
|
184
|
+ onPressed: _showGallerySelectDialog,
|
|
|
185
|
+ splashColor: Colors.transparent,
|
|
|
186
|
+ highlightColor: Colors.transparent,
|
|
|
187
|
+ child: Container(
|
|
|
188
|
+ alignment: Alignment.center,
|
|
|
189
|
+ height: 44.0,
|
|
|
190
|
+ child: Row(
|
|
|
191
|
+ mainAxisAlignment: MainAxisAlignment.center,
|
|
|
192
|
+ children: [
|
|
|
193
|
+ Text(
|
|
|
194
|
+ currentGalleryName,
|
|
|
195
|
+ style: options.theme.textStyle.apply(
|
|
|
196
|
+ fontSizeDelta: 2.0,
|
|
|
197
|
+ fontWeightDelta: 1,
|
|
|
198
|
+ ),
|
|
|
199
|
+ ),
|
|
|
200
|
+ Container(
|
|
|
201
|
+ width: 18,
|
|
|
202
|
+ height: 18,
|
|
|
203
|
+ margin: EdgeInsets.only(left: 8),
|
|
|
204
|
+ decoration: ShapeDecoration(
|
|
|
205
|
+ shape: CircleBorder(
|
|
|
206
|
+ side: BorderSide(
|
|
|
207
|
+ color: options.theme.onSurfaceColor,
|
|
|
208
|
+ width: 1.5),
|
|
|
209
|
+ )),
|
|
|
210
|
+ child: AnimatedSwitcher(
|
|
|
211
|
+ transitionBuilder: (child, animation) {
|
|
|
212
|
+ final Tween<double> tween = overlayEntry != null
|
|
|
213
|
+ ? Tween(begin: -0.25, end: 0.25)
|
|
|
214
|
+ : Tween(begin: 0.25, end: 0.75);
|
|
|
215
|
+ //var tween = Tween(begin: -0.5, end: 0.0);
|
|
|
216
|
+ return RotationTransition(
|
|
|
217
|
+ child: child,
|
|
|
218
|
+ turns: tween.animate(animation));
|
|
|
219
|
+ },
|
|
|
220
|
+ duration: Duration(milliseconds: 200),
|
|
|
221
|
+ reverseDuration: Duration(milliseconds: 0),
|
|
|
222
|
+ child: Icon(Icons.chevron_left,
|
|
|
223
|
+ key: ValueKey(overlayEntry == null ? 0 : 1),
|
|
|
224
|
+ size: 14,
|
|
|
225
|
+ color: options.theme.onSurfaceColor),
|
|
|
226
|
+ ),
|
|
|
227
|
+ ),
|
|
|
228
|
+ ],
|
|
|
229
|
+ )),
|
|
|
230
|
+ ),
|
|
|
231
|
+ ),
|
|
|
232
|
+ Container(
|
|
|
233
|
+ height: kToolbarHeight,
|
|
|
234
|
+ padding: kTabLabelPadding,
|
|
|
235
|
+ alignment: Alignment.center,
|
|
|
236
|
+ child: Text(i18nProvider.getCancelText(options), style: options.theme.textStyle.copyWith(
|
|
|
237
|
+ color: Colors.transparent,
|
|
|
238
|
+ )),
|
|
|
239
|
+ ),
|
|
|
240
|
+ ],
|
|
216
|
241
|
),
|
|
217
|
242
|
),
|
|
218
|
243
|
body: _buildBody(),
|
|
|
@@ -267,7 +292,7 @@ class _PhotoMainPageState extends State<PhotoMainPage>
|
|
267
|
292
|
.copyWith(color: options.theme.onPrimaryColor),
|
|
268
|
293
|
),
|
|
269
|
294
|
duration: Duration(milliseconds: 1500),
|
|
270
|
|
- backgroundColor: options.theme.primaryColor.withOpacity(0.7),
|
|
|
295
|
+ backgroundColor: options.theme.primaryColor,
|
|
271
|
296
|
),
|
|
272
|
297
|
);
|
|
273
|
298
|
}
|