With the other starters

The navigation and security starters know no design library. This starter gives them what is Cupertino's, through beans and the DesignScope of its CupertinoApp. Nothing has to be set up.

Why

The navigation and security starters, and the Flutter starter's MarkdownView, are used in Material, Cupertino and plain WidgetsApp apps alike, so they import no design library. Each asks the application for what is design-specific: a page route, form controls, selection handles. This starter answers for Cupertino, so a Cupertino app gets the iOS behavior from widgets that were never written for it.

The navigation starter

The router of spring_boot_starter_flutter_navigation asks the DesignPageRoutes beans for the route of a page. This starter's cupertinoPageRoutes bean (CupertinoPageRoutes) gives the iOS slide, with the swipe back from the edge, for motion.page-transition: platform in an app of type cupertino and for cupertino in an app of any type:

spring:
  flutter:
    theme:
      motion:
        page-transition: platform     # the iOS slide in a CupertinoApp

The screens of a @ScreenRoute come in with it, and the app widget is a CupertinoApp.router on the router when SpringApplicationWidget has no home: (see The app widget). In an app of type cupertino the heroes of the router's navigators fly as in a CupertinoApp. Everything about the transition, its duration and curve, the swipe back and what happens without this starter is in Page transitions.

The login form of the security starter

LoginForm and OAuth2LoginButton of spring_boot_starter_flutter_security draw their fields and buttons with the controls of the app's design. With this starter those are Cupertino's (CupertinoDesignControls): a CupertinoTextField with the label as its placeholder and the error in red below, a filled CupertinoButton with an activity indicator while it works, and iOS's destructive red for errors. This is LoginDesign.app; LoginDesign.widgets keeps the plain ones. They also find Cupertino's controls below a CupertinoApp the app builds itself.

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

  @override
  Widget build(BuildContext context) => CupertinoPageScaffold(
    navigationBar: const CupertinoNavigationBar(middle: Text('Sign in')),
    child: SafeArea(
      child: Padding(
        padding: const EdgeInsets.all(16),
        // CupertinoTextField and CupertinoButton.filled in a Cupertino app.
        child: LoginForm(onSuccess: (_) => context.route.go('/books')),
      ),
    ),
  );
}

The controls take their look from the CupertinoThemeData: the filled button is cupertino.primary-color with its label in cupertino.primary-contrasting-color, and the fields' cursor is the primary color (see Theme properties). See Login screens.

MarkdownView

Selectable text of the starters' widgets (MarkdownView) has iOS's selection handles on iOS and macOS. On Android, Fuchsia, Linux and Windows a CupertinoApp gives the Flutter starter's own handles (SpringTextSelectionControls), not Material's: a Cupertino app has no Material in its build. The text styles are the SpringTheme's. See MarkdownView.

See also