@@ -268,8 +268,6 @@ class _FavoritesViewPageState extends State<FavoritesViewPage> with SingleTicker
268268 ),
269269 ),
270270 ),
271- // floatingActionButton: _isEditMode ?
272- // Center() : createFloatingActionButton(),
273271 bottomNavigationBar: _isEditMode ?
274272 createBottomBar () : Container (height: 0 ),
275273 );
@@ -325,157 +323,31 @@ class _FavoritesViewPageState extends State<FavoritesViewPage> with SingleTicker
325323 );
326324 }
327325
328- // Widget createUploadActionButton() {
329- // ThemeData _theme = Theme.of(context);
330- // return SpeedDial(
331- // spaceBetweenChildren: 10,
332- // childMargin: EdgeInsets.only(bottom: 17, right: 10),
333- // animatedIcon: AnimatedIcons.menu_close,
334- // animatedIconTheme: IconThemeData(size: 22.0),
335- // closeManually: false,
336- // curve: Curves.bounceIn,
337- // backgroundColor: _theme.floatingActionButtonTheme.backgroundColor,
338- // foregroundColor: _theme.floatingActionButtonTheme.foregroundColor,
339- // overlayColor: Colors.black,
340- // elevation: 5.0,
341- // overlayOpacity: 0.5,
342- // shape: CircleBorder(),
343- // children: [
344- // SpeedDialChild(
345- // elevation: 5,
346- // labelWidget: Text(appStrings(context).createNewAlbum_title, style: TextStyle(fontSize: 14, fontWeight: FontWeight.bold, color: Colors.white)),
347- // child: Icon(Icons.create_new_folder),
348- // backgroundColor: _theme.floatingActionButtonTheme.backgroundColor,
349- // foregroundColor: _theme.floatingActionButtonTheme.foregroundColor,
350- // onTap: () async {
351- // showDialog(
352- // context: context,
353- // builder: (BuildContext context) {
354- // return CreateCategoryDialog(catId: widget.category);
355- // }
356- // ).whenComplete(() {
357- // _getData();
358- // });
359- // },
360- // ),
361- // SpeedDialChild(
362- // elevation: 5,
363- // labelWidget: Text(appStrings(context).categoryUpload_images, style: TextStyle(fontSize: 14, fontWeight: FontWeight.bold, color: Colors.white)),
364- // child: Icon(Icons.add_to_photos),
365- // backgroundColor: _theme.floatingActionButtonTheme.backgroundColor,
366- // foregroundColor: _theme.floatingActionButtonTheme.foregroundColor,
367- // onTap: () async {
368- // try {
369- // ScaffoldMessenger.of(context).removeCurrentSnackBar();
370- // ScaffoldMessenger.of(context).showSnackBar(SnackBar(
371- // content: Row(
372- // mainAxisAlignment: MainAxisAlignment.spaceBetween,
373- // mainAxisSize: MainAxisSize.min,
374- // children: [
375- // Text(appStrings(context).loadingHUD_label),
376- // CircularProgressIndicator(),
377- // ],
378- // ),
379- // duration: Duration(days: 365),
380- // ));
381- // final List<XFile> images = ((await FilePicker.platform.pickFiles(
382- // type: FileType.media,
383- // allowMultiple: true,
384- // )) ?.files ?? []).map<XFile>((e) => XFile(e.path, name: e.name, bytes: e.bytes)).toList();
385- // ScaffoldMessenger.of(context).removeCurrentSnackBar();
386- // if(images.isNotEmpty) {
387- // Navigator.push(context, MaterialPageRoute(
388- // builder: (context) => UploadGalleryViewPage(imageData: images, category: widget.category)
389- // )).whenComplete(() {
390- // setState(() {
391- // print('After upload'); // refresh
392- // });
393- // });
394- // }
395- // } catch (e) {
396- // print('${e.toString()}');
397- // }
398- // }
399- // ),
400- // SpeedDialChild(
401- // elevation: 5,
402- // labelWidget: Text(appStrings(context).categoryUpload_take, style: TextStyle(fontSize: 14, fontWeight: FontWeight.bold, color: Colors.white)),
403- // child: Icon(Icons.photo_camera_rounded),
404- // backgroundColor: _theme.floatingActionButtonTheme.backgroundColor,
405- // foregroundColor: _theme.floatingActionButtonTheme.foregroundColor,
406- // onTap: () async {
407- // try {
408- // ScaffoldMessenger.of(context).removeCurrentSnackBar();
409- // ScaffoldMessenger.of(context).showSnackBar(SnackBar(
410- // content: Row(
411- // mainAxisAlignment: MainAxisAlignment.spaceBetween,
412- // mainAxisSize: MainAxisSize.min,
413- // children: [
414- // Text(appStrings(context).loadingHUD_label),
415- // CircularProgressIndicator(),
416- // ],
417- // ),
418- // duration: Duration(days: 365),
419- // ));
420- // final XFile image = await ImagePicker().pickImage(source: ImageSource.camera);
421- // ScaffoldMessenger.of(context).removeCurrentSnackBar();
422- // if(image != null) {
423- // Navigator.push(context, MaterialPageRoute(
424- // builder: (context) => UploadGalleryViewPage(imageData: [image], category: widget.category)
425- // )).whenComplete(() {
426- // setState(() {
427- // print('After upload'); // refresh
428- // });
429- // });
430- // }
431- // } catch (e) {
432- // print('Dio error ${e.toString()}');
433- // }
434- // }
435- // ),
436- // ],
437- // );
438- // }
439-
440326 Widget createBottomBar () {
441327 ThemeData _theme = Theme .of (context);
442328 return BottomNavigationBar (
443329 onTap: (index) async {
444330 if (_selectedItems.length > 0 ) {
445331 switch (index) {
446332 case 0 :
447- _onEditSelection ();
448- break ;
449- case 1 :
450333 _onDownloadSelection ();
451334 break ;
452335 case 2 :
453336 _onMoveCopySelection ();
454337 break ;
455- case 3 :
456- _onDeleteSelection ();
457- break ;
458338 default :
459339 break ;
460340 }
461341 }
462342 },
463343 items: < BottomNavigationBarItem > [
464- BottomNavigationBarItem (
465- icon: Icon (Icons .edit, color: _theme.iconTheme.color),
466- label: appStrings (context).imageOptions_edit,
467- ),
468344 BottomNavigationBarItem (
469345 icon: Icon (Icons .download_rounded, color: _theme.iconTheme.color),
470346 label: appStrings (context).imageOptions_download,
471347 ),
472348 BottomNavigationBarItem (
473- icon: Icon (Icons .reply_outlined, color: _theme.iconTheme.color),
474- label: appStrings (context).moveImage_title,
475- ),
476- BottomNavigationBarItem (
477- icon: Icon (Icons .delete_outline, color: _theme.errorColor),
478- label: appStrings (context).deleteImage_delete,
349+ icon: Icon (Icons .favorite_border_rounded, color: _theme.errorColor),
350+ label: "Remove from favorites" ,
479351 ),
480352 ],
481353 backgroundColor: _theme.scaffoldBackgroundColor,
@@ -487,45 +359,4 @@ class _FavoritesViewPageState extends State<FavoritesViewPage> with SingleTicker
487359 currentIndex: 0 ,
488360 );
489361 }
490-
491- // Widget createFloatingActionButton() {
492- // final uploadStatusProvider = Provider.of<UploadStatusNotifier>(context);
493- // return Padding(
494- // padding: const EdgeInsets.all(8.0),
495- // child: Stack(
496- // children: <Widget>[
497- // Align(
498- // alignment: Alignment.bottomRight,
499- // child: Container(
500- // margin: EdgeInsets.only(bottom: 0, right: widget.isAdmin? 70 : 0),
501- // child: FloatingActionButton(
502- // backgroundColor: Color(0xff868686),
503- // onPressed: () {
504- // Navigator.of(context).popUntil((route) => route.isFirst);
505- // },
506- // child: uploadStatusProvider.status ?
507- // Stack(
508- // alignment: Alignment.center,
509- // children: [
510- // SizedBox(
511- // height: 55,
512- // width: 55,
513- // child: CircularProgressIndicator(
514- // strokeWidth: 5,
515- // value: uploadStatusProvider.progress,
516- // ),
517- // ),
518- // Text("${uploadStatusProvider.getRemaining()}",
519- // style: TextStyle(fontSize: 16),
520- // ),
521- // ],
522- // ) :
523- // Icon(Icons.home, color: Colors.grey.shade200, size: 30),
524- // ),
525- // ),
526- // ),
527- // ],
528- // ),
529- // );
530- // }
531362}
0 commit comments