|
@@ -54,32 +54,41 @@ class _PhotoMainPageState extends State<PhotoMainPage> with SelectedProvider {
|
54
|
54
|
color: options.textColor,
|
55
|
55
|
fontSize: 14.0,
|
56
|
56
|
);
|
57
|
|
- return DefaultTextStyle(
|
58
|
|
- style: textStyle,
|
59
|
|
- child: Scaffold(
|
60
|
|
- appBar: AppBar(
|
61
|
|
- backgroundColor: options.themeColor,
|
62
|
|
- title: Text(
|
63
|
|
- i18nProvider.getTitleText(options),
|
64
|
|
- ),
|
65
|
|
- actions: <Widget>[
|
66
|
|
- FlatButton(
|
67
|
|
- child: Text(
|
68
|
|
- i18nProvider.getSureText(options, this),
|
69
|
|
- style: textStyle,
|
70
|
|
- ),
|
71
|
|
- onPressed: sure,
|
|
57
|
+ return WillPopScope(
|
|
58
|
+ child: DefaultTextStyle(
|
|
59
|
+ style: textStyle,
|
|
60
|
+ child: Scaffold(
|
|
61
|
+ appBar: AppBar(
|
|
62
|
+ backgroundColor: options.themeColor,
|
|
63
|
+ title: Text(
|
|
64
|
+ i18nProvider.getTitleText(options),
|
72
|
65
|
),
|
73
|
|
- ],
|
74
|
|
- ),
|
75
|
|
- body: _buildBody(),
|
76
|
|
- bottomSheet: _BottomWidget(
|
77
|
|
- provider: i18nProvider,
|
78
|
|
- options: options,
|
79
|
|
- onGalleryChange: _onGalleryChange,
|
80
|
|
- selectedProvider: this,
|
|
66
|
+ actions: <Widget>[
|
|
67
|
+ FlatButton(
|
|
68
|
+ child: Text(
|
|
69
|
+ i18nProvider.getSureText(options, this),
|
|
70
|
+ style: selectedCount == 0
|
|
71
|
+ ? textStyle.copyWith(color: options.disableColor)
|
|
72
|
+ : textStyle,
|
|
73
|
+ ),
|
|
74
|
+ onPressed: selectedCount == 0 ? null : sure,
|
|
75
|
+ ),
|
|
76
|
+ ],
|
|
77
|
+ ),
|
|
78
|
+ body: _buildBody(),
|
|
79
|
+ bottomNavigationBar: _BottomWidget(
|
|
80
|
+ provider: i18nProvider,
|
|
81
|
+ options: options,
|
|
82
|
+ onGalleryChange: _onGalleryChange,
|
|
83
|
+ selectedProvider: this,
|
|
84
|
+ ),
|
81
|
85
|
),
|
82
|
86
|
),
|
|
87
|
+ onWillPop: () async {
|
|
88
|
+ selectedList.clear();
|
|
89
|
+ Navigator.of(context).pop(selectedList);
|
|
90
|
+ return false;
|
|
91
|
+ },
|
83
|
92
|
);
|
84
|
93
|
}
|
85
|
94
|
|
|
@@ -95,7 +104,7 @@ class _PhotoMainPageState extends State<PhotoMainPage> with SelectedProvider {
|
95
|
104
|
|
96
|
105
|
Widget _buildBody() {
|
97
|
106
|
return Container(
|
98
|
|
- color: options.paddingColor,
|
|
107
|
+ color: options.disableColor,
|
99
|
108
|
child: GridView.builder(
|
100
|
109
|
gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(
|
101
|
110
|
crossAxisCount: options.rowCount,
|
|
@@ -206,7 +215,9 @@ class _PhotoMainPageState extends State<PhotoMainPage> with SelectedProvider {
|
206
|
215
|
setState(() {});
|
207
|
216
|
}
|
208
|
217
|
|
209
|
|
- void sure() {}
|
|
218
|
+ void sure() {
|
|
219
|
+ Navigator.pop(context, selectedList);
|
|
220
|
+ }
|
210
|
221
|
|
211
|
222
|
void _onItemClick(ImageEntity data) {}
|
212
|
223
|
|
|
@@ -244,15 +255,35 @@ class __BottomWidgetState extends State<_BottomWidget> {
|
244
|
255
|
|
245
|
256
|
@override
|
246
|
257
|
Widget build(BuildContext context) {
|
|
258
|
+ var textStyle = TextStyle(fontSize: 14.0, color: options.textColor);
|
|
259
|
+ print(MediaQuery.of(context).padding.bottom);
|
247
|
260
|
return Container(
|
248
|
261
|
color: options.themeColor,
|
249
|
|
- height: 44.0,
|
250
|
|
- child: Row(
|
251
|
|
- children: <Widget>[
|
252
|
|
- Text(
|
253
|
|
- widget.galleryName,
|
|
262
|
+ child: SafeArea(
|
|
263
|
+ bottom: true,
|
|
264
|
+ child: Container(
|
|
265
|
+ height: 44.0,
|
|
266
|
+ child: Row(
|
|
267
|
+ children: <Widget>[
|
|
268
|
+ Text(
|
|
269
|
+ widget.galleryName,
|
|
270
|
+ style: textStyle,
|
|
271
|
+ ),
|
|
272
|
+ Expanded(
|
|
273
|
+ child: Container(),
|
|
274
|
+ ),
|
|
275
|
+ Container(
|
|
276
|
+ height: 44.0,
|
|
277
|
+ alignment: Alignment.center,
|
|
278
|
+ child: Text(
|
|
279
|
+ i18nProvider.getPreviewText(options, widget.selectedProvider),
|
|
280
|
+ style: textStyle,
|
|
281
|
+ ),
|
|
282
|
+ padding: const EdgeInsets.symmetric(horizontal: 8.0),
|
|
283
|
+ ),
|
|
284
|
+ ],
|
254
|
285
|
),
|
255
|
|
- ],
|
|
286
|
+ ),
|
256
|
287
|
),
|
257
|
288
|
);
|
258
|
289
|
}
|