Minor fixes
This commit is contained in:
@@ -13,6 +13,7 @@
|
||||
<application
|
||||
android:requestLegacyExternalStorage="true"
|
||||
android:label="ThingsBoard App"
|
||||
android:networkSecurityConfig="@xml/network_security_config"
|
||||
android:icon="@mipmap/launcher_icon">
|
||||
<activity
|
||||
android:name=".MainActivity"
|
||||
@@ -49,5 +50,7 @@
|
||||
android:name="flutterEmbedding"
|
||||
android:value="2"
|
||||
/>
|
||||
<meta-data android:name="io.flutter.network-policy"
|
||||
android:resource="@xml/network_security_config"/>
|
||||
</application>
|
||||
</manifest>
|
||||
|
||||
4
android/app/src/main/res/xml/network_security_config.xml
Normal file
4
android/app/src/main/res/xml/network_security_config.xml
Normal file
@@ -0,0 +1,4 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<network-security-config>
|
||||
<base-config cleartextTrafficPermitted="true" />
|
||||
</network-security-config>
|
||||
@@ -275,6 +275,7 @@ class TbContext {
|
||||
await navigateToDashboard(defaultDashboardId, animate: false);
|
||||
navigateTo('/home',
|
||||
replace: true,
|
||||
closeDashboard: false,
|
||||
transition: TransitionType.none);
|
||||
} else {
|
||||
navigateTo('/fullscreenDashboard/$defaultDashboardId',
|
||||
@@ -323,11 +324,11 @@ class TbContext {
|
||||
return false;
|
||||
}
|
||||
|
||||
Future<dynamic> navigateTo(String path, {bool replace = false, bool clearStack = false,
|
||||
Future<dynamic> navigateTo(String path, {bool replace = false, bool clearStack = false, closeDashboard = true,
|
||||
TransitionType? transition, Duration? transitionDuration, bool restoreDashboard = true}) async {
|
||||
if (currentState != null) {
|
||||
hideNotification();
|
||||
bool isOpenedDashboard = _mainDashboardHolder?.isDashboardOpen() == true;
|
||||
bool isOpenedDashboard = _mainDashboardHolder?.isDashboardOpen() == true && closeDashboard;
|
||||
if (isOpenedDashboard) {
|
||||
_mainDashboardHolder?.openMain();
|
||||
}
|
||||
|
||||
@@ -183,10 +183,7 @@ class _DashboardState extends TbContextState<Dashboard, _DashboardState> {
|
||||
if (!ready) {
|
||||
return SizedBox.shrink();
|
||||
} else {
|
||||
return Container(
|
||||
decoration: BoxDecoration(color: Colors.white),
|
||||
child: SafeArea(
|
||||
child: Stack(
|
||||
return Stack(
|
||||
children: [
|
||||
InAppWebView(
|
||||
key: webViewKey,
|
||||
@@ -311,8 +308,6 @@ class _DashboardState extends TbContextState<Dashboard, _DashboardState> {
|
||||
}
|
||||
)
|
||||
]
|
||||
)
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
import 'package:flutter/gestures.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/widgets.dart';
|
||||
import 'package:thingsboard_app/core/context/tb_context.dart';
|
||||
@@ -147,6 +148,7 @@ class _MainPageState extends TbPageState<MainPage, _MainPageState> with TbMainSt
|
||||
},
|
||||
child: Scaffold(
|
||||
body: TabBarView(
|
||||
physics: tbContext.homeDashboard != null ? NeverScrollableScrollPhysics() : null,
|
||||
controller: _tabController,
|
||||
children: _tabItems.map((item) => item.page).toList(),
|
||||
),
|
||||
@@ -162,7 +164,7 @@ class _MainPageState extends TbPageState<MainPage, _MainPageState> with TbMainSt
|
||||
)).toList()
|
||||
),
|
||||
)
|
||||
),
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@@ -113,10 +113,8 @@ class _TransitionIndexedStackState extends State<TransitionIndexedStack> with Ti
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return GestureDetector(
|
||||
child: Stack(
|
||||
return Stack(
|
||||
children: _pages,
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user