Small details that build taste in Flutter.

curated by Kamran BekirovKamran Bekirov

Launch social media apps directly

Social media links should open the respective app directly if installed.

Use .externalApplication mode and let the system take care of it. If the domain is claimed, it opens that app directly:

import 'package:url_launcher/url_launcher.dart';
  
Future<void> launchInstagram() async {
  await launchUrl(
    'https://instagram.com/beyt.app', // your link
    mode: .externalApplication,
  );
}

Avoid custom schemes: using instagram://, whatsapp:// etc. are also an option, but will fail on devices the apps are not installed.

To open WhatsApp chats use: https://wa.me/{phone number}. Example: https://wa.me/994512223344

Kamran Bekirov
Kamran Bekirov

Want this level of care in your Flutter apps?

Work With Me