-
Notifications
You must be signed in to change notification settings - Fork 29.7k
Closed
flutter/packages
#8675Labels
P1High-priority issues at the top of the work listHigh-priority issues at the top of the work listp: url_launcherPlugin to launch external applicationsPlugin to launch external applicationspackageflutter/packages repository. See also p: labels.flutter/packages repository. See also p: labels.platform-webWeb applications specificallyWeb applications specificallyr: fixedIssue is closed as already fixed in a newer versionIssue is closed as already fixed in a newer versionteam-webOwned by Web platform teamOwned by Web platform teamtriaged-webTriaged by Web platform teamTriaged by Web platform team
Description
Steps to reproduce
If you wrap a ElevatedButton with Link widget on web, and don't pass followLink function to ElevatedButton, when you click on that ElevatedButton button, it still takes user to that link.
Expected results
It should only take user to that link when followLink function is called
Actual results
Even i am not passing followLink function to ElevatedButton's onPressed property but Its still opening link that i set in uri of Link widget.
Code sample
Code sample
import 'package:flutter/material.dart';
import 'package:url_launcher/link.dart' as ul;
class GoogleButton extends StatelessWidget {
const GoogleButton();
@override
Widget build(final BuildContext context) {
return ul.Link(
uri: Uri.parse('https://google.com'),
target: ul.LinkTarget.blank,
builder: (context, followLink) => ElevatedButton(
onPressed: null,
child: Text('Open Google'),
),
);
}
}Screenshots or Video
No response
Logs
No response
Flutter Doctor output
Doctor output
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 3.27.4, on macOS 15.2 24C101 darwin-arm64, locale en-PK)
[✓] Android toolchain - develop for Android devices (Android SDK version 35.0.0)
[✓] Xcode - develop for iOS and macOS (Xcode 16.1)
[✓] Chrome - develop for the web
[✓] Android Studio (version 2023.3)
[✓] Connected device (4 available)
[✓] Network resourcesMetadata
Metadata
Assignees
Labels
P1High-priority issues at the top of the work listHigh-priority issues at the top of the work listp: url_launcherPlugin to launch external applicationsPlugin to launch external applicationspackageflutter/packages repository. See also p: labels.flutter/packages repository. See also p: labels.platform-webWeb applications specificallyWeb applications specificallyr: fixedIssue is closed as already fixed in a newer versionIssue is closed as already fixed in a newer versionteam-webOwned by Web platform teamOwned by Web platform teamtriaged-webTriaged by Web platform teamTriaged by Web platform team