Settings
This commit is contained in:
parent
838ee50d41
commit
8f68fc32f5
|
|
@ -83,13 +83,15 @@ class AuthRepository {
|
|||
|
||||
Future<LoginResponse> sendRequest(
|
||||
{String url, dynamic data, String token}) async {
|
||||
/*
|
||||
url +=
|
||||
'?include=tax_rates,users,custom_payment_terms,task_statuses,expense_categories&include_static=true';
|
||||
*/
|
||||
|
||||
url +=
|
||||
'?include=account,user,token,company.groups,company.company_gateways.gateway&include_static=true';
|
||||
final includes = [
|
||||
'account',
|
||||
'user',
|
||||
'token',
|
||||
'company.users',
|
||||
'company.groups',
|
||||
'company.company_gateways',
|
||||
];
|
||||
url += '?include=${includes.join(',')}&include_static=true';
|
||||
|
||||
final dynamic response =
|
||||
await webClient.post(url, token ?? '', data: json.encode(data));
|
||||
|
|
|
|||
|
|
@ -52,6 +52,15 @@ class _DeviceSettingsState extends State<DeviceSettings> {
|
|||
secondary: Icon(FontAwesomeIcons.moon),
|
||||
activeColor: Theme.of(context).accentColor,
|
||||
),
|
||||
SwitchListTile(
|
||||
title: Text(AppLocalization.of(context)
|
||||
.longPressSelectionIsDefault),
|
||||
value: widget.viewModel.longPressSelectionIsDefault,
|
||||
onChanged: (value) => widget.viewModel
|
||||
.onLongPressSelectionIsDefault(context, value),
|
||||
secondary: Icon(FontAwesomeIcons.checkSquare),
|
||||
activeColor: Theme.of(context).accentColor,
|
||||
),
|
||||
FutureBuilder(
|
||||
future: widget.viewModel.authenticationSupported,
|
||||
builder: (BuildContext context, AsyncSnapshot snapshot) {
|
||||
|
|
@ -84,15 +93,10 @@ class _DeviceSettingsState extends State<DeviceSettings> {
|
|||
activeColor: Theme.of(context).accentColor,
|
||||
)
|
||||
: SizedBox(),
|
||||
SwitchListTile(
|
||||
title: Text(AppLocalization.of(context)
|
||||
.longPressSelectionIsDefault),
|
||||
value: widget.viewModel.longPressSelectionIsDefault,
|
||||
onChanged: (value) => widget.viewModel
|
||||
.onLongPressSelectionIsDefault(context, value),
|
||||
secondary: Icon(FontAwesomeIcons.checkSquare),
|
||||
activeColor: Theme.of(context).accentColor,
|
||||
],
|
||||
),
|
||||
FormCard(
|
||||
children: <Widget>[
|
||||
ListTile(
|
||||
leading: Icon(FontAwesomeIcons.syncAlt),
|
||||
title: Text(AppLocalization.of(context).refreshData),
|
||||
|
|
|
|||
|
|
@ -2,7 +2,6 @@ import 'package:flutter/material.dart';
|
|||
import 'package:invoiceninja_flutter/ui/app/app_scaffold.dart';
|
||||
import 'package:invoiceninja_flutter/ui/settings/settings_list_vm.dart';
|
||||
import 'package:invoiceninja_flutter/utils/localization.dart';
|
||||
import 'package:invoiceninja_flutter/utils/platforms.dart';
|
||||
|
||||
class SettingsScreen extends StatelessWidget {
|
||||
static const String route = '/settings';
|
||||
|
|
@ -13,7 +12,6 @@ class SettingsScreen extends StatelessWidget {
|
|||
|
||||
return AppScaffold(
|
||||
appBarTitle: Text(localization.settings),
|
||||
hideHamburgerButton: !isMobile(context),
|
||||
body: SettingsListBuilder(),
|
||||
);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue