cleaned up sloppy ai code
This commit is contained in:
@@ -40,36 +40,21 @@ class _MapsBookmarksState extends State<MapsBookmarks>
|
||||
|
||||
@override
|
||||
void didChangeAppLifecycleState(AppLifecycleState state) {
|
||||
// Check for shared content when app resumes
|
||||
if (state == AppLifecycleState.resumed) {
|
||||
_checkForSharedContent();
|
||||
}
|
||||
}
|
||||
|
||||
Future<void> _checkForSharedContent() async {
|
||||
final sharedText = await _shareIntentService.getSharedText();
|
||||
final sharedText = await _shareIntentService.getSharedMapsLink();
|
||||
|
||||
if (sharedText != null && mounted) {
|
||||
// Validate it's a Google Maps link
|
||||
if (_shareIntentService.isGoogleMapsLink(sharedText)) {
|
||||
final metadata = _shareIntentService.extractMetadata(sharedText);
|
||||
_handleSharedMapsLink(metadata);
|
||||
}
|
||||
if (sharedText.isNotEmpty && mounted) {
|
||||
_handleSharedMapsLink(sharedText);
|
||||
}
|
||||
}
|
||||
|
||||
void _handleSharedMapsLink(MapsLinkMetadata metadata) {
|
||||
// Navigate to the appropriate page or show a dialog
|
||||
// You can customize this based on your app's flow
|
||||
|
||||
// Option 1: Navigate to collections page with data
|
||||
_navigatorKey.currentState?.pushNamed(
|
||||
CollectionsPage.routeName,
|
||||
arguments: metadata,
|
||||
);
|
||||
|
||||
// Option 2: Show a dialog to select collection and save
|
||||
// This would be implemented based on your UI requirements
|
||||
void _handleSharedMapsLink(String sharedText) {
|
||||
//TODO: implement
|
||||
}
|
||||
|
||||
@override
|
||||
|
||||
Reference in New Issue
Block a user