import 'package:flutter/material.dart'; import 'package:test_sa/views/app_style/sizing.dart'; class ASubTitle extends StatelessWidget { final String text; final EdgeInsets padding; final Color color; final double font; const ASubTitle(this.text, {Key key,this.padding, this.color, this.font}) : super(key: key); @override Widget build(BuildContext context) { return Padding( padding: padding ?? EdgeInsets.zero, child: Text( text, style: Theme.of(context).textTheme.subtitle2.copyWith( // fontWeight: FontWeight.bold, fontSize: font, color: color ), textScaleFactor: AppStyle.getScaleFactor(context), ), ); } }