Limit use of Platform.isIOS
This commit is contained in:
parent
b96822ead8
commit
659553c875
|
|
@ -1,5 +1,3 @@
|
||||||
import 'dart:io';
|
|
||||||
|
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter_redux/flutter_redux.dart';
|
import 'package:flutter_redux/flutter_redux.dart';
|
||||||
import 'package:invoiceninja_flutter/data/models/entities.dart';
|
import 'package:invoiceninja_flutter/data/models/entities.dart';
|
||||||
|
|
@ -56,8 +54,7 @@ class ListScaffold extends StatelessWidget {
|
||||||
} else if (isSettings) {
|
} else if (isSettings) {
|
||||||
leading = isMobile(context)
|
leading = isMobile(context)
|
||||||
? IconButton(
|
? IconButton(
|
||||||
icon: Icon(
|
icon: Icon(Icons.arrow_back),
|
||||||
Platform.isIOS ? Icons.arrow_back_ios : Icons.arrow_back),
|
|
||||||
onPressed: () => Navigator.pop(context),
|
onPressed: () => Navigator.pop(context),
|
||||||
)
|
)
|
||||||
: IconButton(
|
: IconButton(
|
||||||
|
|
|
||||||
|
|
@ -592,8 +592,7 @@ class SidebarFooter extends StatelessWidget {
|
||||||
}),
|
}),
|
||||||
),
|
),
|
||||||
/*
|
/*
|
||||||
if (!Platform.isIOS &&
|
if (isHosted(context) &&
|
||||||
isHosted(context) &&
|
|
||||||
!isPaidAccount(context)) ...[
|
!isPaidAccount(context)) ...[
|
||||||
Spacer(),
|
Spacer(),
|
||||||
FlatButton(
|
FlatButton(
|
||||||
|
|
|
||||||
|
|
@ -53,9 +53,7 @@ class _UpgradeDialogState extends State<UpgradeDialog> {
|
||||||
final data = {
|
final data = {
|
||||||
'order_id': purchase.purchaseID,
|
'order_id': purchase.purchaseID,
|
||||||
'product_id': purchase.productID,
|
'product_id': purchase.productID,
|
||||||
'timestamp': Platform.isIOS
|
'timestamp': (int.parse(purchase.transactionDate) / 1000).floor(),
|
||||||
? (int.parse(purchase.transactionDate) / 1000).floor()
|
|
||||||
: purchase.transactionDate,
|
|
||||||
};
|
};
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,3 @@
|
||||||
import 'dart:io';
|
|
||||||
|
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter_redux/flutter_redux.dart';
|
import 'package:flutter_redux/flutter_redux.dart';
|
||||||
import 'package:invoiceninja_flutter/data/models/entities.dart';
|
import 'package:invoiceninja_flutter/data/models/entities.dart';
|
||||||
|
|
@ -33,6 +31,7 @@ class ViewScaffold extends StatelessWidget {
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
|
|
||||||
final localization = AppLocalization.of(context);
|
final localization = AppLocalization.of(context);
|
||||||
final store = StoreProvider.of<AppState>(context);
|
final store = StoreProvider.of<AppState>(context);
|
||||||
final state = store.state;
|
final state = store.state;
|
||||||
|
|
@ -60,7 +59,7 @@ class ViewScaffold extends StatelessWidget {
|
||||||
);
|
);
|
||||||
} else if (isSettings) {
|
} else if (isSettings) {
|
||||||
leading = IconButton(
|
leading = IconButton(
|
||||||
icon: Icon(Platform.isIOS ? Icons.arrow_back_ios : Icons.arrow_back),
|
icon: Icon(Icons.arrow_back),
|
||||||
onPressed: () => onBackPressed != null
|
onPressed: () => onBackPressed != null
|
||||||
? onBackPressed()
|
? onBackPressed()
|
||||||
: store.dispatch(UpdateCurrentRoute(state.uiState.previousRoute)),
|
: store.dispatch(UpdateCurrentRoute(state.uiState.previousRoute)),
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,4 @@
|
||||||
import 'dart:async';
|
import 'dart:async';
|
||||||
import 'dart:io';
|
|
||||||
import 'package:flutter/foundation.dart';
|
import 'package:flutter/foundation.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter/cupertino.dart';
|
import 'package:flutter/cupertino.dart';
|
||||||
|
|
@ -386,7 +385,7 @@ class _LoginState extends State<LoginView> {
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
if (!_isSelfHosted && !Platform.isIOS)
|
if (!_isSelfHosted)
|
||||||
_ToggleButtons(
|
_ToggleButtons(
|
||||||
tabLabels: [
|
tabLabels: [
|
||||||
'Google',
|
'Google',
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,6 @@
|
||||||
import 'dart:async';
|
import 'dart:async';
|
||||||
import 'dart:convert';
|
import 'dart:convert';
|
||||||
import 'dart:io' as file;
|
import 'dart:io' as file;
|
||||||
import 'dart:io';
|
|
||||||
import 'package:flutter_share/flutter_share.dart';
|
import 'package:flutter_share/flutter_share.dart';
|
||||||
import 'package:http/http.dart' as http;
|
import 'package:http/http.dart' as http;
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
|
@ -94,7 +93,7 @@ class _PDFScaffoldState extends State<PDFScaffold> {
|
||||||
appBar: AppBar(
|
appBar: AppBar(
|
||||||
centerTitle: false,
|
centerTitle: false,
|
||||||
leading: IconButton(
|
leading: IconButton(
|
||||||
icon: Icon(Platform.isIOS ? Icons.arrow_back_ios : Icons.arrow_back),
|
icon: Icon(Icons.arrow_back),
|
||||||
onPressed: () => Navigator.of(context).pop(),
|
onPressed: () => Navigator.of(context).pop(),
|
||||||
),
|
),
|
||||||
title: Text(localization.invoice + ' ' + (invoice.number ?? '')),
|
title: Text(localization.invoice + ' ' + (invoice.number ?? '')),
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue