Flutter upgrader

This commit is contained in:
Hillel Coren 2021-11-16 17:02:40 +02:00
parent b8574bdb80
commit e78dc3ee1f
2 changed files with 20 additions and 9 deletions

View File

@ -286,6 +286,7 @@ class InvoiceNinjaAppState extends State<InvoiceNinjaApp> {
? ThemeData(
colorScheme: ColorScheme.dark().copyWith(
secondary: accentColor,
primary: accentColor,
),
pageTransitionsTheme: pageTransitionsTheme,
indicatorColor: accentColor,

View File

@ -24,22 +24,32 @@ class AppButton extends StatelessWidget {
Widget build(BuildContext context) {
final button = ElevatedButton(
style: ElevatedButton.styleFrom(
primary: color ?? Theme.of(context).colorScheme.secondary,
padding: EdgeInsets.symmetric(vertical: 14, horizontal: 14),
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(kBorderRadius)),
elevation: 4,
textStyle: TextStyle(
color: Colors.white,
)),
primary: color ?? Theme.of(context).colorScheme.secondary,
padding: EdgeInsets.symmetric(vertical: 14, horizontal: 14),
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(kBorderRadius)),
elevation: 4,
textStyle: TextStyle(
color: Colors.white,
),
),
child: iconData != null
? IconText(
icon: iconData,
text: label,
alignment: MainAxisAlignment.center,
style: TextStyle(
color: Colors.white,
),
)
: SizedBox(
child: Text(label, overflow: TextOverflow.ellipsis),
child: Text(
label,
overflow: TextOverflow.ellipsis,
style: TextStyle(
color: Colors.white,
),
),
height: 24,
),
onPressed: onPressed,