Correct padding

This commit is contained in:
Hillel Coren 2021-04-12 18:42:08 +03:00
parent 81801e8ce1
commit d67ebbe9a9
2 changed files with 16 additions and 15 deletions

View File

@ -7,11 +7,13 @@ class AppTextButton extends StatelessWidget {
this.label,
this.onPressed,
this.isInHeader = false,
this.color,
});
final String label;
final Function onPressed;
final bool isInHeader;
final Color color;
@override
Widget build(BuildContext context) {
@ -27,11 +29,13 @@ class AppTextButton extends StatelessWidget {
style: TextStyle(
color: onPressed == null
? null
: isInHeader
? state.headerTextColor
: state.prefState.enableDarkMode
? Colors.white
: Colors.black,
: color != null
? color
: isInHeader
? state.headerTextColor
: state.prefState.enableDarkMode
? Colors.white
: Colors.black,
),
),
),

View File

@ -6,6 +6,7 @@ import 'package:invoiceninja_flutter/redux/app/app_state.dart';
import 'package:invoiceninja_flutter/redux/dashboard/dashboard_actions.dart';
import 'package:invoiceninja_flutter/redux/ui/pref_state.dart';
import 'package:invoiceninja_flutter/ui/app/app_builder.dart';
import 'package:invoiceninja_flutter/ui/app/buttons/app_text_button.dart';
import 'package:invoiceninja_flutter/ui/app/icon_text.dart';
import 'package:invoiceninja_flutter/utils/localization.dart';
import 'package:invoiceninja_flutter/utils/platforms.dart';
@ -71,20 +72,16 @@ class _ChangeLayoutBannerState extends State<ChangeLayoutBanner> {
text: message,
),
),
TextButton(
child: Text(
localization.dismiss,
style: TextStyle(color: Colors.white),
),
AppTextButton(
label: localization.dismiss,
color: Colors.white,
onPressed: () {
setState(() => _dismissedChange = true);
},
),
TextButton(
child: Text(
localization.change,
style: TextStyle(color: Colors.white),
),
AppTextButton(
label: localization.change,
color: Colors.white,
onPressed: () {
final layout =
widget.suggestedLayout == AppLayout.desktop