mirror of
https://github.com/SyncrowIOT/web.git
synced 2025-07-09 14:47:23 +00:00
fixed text style
This commit is contained in:
@ -26,7 +26,7 @@ class EditChip extends StatelessWidget {
|
||||
child: Chip(
|
||||
label: Text(
|
||||
label,
|
||||
style: TextStyle(color: labelColor),
|
||||
style: Theme.of(context).textTheme.bodySmall!.copyWith(color: labelColor)
|
||||
),
|
||||
backgroundColor: backgroundColor,
|
||||
shape: RoundedRectangleBorder(
|
||||
|
@ -102,14 +102,19 @@ class CreateSpaceModelDialog extends StatelessWidget {
|
||||
name: value,
|
||||
allModels: otherSpaceModels ?? []));
|
||||
},
|
||||
style: const TextStyle(color: ColorsManager.blackColor),
|
||||
style: Theme.of(context)
|
||||
.textTheme
|
||||
.bodySmall!
|
||||
.copyWith(color: ColorsManager.blackColor),
|
||||
decoration: InputDecoration(
|
||||
filled: true,
|
||||
fillColor: ColorsManager.textFieldGreyColor,
|
||||
hintText: 'Please enter the name',
|
||||
errorText: state.errorMessage,
|
||||
hintStyle: const TextStyle(
|
||||
color: ColorsManager.lightGrayColor),
|
||||
hintStyle: Theme.of(context)
|
||||
.textTheme
|
||||
.bodySmall!
|
||||
.copyWith(color: ColorsManager.lightGrayColor),
|
||||
border: OutlineInputBorder(
|
||||
borderRadius: BorderRadius.circular(10),
|
||||
borderSide: BorderSide.none,
|
||||
@ -159,7 +164,9 @@ class CreateSpaceModelDialog extends StatelessWidget {
|
||||
const SizedBox(width: 10),
|
||||
Expanded(
|
||||
child: DefaultButton(
|
||||
onPressed: (state.errorMessage == null)
|
||||
onPressed: ((state.errorMessage != null &&
|
||||
state.errorMessage != '') ||
|
||||
!isNameValid)
|
||||
? () {
|
||||
final updatedSpaceTemplate =
|
||||
updatedSpaceModel.copyWith(
|
||||
@ -237,8 +244,9 @@ class CreateSpaceModelDialog extends StatelessWidget {
|
||||
: null,
|
||||
backgroundColor: ColorsManager.secondaryColor,
|
||||
borderRadius: 10,
|
||||
foregroundColor: (state.errorMessage != null &&
|
||||
state.errorMessage != '')
|
||||
foregroundColor: ((state.errorMessage != null &&
|
||||
state.errorMessage != '') ||
|
||||
!isNameValid)
|
||||
? ColorsManager.whiteColorsWithOpacity
|
||||
: ColorsManager.whiteColors,
|
||||
child: const Text('OK'),
|
||||
@ -252,7 +260,10 @@ class CreateSpaceModelDialog extends StatelessWidget {
|
||||
} else if (state is CreateSpaceModelError) {
|
||||
return Text(
|
||||
'Error: ${state.message}',
|
||||
style: const TextStyle(color: ColorsManager.warningRed),
|
||||
style: Theme.of(context)
|
||||
.textTheme
|
||||
.bodyMedium!
|
||||
.copyWith(color: ColorsManager.warningRed),
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -118,10 +118,10 @@ class _SubspaceNameDisplayWidgetState extends State<SubspaceNameDisplayWidget> {
|
||||
padding: const EdgeInsets.only(top: 4.0),
|
||||
child: Text(
|
||||
errorText!,
|
||||
style: const TextStyle(
|
||||
color: ColorsManager.warningRed,
|
||||
fontSize: 12,
|
||||
),
|
||||
style: Theme.of(context)
|
||||
.textTheme
|
||||
.bodyMedium!
|
||||
.copyWith(color: ColorsManager.warningRed),
|
||||
),
|
||||
),
|
||||
],
|
||||
|
@ -73,9 +73,12 @@ class TagChipDisplay extends StatelessWidget {
|
||||
),
|
||||
label: Text(
|
||||
'x${entry.value}', // Show count
|
||||
style: const TextStyle(
|
||||
color: ColorsManager.spaceColor,
|
||||
),
|
||||
style: Theme.of(context)
|
||||
.textTheme
|
||||
.bodySmall!
|
||||
.copyWith(
|
||||
color:
|
||||
ColorsManager.spaceColor),
|
||||
),
|
||||
backgroundColor: ColorsManager.whiteColors,
|
||||
shape: RoundedRectangleBorder(
|
||||
@ -89,7 +92,7 @@ class TagChipDisplay extends StatelessWidget {
|
||||
EditChip(onTap: () async {
|
||||
// Use the Navigator's context for showDialog
|
||||
Navigator.of(context).pop();
|
||||
|
||||
|
||||
await showDialog<bool>(
|
||||
barrierDismissible: false,
|
||||
context: context,
|
||||
|
Reference in New Issue
Block a user