Compare commits
3 Commits
ce02fd3b50
...
c078333129
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c078333129 | ||
|
|
f20380815b | ||
|
|
de5e16dc15 |
@@ -84,7 +84,7 @@ class _HomePageState extends State<HomePage> {
|
||||
},
|
||||
),
|
||||
)
|
||||
..loadRequest(Uri.parse('http://203.64.84.154:8088')),
|
||||
..loadRequest(Uri.parse('http://203.64.84.154:8088/0')),
|
||||
),
|
||||
),
|
||||
Text(
|
||||
|
||||
@@ -2,7 +2,6 @@ import 'package:flutter/material.dart';
|
||||
import 'package:mysql_client/mysql_client.dart';
|
||||
import 'package:webview_flutter/webview_flutter.dart';
|
||||
|
||||
import 'BottomNavBar.dart';
|
||||
class MessagePage extends StatefulWidget {
|
||||
final String email; // 接收來自上個頁面的 email
|
||||
|
||||
@@ -18,12 +17,12 @@ class _MessagePageState extends State<MessagePage> {
|
||||
@override
|
||||
void initState() {
|
||||
super.initState();
|
||||
_webViewController = WebViewController();
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return PopScope(
|
||||
child: Scaffold(
|
||||
return Scaffold(
|
||||
body: Center(
|
||||
child: Column(
|
||||
children: [
|
||||
@@ -59,7 +58,7 @@ class _MessagePageState extends State<MessagePage> {
|
||||
width: double.infinity,
|
||||
// TODO: 如果用http需要分別設定ios, android權限
|
||||
child: WebViewWidget(
|
||||
controller: WebViewController()
|
||||
controller: _webViewController
|
||||
..setJavaScriptMode(JavaScriptMode.unrestricted)
|
||||
..setNavigationDelegate(
|
||||
NavigationDelegate(
|
||||
@@ -84,7 +83,7 @@ class _MessagePageState extends State<MessagePage> {
|
||||
},
|
||||
),
|
||||
)
|
||||
..loadRequest(Uri.parse('http://203.64.84.154:8088')),
|
||||
..loadRequest(Uri.parse('http://203.64.84.154:8088/0')),
|
||||
),
|
||||
),
|
||||
Text(
|
||||
@@ -101,10 +100,8 @@ class _MessagePageState extends State<MessagePage> {
|
||||
physics: NeverScrollableScrollPhysics(),
|
||||
padding: EdgeInsets.all(16),
|
||||
children: [
|
||||
_buildGridItem(Icons.monitor_outlined, '畫面1', context),
|
||||
_buildGridItem(Icons.monitor_outlined, '畫面2', context),
|
||||
/*_buildGridItem(Icons.monitor_outlined, '切換畫面', context),
|
||||
_buildGridItem(Icons.person_sharp, '個人資料', context),*/
|
||||
_buildGridItem(Icons.monitor_outlined, '畫面1', 0, context),
|
||||
_buildGridItem(Icons.monitor_outlined, '畫面2', 1, context),
|
||||
],
|
||||
),
|
||||
),
|
||||
@@ -124,43 +121,7 @@ class _MessagePageState extends State<MessagePage> {
|
||||
color: Colors.white,
|
||||
child: InkWell(
|
||||
onTap: () {
|
||||
/*if (label == '跌倒紀錄') {
|
||||
Navigator.push(
|
||||
context,
|
||||
MaterialPageRoute(
|
||||
builder: (context) => BottomNavBar(
|
||||
email: widget.email,
|
||||
initTabIndex: 1,
|
||||
)),
|
||||
);
|
||||
} else if (label == '知識補充') {
|
||||
Navigator.push(
|
||||
context,
|
||||
MaterialPageRoute(
|
||||
builder: (context) => BottomNavBar(
|
||||
email: widget.email,
|
||||
initTabIndex: 2,
|
||||
)),
|
||||
);
|
||||
} else if (label == '切換畫面') {
|
||||
Navigator.push(
|
||||
context,
|
||||
MaterialPageRoute
|
||||
(builder: (context) => BottomNavBar(
|
||||
email: widget.email,
|
||||
initTabIndex: 3,
|
||||
)),
|
||||
);
|
||||
} else if (label == '個人資料') {
|
||||
Navigator.push(
|
||||
context,
|
||||
MaterialPageRoute(
|
||||
builder: (context) => BottomNavBar(
|
||||
email: widget.email,
|
||||
initTabIndex: 4,
|
||||
)),
|
||||
);
|
||||
}*/
|
||||
_webViewController.loadRequest(Uri.parse('http://203.64.84.154:8088/$camera_id'));
|
||||
},
|
||||
child: Center(
|
||||
child: Column(
|
||||
|
||||
Reference in New Issue
Block a user