replace the "Krow" with "KROW"
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
import 'package:design_system/design_system.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
/// A custom AppBar for the Krow UI design system.
|
||||
/// A custom AppBar for the KROW UI design system.
|
||||
///
|
||||
/// This widget provides a consistent look and feel for top app bars across the application.
|
||||
class UiAppBar extends StatelessWidget implements PreferredSizeWidget {
|
||||
|
||||
@@ -4,11 +4,10 @@ import '../ui_typography.dart';
|
||||
import '../ui_constants.dart';
|
||||
import '../ui_colors.dart';
|
||||
|
||||
/// A custom TextField for the Krow UI design system.
|
||||
/// A custom TextField for the KROW UI design system.
|
||||
///
|
||||
/// This widget combines a label and a [TextField] with consistent styling.
|
||||
class UiTextField extends StatelessWidget {
|
||||
|
||||
const UiTextField({
|
||||
super.key,
|
||||
this.semanticsIdentifier,
|
||||
@@ -30,8 +29,10 @@ class UiTextField extends StatelessWidget {
|
||||
this.onTap,
|
||||
this.validator,
|
||||
});
|
||||
|
||||
/// Optional semantics identifier for E2E testing (e.g. Maestro).
|
||||
final String? semanticsIdentifier;
|
||||
|
||||
/// The label text to display above the text field.
|
||||
final String? label;
|
||||
|
||||
@@ -96,34 +97,31 @@ class UiTextField extends StatelessWidget {
|
||||
Builder(
|
||||
builder: (BuildContext context) {
|
||||
final Widget field = TextFormField(
|
||||
controller: controller,
|
||||
onChanged: onChanged,
|
||||
keyboardType: keyboardType,
|
||||
maxLines: maxLines,
|
||||
obscureText: obscureText,
|
||||
textInputAction: textInputAction,
|
||||
onFieldSubmitted: onSubmitted,
|
||||
autofocus: autofocus,
|
||||
inputFormatters: inputFormatters,
|
||||
readOnly: readOnly,
|
||||
onTap: onTap,
|
||||
validator: validator,
|
||||
style: UiTypography.body1r.textPrimary,
|
||||
decoration: InputDecoration(
|
||||
hintText: hintText,
|
||||
prefixIcon: prefixIcon != null
|
||||
? Icon(prefixIcon, size: 20, color: UiColors.iconSecondary)
|
||||
: null,
|
||||
suffixIcon: suffixIcon != null
|
||||
? Icon(suffixIcon, size: 20, color: UiColors.iconSecondary)
|
||||
: suffix,
|
||||
),
|
||||
);
|
||||
controller: controller,
|
||||
onChanged: onChanged,
|
||||
keyboardType: keyboardType,
|
||||
maxLines: maxLines,
|
||||
obscureText: obscureText,
|
||||
textInputAction: textInputAction,
|
||||
onFieldSubmitted: onSubmitted,
|
||||
autofocus: autofocus,
|
||||
inputFormatters: inputFormatters,
|
||||
readOnly: readOnly,
|
||||
onTap: onTap,
|
||||
validator: validator,
|
||||
style: UiTypography.body1r.textPrimary,
|
||||
decoration: InputDecoration(
|
||||
hintText: hintText,
|
||||
prefixIcon: prefixIcon != null
|
||||
? Icon(prefixIcon, size: 20, color: UiColors.iconSecondary)
|
||||
: null,
|
||||
suffixIcon: suffixIcon != null
|
||||
? Icon(suffixIcon, size: 20, color: UiColors.iconSecondary)
|
||||
: suffix,
|
||||
),
|
||||
);
|
||||
if (semanticsIdentifier != null) {
|
||||
return Semantics(
|
||||
identifier: semanticsIdentifier!,
|
||||
child: field,
|
||||
);
|
||||
return Semantics(identifier: semanticsIdentifier!, child: field);
|
||||
}
|
||||
return field;
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user