Fix fab/heo issue
This commit is contained in:
parent
c8a21d6eaa
commit
00334fa91d
|
|
@ -15,7 +15,6 @@ import 'package:invoiceninja_flutter/redux/task/task_reducer.dart';
|
||||||
import 'package:invoiceninja_flutter/redux/project/project_reducer.dart';
|
import 'package:invoiceninja_flutter/redux/project/project_reducer.dart';
|
||||||
import 'package:invoiceninja_flutter/redux/payment/payment_reducer.dart';
|
import 'package:invoiceninja_flutter/redux/payment/payment_reducer.dart';
|
||||||
import 'package:invoiceninja_flutter/redux/quote/quote_reducer.dart';
|
import 'package:invoiceninja_flutter/redux/quote/quote_reducer.dart';
|
||||||
import 'package:sentry/sentry.dart';
|
|
||||||
// STARTER: import - do not remove comment
|
// STARTER: import - do not remove comment
|
||||||
|
|
||||||
UserCompanyState companyReducer(UserCompanyState state, dynamic action) {
|
UserCompanyState companyReducer(UserCompanyState state, dynamic action) {
|
||||||
|
|
|
||||||
|
|
@ -62,6 +62,7 @@ class ClientScreen extends StatelessWidget {
|
||||||
),
|
),
|
||||||
floatingActionButton: userCompany.canCreate(EntityType.client)
|
floatingActionButton: userCompany.canCreate(EntityType.client)
|
||||||
? FloatingActionButton(
|
? FloatingActionButton(
|
||||||
|
heroTag: 'client_fab',
|
||||||
backgroundColor: Theme.of(context).primaryColorDark,
|
backgroundColor: Theme.of(context).primaryColorDark,
|
||||||
onPressed: () => store.dispatch(
|
onPressed: () => store.dispatch(
|
||||||
EditClient(client: ClientEntity(), context: context)),
|
EditClient(client: ClientEntity(), context: context)),
|
||||||
|
|
|
||||||
|
|
@ -71,6 +71,7 @@ class _ClientViewState extends State<ClientView>
|
||||||
controller: _controller,
|
controller: _controller,
|
||||||
),
|
),
|
||||||
floatingActionButton: FloatingActionButton(
|
floatingActionButton: FloatingActionButton(
|
||||||
|
heroTag: 'client_view_fab',
|
||||||
backgroundColor: Theme.of(context).primaryColorDark,
|
backgroundColor: Theme.of(context).primaryColorDark,
|
||||||
onPressed: () {
|
onPressed: () {
|
||||||
showDialog<SimpleDialog>(
|
showDialog<SimpleDialog>(
|
||||||
|
|
|
||||||
|
|
@ -53,7 +53,7 @@ class DocumentScreen extends StatelessWidget {
|
||||||
),
|
),
|
||||||
floatingActionButton: userCompany.canCreate(EntityType.document)
|
floatingActionButton: userCompany.canCreate(EntityType.document)
|
||||||
? FloatingActionButton(
|
? FloatingActionButton(
|
||||||
//key: Key(DocumentKeys.documentScreenFABKeyString),
|
heroTag: 'document_fab',
|
||||||
backgroundColor: Theme.of(context).primaryColorDark,
|
backgroundColor: Theme.of(context).primaryColorDark,
|
||||||
onPressed: () {
|
onPressed: () {
|
||||||
store.dispatch(
|
store.dispatch(
|
||||||
|
|
|
||||||
|
|
@ -79,7 +79,7 @@ class ExpenseScreen extends StatelessWidget {
|
||||||
),
|
),
|
||||||
floatingActionButton: userCompany.canCreate(EntityType.expense)
|
floatingActionButton: userCompany.canCreate(EntityType.expense)
|
||||||
? FloatingActionButton(
|
? FloatingActionButton(
|
||||||
//key: Key(ExpenseKeys.expenseScreenFABKeyString),
|
heroTag: 'expense_fab',
|
||||||
backgroundColor: Theme.of(context).primaryColorDark,
|
backgroundColor: Theme.of(context).primaryColorDark,
|
||||||
onPressed: () {
|
onPressed: () {
|
||||||
store.dispatch(EditExpense(
|
store.dispatch(EditExpense(
|
||||||
|
|
|
||||||
|
|
@ -63,6 +63,7 @@ class _ExpenseViewState extends State<ExpenseView>
|
||||||
floatingActionButton: company.isEnterprisePlan
|
floatingActionButton: company.isEnterprisePlan
|
||||||
? Builder(builder: (BuildContext context) {
|
? Builder(builder: (BuildContext context) {
|
||||||
return FloatingActionButton(
|
return FloatingActionButton(
|
||||||
|
heroTag: 'expense_fab',
|
||||||
backgroundColor: Theme.of(context).primaryColorDark,
|
backgroundColor: Theme.of(context).primaryColorDark,
|
||||||
onPressed: () async {
|
onPressed: () async {
|
||||||
final image =
|
final image =
|
||||||
|
|
|
||||||
|
|
@ -5,9 +5,6 @@ import 'package:invoiceninja_flutter/ui/invoice/edit/invoice_edit_items_vm.dart'
|
||||||
import 'package:invoiceninja_flutter/ui/invoice/edit/invoice_edit_notes_vm.dart';
|
import 'package:invoiceninja_flutter/ui/invoice/edit/invoice_edit_notes_vm.dart';
|
||||||
import 'package:invoiceninja_flutter/ui/invoice/edit/invoice_edit_vm.dart';
|
import 'package:invoiceninja_flutter/ui/invoice/edit/invoice_edit_vm.dart';
|
||||||
import 'package:invoiceninja_flutter/ui/invoice/edit/invoice_item_selector.dart';
|
import 'package:invoiceninja_flutter/ui/invoice/edit/invoice_item_selector.dart';
|
||||||
import 'package:invoiceninja_flutter/ui/quote/edit/quote_edit_details_vm.dart';
|
|
||||||
import 'package:invoiceninja_flutter/ui/quote/edit/quote_edit_items_vm.dart';
|
|
||||||
import 'package:invoiceninja_flutter/ui/quote/edit/quote_edit_notes_vm.dart';
|
|
||||||
import 'package:invoiceninja_flutter/utils/formatting.dart';
|
import 'package:invoiceninja_flutter/utils/formatting.dart';
|
||||||
import 'package:invoiceninja_flutter/utils/localization.dart';
|
import 'package:invoiceninja_flutter/utils/localization.dart';
|
||||||
import 'package:invoiceninja_flutter/ui/app/buttons/action_icon_button.dart';
|
import 'package:invoiceninja_flutter/ui/app/buttons/action_icon_button.dart';
|
||||||
|
|
@ -69,12 +66,8 @@ class _InvoiceEditState extends State<InvoiceEdit>
|
||||||
appBar: AppBar(
|
appBar: AppBar(
|
||||||
automaticallyImplyLeading: isMobile(context),
|
automaticallyImplyLeading: isMobile(context),
|
||||||
title: Text(invoice.isNew
|
title: Text(invoice.isNew
|
||||||
? invoice.isQuote
|
? localization.newInvoice
|
||||||
? localization.newQuote
|
: localization.editInvoice),
|
||||||
: localization.newInvoice
|
|
||||||
: invoice.isQuote
|
|
||||||
? localization.editQuote
|
|
||||||
: localization.editInvoice),
|
|
||||||
actions: <Widget>[
|
actions: <Widget>[
|
||||||
if (!isMobile(context))
|
if (!isMobile(context))
|
||||||
FlatButton(
|
FlatButton(
|
||||||
|
|
@ -120,17 +113,11 @@ class _InvoiceEditState extends State<InvoiceEdit>
|
||||||
child: TabBarView(
|
child: TabBarView(
|
||||||
key: ValueKey(viewModel.invoice.id),
|
key: ValueKey(viewModel.invoice.id),
|
||||||
controller: _controller,
|
controller: _controller,
|
||||||
children: invoice.isQuote
|
children: <Widget>[
|
||||||
? <Widget>[
|
InvoiceEditDetailsScreen(),
|
||||||
QuoteEditDetailsScreen(),
|
InvoiceEditItemsScreen(),
|
||||||
QuoteEditItemsScreen(),
|
InvoiceEditNotesScreen(),
|
||||||
QuoteEditNotesScreen(),
|
],
|
||||||
]
|
|
||||||
: <Widget>[
|
|
||||||
InvoiceEditDetailsScreen(),
|
|
||||||
InvoiceEditItemsScreen(),
|
|
||||||
InvoiceEditNotesScreen(),
|
|
||||||
],
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
bottomNavigationBar: BottomAppBar(
|
bottomNavigationBar: BottomAppBar(
|
||||||
|
|
@ -150,6 +137,7 @@ class _InvoiceEditState extends State<InvoiceEdit>
|
||||||
),
|
),
|
||||||
floatingActionButtonLocation: FloatingActionButtonLocation.endDocked,
|
floatingActionButtonLocation: FloatingActionButtonLocation.endDocked,
|
||||||
floatingActionButton: FloatingActionButton(
|
floatingActionButton: FloatingActionButton(
|
||||||
|
heroTag: 'invoice_edit_fab',
|
||||||
backgroundColor: Theme.of(context).primaryColorDark,
|
backgroundColor: Theme.of(context).primaryColorDark,
|
||||||
onPressed: () {
|
onPressed: () {
|
||||||
showDialog<InvoiceItemSelector>(
|
showDialog<InvoiceItemSelector>(
|
||||||
|
|
|
||||||
|
|
@ -98,6 +98,7 @@ class InvoiceScreen extends StatelessWidget {
|
||||||
),
|
),
|
||||||
floatingActionButton: userCompany.canCreate(EntityType.invoice)
|
floatingActionButton: userCompany.canCreate(EntityType.invoice)
|
||||||
? FloatingActionButton(
|
? FloatingActionButton(
|
||||||
|
heroTag: 'invoice_fab',
|
||||||
backgroundColor: Theme.of(context).primaryColorDark,
|
backgroundColor: Theme.of(context).primaryColorDark,
|
||||||
onPressed: () {
|
onPressed: () {
|
||||||
store.dispatch(EditInvoice(
|
store.dispatch(EditInvoice(
|
||||||
|
|
|
||||||
|
|
@ -53,7 +53,7 @@ class PaymentScreen extends StatelessWidget {
|
||||||
),
|
),
|
||||||
floatingActionButton: userCompany.canCreate(EntityType.payment)
|
floatingActionButton: userCompany.canCreate(EntityType.payment)
|
||||||
? FloatingActionButton(
|
? FloatingActionButton(
|
||||||
//key: Key(PaymentKeys.paymentScreenFABKeyString),
|
heroTag: 'payment_fab',
|
||||||
backgroundColor: Theme.of(context).primaryColorDark,
|
backgroundColor: Theme.of(context).primaryColorDark,
|
||||||
onPressed: () {
|
onPressed: () {
|
||||||
store.dispatch(EditPayment(
|
store.dispatch(EditPayment(
|
||||||
|
|
|
||||||
|
|
@ -59,6 +59,7 @@ class ProductScreen extends StatelessWidget {
|
||||||
),
|
),
|
||||||
floatingActionButton: userCompany.canCreate(EntityType.product)
|
floatingActionButton: userCompany.canCreate(EntityType.product)
|
||||||
? FloatingActionButton(
|
? FloatingActionButton(
|
||||||
|
heroTag: 'product_fab',
|
||||||
backgroundColor: Theme.of(context).primaryColorDark,
|
backgroundColor: Theme.of(context).primaryColorDark,
|
||||||
onPressed: () {
|
onPressed: () {
|
||||||
store.dispatch(
|
store.dispatch(
|
||||||
|
|
|
||||||
|
|
@ -58,7 +58,7 @@ class ProjectScreen extends StatelessWidget {
|
||||||
),
|
),
|
||||||
floatingActionButton: userCompany.canCreate(EntityType.project)
|
floatingActionButton: userCompany.canCreate(EntityType.project)
|
||||||
? FloatingActionButton(
|
? FloatingActionButton(
|
||||||
//key: Key(ProjectKeys.projectScreenFABKeyString),
|
heroTag: 'project_fab',
|
||||||
backgroundColor: Theme.of(context).primaryColorDark,
|
backgroundColor: Theme.of(context).primaryColorDark,
|
||||||
onPressed: () {
|
onPressed: () {
|
||||||
store.dispatch(EditProject(
|
store.dispatch(EditProject(
|
||||||
|
|
|
||||||
|
|
@ -153,6 +153,7 @@ class _ProjectViewState extends State<ProjectView> {
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
floatingActionButton: FloatingActionButton(
|
floatingActionButton: FloatingActionButton(
|
||||||
|
heroTag: 'project_view_fab',
|
||||||
backgroundColor: Theme.of(context).primaryColorDark,
|
backgroundColor: Theme.of(context).primaryColorDark,
|
||||||
onPressed: () => viewModel.onAddTaskPressed(context),
|
onPressed: () => viewModel.onAddTaskPressed(context),
|
||||||
child: Icon(
|
child: Icon(
|
||||||
|
|
|
||||||
|
|
@ -5,8 +5,8 @@ import 'package:flutter_redux/flutter_redux.dart';
|
||||||
import 'package:invoiceninja_flutter/redux/quote/quote_actions.dart';
|
import 'package:invoiceninja_flutter/redux/quote/quote_actions.dart';
|
||||||
import 'package:invoiceninja_flutter/redux/ui/ui_actions.dart';
|
import 'package:invoiceninja_flutter/redux/ui/ui_actions.dart';
|
||||||
import 'package:invoiceninja_flutter/ui/app/dialogs/error_dialog.dart';
|
import 'package:invoiceninja_flutter/ui/app/dialogs/error_dialog.dart';
|
||||||
import 'package:invoiceninja_flutter/ui/invoice/edit/invoice_edit.dart';
|
|
||||||
import 'package:invoiceninja_flutter/ui/invoice/edit/invoice_edit_vm.dart';
|
import 'package:invoiceninja_flutter/ui/invoice/edit/invoice_edit_vm.dart';
|
||||||
|
import 'package:invoiceninja_flutter/ui/quote/quote_edit.dart';
|
||||||
import 'package:invoiceninja_flutter/ui/quote/quote_screen.dart';
|
import 'package:invoiceninja_flutter/ui/quote/quote_screen.dart';
|
||||||
import 'package:invoiceninja_flutter/ui/quote/view/quote_view_vm.dart';
|
import 'package:invoiceninja_flutter/ui/quote/view/quote_view_vm.dart';
|
||||||
import 'package:invoiceninja_flutter/utils/platforms.dart';
|
import 'package:invoiceninja_flutter/utils/platforms.dart';
|
||||||
|
|
@ -28,7 +28,7 @@ class QuoteEditScreen extends StatelessWidget {
|
||||||
return QuoteEditVM.fromStore(store);
|
return QuoteEditVM.fromStore(store);
|
||||||
},
|
},
|
||||||
builder: (context, viewModel) {
|
builder: (context, viewModel) {
|
||||||
return InvoiceEdit(
|
return QuoteEdit(
|
||||||
viewModel: viewModel,
|
viewModel: viewModel,
|
||||||
formKey: _formKey,
|
formKey: _formKey,
|
||||||
);
|
);
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,166 @@
|
||||||
|
import 'package:flutter/foundation.dart';
|
||||||
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:invoiceninja_flutter/ui/invoice/edit/invoice_edit_vm.dart';
|
||||||
|
import 'package:invoiceninja_flutter/ui/invoice/edit/invoice_item_selector.dart';
|
||||||
|
import 'package:invoiceninja_flutter/ui/quote/edit/quote_edit_details_vm.dart';
|
||||||
|
import 'package:invoiceninja_flutter/ui/quote/edit/quote_edit_items_vm.dart';
|
||||||
|
import 'package:invoiceninja_flutter/ui/quote/edit/quote_edit_notes_vm.dart';
|
||||||
|
import 'package:invoiceninja_flutter/utils/formatting.dart';
|
||||||
|
import 'package:invoiceninja_flutter/utils/localization.dart';
|
||||||
|
import 'package:invoiceninja_flutter/ui/app/buttons/action_icon_button.dart';
|
||||||
|
import 'package:invoiceninja_flutter/utils/platforms.dart';
|
||||||
|
|
||||||
|
class QuoteEdit extends StatefulWidget {
|
||||||
|
const QuoteEdit({
|
||||||
|
Key key,
|
||||||
|
@required this.formKey,
|
||||||
|
@required this.viewModel,
|
||||||
|
}) : super(key: key);
|
||||||
|
|
||||||
|
final EntityEditVM viewModel;
|
||||||
|
final GlobalKey<FormState> formKey;
|
||||||
|
|
||||||
|
@override
|
||||||
|
_QuoteEditState createState() => _QuoteEditState();
|
||||||
|
}
|
||||||
|
|
||||||
|
class _QuoteEditState extends State<QuoteEdit>
|
||||||
|
with SingleTickerProviderStateMixin {
|
||||||
|
TabController _controller;
|
||||||
|
|
||||||
|
static const kDetailsScreen = 0;
|
||||||
|
static const kItemScreen = 1;
|
||||||
|
static const kNotesScreen = 2;
|
||||||
|
|
||||||
|
@override
|
||||||
|
void initState() {
|
||||||
|
super.initState();
|
||||||
|
|
||||||
|
final invoice = widget.viewModel.invoice;
|
||||||
|
final invoiceItem = widget.viewModel.invoiceItem;
|
||||||
|
|
||||||
|
final index = invoice.invoiceItems.contains(invoiceItem)
|
||||||
|
? kItemScreen
|
||||||
|
: kDetailsScreen;
|
||||||
|
_controller = TabController(vsync: this, length: 3, initialIndex: index);
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
void dispose() {
|
||||||
|
_controller.dispose();
|
||||||
|
super.dispose();
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
final localization = AppLocalization.of(context);
|
||||||
|
final viewModel = widget.viewModel;
|
||||||
|
final invoice = viewModel.invoice;
|
||||||
|
|
||||||
|
return WillPopScope(
|
||||||
|
onWillPop: () async {
|
||||||
|
viewModel.onBackPressed();
|
||||||
|
return true;
|
||||||
|
},
|
||||||
|
child: Scaffold(
|
||||||
|
appBar: AppBar(
|
||||||
|
automaticallyImplyLeading: isMobile(context),
|
||||||
|
title: Text(
|
||||||
|
invoice.isNew ? localization.newQuote : localization.editQuote),
|
||||||
|
actions: <Widget>[
|
||||||
|
if (!isMobile(context))
|
||||||
|
FlatButton(
|
||||||
|
child: Text(
|
||||||
|
localization.cancel,
|
||||||
|
style: TextStyle(color: Colors.white),
|
||||||
|
),
|
||||||
|
onPressed: () => viewModel.onCancelPressed(context),
|
||||||
|
),
|
||||||
|
ActionIconButton(
|
||||||
|
icon: Icons.cloud_upload,
|
||||||
|
tooltip: localization.save,
|
||||||
|
isVisible: !invoice.isDeleted,
|
||||||
|
isSaving: widget.viewModel.isSaving,
|
||||||
|
isDirty: invoice.isNew || invoice != viewModel.origInvoice,
|
||||||
|
onPressed: () {
|
||||||
|
if (!widget.formKey.currentState.validate()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
widget.viewModel.onSavePressed(context);
|
||||||
|
},
|
||||||
|
)
|
||||||
|
],
|
||||||
|
bottom: TabBar(
|
||||||
|
controller: _controller,
|
||||||
|
//isScrollable: true,
|
||||||
|
tabs: [
|
||||||
|
Tab(
|
||||||
|
text: localization.details,
|
||||||
|
),
|
||||||
|
Tab(
|
||||||
|
text: localization.items,
|
||||||
|
),
|
||||||
|
Tab(
|
||||||
|
text: localization.notes,
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
body: Form(
|
||||||
|
key: widget.formKey,
|
||||||
|
child: TabBarView(
|
||||||
|
key: ValueKey(viewModel.invoice.id),
|
||||||
|
controller: _controller,
|
||||||
|
children: <Widget>[
|
||||||
|
QuoteEditDetailsScreen(),
|
||||||
|
QuoteEditItemsScreen(),
|
||||||
|
QuoteEditNotesScreen(),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
bottomNavigationBar: BottomAppBar(
|
||||||
|
color: Theme.of(context).primaryColor,
|
||||||
|
shape: CircularNotchedRectangle(),
|
||||||
|
child: Padding(
|
||||||
|
padding: const EdgeInsets.all(14.0),
|
||||||
|
child: Text(
|
||||||
|
'${localization.total}: ${formatNumber(invoice.calculateTotal(viewModel.company.settings.enableInclusiveTaxes), context, clientId: viewModel.invoice.clientId)}',
|
||||||
|
style: TextStyle(
|
||||||
|
//color: Theme.of(context).selectedRowColor,
|
||||||
|
color: Colors.white,
|
||||||
|
fontSize: 20.0,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
floatingActionButtonLocation: FloatingActionButtonLocation.endDocked,
|
||||||
|
floatingActionButton: FloatingActionButton(
|
||||||
|
heroTag: 'quote_edit_fab',
|
||||||
|
backgroundColor: Theme.of(context).primaryColorDark,
|
||||||
|
onPressed: () {
|
||||||
|
showDialog<InvoiceItemSelector>(
|
||||||
|
context: context,
|
||||||
|
builder: (BuildContext context) {
|
||||||
|
return InvoiceItemSelector(
|
||||||
|
excluded: invoice.invoiceItems
|
||||||
|
.where((item) => item.isTask || item.isExpense)
|
||||||
|
.map((item) => item.isTask
|
||||||
|
? viewModel.state.taskState.map[item.taskId]
|
||||||
|
: viewModel.state.expenseState.map[item.expenseId])
|
||||||
|
.toList(),
|
||||||
|
clientId: invoice.clientId,
|
||||||
|
onItemsSelected: (items, [clientId]) {
|
||||||
|
viewModel.onItemsAdded(items, clientId);
|
||||||
|
_controller.animateTo(kItemScreen);
|
||||||
|
},
|
||||||
|
);
|
||||||
|
});
|
||||||
|
},
|
||||||
|
child: const Icon(Icons.add, color: Colors.white),
|
||||||
|
tooltip: localization.addItem,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -91,6 +91,7 @@ class QuoteScreen extends StatelessWidget {
|
||||||
),
|
),
|
||||||
floatingActionButton: userCompany.canCreate(EntityType.quote)
|
floatingActionButton: userCompany.canCreate(EntityType.quote)
|
||||||
? FloatingActionButton(
|
? FloatingActionButton(
|
||||||
|
heroTag: 'quote_fab',
|
||||||
backgroundColor: Theme.of(context).primaryColorDark,
|
backgroundColor: Theme.of(context).primaryColorDark,
|
||||||
onPressed: () {
|
onPressed: () {
|
||||||
store.dispatch(EditQuote(
|
store.dispatch(EditQuote(
|
||||||
|
|
|
||||||
|
|
@ -137,6 +137,7 @@ class _TaskEditState extends State<TaskEdit>
|
||||||
floatingActionButton: task.isInvoiced || task.isDeleted
|
floatingActionButton: task.isInvoiced || task.isDeleted
|
||||||
? SizedBox()
|
? SizedBox()
|
||||||
: FloatingActionButton(
|
: FloatingActionButton(
|
||||||
|
heroTag: 'task_edit_fab',
|
||||||
backgroundColor: Theme.of(context).primaryColorDark,
|
backgroundColor: Theme.of(context).primaryColorDark,
|
||||||
onPressed: () => viewModel.onFabPressed(),
|
onPressed: () => viewModel.onFabPressed(),
|
||||||
child: Icon(
|
child: Icon(
|
||||||
|
|
|
||||||
|
|
@ -78,7 +78,7 @@ class TaskScreen extends StatelessWidget {
|
||||||
),
|
),
|
||||||
floatingActionButton: userCompany.canCreate(EntityType.task)
|
floatingActionButton: userCompany.canCreate(EntityType.task)
|
||||||
? FloatingActionButton(
|
? FloatingActionButton(
|
||||||
//key: Key(TaskKeys.taskScreenFABKeyString),
|
heroTag: 'task_fab',
|
||||||
backgroundColor: Theme.of(context).primaryColorDark,
|
backgroundColor: Theme.of(context).primaryColorDark,
|
||||||
onPressed: () {
|
onPressed: () {
|
||||||
store.dispatch(EditTask(
|
store.dispatch(EditTask(
|
||||||
|
|
|
||||||
|
|
@ -219,6 +219,7 @@ class _TaskViewState extends State<TaskView> {
|
||||||
return task.isInvoiced || task.isDeleted
|
return task.isInvoiced || task.isDeleted
|
||||||
? SizedBox()
|
? SizedBox()
|
||||||
: FloatingActionButton(
|
: FloatingActionButton(
|
||||||
|
heroTag: 'task_view_fab',
|
||||||
backgroundColor: Theme.of(context).primaryColorDark,
|
backgroundColor: Theme.of(context).primaryColorDark,
|
||||||
onPressed: () => viewModel.onFabPressed(context),
|
onPressed: () => viewModel.onFabPressed(context),
|
||||||
child: Icon(
|
child: Icon(
|
||||||
|
|
|
||||||
|
|
@ -58,7 +58,7 @@ class VendorScreen extends StatelessWidget {
|
||||||
),
|
),
|
||||||
floatingActionButton: userCompany.canCreate(EntityType.vendor)
|
floatingActionButton: userCompany.canCreate(EntityType.vendor)
|
||||||
? FloatingActionButton(
|
? FloatingActionButton(
|
||||||
//key: Key(VendorKeys.vendorScreenFABKeyString),
|
heroTag: 'vendor_fab',
|
||||||
backgroundColor: Theme.of(context).primaryColorDark,
|
backgroundColor: Theme.of(context).primaryColorDark,
|
||||||
onPressed: () {
|
onPressed: () {
|
||||||
store.dispatch(
|
store.dispatch(
|
||||||
|
|
|
||||||
|
|
@ -57,6 +57,7 @@ class _VendorViewState extends State<VendorView>
|
||||||
controller: _controller,
|
controller: _controller,
|
||||||
),
|
),
|
||||||
floatingActionButton: FloatingActionButton(
|
floatingActionButton: FloatingActionButton(
|
||||||
|
heroTag: 'vendor_view_fab',
|
||||||
backgroundColor: Theme.of(context).primaryColorDark,
|
backgroundColor: Theme.of(context).primaryColorDark,
|
||||||
onPressed: () => viewModel.onAddExpensePressed(context),
|
onPressed: () => viewModel.onAddExpensePressed(context),
|
||||||
child: Icon(
|
child: Icon(
|
||||||
|
|
|
||||||
|
|
@ -60,7 +60,7 @@ class StubScreen extends StatelessWidget {
|
||||||
),
|
),
|
||||||
floatingActionButton: user.canCreate(EntityType.stub)
|
floatingActionButton: user.canCreate(EntityType.stub)
|
||||||
? FloatingActionButton(
|
? FloatingActionButton(
|
||||||
//key: Key(StubKeys.stubScreenFABKeyString),
|
heroTag: 'stub_fab',
|
||||||
backgroundColor: Theme.of(context).primaryColorDark,
|
backgroundColor: Theme.of(context).primaryColorDark,
|
||||||
onPressed: () {
|
onPressed: () {
|
||||||
store.dispatch(
|
store.dispatch(
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue