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