flutter

nexauth_flutter

The integration that should have existed elsewhere — first-class, documented, customizable.

pubspec.yaml
dependencies:
  nexauth_flutter: ^0.1.0

Drop-in screen

login.dart
final auth = NexAuth(publishableKey: 'pk_live_...');

Navigator.push(context, MaterialPageRoute(
  builder: (_) => NexOtpScreen(
    auth: auth,
    channel: NexChannel.whatsapp,
    branding: NexBranding(
      appName: 'Acme Health',
      logo: AssetImage('assets/logo.png'),
      primaryColor: Color(0xFF7C6CFF),
      securedBy: true,          // free tier — remove on Scale
    ),
    onSuccess: (s) => context.go('/home'),
  ),
));

NexOtpInput — animated boxes

custom ui
NexOtpInput(
  length: 6,
  autoRetrieveSms: true,          // Android SMS Retriever
  autoReadOtp: true,              // listens for the message
  boxDecoration: NexOtpStyle.filled,
  cursorColor: Color(0xFF7C6CFF),
  activeBorderColor: Color(0xFF7C6CFF),
  animation: NexOtpAnimation.scale, // scale | shake | none
  onCompleted: (code) => auth.otp.verify(...),
)
// iOS: UITextContentType.oneTimeCode set automatically

Phone number hint — one tap, no typing

hint
// Wraps Google Credential Manager Phone Number Hint —
// shows a bottom sheet of the device's numbers:
final phone = await auth.hintPhoneNumber();   // "+9199XXXXXXXX"
if (phone != null) await auth.otp.send(channel: NexChannel.whatsapp, to: phone);

Customization contract

NexBranding.appNameheader text
.logoAssetImage/NetworkImage
.primaryColorbuttons + active otp border
.themedark | light
.securedBy'Secured by NexAuth' footer (free = forced)
NexOtpStylebox: outlined | filled | underline
NexOtpAnimationscale | shake | none