Skip to content

serverpod_auth_idp_flutter: pinput <7 cap blocks the material_ui migration for apps that don't use the built-in sign-in widgets #6025

Open

Description

@Silfalion

Problem to Solve

Our app uses serverpod_auth_idp_flutter only for its non-UI parts: FlutterAuthSessionManager (re-exported from serverpod_auth_core_flutter), GoogleSignInService, and Apple sign-in. We draw our own sign-in screens, including a code-entry field built on pinput.

Moving the app to material_ui (Flutter 3.47), pinput 6 throws No Material widget found inside a material_ui Scaffold, since it still uses package:flutter/material.dart. pinput 7.0.0 fixes exactly that (it migrated to material_ui), but serverpod_auth_idp_flutter 4.1.2 declares:

pinput: '>=5.0.2 <7.0.0'

so pub can't resolve pinput ^7.0.0. The cap comes from widgets we never build (VerificationCode, and PinTheme re-exported from theme.dart), yet it blocks our whole migration. Related: #5695.

Proposal

  1. Ship the non-UI parts (session manager, *SignInService, *AuthController) in a package with no widget dependencies, either a new one or inside serverpod_auth_core_flutter, and have serverpod_auth_idp_flutter re-export it, so nothing changes for current users. Apps that bring their own UI then stop inheriting pinput, google_fonts, flutter_svg, animations.
  2. When the widgets move to material_ui (SignInWidget no longer renders using new standalone material_ui: "No Material widget found", "No MaterialLocalizations found" #5695), raise the cap to pinput: ^7.0.0. The package already requires Flutter ^3.44.4 and Dart ^3.12.2, the same floor pinput 7 declares, so the SDK floor doesn't need to change.

Use Case

An app with its own sign-in screens that needs only:

import 'package:serverpod_auth_idp_flutter/serverpod_auth_idp_flutter.dart';

final sessionManager = FlutterAuthSessionManager(/* ... */);
await GoogleSignInService.instance.ensureInitialized(/* ... */);

should be able to adopt material_ui and pinput 7 without waiting for Serverpod's widgets to migrate.

Alternatives

  • dependency_overrides: pinput: ^7.0.0: we'd rather not ship an override; it hides real conflicts from the solver and is unsupported.
  • Replacing pinput with our own code-entry field: possible, but drops a maintained widget just to get around a transitive cap.
  • MaterialUiCompatibilityBridge: doesn't help. It maps theme and localizations only, while pinput 6's debugCheckHasMaterial matches the legacy Material by exact type (per pinput's changelog). It's also already deprecated.

Additional context

  • serverpod_auth_idp_flutter 4.1.2, serverpod_auth_core_flutter 4.1.2
  • pinput resolved at 6.0.2; 7.0.0 wanted
  • Flutter 3.47.8, Dart 3.13.7; Linux and Android

How experienced are you with this library?

Intermediate - Familiar with the basics or have used it in a few projects

Are you interested in working on a PR for this?

  • I want to work on this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions