Skip to main content

share_lelo 0.1.2 copy "share_lelo: ^0.1.2" to clipboard
share_lelo: ^0.1.2 copied to clipboard

PlatformAndroid

Share the full APK file of your Flutter app (Bluetooth, WhatsApp, Nearby Share...) in one line. Not a link: the app itself.

example/lib/main.dart

import 'package:flutter/material.dart';
import 'package:share_lelo/share_lelo.dart';

void main() => runApp(const MaterialApp(home: ShareApkPage()));

class ShareApkPage extends StatelessWidget {
  const ShareApkPage({super.key});

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(title: const Text('share_lelo')),
      body: Padding(
        padding: const EdgeInsets.all(16),
        child: Column(
          crossAxisAlignment: CrossAxisAlignment.stretch,
          children: [
            FutureBuilder<ApkInfo>(
              future: ShareLelo.getApkInfo(),
              builder: (context, snapshot) {
                final info = snapshot.data;
                if (info == null) {
                  return const Center(child: CircularProgressIndicator());
                }
                return Card(
                  child: ListTile(
                    leading: const Icon(Icons.android, size: 40),
                    title: Text('${info.appName} v${info.versionName}'),
                    subtitle: Text(
                      '${info.formattedSize}'
                      '${info.isSplit ? ' • ${info.splitApkPaths.length + 1} APK files' : ''}',
                    ),
                  ),
                );
              },
            ),
            const SizedBox(height: 24),
            // The whole integration: one widget.
            const ShareApkButton(text: 'Install my app 🚀'),
            const SizedBox(height: 12),
            const ShareApkButton(
              packageName: 'com.android.bluetooth',
              icon: Icon(Icons.bluetooth),
              label: Text('Send via Bluetooth'),
            ),
          ],
        ),
      ),
    );
  }
}
1
likes
160
points
435
downloads

Documentation

API reference

Publisher

unverified uploader

Weekly Downloads

Share the full APK file of your Flutter app (Bluetooth, WhatsApp, Nearby Share...) in one line. Not a link: the app itself.

Repository (GitHub)
View/report issues

Topics

#share #apk #android #bluetooth #file-sharing

License

MIT (license)

Dependencies

flutter, plugin_platform_interface

More

Packages that depend on share_lelo

Packages that implement share_lelo