appwin_community 0.4.1 copy "appwin_community: ^0.4.1" to clipboard
appwin_community: ^0.4.1 copied to clipboard

Flutter plugin wrapping the native Appwin Community SDK (ADR-0019).

example/lib/main.dart

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

/// Minimal Appwin Community integration: configure, initialise, embed.
///
/// Replace `your-app-id` with the App ID from your dashboard, under
/// Settings → SDK.
const appId = 'your-app-id';

Future<void> main() async {
  WidgetsFlutterBinding.ensureInitialized();

  // 1. The foundation. One call, whatever the number of products.
  await AppwinCore.instance.configure(appId: appId);

  // 2. Community itself. It answers whether this app may open it.
  final community = await AppwinCommunity.instance.initialize();
  debugPrint('Appwin Community: $community');

  runApp(ExampleApp(communityReady: community.isReady));
}

class ExampleApp extends StatelessWidget {
  const ExampleApp({super.key, required this.communityReady});

  /// 3. Your app decides what to show. The SDK cannot remove your tab.
  final bool communityReady;

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        appBar: AppBar(title: const Text('Appwin Community')),
        // The feed fills the space it is given and has no close button: the
        // surrounding screen is the way out.
        body: communityReady
            ? const AppwinCommunityView()
            : const Center(child: Text('Community is not available for this app.')),
      ),
    );
  }
}
0
likes
150
points
284
downloads

Documentation

API reference

Publisher

verified publisherappwin.io

Weekly Downloads

Flutter plugin wrapping the native Appwin Community SDK (ADR-0019).

Homepage
Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

appwin_core, flutter, plugin_platform_interface

More

Packages that depend on appwin_community

Packages that implement appwin_community