|
|
|
|
@ -2,7 +2,6 @@ import 'package:doctor_app_flutter/config/size_config.dart';
|
|
|
|
|
import 'package:flutter/cupertino.dart';
|
|
|
|
|
import 'package:flutter/material.dart';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// OWNER : Ibrahim albitar
|
|
|
|
|
// DATE : 12-04-2020
|
|
|
|
|
// DESCRIPTION : Customization for Texts in app
|
|
|
|
|
@ -19,6 +18,7 @@ class AppText extends StatefulWidget {
|
|
|
|
|
final double marginBottom;
|
|
|
|
|
final double marginLeft;
|
|
|
|
|
final bool visibility;
|
|
|
|
|
final TextAlign textAlign;
|
|
|
|
|
|
|
|
|
|
AppText(this.data,
|
|
|
|
|
{this.color = Colors.black,
|
|
|
|
|
@ -30,7 +30,8 @@ class AppText extends StatefulWidget {
|
|
|
|
|
this.marginRight = 0,
|
|
|
|
|
this.marginBottom = 0,
|
|
|
|
|
this.marginLeft = 0,
|
|
|
|
|
this.visibility = true});
|
|
|
|
|
this.visibility = true,
|
|
|
|
|
this.textAlign});
|
|
|
|
|
|
|
|
|
|
@override
|
|
|
|
|
_AppTextState createState() => _AppTextState();
|
|
|
|
|
@ -39,18 +40,19 @@ class AppText extends StatefulWidget {
|
|
|
|
|
class _AppTextState extends State<AppText> {
|
|
|
|
|
@override
|
|
|
|
|
Widget build(BuildContext context) {
|
|
|
|
|
|
|
|
|
|
return Visibility(
|
|
|
|
|
visible: widget.visibility,
|
|
|
|
|
child: Container(
|
|
|
|
|
margin: widget.margin != null ? EdgeInsets.all(widget.margin) : EdgeInsets.only(
|
|
|
|
|
top: widget.marginTop,
|
|
|
|
|
right: widget.marginRight,
|
|
|
|
|
bottom: widget.marginBottom,
|
|
|
|
|
left: widget.marginLeft
|
|
|
|
|
),
|
|
|
|
|
child: Container(
|
|
|
|
|
margin: widget.margin != null
|
|
|
|
|
? EdgeInsets.all(widget.margin)
|
|
|
|
|
: EdgeInsets.only(
|
|
|
|
|
top: widget.marginTop,
|
|
|
|
|
right: widget.marginRight,
|
|
|
|
|
bottom: widget.marginBottom,
|
|
|
|
|
left: widget.marginLeft),
|
|
|
|
|
child: Text(
|
|
|
|
|
widget.data,
|
|
|
|
|
textAlign: widget.textAlign,
|
|
|
|
|
style: TextStyle(
|
|
|
|
|
color: widget.color,
|
|
|
|
|
fontWeight: widget.fontWeight,
|
|
|
|
|
|