Windows App Can’t close when in Mobile Mode
This commit is contained in:
parent
39e8279943
commit
04476b8d55
|
|
@ -11,6 +11,7 @@ import 'package:flutter_localizations/flutter_localizations.dart';
|
||||||
import 'package:flutter_redux/flutter_redux.dart';
|
import 'package:flutter_redux/flutter_redux.dart';
|
||||||
import 'package:flutter_styled_toast/flutter_styled_toast.dart';
|
import 'package:flutter_styled_toast/flutter_styled_toast.dart';
|
||||||
import 'package:intl/intl.dart';
|
import 'package:intl/intl.dart';
|
||||||
|
import 'package:invoiceninja_flutter/ui/app/window_manager.dart';
|
||||||
import 'package:invoiceninja_flutter/ui/bank_account/edit/bank_account_edit_vm.dart';
|
import 'package:invoiceninja_flutter/ui/bank_account/edit/bank_account_edit_vm.dart';
|
||||||
import 'package:invoiceninja_flutter/ui/settings/payment_settings_vm.dart';
|
import 'package:invoiceninja_flutter/ui/settings/payment_settings_vm.dart';
|
||||||
import 'package:local_auth/local_auth.dart';
|
import 'package:local_auth/local_auth.dart';
|
||||||
|
|
@ -333,324 +334,343 @@ class InvoiceNinjaAppState extends State<InvoiceNinjaApp> {
|
||||||
),
|
),
|
||||||
child: WebSocketRefresh(
|
child: WebSocketRefresh(
|
||||||
companyId: state.company?.id,
|
companyId: state.company?.id,
|
||||||
child: MaterialApp(
|
child: WindowManager(
|
||||||
builder: (BuildContext context, Widget child) {
|
child: MaterialApp(
|
||||||
final MediaQueryData data = MediaQuery.of(context);
|
builder: (BuildContext context, Widget child) {
|
||||||
return MediaQuery(
|
final MediaQueryData data = MediaQuery.of(context);
|
||||||
data: data.copyWith(
|
return MediaQuery(
|
||||||
textScaleFactor: state.prefState.textScaleFactor,
|
data: data.copyWith(
|
||||||
alwaysUse24HourFormat:
|
textScaleFactor: state.prefState.textScaleFactor,
|
||||||
state.company?.settings?.enableMilitaryTime ?? false,
|
alwaysUse24HourFormat:
|
||||||
),
|
state.company?.settings?.enableMilitaryTime ??
|
||||||
child: child,
|
false,
|
||||||
);
|
|
||||||
},
|
|
||||||
scrollBehavior: state.prefState.enableTouchEvents
|
|
||||||
? MyCustomScrollBehavior()
|
|
||||||
: null,
|
|
||||||
navigatorKey: navigatorKey,
|
|
||||||
supportedLocales: kLanguages
|
|
||||||
.map(
|
|
||||||
(String locale) => AppLocalization.createLocale(locale))
|
|
||||||
.toList(),
|
|
||||||
debugShowCheckedModeBanner: false,
|
|
||||||
//showPerformanceOverlay: true,
|
|
||||||
navigatorObservers: [
|
|
||||||
SentryNavigatorObserver(),
|
|
||||||
],
|
|
||||||
localizationsDelegates: [
|
|
||||||
const AppLocalizationsDelegate(),
|
|
||||||
GlobalCupertinoLocalizations.delegate,
|
|
||||||
GlobalWidgetsLocalizations.delegate,
|
|
||||||
GlobalMaterialLocalizations.delegate
|
|
||||||
],
|
|
||||||
home: state.prefState.requireAuthentication && !_authenticated
|
|
||||||
? LockScreen(onAuthenticatePressed: _authenticate)
|
|
||||||
: InitScreen(),
|
|
||||||
locale: locale,
|
|
||||||
theme: state.prefState.enableDarkMode
|
|
||||||
? ThemeData(
|
|
||||||
colorScheme: ColorScheme.dark().copyWith(
|
|
||||||
secondary: accentColor,
|
|
||||||
primary: accentColor,
|
|
||||||
),
|
|
||||||
tooltipTheme: TooltipThemeData(
|
|
||||||
waitDuration: Duration(milliseconds: 500),
|
|
||||||
),
|
|
||||||
pageTransitionsTheme: pageTransitionsTheme,
|
|
||||||
indicatorColor: accentColor,
|
|
||||||
textSelectionTheme: TextSelectionThemeData(
|
|
||||||
selectionHandleColor: accentColor,
|
|
||||||
),
|
|
||||||
fontFamily: fontFamily,
|
|
||||||
backgroundColor: Colors.black,
|
|
||||||
canvasColor: Colors.black,
|
|
||||||
cardColor: const Color(0xFF1B1C1E),
|
|
||||||
bottomAppBarColor: const Color(0xFF1B1C1E),
|
|
||||||
primaryColorDark: Colors.black,
|
|
||||||
textButtonTheme:
|
|
||||||
TextButtonThemeData(style: textButtonTheme),
|
|
||||||
outlinedButtonTheme:
|
|
||||||
OutlinedButtonThemeData(style: outlinedButtonTheme),
|
|
||||||
)
|
|
||||||
: ThemeData(
|
|
||||||
colorScheme: ColorScheme.fromSwatch().copyWith(
|
|
||||||
secondary: accentColor,
|
|
||||||
),
|
|
||||||
tooltipTheme: TooltipThemeData(
|
|
||||||
waitDuration: Duration(milliseconds: 500),
|
|
||||||
),
|
|
||||||
pageTransitionsTheme: pageTransitionsTheme,
|
|
||||||
primaryColor: accentColor,
|
|
||||||
indicatorColor: accentColor,
|
|
||||||
textSelectionTheme: TextSelectionThemeData(
|
|
||||||
selectionColor: accentColor,
|
|
||||||
),
|
|
||||||
fontFamily: fontFamily,
|
|
||||||
backgroundColor: Colors.white,
|
|
||||||
canvasColor: Colors.white,
|
|
||||||
cardColor: Colors.white,
|
|
||||||
bottomAppBarColor: Colors.white,
|
|
||||||
primaryColorDark: hasAccentColor
|
|
||||||
? accentColor
|
|
||||||
: const Color(0xFF0D5D91),
|
|
||||||
primaryColorLight: hasAccentColor
|
|
||||||
? accentColor
|
|
||||||
: const Color(0xFF5dabf4),
|
|
||||||
scaffoldBackgroundColor: const Color(0xFFF3F4F6),
|
|
||||||
tabBarTheme: TabBarTheme(
|
|
||||||
labelColor:
|
|
||||||
hasAccentColor ? Colors.white : Colors.black,
|
|
||||||
unselectedLabelColor: hasAccentColor
|
|
||||||
? Colors.white.withOpacity(.65)
|
|
||||||
: Colors.black.withOpacity(.65),
|
|
||||||
),
|
|
||||||
iconTheme: IconThemeData(
|
|
||||||
color: hasAccentColor ? null : accentColor,
|
|
||||||
),
|
|
||||||
appBarTheme: AppBarTheme(
|
|
||||||
color: hasAccentColor ? accentColor : Colors.white,
|
|
||||||
iconTheme: IconThemeData(
|
|
||||||
color: hasAccentColor ? Colors.white : accentColor,
|
|
||||||
),
|
|
||||||
titleTextStyle: TextStyle(
|
|
||||||
fontSize: 20,
|
|
||||||
color:
|
|
||||||
hasAccentColor ? Colors.white : Colors.black),
|
|
||||||
),
|
|
||||||
textButtonTheme:
|
|
||||||
TextButtonThemeData(style: textButtonTheme),
|
|
||||||
outlinedButtonTheme:
|
|
||||||
OutlinedButtonThemeData(style: outlinedButtonTheme),
|
|
||||||
),
|
),
|
||||||
title: kAppName,
|
child: child,
|
||||||
onGenerateRoute: isMobile(context) ? null : generateRoute,
|
);
|
||||||
routes: isMobile(context)
|
},
|
||||||
? {
|
scrollBehavior: state.prefState.enableTouchEvents
|
||||||
LoginScreen.route: (context) => LoginScreen(),
|
? MyCustomScrollBehavior()
|
||||||
MainScreen.route: (context) => MainScreen(),
|
: null,
|
||||||
DashboardScreenBuilder.route: (context) =>
|
navigatorKey: navigatorKey,
|
||||||
ChangeLayoutBanner(
|
supportedLocales: kLanguages
|
||||||
suggestedLayout: AppLayout.mobile,
|
.map((String locale) =>
|
||||||
appLayout: state.prefState.appLayout,
|
AppLocalization.createLocale(locale))
|
||||||
child: DashboardScreenBuilder(),
|
.toList(),
|
||||||
|
debugShowCheckedModeBanner: false,
|
||||||
|
//showPerformanceOverlay: true,
|
||||||
|
navigatorObservers: [
|
||||||
|
SentryNavigatorObserver(),
|
||||||
|
],
|
||||||
|
localizationsDelegates: [
|
||||||
|
const AppLocalizationsDelegate(),
|
||||||
|
GlobalCupertinoLocalizations.delegate,
|
||||||
|
GlobalWidgetsLocalizations.delegate,
|
||||||
|
GlobalMaterialLocalizations.delegate
|
||||||
|
],
|
||||||
|
home: state.prefState.requireAuthentication && !_authenticated
|
||||||
|
? LockScreen(onAuthenticatePressed: _authenticate)
|
||||||
|
: InitScreen(),
|
||||||
|
locale: locale,
|
||||||
|
theme: state.prefState.enableDarkMode
|
||||||
|
? ThemeData(
|
||||||
|
colorScheme: ColorScheme.dark().copyWith(
|
||||||
|
secondary: accentColor,
|
||||||
|
primary: accentColor,
|
||||||
|
),
|
||||||
|
tooltipTheme: TooltipThemeData(
|
||||||
|
waitDuration: Duration(milliseconds: 500),
|
||||||
|
),
|
||||||
|
pageTransitionsTheme: pageTransitionsTheme,
|
||||||
|
indicatorColor: accentColor,
|
||||||
|
textSelectionTheme: TextSelectionThemeData(
|
||||||
|
selectionHandleColor: accentColor,
|
||||||
|
),
|
||||||
|
fontFamily: fontFamily,
|
||||||
|
backgroundColor: Colors.black,
|
||||||
|
canvasColor: Colors.black,
|
||||||
|
cardColor: const Color(0xFF1B1C1E),
|
||||||
|
bottomAppBarColor: const Color(0xFF1B1C1E),
|
||||||
|
primaryColorDark: Colors.black,
|
||||||
|
textButtonTheme:
|
||||||
|
TextButtonThemeData(style: textButtonTheme),
|
||||||
|
outlinedButtonTheme: OutlinedButtonThemeData(
|
||||||
|
style: outlinedButtonTheme),
|
||||||
|
)
|
||||||
|
: ThemeData(
|
||||||
|
colorScheme: ColorScheme.fromSwatch().copyWith(
|
||||||
|
secondary: accentColor,
|
||||||
|
),
|
||||||
|
tooltipTheme: TooltipThemeData(
|
||||||
|
waitDuration: Duration(milliseconds: 500),
|
||||||
|
),
|
||||||
|
pageTransitionsTheme: pageTransitionsTheme,
|
||||||
|
primaryColor: accentColor,
|
||||||
|
indicatorColor: accentColor,
|
||||||
|
textSelectionTheme: TextSelectionThemeData(
|
||||||
|
selectionColor: accentColor,
|
||||||
|
),
|
||||||
|
fontFamily: fontFamily,
|
||||||
|
backgroundColor: Colors.white,
|
||||||
|
canvasColor: Colors.white,
|
||||||
|
cardColor: Colors.white,
|
||||||
|
bottomAppBarColor: Colors.white,
|
||||||
|
primaryColorDark: hasAccentColor
|
||||||
|
? accentColor
|
||||||
|
: const Color(0xFF0D5D91),
|
||||||
|
primaryColorLight: hasAccentColor
|
||||||
|
? accentColor
|
||||||
|
: const Color(0xFF5dabf4),
|
||||||
|
scaffoldBackgroundColor: const Color(0xFFF3F4F6),
|
||||||
|
tabBarTheme: TabBarTheme(
|
||||||
|
labelColor:
|
||||||
|
hasAccentColor ? Colors.white : Colors.black,
|
||||||
|
unselectedLabelColor: hasAccentColor
|
||||||
|
? Colors.white.withOpacity(.65)
|
||||||
|
: Colors.black.withOpacity(.65),
|
||||||
|
),
|
||||||
|
iconTheme: IconThemeData(
|
||||||
|
color: hasAccentColor ? null : accentColor,
|
||||||
|
),
|
||||||
|
appBarTheme: AppBarTheme(
|
||||||
|
color: hasAccentColor ? accentColor : Colors.white,
|
||||||
|
iconTheme: IconThemeData(
|
||||||
|
color:
|
||||||
|
hasAccentColor ? Colors.white : accentColor,
|
||||||
),
|
),
|
||||||
ProductScreen.route: (context) =>
|
titleTextStyle: TextStyle(
|
||||||
ProductScreenBuilder(),
|
fontSize: 20,
|
||||||
ProductViewScreen.route: (context) =>
|
color: hasAccentColor
|
||||||
ProductViewScreen(),
|
? Colors.white
|
||||||
ProductEditScreen.route: (context) =>
|
: Colors.black),
|
||||||
ProductEditScreen(),
|
),
|
||||||
ClientScreen.route: (context) => ClientScreenBuilder(),
|
textButtonTheme:
|
||||||
ClientViewScreen.route: (context) => ClientViewScreen(),
|
TextButtonThemeData(style: textButtonTheme),
|
||||||
ClientEditScreen.route: (context) => ClientEditScreen(),
|
outlinedButtonTheme: OutlinedButtonThemeData(
|
||||||
ClientPdfScreen.route: (context) => ClientPdfScreen(),
|
style: outlinedButtonTheme),
|
||||||
InvoiceScreen.route: (context) =>
|
),
|
||||||
InvoiceScreenBuilder(),
|
title: kAppName,
|
||||||
InvoiceViewScreen.route: (context) =>
|
onGenerateRoute: isMobile(context) ? null : generateRoute,
|
||||||
InvoiceViewScreen(),
|
routes: isMobile(context)
|
||||||
InvoiceEditScreen.route: (context) =>
|
? {
|
||||||
InvoiceEditScreen(),
|
LoginScreen.route: (context) => LoginScreen(),
|
||||||
InvoiceEmailScreen.route: (context) =>
|
MainScreen.route: (context) => MainScreen(),
|
||||||
InvoiceEmailScreen(),
|
DashboardScreenBuilder.route: (context) =>
|
||||||
InvoicePdfScreen.route: (context) => InvoicePdfScreen(),
|
ChangeLayoutBanner(
|
||||||
DocumentScreen.route: (context) =>
|
suggestedLayout: AppLayout.mobile,
|
||||||
DocumentScreenBuilder(),
|
appLayout: state.prefState.appLayout,
|
||||||
DocumentViewScreen.route: (context) =>
|
child: DashboardScreenBuilder(),
|
||||||
DocumentViewScreen(),
|
),
|
||||||
DocumentEditScreen.route: (context) =>
|
ProductScreen.route: (context) =>
|
||||||
DocumentEditScreen(),
|
ProductScreenBuilder(),
|
||||||
ExpenseScreen.route: (context) =>
|
ProductViewScreen.route: (context) =>
|
||||||
ExpenseScreenBuilder(),
|
ProductViewScreen(),
|
||||||
ExpenseViewScreen.route: (context) =>
|
ProductEditScreen.route: (context) =>
|
||||||
ExpenseViewScreen(),
|
ProductEditScreen(),
|
||||||
ExpenseEditScreen.route: (context) =>
|
ClientScreen.route: (context) =>
|
||||||
ExpenseEditScreen(),
|
ClientScreenBuilder(),
|
||||||
VendorScreen.route: (context) => VendorScreenBuilder(),
|
ClientViewScreen.route: (context) =>
|
||||||
VendorViewScreen.route: (context) => VendorViewScreen(),
|
ClientViewScreen(),
|
||||||
VendorEditScreen.route: (context) => VendorEditScreen(),
|
ClientEditScreen.route: (context) =>
|
||||||
TaskScreen.route: (context) => TaskScreenBuilder(),
|
ClientEditScreen(),
|
||||||
TaskViewScreen.route: (context) => TaskViewScreen(),
|
ClientPdfScreen.route: (context) => ClientPdfScreen(),
|
||||||
TaskEditScreen.route: (context) => TaskEditScreen(),
|
InvoiceScreen.route: (context) =>
|
||||||
ProjectScreen.route: (context) =>
|
InvoiceScreenBuilder(),
|
||||||
ProjectScreenBuilder(),
|
InvoiceViewScreen.route: (context) =>
|
||||||
ProjectViewScreen.route: (context) =>
|
InvoiceViewScreen(),
|
||||||
ProjectViewScreen(),
|
InvoiceEditScreen.route: (context) =>
|
||||||
ProjectEditScreen.route: (context) =>
|
InvoiceEditScreen(),
|
||||||
ProjectEditScreen(),
|
InvoiceEmailScreen.route: (context) =>
|
||||||
PaymentScreen.route: (context) =>
|
InvoiceEmailScreen(),
|
||||||
PaymentScreenBuilder(),
|
InvoicePdfScreen.route: (context) =>
|
||||||
PaymentViewScreen.route: (context) =>
|
InvoicePdfScreen(),
|
||||||
PaymentViewScreen(),
|
DocumentScreen.route: (context) =>
|
||||||
PaymentEditScreen.route: (context) =>
|
DocumentScreenBuilder(),
|
||||||
PaymentEditScreen(),
|
DocumentViewScreen.route: (context) =>
|
||||||
PaymentRefundScreen.route: (context) =>
|
DocumentViewScreen(),
|
||||||
PaymentRefundScreen(),
|
DocumentEditScreen.route: (context) =>
|
||||||
QuoteScreen.route: (context) => QuoteScreenBuilder(),
|
DocumentEditScreen(),
|
||||||
QuoteViewScreen.route: (context) => QuoteViewScreen(),
|
ExpenseScreen.route: (context) =>
|
||||||
QuoteEditScreen.route: (context) => QuoteEditScreen(),
|
ExpenseScreenBuilder(),
|
||||||
QuoteEmailScreen.route: (context) => QuoteEmailScreen(),
|
ExpenseViewScreen.route: (context) =>
|
||||||
QuotePdfScreen.route: (context) => QuotePdfScreen(),
|
ExpenseViewScreen(),
|
||||||
// STARTER: routes - do not remove comment
|
ExpenseEditScreen.route: (context) =>
|
||||||
TransactionScreen.route: (context) =>
|
ExpenseEditScreen(),
|
||||||
TransactionScreenBuilder(),
|
VendorScreen.route: (context) =>
|
||||||
TransactionViewScreen.route: (context) =>
|
VendorScreenBuilder(),
|
||||||
TransactionViewScreen(),
|
VendorViewScreen.route: (context) =>
|
||||||
TransactionEditScreen.route: (context) =>
|
VendorViewScreen(),
|
||||||
TransactionEditScreen(),
|
VendorEditScreen.route: (context) =>
|
||||||
BankAccountScreen.route: (context) =>
|
VendorEditScreen(),
|
||||||
BankAccountScreenBuilder(),
|
TaskScreen.route: (context) => TaskScreenBuilder(),
|
||||||
BankAccountViewScreen.route: (context) =>
|
TaskViewScreen.route: (context) => TaskViewScreen(),
|
||||||
BankAccountViewScreen(),
|
TaskEditScreen.route: (context) => TaskEditScreen(),
|
||||||
BankAccountEditScreen.route: (context) =>
|
ProjectScreen.route: (context) =>
|
||||||
BankAccountEditScreen(),
|
ProjectScreenBuilder(),
|
||||||
PurchaseOrderScreen.route: (context) =>
|
ProjectViewScreen.route: (context) =>
|
||||||
PurchaseOrderScreenBuilder(),
|
ProjectViewScreen(),
|
||||||
PurchaseOrderViewScreen.route: (context) =>
|
ProjectEditScreen.route: (context) =>
|
||||||
PurchaseOrderViewScreen(),
|
ProjectEditScreen(),
|
||||||
PurchaseOrderEditScreen.route: (context) =>
|
PaymentScreen.route: (context) =>
|
||||||
PurchaseOrderEditScreen(),
|
PaymentScreenBuilder(),
|
||||||
RecurringExpenseScreen.route: (context) =>
|
PaymentViewScreen.route: (context) =>
|
||||||
RecurringExpenseScreenBuilder(),
|
PaymentViewScreen(),
|
||||||
RecurringExpenseViewScreen.route: (context) =>
|
PaymentEditScreen.route: (context) =>
|
||||||
RecurringExpenseViewScreen(),
|
PaymentEditScreen(),
|
||||||
RecurringExpenseEditScreen.route: (context) =>
|
PaymentRefundScreen.route: (context) =>
|
||||||
RecurringExpenseEditScreen(),
|
PaymentRefundScreen(),
|
||||||
SubscriptionScreen.route: (context) =>
|
QuoteScreen.route: (context) => QuoteScreenBuilder(),
|
||||||
SubscriptionScreenBuilder(),
|
QuoteViewScreen.route: (context) => QuoteViewScreen(),
|
||||||
SubscriptionViewScreen.route: (context) =>
|
QuoteEditScreen.route: (context) => QuoteEditScreen(),
|
||||||
SubscriptionViewScreen(),
|
QuoteEmailScreen.route: (context) =>
|
||||||
SubscriptionEditScreen.route: (context) =>
|
QuoteEmailScreen(),
|
||||||
SubscriptionEditScreen(),
|
QuotePdfScreen.route: (context) => QuotePdfScreen(),
|
||||||
TaskStatusScreen.route: (context) =>
|
// STARTER: routes - do not remove comment
|
||||||
TaskStatusScreenBuilder(),
|
TransactionScreen.route: (context) =>
|
||||||
TaskStatusViewScreen.route: (context) =>
|
TransactionScreenBuilder(),
|
||||||
TaskStatusViewScreen(),
|
TransactionViewScreen.route: (context) =>
|
||||||
TaskStatusEditScreen.route: (context) =>
|
TransactionViewScreen(),
|
||||||
TaskStatusEditScreen(),
|
TransactionEditScreen.route: (context) =>
|
||||||
ExpenseCategoryScreen.route: (context) =>
|
TransactionEditScreen(),
|
||||||
ExpenseCategoryScreenBuilder(),
|
BankAccountScreen.route: (context) =>
|
||||||
ExpenseCategoryViewScreen.route: (context) =>
|
BankAccountScreenBuilder(),
|
||||||
ExpenseCategoryViewScreen(),
|
BankAccountViewScreen.route: (context) =>
|
||||||
ExpenseCategoryEditScreen.route: (context) =>
|
BankAccountViewScreen(),
|
||||||
ExpenseCategoryEditScreen(),
|
BankAccountEditScreen.route: (context) =>
|
||||||
RecurringInvoiceScreen.route: (context) =>
|
BankAccountEditScreen(),
|
||||||
RecurringInvoiceScreenBuilder(),
|
PurchaseOrderScreen.route: (context) =>
|
||||||
RecurringInvoiceViewScreen.route: (context) =>
|
PurchaseOrderScreenBuilder(),
|
||||||
RecurringInvoiceViewScreen(),
|
PurchaseOrderViewScreen.route: (context) =>
|
||||||
RecurringInvoiceEditScreen.route: (context) =>
|
PurchaseOrderViewScreen(),
|
||||||
RecurringInvoiceEditScreen(),
|
PurchaseOrderEditScreen.route: (context) =>
|
||||||
RecurringInvoicePdfScreen.route: (context) =>
|
PurchaseOrderEditScreen(),
|
||||||
RecurringInvoicePdfScreen(),
|
RecurringExpenseScreen.route: (context) =>
|
||||||
WebhookScreen.route: (context) =>
|
RecurringExpenseScreenBuilder(),
|
||||||
WebhookScreenBuilder(),
|
RecurringExpenseViewScreen.route: (context) =>
|
||||||
WebhookViewScreen.route: (context) =>
|
RecurringExpenseViewScreen(),
|
||||||
WebhookViewScreen(),
|
RecurringExpenseEditScreen.route: (context) =>
|
||||||
WebhookEditScreen.route: (context) =>
|
RecurringExpenseEditScreen(),
|
||||||
WebhookEditScreen(),
|
SubscriptionScreen.route: (context) =>
|
||||||
TokenScreen.route: (context) => TokenScreenBuilder(),
|
SubscriptionScreenBuilder(),
|
||||||
TokenViewScreen.route: (context) => TokenViewScreen(),
|
SubscriptionViewScreen.route: (context) =>
|
||||||
TokenEditScreen.route: (context) => TokenEditScreen(),
|
SubscriptionViewScreen(),
|
||||||
PaymentTermScreen.route: (context) =>
|
SubscriptionEditScreen.route: (context) =>
|
||||||
PaymentTermScreenBuilder(),
|
SubscriptionEditScreen(),
|
||||||
PaymentTermEditScreen.route: (context) =>
|
TaskStatusScreen.route: (context) =>
|
||||||
PaymentTermEditScreen(),
|
TaskStatusScreenBuilder(),
|
||||||
PaymentTermViewScreen.route: (context) =>
|
TaskStatusViewScreen.route: (context) =>
|
||||||
PaymentTermViewScreen(),
|
TaskStatusViewScreen(),
|
||||||
DesignScreen.route: (context) => DesignScreenBuilder(),
|
TaskStatusEditScreen.route: (context) =>
|
||||||
DesignViewScreen.route: (context) => DesignViewScreen(),
|
TaskStatusEditScreen(),
|
||||||
DesignEditScreen.route: (context) => DesignEditScreen(),
|
ExpenseCategoryScreen.route: (context) =>
|
||||||
CreditScreen.route: (context) => CreditScreenBuilder(),
|
ExpenseCategoryScreenBuilder(),
|
||||||
CreditViewScreen.route: (context) => CreditViewScreen(),
|
ExpenseCategoryViewScreen.route: (context) =>
|
||||||
CreditEditScreen.route: (context) => CreditEditScreen(),
|
ExpenseCategoryViewScreen(),
|
||||||
CreditEmailScreen.route: (context) =>
|
ExpenseCategoryEditScreen.route: (context) =>
|
||||||
CreditEmailScreen(),
|
ExpenseCategoryEditScreen(),
|
||||||
CreditPdfScreen.route: (context) => CreditPdfScreen(),
|
RecurringInvoiceScreen.route: (context) =>
|
||||||
UserScreen.route: (context) => UserScreenBuilder(),
|
RecurringInvoiceScreenBuilder(),
|
||||||
UserViewScreen.route: (context) => UserViewScreen(),
|
RecurringInvoiceViewScreen.route: (context) =>
|
||||||
UserEditScreen.route: (context) => UserEditScreen(),
|
RecurringInvoiceViewScreen(),
|
||||||
GroupSettingsScreen.route: (context) =>
|
RecurringInvoiceEditScreen.route: (context) =>
|
||||||
GroupScreenBuilder(),
|
RecurringInvoiceEditScreen(),
|
||||||
GroupViewScreen.route: (context) => GroupViewScreen(),
|
RecurringInvoicePdfScreen.route: (context) =>
|
||||||
GroupEditScreen.route: (context) => GroupEditScreen(),
|
RecurringInvoicePdfScreen(),
|
||||||
SettingsScreen.route: (context) =>
|
WebhookScreen.route: (context) =>
|
||||||
SettingsScreenBuilder(),
|
WebhookScreenBuilder(),
|
||||||
ReportsScreen.route: (context) =>
|
WebhookViewScreen.route: (context) =>
|
||||||
ReportsScreenBuilder(),
|
WebhookViewScreen(),
|
||||||
CompanyDetailsScreen.route: (context) =>
|
WebhookEditScreen.route: (context) =>
|
||||||
CompanyDetailsScreen(),
|
WebhookEditScreen(),
|
||||||
UserDetailsScreen.route: (context) =>
|
TokenScreen.route: (context) => TokenScreenBuilder(),
|
||||||
UserDetailsScreen(),
|
TokenViewScreen.route: (context) => TokenViewScreen(),
|
||||||
LocalizationScreen.route: (context) =>
|
TokenEditScreen.route: (context) => TokenEditScreen(),
|
||||||
LocalizationScreen(),
|
PaymentTermScreen.route: (context) =>
|
||||||
PaymentsSettingsScreen.route: (context) =>
|
PaymentTermScreenBuilder(),
|
||||||
PaymentsSettingsScreen(),
|
PaymentTermEditScreen.route: (context) =>
|
||||||
CompanyGatewayScreen.route: (context) =>
|
PaymentTermEditScreen(),
|
||||||
CompanyGatewayScreenBuilder(),
|
PaymentTermViewScreen.route: (context) =>
|
||||||
CompanyGatewayViewScreen.route: (context) =>
|
PaymentTermViewScreen(),
|
||||||
CompanyGatewayViewScreen(),
|
DesignScreen.route: (context) =>
|
||||||
CompanyGatewayEditScreen.route: (context) =>
|
DesignScreenBuilder(),
|
||||||
CompanyGatewayEditScreen(),
|
DesignViewScreen.route: (context) =>
|
||||||
TaxSettingsScreen.route: (context) =>
|
DesignViewScreen(),
|
||||||
TaxSettingsScreen(),
|
DesignEditScreen.route: (context) =>
|
||||||
TaxRateSettingsScreen.route: (context) =>
|
DesignEditScreen(),
|
||||||
TaxRateScreenBuilder(),
|
CreditScreen.route: (context) =>
|
||||||
TaxRateViewScreen.route: (context) =>
|
CreditScreenBuilder(),
|
||||||
TaxRateViewScreen(),
|
CreditViewScreen.route: (context) =>
|
||||||
TaxRateEditScreen.route: (context) =>
|
CreditViewScreen(),
|
||||||
TaxRateEditScreen(),
|
CreditEditScreen.route: (context) =>
|
||||||
ProductSettingsScreen.route: (context) =>
|
CreditEditScreen(),
|
||||||
ProductSettingsScreen(),
|
CreditEmailScreen.route: (context) =>
|
||||||
ExpenseSettingsScreen.route: (context) =>
|
CreditEmailScreen(),
|
||||||
ExpenseSettingsScreen(),
|
CreditPdfScreen.route: (context) => CreditPdfScreen(),
|
||||||
TaskSettingsScreen.route: (context) =>
|
UserScreen.route: (context) => UserScreenBuilder(),
|
||||||
TaskSettingsScreen(),
|
UserViewScreen.route: (context) => UserViewScreen(),
|
||||||
ImportExportScreen.route: (context) =>
|
UserEditScreen.route: (context) => UserEditScreen(),
|
||||||
ImportExportScreen(),
|
GroupSettingsScreen.route: (context) =>
|
||||||
DeviceSettingsScreen.route: (context) =>
|
GroupScreenBuilder(),
|
||||||
DeviceSettingsScreen(),
|
GroupViewScreen.route: (context) => GroupViewScreen(),
|
||||||
AccountManagementScreen.route: (context) =>
|
GroupEditScreen.route: (context) => GroupEditScreen(),
|
||||||
AccountManagementScreen(),
|
SettingsScreen.route: (context) =>
|
||||||
CustomFieldsScreen.route: (context) =>
|
SettingsScreenBuilder(),
|
||||||
CustomFieldsScreen(),
|
ReportsScreen.route: (context) =>
|
||||||
GeneratedNumbersScreen.route: (context) =>
|
ReportsScreenBuilder(),
|
||||||
GeneratedNumbersScreen(),
|
CompanyDetailsScreen.route: (context) =>
|
||||||
WorkflowSettingsScreen.route: (context) =>
|
CompanyDetailsScreen(),
|
||||||
WorkflowSettingsScreen(),
|
UserDetailsScreen.route: (context) =>
|
||||||
InvoiceDesignScreen.route: (context) =>
|
UserDetailsScreen(),
|
||||||
InvoiceDesignScreen(),
|
LocalizationScreen.route: (context) =>
|
||||||
ClientPortalScreen.route: (context) =>
|
LocalizationScreen(),
|
||||||
ClientPortalScreen(),
|
PaymentsSettingsScreen.route: (context) =>
|
||||||
EmailSettingsScreen.route: (context) =>
|
PaymentsSettingsScreen(),
|
||||||
EmailSettingsScreen(),
|
CompanyGatewayScreen.route: (context) =>
|
||||||
TemplatesAndRemindersScreen.route: (context) =>
|
CompanyGatewayScreenBuilder(),
|
||||||
TemplatesAndRemindersScreen(),
|
CompanyGatewayViewScreen.route: (context) =>
|
||||||
CreditCardsAndBanksScreen.route: (context) =>
|
CompanyGatewayViewScreen(),
|
||||||
CreditCardsAndBanksScreen(),
|
CompanyGatewayEditScreen.route: (context) =>
|
||||||
DataVisualizationsScreen.route: (context) =>
|
CompanyGatewayEditScreen(),
|
||||||
DataVisualizationsScreen(),
|
TaxSettingsScreen.route: (context) =>
|
||||||
}
|
TaxSettingsScreen(),
|
||||||
: {},
|
TaxRateSettingsScreen.route: (context) =>
|
||||||
|
TaxRateScreenBuilder(),
|
||||||
|
TaxRateViewScreen.route: (context) =>
|
||||||
|
TaxRateViewScreen(),
|
||||||
|
TaxRateEditScreen.route: (context) =>
|
||||||
|
TaxRateEditScreen(),
|
||||||
|
ProductSettingsScreen.route: (context) =>
|
||||||
|
ProductSettingsScreen(),
|
||||||
|
ExpenseSettingsScreen.route: (context) =>
|
||||||
|
ExpenseSettingsScreen(),
|
||||||
|
TaskSettingsScreen.route: (context) =>
|
||||||
|
TaskSettingsScreen(),
|
||||||
|
ImportExportScreen.route: (context) =>
|
||||||
|
ImportExportScreen(),
|
||||||
|
DeviceSettingsScreen.route: (context) =>
|
||||||
|
DeviceSettingsScreen(),
|
||||||
|
AccountManagementScreen.route: (context) =>
|
||||||
|
AccountManagementScreen(),
|
||||||
|
CustomFieldsScreen.route: (context) =>
|
||||||
|
CustomFieldsScreen(),
|
||||||
|
GeneratedNumbersScreen.route: (context) =>
|
||||||
|
GeneratedNumbersScreen(),
|
||||||
|
WorkflowSettingsScreen.route: (context) =>
|
||||||
|
WorkflowSettingsScreen(),
|
||||||
|
InvoiceDesignScreen.route: (context) =>
|
||||||
|
InvoiceDesignScreen(),
|
||||||
|
ClientPortalScreen.route: (context) =>
|
||||||
|
ClientPortalScreen(),
|
||||||
|
EmailSettingsScreen.route: (context) =>
|
||||||
|
EmailSettingsScreen(),
|
||||||
|
TemplatesAndRemindersScreen.route: (context) =>
|
||||||
|
TemplatesAndRemindersScreen(),
|
||||||
|
CreditCardsAndBanksScreen.route: (context) =>
|
||||||
|
CreditCardsAndBanksScreen(),
|
||||||
|
DataVisualizationsScreen.route: (context) =>
|
||||||
|
DataVisualizationsScreen(),
|
||||||
|
}
|
||||||
|
: {},
|
||||||
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,6 @@ import 'package:flutter/material.dart';
|
||||||
// Package imports:
|
// Package imports:
|
||||||
import 'package:flutter_redux/flutter_redux.dart';
|
import 'package:flutter_redux/flutter_redux.dart';
|
||||||
import 'package:invoiceninja_flutter/ui/app/app_title_bar.dart';
|
import 'package:invoiceninja_flutter/ui/app/app_title_bar.dart';
|
||||||
import 'package:invoiceninja_flutter/ui/app/window_manager.dart';
|
|
||||||
import 'package:invoiceninja_flutter/ui/bank_account/bank_account_screen_vm.dart';
|
import 'package:invoiceninja_flutter/ui/bank_account/bank_account_screen_vm.dart';
|
||||||
import 'package:invoiceninja_flutter/ui/bank_account/edit/bank_account_edit_vm.dart';
|
import 'package:invoiceninja_flutter/ui/bank_account/edit/bank_account_edit_vm.dart';
|
||||||
import 'package:invoiceninja_flutter/ui/bank_account/view/bank_account_view_vm.dart';
|
import 'package:invoiceninja_flutter/ui/bank_account/view/bank_account_view_vm.dart';
|
||||||
|
|
@ -318,31 +317,29 @@ class MainScreen extends StatelessWidget {
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
},
|
},
|
||||||
child: WindowManager(
|
child: DesktopSessionTimeout(
|
||||||
child: DesktopSessionTimeout(
|
child: SafeArea(
|
||||||
child: SafeArea(
|
child: FocusTraversalGroup(
|
||||||
child: FocusTraversalGroup(
|
policy: ReadingOrderTraversalPolicy(),
|
||||||
policy: ReadingOrderTraversalPolicy(),
|
child: Column(
|
||||||
child: Column(
|
children: [
|
||||||
children: [
|
if (isWindows()) AppTitleBar(),
|
||||||
if (isWindows()) AppTitleBar(),
|
Expanded(
|
||||||
Expanded(
|
child: ChangeLayoutBanner(
|
||||||
child: ChangeLayoutBanner(
|
appLayout: prefState.appLayout,
|
||||||
appLayout: prefState.appLayout,
|
suggestedLayout: AppLayout.desktop,
|
||||||
suggestedLayout: AppLayout.desktop,
|
child: Row(children: <Widget>[
|
||||||
child: Row(children: <Widget>[
|
if (prefState.showMenu) MenuDrawerBuilder(),
|
||||||
if (prefState.showMenu) MenuDrawerBuilder(),
|
Expanded(
|
||||||
Expanded(
|
child: AppBorder(
|
||||||
child: AppBorder(
|
child: screen,
|
||||||
child: screen,
|
isLeft: prefState.showMenu &&
|
||||||
isLeft: prefState.showMenu &&
|
(!state.isFullScreen || showFilterSidebar),
|
||||||
(!state.isFullScreen || showFilterSidebar),
|
)),
|
||||||
)),
|
]),
|
||||||
]),
|
|
||||||
),
|
|
||||||
),
|
),
|
||||||
],
|
),
|
||||||
),
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue