added workflow to add bookmark from share intent
This commit is contained in:
@@ -6,13 +6,18 @@ import '../model/maps_link_metadata.dart';
|
||||
class SharedLinkProvider extends ChangeNotifier {
|
||||
MapsLinkMetadata? _currentMapsLinkMetadata;
|
||||
|
||||
void setCurrentMapsLink(String mapsLink) async {
|
||||
void setCurrentMapsLink(String mapsLink, {bool silent = false}) async {
|
||||
final metadata = await MetadataFetch.extract(mapsLink);
|
||||
_currentMapsLinkMetadata = MapsLinkMetadata(
|
||||
url: mapsLink,
|
||||
placeName: metadata?.title ?? '',
|
||||
);
|
||||
notifyListeners();
|
||||
if (!silent) notifyListeners();
|
||||
}
|
||||
|
||||
void removeCurrentMapsLink({bool silent = false}) {
|
||||
_currentMapsLinkMetadata = null;
|
||||
if (!silent) notifyListeners();
|
||||
}
|
||||
|
||||
MapsLinkMetadata? get currentMapsLinkMetadata => _currentMapsLinkMetadata;
|
||||
|
||||
Reference in New Issue
Block a user