Common Button¶
Buttons allow users to take actions, and make choices, with a single tap.
Button di Menoreh Library menggunakan Tema Matrial design v2. Button terdiri dari Widget ElevatedButton
, OutlinedButton
dan TextButton
.
Untuk mengubah semua Tema button silahkan pelajari berikut ini.
Elevated Button¶
Elevated Icon Button
Outlined Button¶
Outlined Icon Button
Text Button¶
Text Icon Button
Customization¶
To change the whole Button Theme, please open the core/themes/app_theme.dart
. Here's how to change the Widget Buttons theme:
Elevated Button¶
elevatedButtonTheme: ElevatedButtonThemeData(
style: ElevatedButton.styleFrom(
shape: const StadiumBorder(),
padding: const EdgeInsets.symmetric(horizontal: AppDimens.paddingLarge),
foregroundColor: AppColors.white,
backgroundColor: AppColors.primary,
minimumSize: Size(AppDimens.size8X, AppDimens.size3XL),
shadowColor: AppColors.transparant,
elevation: 0,
),
),
Outlined Button¶
outlinedButtonTheme: OutlinedButtonThemeData(
style: OutlinedButton.styleFrom(
foregroundColor: AppColors.primary,
side: const BorderSide(width: 1.0, color: AppColors.primary),
shape: const StadiumBorder(),
padding: const EdgeInsets.symmetric(horizontal: AppDimens.paddingLarge),
minimumSize: Size(AppDimens.size8X, AppDimens.size3XL),
shadowColor: AppColors.transparant,
elevation: 0,
),
),
Text Button¶
textButtonTheme: TextButtonThemeData(
style: TextButton.styleFrom(
shape: const StadiumBorder(),
padding: const EdgeInsets.symmetric(horizontal: AppDimens.paddingLarge),
foregroundColor: AppColors.primary,
minimumSize: Size(AppDimens.size8X, AppDimens.size3XL),
elevation: 0,
),
)
Authors: