Routes
This commit is contained in:
parent
589884db11
commit
1a459647b4
|
|
@ -6,6 +6,7 @@ import 'package:invoiceninja_flutter/redux/ui/ui_actions.dart';
|
|||
import 'package:invoiceninja_flutter/ui/client/client_screen.dart';
|
||||
import 'package:invoiceninja_flutter/ui/client/edit/client_edit_vm.dart';
|
||||
import 'package:invoiceninja_flutter/ui/client/view/client_view_vm.dart';
|
||||
import 'package:invoiceninja_flutter/ui/dashboard/dashboard_screen.dart';
|
||||
import 'package:redux/redux.dart';
|
||||
import 'package:invoiceninja_flutter/redux/client/client_actions.dart';
|
||||
import 'package:invoiceninja_flutter/redux/app/app_state.dart';
|
||||
|
|
@ -68,8 +69,10 @@ Middleware<AppState> _viewClientList() {
|
|||
next(action);
|
||||
|
||||
store.dispatch(UpdateCurrentRoute(ClientScreen.route));
|
||||
|
||||
Navigator.of(action.context).pushNamedAndRemoveUntil(
|
||||
ClientScreen.route, (Route<dynamic> route) => false);
|
||||
ClientScreen.route, ModalRoute.withName(DashboardScreen.route));
|
||||
//Navigator.of(action.context).pushNamedAndRemoveUntil(ClientScreen.route, (Route<dynamic> route) => false);
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -13,8 +13,6 @@ import 'package:invoiceninja_flutter/ui/app/app_drawer_vm.dart';
|
|||
import 'package:invoiceninja_flutter/ui/settings/settings_screen.dart';
|
||||
import 'package:invoiceninja_flutter/utils/localization.dart';
|
||||
import 'package:font_awesome_flutter/font_awesome_flutter.dart';
|
||||
|
||||
//import 'package:cached_network_image/cached_network_image.dart';
|
||||
import 'package:redux/redux.dart';
|
||||
import 'package:url_launcher/url_launcher.dart';
|
||||
|
||||
|
|
@ -46,7 +44,7 @@ class AppDrawer extends StatelessWidget {
|
|||
|
||||
final _multipleCompanies = Align(
|
||||
alignment: FractionalOffset.bottomLeft,
|
||||
child: DropdownButtonHideUnderline(
|
||||
child: viewModel.companies.isNotEmpty ? DropdownButtonHideUnderline(
|
||||
child: DropdownButton<String>(
|
||||
value: viewModel.selectedCompanyIndex,
|
||||
items: viewModel.companies
|
||||
|
|
@ -68,7 +66,7 @@ class AppDrawer extends StatelessWidget {
|
|||
viewModel.onCompanyChanged(context, value);
|
||||
},
|
||||
),
|
||||
),
|
||||
) : Container(),
|
||||
);
|
||||
|
||||
final Store<AppState> store = StoreProvider.of<AppState>(context);
|
||||
|
|
@ -90,7 +88,10 @@ class AppDrawer extends StatelessWidget {
|
|||
children: <Widget>[
|
||||
Expanded(
|
||||
child: Center(
|
||||
child: Image.asset('assets/images/logo.png',
|
||||
child: viewModel.selectedCompany.logoUrl != null &&
|
||||
viewModel.selectedCompany.logoUrl.isNotEmpty
|
||||
? Image.network(viewModel.selectedCompany.logoUrl)
|
||||
: Image.asset('assets/images/logo.png',
|
||||
width: 100.0, height: 100.0)),
|
||||
/*
|
||||
child: viewModel.selectedCompany.logoUrl != null &&
|
||||
|
|
|
|||
|
|
@ -9,6 +9,7 @@ import 'package:invoiceninja_flutter/ui/app/lists/activity_list_tile.dart';
|
|||
import 'package:invoiceninja_flutter/ui/app/loading_indicator.dart';
|
||||
import 'package:invoiceninja_flutter/utils/localization.dart';
|
||||
import 'package:invoiceninja_flutter/utils/templates.dart';
|
||||
import 'package:flutter_html_view/flutter_html_view.dart';
|
||||
|
||||
class InvoiceEmailView extends StatefulWidget {
|
||||
final EmailInvoiceVM viewModel;
|
||||
|
|
@ -171,14 +172,12 @@ class _InvoiceEmailViewState extends State<InvoiceEmailView> {
|
|||
),
|
||||
),
|
||||
),
|
||||
/*
|
||||
Container(
|
||||
//color: Colors.white,
|
||||
child: HtmlView(
|
||||
data: emailBody,
|
||||
),
|
||||
),
|
||||
*/
|
||||
],
|
||||
),
|
||||
),
|
||||
|
|
|
|||
|
|
@ -48,7 +48,9 @@ class _DashboardViewState extends State<DashboardView>
|
|||
final localization = AppLocalization.of(context);
|
||||
final store = StoreProvider.of<AppState>(context);
|
||||
|
||||
return Scaffold(
|
||||
return WillPopScope(
|
||||
onWillPop: () async => false,
|
||||
child: Scaffold(
|
||||
drawer: AppDrawerBuilder(),
|
||||
appBar: AppBar(
|
||||
title: ListFilter(
|
||||
|
|
@ -80,6 +82,7 @@ class _DashboardViewState extends State<DashboardView>
|
|||
viewModel: widget.viewModel,
|
||||
controller: _controller,
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -78,11 +78,8 @@ class SettingsListVM {
|
|||
new FlatButton(
|
||||
child: Text(localization.ok.toUpperCase()),
|
||||
onPressed: () {
|
||||
final navigator = Navigator.of(context);
|
||||
while (navigator.canPop()) {
|
||||
navigator.pop();
|
||||
}
|
||||
navigator.pushNamed(LoginScreen.route);
|
||||
Navigator.of(context).pushNamedAndRemoveUntil(
|
||||
LoginScreen.route, (Route<dynamic> route) => false);
|
||||
store.dispatch(UserLogout());
|
||||
})
|
||||
],
|
||||
|
|
|
|||
51
pubspec.lock
51
pubspec.lock
|
|
@ -92,6 +92,13 @@ packages:
|
|||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "5.5.5"
|
||||
cached_network_image:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: cached_network_image
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "0.4.1+1"
|
||||
charcode:
|
||||
dependency: transitive
|
||||
description:
|
||||
|
|
@ -174,11 +181,32 @@ packages:
|
|||
description: flutter
|
||||
source: sdk
|
||||
version: "0.0.0"
|
||||
flutter_cache_manager:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: flutter_cache_manager
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "0.1.1"
|
||||
flutter_custom_tabs:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: flutter_custom_tabs
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "0.1.0"
|
||||
flutter_driver:
|
||||
dependency: "direct dev"
|
||||
description: flutter
|
||||
source: sdk
|
||||
version: "0.0.0"
|
||||
flutter_html_view:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
name: flutter_html_view
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "0.5.4"
|
||||
flutter_localizations:
|
||||
dependency: "direct main"
|
||||
description: flutter
|
||||
|
|
@ -544,6 +572,13 @@ packages:
|
|||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "1.0.3"
|
||||
synchronized:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: synchronized
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "1.5.1+1"
|
||||
term_glyph:
|
||||
dependency: transitive
|
||||
description:
|
||||
|
|
@ -579,6 +614,13 @@ packages:
|
|||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "0.9.0+5"
|
||||
uuid:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: uuid
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "0.5.3"
|
||||
vector_math:
|
||||
dependency: transitive
|
||||
description:
|
||||
|
|
@ -586,6 +628,13 @@ packages:
|
|||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "2.0.8"
|
||||
video_player:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: video_player
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "0.6.4"
|
||||
vm_service_client:
|
||||
dependency: transitive
|
||||
description:
|
||||
|
|
@ -616,4 +665,4 @@ packages:
|
|||
version: "2.1.15"
|
||||
sdks:
|
||||
dart: ">=2.0.0-dev.65 <=2.0.0-dev.69.5.flutter-eab492385c"
|
||||
flutter: ">=0.1.4 <2.0.0"
|
||||
flutter: ">=0.2.5 <2.0.0"
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ dependencies:
|
|||
share: ^0.5.2
|
||||
intl: ^0.15.6
|
||||
flutter_pdf_viewer: ^0.0.2
|
||||
#flutter_html_view: ^0.5.2
|
||||
flutter_html_view: ^0.5.2
|
||||
google_sign_in: ^3.0.4
|
||||
firebase_auth: ^0.5.14
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue