mirror of
https://github.com/SyncrowIOT/syncrow-app.git
synced 2025-07-15 17:47:28 +00:00
initialized Dashboard Page
This commit is contained in:
28
lib/features/shared_widgets/text_widgets/body_large.dart
Normal file
28
lib/features/shared_widgets/text_widgets/body_large.dart
Normal file
@ -0,0 +1,28 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:syncrow_app/utils/context_extension.dart';
|
||||
|
||||
import 'custom_text_widget.dart';
|
||||
|
||||
class BodyLarge extends StatelessWidget {
|
||||
const BodyLarge({
|
||||
required this.text,
|
||||
super.key,
|
||||
this.textAlign,
|
||||
this.style,
|
||||
this.height,
|
||||
});
|
||||
|
||||
final String text;
|
||||
final TextAlign? textAlign;
|
||||
|
||||
final TextStyle? style;
|
||||
|
||||
final double? height;
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) => CustomText(
|
||||
text,
|
||||
style: style ?? context.bodyLarge.copyWith(height: height ?? 1.5),
|
||||
textAlign: textAlign,
|
||||
);
|
||||
}
|
31
lib/features/shared_widgets/text_widgets/body_medium.dart
Normal file
31
lib/features/shared_widgets/text_widgets/body_medium.dart
Normal file
@ -0,0 +1,31 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:syncrow_app/features/shared_widgets/text_widgets/custom_text_widget.dart';
|
||||
import 'package:syncrow_app/utils/context_extension.dart';
|
||||
|
||||
class BodyMedium extends StatelessWidget {
|
||||
const BodyMedium({
|
||||
required this.text,
|
||||
super.key,
|
||||
this.style,
|
||||
this.maxLines,
|
||||
this.overflow,
|
||||
this.textAlign,
|
||||
});
|
||||
|
||||
final String text;
|
||||
final TextStyle? style;
|
||||
final int? maxLines;
|
||||
final TextOverflow? overflow;
|
||||
|
||||
final TextAlign? textAlign;
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) => CustomText(
|
||||
text,
|
||||
style: style ?? context.bodyMedium,
|
||||
// softWrap: true,
|
||||
maxLines: maxLines,
|
||||
// overflow: overflow,
|
||||
textAlign: textAlign,
|
||||
);
|
||||
}
|
28
lib/features/shared_widgets/text_widgets/body_small.dart
Normal file
28
lib/features/shared_widgets/text_widgets/body_small.dart
Normal file
@ -0,0 +1,28 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:syncrow_app/features/shared_widgets/text_widgets/custom_text_widget.dart';
|
||||
import 'package:syncrow_app/utils/context_extension.dart';
|
||||
|
||||
class BodySmall extends StatelessWidget {
|
||||
const BodySmall({
|
||||
required this.text,
|
||||
super.key,
|
||||
this.style,
|
||||
this.fontColor,
|
||||
this.fontSize,
|
||||
});
|
||||
|
||||
final String text;
|
||||
final TextStyle? style;
|
||||
|
||||
final Color? fontColor;
|
||||
|
||||
final double? fontSize;
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) => CustomText(
|
||||
text,
|
||||
style: style ?? context.bodySmall,
|
||||
fontColor: fontColor,
|
||||
fontSize: fontSize,
|
||||
);
|
||||
}
|
@ -0,0 +1,42 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:syncrow_app/utils/resource_manager/color_manager.dart';
|
||||
|
||||
class CustomText extends StatelessWidget {
|
||||
const CustomText(this.text,
|
||||
{super.key,
|
||||
this.style,
|
||||
this.textAlign,
|
||||
this.onTap,
|
||||
this.minLines,
|
||||
this.maxLines,
|
||||
this.textDirection,
|
||||
this.fontSize,
|
||||
this.fontColor});
|
||||
|
||||
final String text;
|
||||
final TextStyle? style;
|
||||
final TextAlign? textAlign;
|
||||
final Function()? onTap;
|
||||
final int? minLines;
|
||||
final int? maxLines;
|
||||
final TextDirection? textDirection;
|
||||
|
||||
final double? fontSize;
|
||||
final Color? fontColor;
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return SelectableText(
|
||||
text,
|
||||
style: style!.copyWith(
|
||||
fontSize: fontSize,
|
||||
color: fontColor ?? ColorsManager.textPrimaryColor,
|
||||
),
|
||||
textAlign: textAlign,
|
||||
onTap: onTap,
|
||||
minLines: minLines,
|
||||
maxLines: maxLines,
|
||||
textDirection: textDirection,
|
||||
);
|
||||
}
|
||||
}
|
24
lib/features/shared_widgets/text_widgets/display_large.dart
Normal file
24
lib/features/shared_widgets/text_widgets/display_large.dart
Normal file
@ -0,0 +1,24 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:syncrow_app/features/shared_widgets/text_widgets/custom_text_widget.dart';
|
||||
|
||||
class DisplayLarge extends StatelessWidget {
|
||||
const DisplayLarge({
|
||||
required this.text,
|
||||
super.key,
|
||||
this.style,
|
||||
this.textAlign,
|
||||
});
|
||||
|
||||
final String text;
|
||||
final TextStyle? style;
|
||||
|
||||
final TextAlign? textAlign;
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) => CustomText(
|
||||
text,
|
||||
style: style ?? Theme.of(context).textTheme.displayLarge,
|
||||
textAlign: textAlign,
|
||||
// softWrap: true,
|
||||
);
|
||||
}
|
20
lib/features/shared_widgets/text_widgets/display_medium.dart
Normal file
20
lib/features/shared_widgets/text_widgets/display_medium.dart
Normal file
@ -0,0 +1,20 @@
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
import 'custom_text_widget.dart';
|
||||
|
||||
class DisplayMedium extends StatelessWidget {
|
||||
const DisplayMedium({
|
||||
required this.text,
|
||||
super.key,
|
||||
this.style,
|
||||
});
|
||||
|
||||
final String text;
|
||||
final TextStyle? style;
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) => CustomText(
|
||||
text,
|
||||
style: style ?? Theme.of(context).textTheme.displayMedium,
|
||||
);
|
||||
}
|
25
lib/features/shared_widgets/text_widgets/display_small.dart
Normal file
25
lib/features/shared_widgets/text_widgets/display_small.dart
Normal file
@ -0,0 +1,25 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:syncrow_app/utils/context_extension.dart';
|
||||
|
||||
import 'custom_text_widget.dart';
|
||||
|
||||
class DisplaySmall extends StatelessWidget {
|
||||
const DisplaySmall({
|
||||
required this.text,
|
||||
super.key,
|
||||
this.textAlign,
|
||||
});
|
||||
|
||||
final String text;
|
||||
final TextAlign? textAlign;
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) => Padding(
|
||||
padding: const EdgeInsets.only(bottom: 20),
|
||||
child: CustomText(
|
||||
text,
|
||||
style: context.displaySmall,
|
||||
textAlign: textAlign,
|
||||
),
|
||||
);
|
||||
}
|
20
lib/features/shared_widgets/text_widgets/title_large.dart
Normal file
20
lib/features/shared_widgets/text_widgets/title_large.dart
Normal file
@ -0,0 +1,20 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:syncrow_app/utils/context_extension.dart';
|
||||
|
||||
class TitleLarge extends StatelessWidget {
|
||||
const TitleLarge({
|
||||
required this.text,
|
||||
super.key,
|
||||
});
|
||||
|
||||
final String text;
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) => Padding(
|
||||
padding: const EdgeInsets.only(top: 20, bottom: 10),
|
||||
child: SelectableText(
|
||||
text,
|
||||
style: context.titleLarge,
|
||||
),
|
||||
);
|
||||
}
|
28
lib/features/shared_widgets/text_widgets/title_medium.dart
Normal file
28
lib/features/shared_widgets/text_widgets/title_medium.dart
Normal file
@ -0,0 +1,28 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:syncrow_app/utils/context_extension.dart';
|
||||
|
||||
import 'custom_text_widget.dart';
|
||||
|
||||
class TitleMedium extends StatelessWidget {
|
||||
const TitleMedium({
|
||||
required this.text,
|
||||
super.key,
|
||||
this.maxLines,
|
||||
this.textAlign,
|
||||
this.style,
|
||||
});
|
||||
|
||||
final String text;
|
||||
final int? maxLines;
|
||||
final TextAlign? textAlign;
|
||||
|
||||
final TextStyle? style;
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) => CustomText(
|
||||
text,
|
||||
style: style ?? context.titleMedium,
|
||||
maxLines: maxLines,
|
||||
textAlign: textAlign,
|
||||
);
|
||||
}
|
24
lib/features/shared_widgets/text_widgets/title_small.dart
Normal file
24
lib/features/shared_widgets/text_widgets/title_small.dart
Normal file
@ -0,0 +1,24 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:syncrow_app/utils/context_extension.dart';
|
||||
|
||||
import 'custom_text_widget.dart';
|
||||
|
||||
class TitleSmall extends StatelessWidget {
|
||||
const TitleSmall({
|
||||
required this.text,
|
||||
super.key,
|
||||
this.style,
|
||||
this.textAlign,
|
||||
});
|
||||
|
||||
final String text;
|
||||
final TextStyle? style;
|
||||
final TextAlign? textAlign;
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) => CustomText(
|
||||
text,
|
||||
style: style ?? context.titleSmall,
|
||||
textAlign: textAlign,
|
||||
);
|
||||
}
|
Reference in New Issue
Block a user