Correct padding
This commit is contained in:
parent
81801e8ce1
commit
d67ebbe9a9
|
|
@ -7,11 +7,13 @@ class AppTextButton extends StatelessWidget {
|
||||||
this.label,
|
this.label,
|
||||||
this.onPressed,
|
this.onPressed,
|
||||||
this.isInHeader = false,
|
this.isInHeader = false,
|
||||||
|
this.color,
|
||||||
});
|
});
|
||||||
|
|
||||||
final String label;
|
final String label;
|
||||||
final Function onPressed;
|
final Function onPressed;
|
||||||
final bool isInHeader;
|
final bool isInHeader;
|
||||||
|
final Color color;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
|
|
@ -27,11 +29,13 @@ class AppTextButton extends StatelessWidget {
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
color: onPressed == null
|
color: onPressed == null
|
||||||
? null
|
? null
|
||||||
: isInHeader
|
: color != null
|
||||||
? state.headerTextColor
|
? color
|
||||||
: state.prefState.enableDarkMode
|
: isInHeader
|
||||||
? Colors.white
|
? state.headerTextColor
|
||||||
: Colors.black,
|
: state.prefState.enableDarkMode
|
||||||
|
? Colors.white
|
||||||
|
: Colors.black,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|
|
||||||
|
|
@ -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/dashboard/dashboard_actions.dart';
|
||||||
import 'package:invoiceninja_flutter/redux/ui/pref_state.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/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/ui/app/icon_text.dart';
|
||||||
import 'package:invoiceninja_flutter/utils/localization.dart';
|
import 'package:invoiceninja_flutter/utils/localization.dart';
|
||||||
import 'package:invoiceninja_flutter/utils/platforms.dart';
|
import 'package:invoiceninja_flutter/utils/platforms.dart';
|
||||||
|
|
@ -71,20 +72,16 @@ class _ChangeLayoutBannerState extends State<ChangeLayoutBanner> {
|
||||||
text: message,
|
text: message,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
TextButton(
|
AppTextButton(
|
||||||
child: Text(
|
label: localization.dismiss,
|
||||||
localization.dismiss,
|
color: Colors.white,
|
||||||
style: TextStyle(color: Colors.white),
|
|
||||||
),
|
|
||||||
onPressed: () {
|
onPressed: () {
|
||||||
setState(() => _dismissedChange = true);
|
setState(() => _dismissedChange = true);
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
TextButton(
|
AppTextButton(
|
||||||
child: Text(
|
label: localization.change,
|
||||||
localization.change,
|
color: Colors.white,
|
||||||
style: TextStyle(color: Colors.white),
|
|
||||||
),
|
|
||||||
onPressed: () {
|
onPressed: () {
|
||||||
final layout =
|
final layout =
|
||||||
widget.suggestedLayout == AppLayout.desktop
|
widget.suggestedLayout == AppLayout.desktop
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue