getLoginTheme function

LoginTheme getLoginTheme(
  1. BuildContext context
)

The login theme configuration for the FlutterLogin widget.

This theme customizes the appearance of the login page, including colors, input fields, and title styles.

Implementation

LoginTheme getLoginTheme(BuildContext context) {
  // Dynamically calculate the font size based on the screen width.
  double currentScreenWidth = MediaQuery.of(context).size.width;
  double dynamicFontSize = ResponsiveDesignUtils.interpolateBestDouble(
      InterpolationDoubleValues(min: 32, max: 48), currentScreenWidth);

  return LoginTheme(
    pageColorLight: kColors_flutterLoginTheme_pageColorLight,
    primaryColor: kColors_flutterLoginTheme_primaryColor,
    inputTheme: kThemes_flutterLogin_inputDecorationTheme,
    titleStyle: TextStyle(
      color: kColors_flutterLoginTheme_titleTextColor,
      fontSize: dynamicFontSize, // Dynamic font size
      fontWeight: FontWeight.bold,
    ),
  );
}