Correct padding
This commit is contained in:
parent
3076254957
commit
a8f1900e40
|
|
@ -8,6 +8,7 @@ import 'package:invoiceninja_flutter/redux/settings/settings_actions.dart';
|
|||
import 'package:invoiceninja_flutter/redux/ui/list_ui_state.dart';
|
||||
import 'package:invoiceninja_flutter/redux/ui/pref_state.dart';
|
||||
import 'package:invoiceninja_flutter/ui/app/app_border.dart';
|
||||
import 'package:invoiceninja_flutter/ui/app/buttons/app_text_button.dart';
|
||||
import 'package:invoiceninja_flutter/ui/app/dialogs/multiselect_dialog.dart';
|
||||
import 'package:invoiceninja_flutter/utils/completers.dart';
|
||||
import 'package:invoiceninja_flutter/utils/localization.dart';
|
||||
|
|
@ -484,15 +485,9 @@ class _AppBottomBarState extends State<AppBottomBar> {
|
|||
if (!state.prefState.isMenuFloated) Spacer(),
|
||||
if (!widget.entityType.isSetting && !isList)
|
||||
if (state.prefState.isDesktop)
|
||||
TextButton(
|
||||
AppTextButton(
|
||||
label: localization.columns,
|
||||
onPressed: _onColumnsPressed,
|
||||
child: Text(
|
||||
localization.columns,
|
||||
style: TextStyle(
|
||||
color: state.prefState.enableDarkMode
|
||||
? Colors.white
|
||||
: Colors.black),
|
||||
),
|
||||
)
|
||||
else
|
||||
IconButton(
|
||||
|
|
|
|||
|
|
@ -0,0 +1,32 @@
|
|||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_redux/flutter_redux.dart';
|
||||
import 'package:invoiceninja_flutter/redux/app/app_state.dart';
|
||||
|
||||
class AppTextButton extends StatelessWidget {
|
||||
const AppTextButton({
|
||||
this.label,
|
||||
this.onPressed,
|
||||
});
|
||||
|
||||
final String label;
|
||||
final Function onPressed;
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final store = StoreProvider.of<AppState>(context);
|
||||
final state = store.state;
|
||||
|
||||
return TextButton(
|
||||
onPressed: onPressed,
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 16),
|
||||
child: Text(
|
||||
label,
|
||||
style: TextStyle(
|
||||
color: state.prefState.enableDarkMode ? Colors.white : Colors.black,
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
Loading…
Reference in New Issue