Этот репозиторий содержит Flutter плагины для платформы ОС Аврора.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

35 lines
736 B

/*
* Copyright (c) 2023. Open Mobile Platform LLC.
* License: Proprietary.
*/
import 'package:flutter/material.dart';
class TextBase extends StatelessWidget {
const TextBase(
this.data, {
super.key,
this.color,
this.textAlign,
this.fontWeight,
});
final String data;
final Color? color;
final TextAlign? textAlign;
final FontWeight? fontWeight;
TextStyle? getStyle(BuildContext context) {
return Theme.of(context).textTheme.bodyMedium;
}
@override
Widget build(BuildContext context) {
return Text(
data,
style: getStyle(context)?.copyWith(color: color ?? Colors.black).copyWith(
fontWeight: fontWeight,
),
textAlign: textAlign,
);
}
}