Alot of changes
This commit is contained in:
365
lib/remaster/dashboard.dart
Normal file
365
lib/remaster/dashboard.dart
Normal file
@@ -0,0 +1,365 @@
|
||||
|
||||
import 'package:bus_infotainment/pages/components/ibus_display.dart';
|
||||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:flutter/foundation.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'dart:io' show Platform;
|
||||
|
||||
import 'package:flutter/widgets.dart';
|
||||
import 'package:google_fonts/google_fonts.dart';
|
||||
import 'package:text_scroll/text_scroll.dart';
|
||||
|
||||
Color rgb(int r, int g, int b) {
|
||||
return Color.fromRGBO(r, g, b, 1);
|
||||
}
|
||||
|
||||
class Dashboard extends StatelessWidget {
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
// TODO: implement build
|
||||
return Scaffold(
|
||||
|
||||
backgroundColor: Colors.grey.shade900,
|
||||
|
||||
bottomNavigationBar: ((defaultTargetPlatform == TargetPlatform.android || defaultTargetPlatform == TargetPlatform.iOS)) ? null : BottomAppBar(
|
||||
|
||||
color: Colors.grey.shade800,
|
||||
|
||||
child: Row(
|
||||
children: [
|
||||
IconButton(
|
||||
icon: Icon(Icons.home),
|
||||
onPressed: () {
|
||||
Navigator.pushNamed(context, "/dashboard");
|
||||
},
|
||||
),
|
||||
IconButton(
|
||||
icon: Icon(Icons.search),
|
||||
onPressed: () {
|
||||
Navigator.pushNamed(context, "/search");
|
||||
},
|
||||
),
|
||||
IconButton(
|
||||
icon: Icon(Icons.settings),
|
||||
onPressed: () {
|
||||
Navigator.pushNamed(context, "/settings");
|
||||
},
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
|
||||
body: Column(
|
||||
children: [
|
||||
|
||||
Container(
|
||||
|
||||
margin: EdgeInsets.all(16),
|
||||
padding: EdgeInsets.all(8),
|
||||
|
||||
decoration: BoxDecoration(
|
||||
|
||||
borderRadius: BorderRadius.circular(10),
|
||||
|
||||
color: Colors.grey.shade800
|
||||
|
||||
),
|
||||
|
||||
// height: 100,
|
||||
|
||||
child: ibus_display()
|
||||
),
|
||||
|
||||
Expanded(
|
||||
child: Row(
|
||||
|
||||
children: [
|
||||
|
||||
if (false)
|
||||
if (!(defaultTargetPlatform == TargetPlatform.android || defaultTargetPlatform == TargetPlatform.iOS))
|
||||
NavigationRail(
|
||||
|
||||
selectedIndex: 0,
|
||||
|
||||
groupAlignment: 1,
|
||||
|
||||
destinations: [
|
||||
|
||||
NavigationRailDestination(
|
||||
icon: Icon(Icons.home),
|
||||
label: Text("Dashboard"),
|
||||
),
|
||||
|
||||
NavigationRailDestination(
|
||||
icon: Icon(Icons.search),
|
||||
label: Text("Routes")
|
||||
),
|
||||
|
||||
NavigationRailDestination(
|
||||
icon: Icon(Icons.settings),
|
||||
label: Text("Settings")
|
||||
)
|
||||
|
||||
],
|
||||
|
||||
),
|
||||
|
||||
Expanded(
|
||||
child: Container(
|
||||
|
||||
child: Column(
|
||||
|
||||
children: [
|
||||
|
||||
Container(
|
||||
|
||||
padding: EdgeInsets.symmetric(
|
||||
horizontal: 16
|
||||
),
|
||||
|
||||
child: IntrinsicHeight(
|
||||
child: Row(
|
||||
|
||||
children: [
|
||||
|
||||
Expanded(
|
||||
child: Container(
|
||||
|
||||
decoration: BoxDecoration(
|
||||
|
||||
borderRadius: BorderRadius.circular(10),
|
||||
|
||||
color: Colors.grey.shade800
|
||||
|
||||
),
|
||||
|
||||
padding: EdgeInsets.all(16),
|
||||
|
||||
child: IntrinsicWidth(
|
||||
child: Column(
|
||||
|
||||
crossAxisAlignment: CrossAxisAlignment.center,
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
|
||||
children: [
|
||||
|
||||
Row(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
|
||||
children: [
|
||||
Text(
|
||||
"Bus Route:",
|
||||
style: GoogleFonts.interTight(
|
||||
fontSize: 18,
|
||||
fontWeight: FontWeight.bold,
|
||||
color: Colors.white
|
||||
)
|
||||
),
|
||||
|
||||
SizedBox(
|
||||
width: 16,
|
||||
),
|
||||
|
||||
Text(
|
||||
"11",
|
||||
style: GoogleFonts.interTight(
|
||||
fontSize: 18,
|
||||
fontWeight: FontWeight.normal,
|
||||
color: Colors.white
|
||||
)
|
||||
)
|
||||
],
|
||||
),
|
||||
Row(
|
||||
// mainAxisSize: MainAxisSize.min,
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Text(
|
||||
"Destination:",
|
||||
style: GoogleFonts.interTight(
|
||||
fontSize: 18,
|
||||
fontWeight: FontWeight.bold,
|
||||
color: Colors.white
|
||||
)
|
||||
),
|
||||
|
||||
const SizedBox(
|
||||
width: 16,
|
||||
),
|
||||
|
||||
Text(
|
||||
"Fullham Broadway",
|
||||
style: GoogleFonts.interTight(
|
||||
fontSize: 18,
|
||||
fontWeight: FontWeight.normal,
|
||||
color: Colors.white
|
||||
)
|
||||
)
|
||||
],
|
||||
),
|
||||
|
||||
const SizedBox(
|
||||
height: 8,
|
||||
),
|
||||
|
||||
Row(
|
||||
// mainAxisSize: MainAxisSize.min,
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Text(
|
||||
"Next Stop:",
|
||||
style: GoogleFonts.interTight(
|
||||
fontSize: 18,
|
||||
fontWeight: FontWeight.bold,
|
||||
color: Colors.white
|
||||
)
|
||||
),
|
||||
|
||||
const SizedBox(
|
||||
width: 16,
|
||||
),
|
||||
|
||||
Text(
|
||||
"St Thomas Hospital / County Hall",
|
||||
style: GoogleFonts.interTight(
|
||||
fontSize: 18,
|
||||
fontWeight: FontWeight.normal,
|
||||
color: Colors.white
|
||||
),
|
||||
overflow: TextOverflow.fade,
|
||||
)
|
||||
],
|
||||
),
|
||||
|
||||
Row(
|
||||
// mainAxisSize: MainAxisSize.min,
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Text(
|
||||
"Last Stop:",
|
||||
style: GoogleFonts.interTight(
|
||||
fontSize: 18,
|
||||
fontWeight: FontWeight.bold,
|
||||
color: Colors.white
|
||||
),
|
||||
overflow: TextOverflow.fade,
|
||||
),
|
||||
|
||||
const SizedBox(
|
||||
width: 16,
|
||||
),
|
||||
|
||||
Text(
|
||||
"Fullham Town Hall",
|
||||
style: GoogleFonts.interTight(
|
||||
fontSize: 18,
|
||||
fontWeight: FontWeight.normal,
|
||||
color: Colors.white
|
||||
),
|
||||
overflow: TextOverflow.fade,
|
||||
)
|
||||
],
|
||||
),
|
||||
|
||||
|
||||
|
||||
],
|
||||
|
||||
),
|
||||
)
|
||||
|
||||
),
|
||||
),
|
||||
|
||||
// SizedBox(
|
||||
// width: 16,
|
||||
// ),
|
||||
//
|
||||
// Column(
|
||||
//
|
||||
// children: [
|
||||
//
|
||||
// SizedBox(
|
||||
//
|
||||
// width: 150,
|
||||
//
|
||||
// child: FloatingActionButton(
|
||||
// onPressed: () {
|
||||
//
|
||||
// },
|
||||
//
|
||||
// backgroundColor: Colors.red,
|
||||
//
|
||||
// child: Text(
|
||||
// "Bus Stopping",
|
||||
// style: GoogleFonts.interTight(
|
||||
// fontSize: 18,
|
||||
// fontWeight: FontWeight.bold,
|
||||
// color: Colors.white
|
||||
// )
|
||||
//
|
||||
// ),
|
||||
// ),
|
||||
// ),
|
||||
//
|
||||
// SizedBox(
|
||||
// height: 16
|
||||
// ),
|
||||
//
|
||||
// SizedBox(
|
||||
//
|
||||
// width: 150,
|
||||
// height: 100,
|
||||
//
|
||||
// child: FloatingActionButton(
|
||||
// onPressed: () {
|
||||
//
|
||||
// },
|
||||
//
|
||||
// backgroundColor: Colors.grey.shade600,
|
||||
//
|
||||
// child: Text(
|
||||
// "Acknowledge Bus Stop",
|
||||
// style: GoogleFonts.interTight(
|
||||
// fontSize: 18,
|
||||
// fontWeight: FontWeight.bold,
|
||||
// color: Colors.white
|
||||
// ),
|
||||
// textAlign: TextAlign.center,
|
||||
//
|
||||
// ),
|
||||
// ),
|
||||
// )
|
||||
//
|
||||
// ],
|
||||
//
|
||||
// )
|
||||
|
||||
],
|
||||
|
||||
),
|
||||
),
|
||||
)
|
||||
|
||||
|
||||
|
||||
],
|
||||
|
||||
),
|
||||
|
||||
),
|
||||
)
|
||||
|
||||
],
|
||||
|
||||
),
|
||||
),
|
||||
],
|
||||
)
|
||||
|
||||
);
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user