Show toast on successful share
This commit is contained in:
parent
ecb5c2f437
commit
1d0515d70e
3 changed files with 17 additions and 0 deletions
|
@ -1,5 +1,6 @@
|
|||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/widgets.dart';
|
||||
import 'package:fluttertoast/fluttertoast.dart';
|
||||
import 'package:photos/folder_service.dart';
|
||||
import 'package:photos/models/folder.dart';
|
||||
import 'package:photos/ui/loading_widget.dart';
|
||||
|
@ -64,6 +65,14 @@ class _ShareFolderWidgetState extends State<ShareFolderWidget> {
|
|||
_folder.sharedWith.clear();
|
||||
_folder.sharedWith.addAll(sharedWith);
|
||||
await FolderSharingService.instance.updateFolder(_folder);
|
||||
Fluttertoast.showToast(
|
||||
msg: "Sharing configuration updated successfully.",
|
||||
toastLength: Toast.LENGTH_SHORT,
|
||||
gravity: ToastGravity.BOTTOM,
|
||||
timeInSecForIosWeb: 1,
|
||||
backgroundColor: Colors.grey[600],
|
||||
textColor: Colors.white,
|
||||
fontSize: 16.0);
|
||||
Navigator.of(context).pop();
|
||||
},
|
||||
),
|
||||
|
|
|
@ -170,6 +170,13 @@ packages:
|
|||
description: flutter
|
||||
source: sdk
|
||||
version: "0.0.0"
|
||||
fluttertoast:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
name: fluttertoast
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "4.0.1"
|
||||
get_ip:
|
||||
dependency: transitive
|
||||
description:
|
||||
|
|
|
@ -49,6 +49,7 @@ dependencies:
|
|||
flutter_image_compress: ^0.6.5+1
|
||||
flutter_typeahead: ^1.8.1
|
||||
pull_to_refresh: ^1.5.7
|
||||
fluttertoast: ^4.0.1
|
||||
|
||||
dev_dependencies:
|
||||
flutter_test:
|
||||
|
|
Loading…
Add table
Reference in a new issue