clerk_flutter 0.0.17-beta copy "clerk_flutter: ^0.0.17-beta" to clipboard
clerk_flutter: ^0.0.17-beta copied to clipboard

retracted

Package that will allow you to authenticate and use Clerk from Flutter code.

Community-maintained Clerk Flutter SDK (Beta) #

Pub Version Pub Points chat on Discord documentation Follow on X

⚠️ The Clerk Flutter SDK is in Beta ⚠️ #

❗️ Breaking changes should be expected until the first stable release (1.0.0) ❗️

Clerk provides user management: sign-up, sign-in, and profile management for your users, straight from your Flutter code.

This SDK is community-maintained and provided as-is — not officially supported by Clerk. Clerk employees may contribute on their own time. See clerk-community for what that means.

Requirements #

  • Flutter >= 3.27.4
  • Dart >= 3.6.2

In Development #

  • Organization support

Example Usage #

To use this package you will need to go to your Clerk Dashboard create an application and copy the public and publishable API keys into your project.

The bundled example app requires one, possibly two, variables to be set up in your environment:

  • publishable_key: your Clerk publishable key, usually starting pk_
  • google_client_id: the ID of your GCP web project, if you are using Google token oauth
/// Example App
class ExampleApp extends StatelessWidget {
  /// Constructs an instance of Example App
  const ExampleApp({super.key, required this.publishableKey});

  /// Publishable Key
  final String publishableKey;

  @override
  Widget build(BuildContext context) {
    return ClerkAuth(
      config: ClerkAuthConfig(publishableKey: publishableKey),
      child: MaterialApp(
        theme: ThemeData.light(),
        debugShowCheckedModeBanner: false,
        home: Scaffold(
          body: SafeArea(
            child: ClerkErrorListener(
              child: ClerkAuthBuilder(
                signedInBuilder: (context, authState) {
                  return const ClerkUserButton();
                },
                signedOutBuilder: (context, authState) {
                  return const ClerkAuthentication();
                },
              ),
            ),
          ),
        ),
      ),
    );
  }
}

Installation (Android) #

Add the following line to your android/app/src/main/AndroidManifest.xml file:

<uses-permission android:name="android.permission.INTERNET" />

License #

This SDK is licensed under the MIT license found in the LICENSE file.