mirror of
https://github.com/SyncrowIOT/syncrow-app.git
synced 2025-07-15 09:45:22 +00:00
initialized Dashboard Page
This commit is contained in:
63
lib/features/shared_widgets/united_text.dart
Normal file
63
lib/features/shared_widgets/united_text.dart
Normal file
@ -0,0 +1,63 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:syncrow_app/features/shared_widgets/text_widgets/body_large.dart';
|
||||
import 'package:syncrow_app/features/shared_widgets/text_widgets/body_small.dart';
|
||||
|
||||
class UnitedText extends StatelessWidget {
|
||||
const UnitedText({
|
||||
super.key,
|
||||
required this.value,
|
||||
required this.unit,
|
||||
this.valueStyle,
|
||||
this.unitStyle,
|
||||
this.valueSize,
|
||||
this.valueWeight,
|
||||
this.valueColor,
|
||||
this.unitSize,
|
||||
this.unitWeight,
|
||||
this.unitColor,
|
||||
});
|
||||
|
||||
final String value;
|
||||
|
||||
final TextStyle? valueStyle;
|
||||
final double? valueSize;
|
||||
final FontWeight? valueWeight;
|
||||
|
||||
final Color? valueColor;
|
||||
final String unit;
|
||||
|
||||
final TextStyle? unitStyle;
|
||||
final double? unitSize;
|
||||
final FontWeight? unitWeight;
|
||||
final Color? unitColor;
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Row(
|
||||
mainAxisAlignment: MainAxisAlignment.end,
|
||||
crossAxisAlignment: CrossAxisAlignment.baseline,
|
||||
textBaseline: TextBaseline.alphabetic,
|
||||
children: [
|
||||
BodyLarge(
|
||||
text: value,
|
||||
style: valueStyle ??
|
||||
TextStyle(
|
||||
fontSize: valueSize ?? 20,
|
||||
fontWeight: valueWeight ?? FontWeight.bold,
|
||||
color: valueColor,
|
||||
height: 0,
|
||||
),
|
||||
),
|
||||
BodySmall(
|
||||
text: unit,
|
||||
style: unitStyle ??
|
||||
TextStyle(
|
||||
fontSize: unitSize ?? 10,
|
||||
fontWeight: unitWeight,
|
||||
color: unitColor,
|
||||
),
|
||||
),
|
||||
],
|
||||
);
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user