You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
33 lines
813 B
Dart
33 lines
813 B
Dart
import 'package:flutter/material.dart';
|
|
|
|
import '../../app_style/sizing.dart';
|
|
|
|
class ATitle extends StatelessWidget {
|
|
final String text;
|
|
final EdgeInsets? padding;
|
|
final bool center;
|
|
|
|
const ATitle(this.text, {Key? key, this.padding, this.center = false}) : super(key: key);
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return Padding(
|
|
padding: padding ??
|
|
const EdgeInsets.symmetric(
|
|
horizontal: 16,
|
|
vertical: 8,
|
|
),
|
|
child: Row(
|
|
mainAxisAlignment: center ? MainAxisAlignment.center : MainAxisAlignment.start,
|
|
children: [
|
|
Text(
|
|
text,
|
|
style: Theme.of(context).textTheme.titleLarge,
|
|
textScaleFactor: AppStyle.getScaleFactor(context),
|
|
),
|
|
],
|
|
),
|
|
);
|
|
}
|
|
}
|