|
|
@ -1,11 +1,16 @@
|
|
|
|
import 'package:flutter/material.dart';
|
|
|
|
import 'package:flutter/material.dart';
|
|
|
|
import 'package:flutter/services.dart';
|
|
|
|
import 'package:flutter/services.dart';
|
|
|
|
import 'package:flutter_svg/flutter_svg.dart';
|
|
|
|
import 'package:flutter_svg/flutter_svg.dart';
|
|
|
|
|
|
|
|
import 'package:healthcare_user/emergency.dart';
|
|
|
|
|
|
|
|
import 'package:healthcare_user/invitations.dart';
|
|
|
|
|
|
|
|
import 'package:healthcare_user/medicines.dart';
|
|
|
|
|
|
|
|
import 'package:healthcare_user/prescriptions.dart';
|
|
|
|
|
|
|
|
import 'package:healthcare_user/reports.dart';
|
|
|
|
|
|
|
|
import 'package:healthcare_user/seekopinion.dart';
|
|
|
|
import 'package:healthcare_user/settings.dart';
|
|
|
|
import 'package:healthcare_user/settings.dart';
|
|
|
|
import 'package:image_picker/image_picker.dart';
|
|
|
|
import 'package:image_picker/image_picker.dart';
|
|
|
|
import 'dart:io';
|
|
|
|
import 'package:carousel_slider/carousel_slider.dart';
|
|
|
|
import 'dart:ui' as ui;
|
|
|
|
import 'dart:ui' as ui;
|
|
|
|
|
|
|
|
|
|
|
|
import 'login.dart';
|
|
|
|
import 'login.dart';
|
|
|
|
|
|
|
|
|
|
|
|
class Dashboard extends StatefulWidget {
|
|
|
|
class Dashboard extends StatefulWidget {
|
|
|
@ -17,33 +22,11 @@ class Dashboard extends StatefulWidget {
|
|
|
|
|
|
|
|
|
|
|
|
class _DashboardState extends State<Dashboard> {
|
|
|
|
class _DashboardState extends State<Dashboard> {
|
|
|
|
int _selectedIndex = 0;
|
|
|
|
int _selectedIndex = 0;
|
|
|
|
|
|
|
|
final List<String> imgList = [
|
|
|
|
TextEditingController tankNameController = TextEditingController();
|
|
|
|
'images/mobilebg.png',
|
|
|
|
TextEditingController blockNameController = TextEditingController();
|
|
|
|
'images/mobilebg.png',
|
|
|
|
TextEditingController capacityController = TextEditingController();
|
|
|
|
'images/mobilebg.png'
|
|
|
|
String dropdownTypeOfWater = 'General';
|
|
|
|
|
|
|
|
String dropdownTankLocation = 'Sump';
|
|
|
|
|
|
|
|
var typeOfWaterItems = [
|
|
|
|
|
|
|
|
'General',
|
|
|
|
|
|
|
|
'Bore',
|
|
|
|
|
|
|
|
'Tanker',
|
|
|
|
|
|
|
|
];
|
|
|
|
];
|
|
|
|
var typeOfTankLocationItems = [
|
|
|
|
|
|
|
|
'Sump',
|
|
|
|
|
|
|
|
'Overhead',
|
|
|
|
|
|
|
|
];
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
bool isT1Checked = false;
|
|
|
|
|
|
|
|
bool isT2Checked = false;
|
|
|
|
|
|
|
|
bool isT3Checked = false;
|
|
|
|
|
|
|
|
bool isS2T1Checked = false;
|
|
|
|
|
|
|
|
bool isS2T2Checked = false;
|
|
|
|
|
|
|
|
bool isS2T3Checked = false;
|
|
|
|
|
|
|
|
bool isS3T1Checked = false;
|
|
|
|
|
|
|
|
bool isS3T2Checked = false;
|
|
|
|
|
|
|
|
bool isS3T3Checked = false;
|
|
|
|
|
|
|
|
static const TextStyle optionStyle =
|
|
|
|
|
|
|
|
TextStyle(fontSize: 30, fontWeight: FontWeight.bold);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
final ImagePicker _picker = ImagePicker();
|
|
|
|
final ImagePicker _picker = ImagePicker();
|
|
|
|
bool isTablet = false;
|
|
|
|
bool isTablet = false;
|
|
|
@ -67,13 +50,87 @@ class _DashboardState extends State<Dashboard> {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
List<String> images = [
|
|
|
|
|
|
|
|
"images/seekopinion.png",
|
|
|
|
|
|
|
|
"images/reports.png",
|
|
|
|
|
|
|
|
"images/prescriptions.png",
|
|
|
|
|
|
|
|
"images/medicines.png",
|
|
|
|
|
|
|
|
"images/invitations.png",
|
|
|
|
|
|
|
|
"images/emergency.png"
|
|
|
|
|
|
|
|
];
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
gridOntap(int ind){
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if(ind==0){
|
|
|
|
|
|
|
|
Navigator.push(
|
|
|
|
|
|
|
|
context,
|
|
|
|
|
|
|
|
MaterialPageRoute(
|
|
|
|
|
|
|
|
builder: (context) => const SeekOpinion()),
|
|
|
|
|
|
|
|
);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
else if(ind==1){
|
|
|
|
|
|
|
|
Navigator.push(
|
|
|
|
|
|
|
|
context,
|
|
|
|
|
|
|
|
MaterialPageRoute(
|
|
|
|
|
|
|
|
builder: (context) => const Reports()),
|
|
|
|
|
|
|
|
);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
else if(ind==2){
|
|
|
|
|
|
|
|
Navigator.push(
|
|
|
|
|
|
|
|
context,
|
|
|
|
|
|
|
|
MaterialPageRoute(
|
|
|
|
|
|
|
|
builder: (context) => const Prescriptions()),
|
|
|
|
|
|
|
|
);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
else if(ind==3){
|
|
|
|
|
|
|
|
Navigator.push(
|
|
|
|
|
|
|
|
context,
|
|
|
|
|
|
|
|
MaterialPageRoute(
|
|
|
|
|
|
|
|
builder: (context) => const Medicines()),
|
|
|
|
|
|
|
|
);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
else if(ind==4){
|
|
|
|
|
|
|
|
Navigator.push(
|
|
|
|
|
|
|
|
context,
|
|
|
|
|
|
|
|
MaterialPageRoute(
|
|
|
|
|
|
|
|
builder: (context) => const Invitations()),
|
|
|
|
|
|
|
|
);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
else if(ind==5){
|
|
|
|
|
|
|
|
Navigator.push(
|
|
|
|
|
|
|
|
context,
|
|
|
|
|
|
|
|
MaterialPageRoute(
|
|
|
|
|
|
|
|
builder: (context) => const Emergency()),
|
|
|
|
|
|
|
|
);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
Widget _dashBoard() {
|
|
|
|
Widget _dashBoard() {
|
|
|
|
return Container(
|
|
|
|
return Container(
|
|
|
|
color: screenBackgroundColor,
|
|
|
|
color: Colors.white,
|
|
|
|
child: Column(
|
|
|
|
child: Column(
|
|
|
|
children: <Widget>[
|
|
|
|
children: <Widget>[
|
|
|
|
Container(
|
|
|
|
CarouselSlider(
|
|
|
|
|
|
|
|
options: CarouselOptions(
|
|
|
|
|
|
|
|
height: MediaQuery.of(context).size.height * .250,
|
|
|
|
|
|
|
|
aspectRatio: 16 / 9,
|
|
|
|
|
|
|
|
viewportFraction: 0.8,
|
|
|
|
|
|
|
|
initialPage: 0,
|
|
|
|
|
|
|
|
enableInfiniteScroll: true,
|
|
|
|
|
|
|
|
reverse: false,
|
|
|
|
|
|
|
|
autoPlay: true,
|
|
|
|
|
|
|
|
autoPlayInterval: Duration(seconds: 3),
|
|
|
|
|
|
|
|
autoPlayAnimationDuration: Duration(milliseconds: 800),
|
|
|
|
|
|
|
|
autoPlayCurve: Curves.ease,
|
|
|
|
|
|
|
|
enlargeCenterPage: true,
|
|
|
|
|
|
|
|
enlargeFactor: 0.2,
|
|
|
|
|
|
|
|
scrollDirection: Axis.horizontal,
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
items: imgList.map((i) {
|
|
|
|
|
|
|
|
return Builder(
|
|
|
|
|
|
|
|
builder: (BuildContext context) {
|
|
|
|
|
|
|
|
return Container(
|
|
|
|
height: MediaQuery.of(context).size.height * .250,
|
|
|
|
height: MediaQuery.of(context).size.height * .250,
|
|
|
|
width: double.infinity,
|
|
|
|
width: double.infinity,
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
decoration: BoxDecoration(
|
|
|
@ -82,52 +139,32 @@ class _DashboardState extends State<Dashboard> {
|
|
|
|
//color: Colors.red,
|
|
|
|
//color: Colors.red,
|
|
|
|
child: FittedBox(
|
|
|
|
child: FittedBox(
|
|
|
|
child: Image(
|
|
|
|
child: Image(
|
|
|
|
image: isTablet
|
|
|
|
image: AssetImage(i),
|
|
|
|
? AssetImage('images/appbg.png')
|
|
|
|
|
|
|
|
: AssetImage('images/mobilebg.png'),
|
|
|
|
|
|
|
|
),
|
|
|
|
),
|
|
|
|
fit: BoxFit.fill,
|
|
|
|
fit: BoxFit.fill,
|
|
|
|
)),
|
|
|
|
));
|
|
|
|
SizedBox(height: 5),
|
|
|
|
|
|
|
|
Row(
|
|
|
|
|
|
|
|
mainAxisAlignment: MainAxisAlignment.center,
|
|
|
|
|
|
|
|
children: <Widget>[
|
|
|
|
|
|
|
|
Expanded(
|
|
|
|
|
|
|
|
child: GestureDetector(
|
|
|
|
|
|
|
|
onTap: () {
|
|
|
|
|
|
|
|
/*Navigator.push(
|
|
|
|
|
|
|
|
context,
|
|
|
|
|
|
|
|
MaterialPageRoute(builder: (context) => TankLevelsNew()),
|
|
|
|
|
|
|
|
);*/
|
|
|
|
|
|
|
|
},
|
|
|
|
},
|
|
|
|
child: Container(
|
|
|
|
);
|
|
|
|
padding: EdgeInsets.all(05),
|
|
|
|
}).toList(),
|
|
|
|
margin:
|
|
|
|
|
|
|
|
EdgeInsets.only(left: 15, top: 10, right: 0, bottom: 0),
|
|
|
|
|
|
|
|
//height: MediaQuery.of(context).size.height * .05,
|
|
|
|
|
|
|
|
//width: MediaQuery.of(context).size.width * .45,
|
|
|
|
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
|
|
|
|
color: Colors.white,
|
|
|
|
|
|
|
|
borderRadius: BorderRadius.circular(12),
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
// Change button text when light changes state.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
child: Column(
|
|
|
|
|
|
|
|
children: [
|
|
|
|
|
|
|
|
Container(
|
|
|
|
|
|
|
|
padding: EdgeInsets.fromLTRB(35, 10, 0, 0),
|
|
|
|
|
|
|
|
child: new SvgPicture.asset(
|
|
|
|
|
|
|
|
"assets/images/tanklevels.svg")),
|
|
|
|
|
|
|
|
Text(
|
|
|
|
|
|
|
|
'Tank Levels',
|
|
|
|
|
|
|
|
style: dashboardTextStyle(),
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
],
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
)),
|
|
|
|
|
|
|
|
],
|
|
|
|
|
|
|
|
),
|
|
|
|
),
|
|
|
|
|
|
|
|
SizedBox(height: 5),
|
|
|
|
|
|
|
|
Expanded(child: Container(
|
|
|
|
|
|
|
|
padding: EdgeInsets.all(12.0),
|
|
|
|
|
|
|
|
child: GridView.builder(
|
|
|
|
|
|
|
|
itemCount: images.length,
|
|
|
|
|
|
|
|
gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(
|
|
|
|
|
|
|
|
crossAxisCount: 3,
|
|
|
|
|
|
|
|
crossAxisSpacing: 4.0,
|
|
|
|
|
|
|
|
mainAxisSpacing: 4.0,),
|
|
|
|
|
|
|
|
itemBuilder: (BuildContext context, int index) {
|
|
|
|
|
|
|
|
return GestureDetector(
|
|
|
|
|
|
|
|
onTap: (){
|
|
|
|
|
|
|
|
gridOntap(index);
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
child: Image.asset(images[index]),
|
|
|
|
|
|
|
|
);
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
)),)
|
|
|
|
],
|
|
|
|
],
|
|
|
|
),
|
|
|
|
),
|
|
|
|
);
|
|
|
|
);
|
|
|
@ -175,7 +212,6 @@ class _DashboardState extends State<Dashboard> {
|
|
|
|
Widget build(BuildContext context) {
|
|
|
|
Widget build(BuildContext context) {
|
|
|
|
return WillPopScope(
|
|
|
|
return WillPopScope(
|
|
|
|
onWillPop: () async {
|
|
|
|
onWillPop: () async {
|
|
|
|
if (_selectedIndex == 0) {
|
|
|
|
|
|
|
|
final shouldPop = await showDialog<bool>(
|
|
|
|
final shouldPop = await showDialog<bool>(
|
|
|
|
context: context,
|
|
|
|
context: context,
|
|
|
|
builder: (context) {
|
|
|
|
builder: (context) {
|
|
|
@ -212,23 +248,12 @@ class _DashboardState extends State<Dashboard> {
|
|
|
|
},
|
|
|
|
},
|
|
|
|
);
|
|
|
|
);
|
|
|
|
return shouldPop!;
|
|
|
|
return shouldPop!;
|
|
|
|
} else {
|
|
|
|
|
|
|
|
setState(() {
|
|
|
|
|
|
|
|
_selectedIndex = 0;
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
return false;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
},
|
|
|
|
},
|
|
|
|
child: Scaffold(
|
|
|
|
child: Scaffold(
|
|
|
|
resizeToAvoidBottomInset: false,
|
|
|
|
resizeToAvoidBottomInset: false,
|
|
|
|
appBar: AppSettings.appBar('Arminta Water Management'),
|
|
|
|
appBar: AppSettings.appBar('Health Care'),
|
|
|
|
drawer: Drawer(
|
|
|
|
drawer: Drawer(
|
|
|
|
// Add a ListView to the drawer. This ensures the user can scroll
|
|
|
|
|
|
|
|
// through the options in the drawer if there isn't enough vertical
|
|
|
|
|
|
|
|
// space to fit everything.
|
|
|
|
|
|
|
|
//backgroundColor: screenBackgroundColor,
|
|
|
|
|
|
|
|
child: ListView(
|
|
|
|
child: ListView(
|
|
|
|
// Important: Remove any padding from the ListView.
|
|
|
|
|
|
|
|
padding: EdgeInsets.zero,
|
|
|
|
padding: EdgeInsets.zero,
|
|
|
|
children: [
|
|
|
|
children: [
|
|
|
|
DrawerHeader(
|
|
|
|
DrawerHeader(
|
|
|
@ -249,72 +274,25 @@ class _DashboardState extends State<Dashboard> {
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
shape: BoxShape.circle,
|
|
|
|
shape: BoxShape.circle,
|
|
|
|
image: DecorationImage(
|
|
|
|
image: DecorationImage(
|
|
|
|
image: (AppSettings.updatedImage !=
|
|
|
|
image: AssetImage(
|
|
|
|
null)
|
|
|
|
|
|
|
|
? FileImage(
|
|
|
|
|
|
|
|
AppSettings.updatedImage!)
|
|
|
|
|
|
|
|
as ImageProvider
|
|
|
|
|
|
|
|
: AssetImage(
|
|
|
|
|
|
|
|
"images/profile_pic.png"), // picked file
|
|
|
|
"images/profile_pic.png"), // picked file
|
|
|
|
fit: BoxFit.cover)),
|
|
|
|
fit: BoxFit.cover)),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
onTap: () {
|
|
|
|
onTap: () {},
|
|
|
|
/*showModalBottomSheet<void>(
|
|
|
|
|
|
|
|
context: context,
|
|
|
|
|
|
|
|
builder: (BuildContext context) {
|
|
|
|
|
|
|
|
return SizedBox(
|
|
|
|
|
|
|
|
height: 200,
|
|
|
|
|
|
|
|
child: Center(
|
|
|
|
|
|
|
|
child: Row(
|
|
|
|
|
|
|
|
mainAxisAlignment:
|
|
|
|
|
|
|
|
MainAxisAlignment.center,
|
|
|
|
|
|
|
|
children: <Widget>[
|
|
|
|
|
|
|
|
GestureDetector(
|
|
|
|
|
|
|
|
child: Icon(
|
|
|
|
|
|
|
|
Icons.camera_alt_outlined,
|
|
|
|
|
|
|
|
size: 100,
|
|
|
|
|
|
|
|
color: greyColor,
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
onTap: () async {
|
|
|
|
|
|
|
|
await takeImageFromCamera();
|
|
|
|
|
|
|
|
Navigator.pop(context);
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
SizedBox(
|
|
|
|
|
|
|
|
width: MediaQuery.of(context)
|
|
|
|
|
|
|
|
.size
|
|
|
|
|
|
|
|
.width *
|
|
|
|
|
|
|
|
.20,
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
GestureDetector(
|
|
|
|
|
|
|
|
child: Icon(
|
|
|
|
|
|
|
|
Icons.photo,
|
|
|
|
|
|
|
|
size: 100,
|
|
|
|
|
|
|
|
color: greyColor,
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
onTap: () async {
|
|
|
|
|
|
|
|
await pickImageFromGallery();
|
|
|
|
|
|
|
|
Navigator.pop(context);
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
],
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
);
|
|
|
|
|
|
|
|
});*/
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
Text(
|
|
|
|
Text(
|
|
|
|
AppSettings.userName,
|
|
|
|
"Sneha",
|
|
|
|
|
|
|
|
//AppSettings.userName,
|
|
|
|
style: TextStyle(color: Colors.white, fontSize: 15),
|
|
|
|
style: TextStyle(color: Colors.white, fontSize: 15),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
Text(
|
|
|
|
Text(
|
|
|
|
AppSettings.phoneNumber,
|
|
|
|
'9898989898',
|
|
|
|
|
|
|
|
//AppSettings.phoneNumber,
|
|
|
|
style: TextStyle(color: Colors.white, fontSize: 15),
|
|
|
|
style: TextStyle(color: Colors.white, fontSize: 15),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
Text(
|
|
|
|
Text(
|
|
|
|
AppSettings.email,
|
|
|
|
'sneha@armintasolutions.com', //AppSettings.email,
|
|
|
|
style: TextStyle(color: Colors.white, fontSize: 15),
|
|
|
|
style: TextStyle(color: Colors.white, fontSize: 15),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
],
|
|
|
|
],
|
|
|
@ -322,12 +300,11 @@ class _DashboardState extends State<Dashboard> {
|
|
|
|
Container()
|
|
|
|
Container()
|
|
|
|
],
|
|
|
|
],
|
|
|
|
)),
|
|
|
|
)),
|
|
|
|
|
|
|
|
|
|
|
|
ListTile(
|
|
|
|
ListTile(
|
|
|
|
title: Row(
|
|
|
|
title: Row(
|
|
|
|
children: const [
|
|
|
|
children: const [
|
|
|
|
Image(
|
|
|
|
Image(
|
|
|
|
image: const AssetImage('images/editprofileblue.png'),
|
|
|
|
image: const AssetImage('images/01.png'),
|
|
|
|
height: 25,
|
|
|
|
height: 25,
|
|
|
|
width: 25,
|
|
|
|
width: 25,
|
|
|
|
fit: BoxFit.fill),
|
|
|
|
fit: BoxFit.fill),
|
|
|
@ -340,37 +317,29 @@ class _DashboardState extends State<Dashboard> {
|
|
|
|
Text('Edit Profile', style: TextStyle(color: primaryColor)),
|
|
|
|
Text('Edit Profile', style: TextStyle(color: primaryColor)),
|
|
|
|
],
|
|
|
|
],
|
|
|
|
),
|
|
|
|
),
|
|
|
|
onTap: () {
|
|
|
|
onTap: () {},
|
|
|
|
/* Navigator.push(
|
|
|
|
|
|
|
|
context,
|
|
|
|
|
|
|
|
MaterialPageRoute(builder: (context) => UpdateProfile()),
|
|
|
|
|
|
|
|
);*/
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
),
|
|
|
|
),
|
|
|
|
Divider(
|
|
|
|
Divider(
|
|
|
|
color: Colors.grey,
|
|
|
|
color: Colors.grey,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
// Add Tanks
|
|
|
|
|
|
|
|
ListTile(
|
|
|
|
ListTile(
|
|
|
|
title: Row(
|
|
|
|
title: Row(
|
|
|
|
children: const [
|
|
|
|
children: const [
|
|
|
|
Image(
|
|
|
|
Image(
|
|
|
|
image: const AssetImage('images/addtankerblue.png'),
|
|
|
|
image: const AssetImage('images/01.png'),
|
|
|
|
height: 25,
|
|
|
|
height: 25,
|
|
|
|
width: 25,
|
|
|
|
width: 25,
|
|
|
|
fit: BoxFit.fill),
|
|
|
|
fit: BoxFit.fill),
|
|
|
|
const SizedBox(
|
|
|
|
const SizedBox(
|
|
|
|
width: 10,
|
|
|
|
width: 10,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
Text('Add Tanks', style: TextStyle(color: primaryColor)),
|
|
|
|
const SizedBox(
|
|
|
|
|
|
|
|
width: 10,
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
Text('My Health', style: TextStyle(color: primaryColor)),
|
|
|
|
],
|
|
|
|
],
|
|
|
|
),
|
|
|
|
),
|
|
|
|
onTap: () {
|
|
|
|
onTap: () {},
|
|
|
|
/*Navigator.push(
|
|
|
|
|
|
|
|
context,
|
|
|
|
|
|
|
|
MaterialPageRoute(builder: (context) => AddTanks()),
|
|
|
|
|
|
|
|
);*/
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
),
|
|
|
|
),
|
|
|
|
Divider(
|
|
|
|
Divider(
|
|
|
|
color: Colors.grey,
|
|
|
|
color: Colors.grey,
|
|
|
@ -379,48 +348,42 @@ class _DashboardState extends State<Dashboard> {
|
|
|
|
title: Row(
|
|
|
|
title: Row(
|
|
|
|
children: const [
|
|
|
|
children: const [
|
|
|
|
Image(
|
|
|
|
Image(
|
|
|
|
image: const AssetImage('images/tankviewblue.png'),
|
|
|
|
image: const AssetImage('images/01.png'),
|
|
|
|
height: 25,
|
|
|
|
height: 25,
|
|
|
|
width: 25,
|
|
|
|
width: 25,
|
|
|
|
fit: BoxFit.fill),
|
|
|
|
fit: BoxFit.fill),
|
|
|
|
const SizedBox(
|
|
|
|
const SizedBox(
|
|
|
|
width: 10,
|
|
|
|
width: 10,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
Text('Tanks View', style: TextStyle(color: primaryColor)),
|
|
|
|
const SizedBox(
|
|
|
|
|
|
|
|
width: 10,
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
Text('Report Myself', style: TextStyle(color: primaryColor)),
|
|
|
|
],
|
|
|
|
],
|
|
|
|
),
|
|
|
|
),
|
|
|
|
onTap: () {
|
|
|
|
onTap: () {},
|
|
|
|
/*Navigator.push(
|
|
|
|
|
|
|
|
context,
|
|
|
|
|
|
|
|
MaterialPageRoute(builder: (context) => TanksView()),
|
|
|
|
|
|
|
|
);*/
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
),
|
|
|
|
),
|
|
|
|
Divider(
|
|
|
|
Divider(
|
|
|
|
color: Colors.grey,
|
|
|
|
color: Colors.grey,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
//Add Tanker
|
|
|
|
|
|
|
|
ListTile(
|
|
|
|
ListTile(
|
|
|
|
title: Row(
|
|
|
|
title: Row(
|
|
|
|
children: const [
|
|
|
|
children: const [
|
|
|
|
Image(
|
|
|
|
Image(
|
|
|
|
image: const AssetImage('images/suppliersblue.png'),
|
|
|
|
image: const AssetImage('images/01.png'),
|
|
|
|
height: 25,
|
|
|
|
height: 25,
|
|
|
|
width: 25,
|
|
|
|
width: 25,
|
|
|
|
fit: BoxFit.fill),
|
|
|
|
fit: BoxFit.fill),
|
|
|
|
const SizedBox(
|
|
|
|
const SizedBox(
|
|
|
|
width: 10,
|
|
|
|
width: 10,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
Text('Add Water Suppliers',
|
|
|
|
const SizedBox(
|
|
|
|
style: TextStyle(color: primaryColor)),
|
|
|
|
width: 10,
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
Text('My Connections', style: TextStyle(color: primaryColor)),
|
|
|
|
],
|
|
|
|
],
|
|
|
|
),
|
|
|
|
),
|
|
|
|
onTap: () {
|
|
|
|
onTap: () {},
|
|
|
|
/* Navigator.push(
|
|
|
|
|
|
|
|
context,
|
|
|
|
|
|
|
|
MaterialPageRoute(builder: (context) => Suppliers()),
|
|
|
|
|
|
|
|
);*/
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
),
|
|
|
|
),
|
|
|
|
Divider(
|
|
|
|
Divider(
|
|
|
|
color: Colors.grey,
|
|
|
|
color: Colors.grey,
|
|
|
@ -429,22 +392,20 @@ class _DashboardState extends State<Dashboard> {
|
|
|
|
title: Row(
|
|
|
|
title: Row(
|
|
|
|
children: const [
|
|
|
|
children: const [
|
|
|
|
Image(
|
|
|
|
Image(
|
|
|
|
image: const AssetImage('images/connectionsblue.png'),
|
|
|
|
image: const AssetImage('images/01.png'),
|
|
|
|
height: 25,
|
|
|
|
height: 25,
|
|
|
|
width: 25,
|
|
|
|
width: 25,
|
|
|
|
fit: BoxFit.fill),
|
|
|
|
fit: BoxFit.fill),
|
|
|
|
const SizedBox(
|
|
|
|
const SizedBox(
|
|
|
|
width: 10,
|
|
|
|
width: 10,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
Text('Connections', style: TextStyle(color: primaryColor)),
|
|
|
|
const SizedBox(
|
|
|
|
|
|
|
|
width: 10,
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
Text('My Medicine Timings', style: TextStyle(color: primaryColor)),
|
|
|
|
],
|
|
|
|
],
|
|
|
|
),
|
|
|
|
),
|
|
|
|
onTap: () {
|
|
|
|
onTap: () {},
|
|
|
|
/* Navigator.push(
|
|
|
|
|
|
|
|
context,
|
|
|
|
|
|
|
|
MaterialPageRoute(builder: (context) => ConnectionsView()),
|
|
|
|
|
|
|
|
);*/
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
),
|
|
|
|
),
|
|
|
|
Divider(
|
|
|
|
Divider(
|
|
|
|
color: Colors.grey,
|
|
|
|
color: Colors.grey,
|
|
|
@ -453,22 +414,20 @@ class _DashboardState extends State<Dashboard> {
|
|
|
|
title: Row(
|
|
|
|
title: Row(
|
|
|
|
children: const [
|
|
|
|
children: const [
|
|
|
|
Image(
|
|
|
|
Image(
|
|
|
|
image: const AssetImage('images/resourceblue.png'),
|
|
|
|
image: const AssetImage('images/01.png'),
|
|
|
|
height: 25,
|
|
|
|
height: 25,
|
|
|
|
width: 25,
|
|
|
|
width: 25,
|
|
|
|
fit: BoxFit.fill),
|
|
|
|
fit: BoxFit.fill),
|
|
|
|
const SizedBox(
|
|
|
|
const SizedBox(
|
|
|
|
width: 10,
|
|
|
|
width: 10,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
Text('Resources', style: TextStyle(color: primaryColor)),
|
|
|
|
const SizedBox(
|
|
|
|
|
|
|
|
width: 10,
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
Text('Update Pin', style: TextStyle(color: primaryColor)),
|
|
|
|
],
|
|
|
|
],
|
|
|
|
),
|
|
|
|
),
|
|
|
|
onTap: () {
|
|
|
|
onTap: () {},
|
|
|
|
/*Navigator.push(
|
|
|
|
|
|
|
|
context,
|
|
|
|
|
|
|
|
MaterialPageRoute(builder: (context) => Resources()),
|
|
|
|
|
|
|
|
);*/
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
),
|
|
|
|
),
|
|
|
|
Divider(
|
|
|
|
Divider(
|
|
|
|
color: Colors.grey,
|
|
|
|
color: Colors.grey,
|
|
|
@ -477,22 +436,20 @@ class _DashboardState extends State<Dashboard> {
|
|
|
|
title: Row(
|
|
|
|
title: Row(
|
|
|
|
children: const [
|
|
|
|
children: const [
|
|
|
|
Image(
|
|
|
|
Image(
|
|
|
|
image: const AssetImage('images/customercareblue.png'),
|
|
|
|
image: const AssetImage('images/01.png'),
|
|
|
|
height: 25,
|
|
|
|
height: 25,
|
|
|
|
width: 25,
|
|
|
|
width: 25,
|
|
|
|
fit: BoxFit.fill),
|
|
|
|
fit: BoxFit.fill),
|
|
|
|
const SizedBox(
|
|
|
|
const SizedBox(
|
|
|
|
width: 10,
|
|
|
|
width: 10,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
Text('Accounts', style: TextStyle(color: primaryColor)),
|
|
|
|
const SizedBox(
|
|
|
|
|
|
|
|
width: 10,
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
Text('Update Mobile Number', style: TextStyle(color: primaryColor)),
|
|
|
|
],
|
|
|
|
],
|
|
|
|
),
|
|
|
|
),
|
|
|
|
onTap: () {
|
|
|
|
onTap: () {},
|
|
|
|
/*Navigator.push(
|
|
|
|
|
|
|
|
context,
|
|
|
|
|
|
|
|
MaterialPageRoute(builder: (context) => UserAccounts()),
|
|
|
|
|
|
|
|
);*/
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
),
|
|
|
|
),
|
|
|
|
Divider(
|
|
|
|
Divider(
|
|
|
|
color: Colors.grey,
|
|
|
|
color: Colors.grey,
|
|
|
@ -501,15 +458,17 @@ class _DashboardState extends State<Dashboard> {
|
|
|
|
title: Row(
|
|
|
|
title: Row(
|
|
|
|
children: const [
|
|
|
|
children: const [
|
|
|
|
Image(
|
|
|
|
Image(
|
|
|
|
image: const AssetImage('images/customercareblue.png'),
|
|
|
|
image: const AssetImage('images/01.png'),
|
|
|
|
height: 25,
|
|
|
|
height: 25,
|
|
|
|
width: 25,
|
|
|
|
width: 25,
|
|
|
|
fit: BoxFit.fill),
|
|
|
|
fit: BoxFit.fill),
|
|
|
|
const SizedBox(
|
|
|
|
const SizedBox(
|
|
|
|
width: 10,
|
|
|
|
width: 10,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
Text('Customer Support',
|
|
|
|
const SizedBox(
|
|
|
|
style: TextStyle(color: primaryColor)),
|
|
|
|
width: 10,
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
Text('Update My Location', style: TextStyle(color: primaryColor)),
|
|
|
|
],
|
|
|
|
],
|
|
|
|
),
|
|
|
|
),
|
|
|
|
onTap: () {},
|
|
|
|
onTap: () {},
|
|
|
@ -521,58 +480,26 @@ class _DashboardState extends State<Dashboard> {
|
|
|
|
title: Row(
|
|
|
|
title: Row(
|
|
|
|
children: const [
|
|
|
|
children: const [
|
|
|
|
Image(
|
|
|
|
Image(
|
|
|
|
image: const AssetImage('images/logoutblue.png'),
|
|
|
|
image: const AssetImage('images/01.png'),
|
|
|
|
height: 25,
|
|
|
|
height: 25,
|
|
|
|
width: 25,
|
|
|
|
width: 25,
|
|
|
|
fit: BoxFit.fill),
|
|
|
|
fit: BoxFit.fill),
|
|
|
|
const SizedBox(
|
|
|
|
const SizedBox(
|
|
|
|
width: 10,
|
|
|
|
width: 10,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
|
|
|
|
const SizedBox(
|
|
|
|
|
|
|
|
width: 10,
|
|
|
|
|
|
|
|
),
|
|
|
|
Text('Logout', style: TextStyle(color: primaryColor)),
|
|
|
|
Text('Logout', style: TextStyle(color: primaryColor)),
|
|
|
|
],
|
|
|
|
],
|
|
|
|
),
|
|
|
|
),
|
|
|
|
onTap: () async {
|
|
|
|
onTap: () {},
|
|
|
|
showLogoutAlertDialog(context);
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
),
|
|
|
|
),
|
|
|
|
|
|
|
|
|
|
|
|
],
|
|
|
|
],
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
body: _dashBoard(),
|
|
|
|
body: _dashBoard(),
|
|
|
|
/*body: IndexedStack(
|
|
|
|
|
|
|
|
index: _selectedIndex,
|
|
|
|
|
|
|
|
children: screens,
|
|
|
|
|
|
|
|
),*/
|
|
|
|
|
|
|
|
/* bottomNavigationBar: Container(
|
|
|
|
|
|
|
|
//height: MediaQuery.of(context).size.height,
|
|
|
|
|
|
|
|
child: BottomNavigationBar(
|
|
|
|
|
|
|
|
items: const <BottomNavigationBarItem>[
|
|
|
|
|
|
|
|
BottomNavigationBarItem(
|
|
|
|
|
|
|
|
icon: Icon(
|
|
|
|
|
|
|
|
Icons.home,
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
label: 'Home',
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
BottomNavigationBarItem(
|
|
|
|
|
|
|
|
icon: Icon(Icons.propane_tank),
|
|
|
|
|
|
|
|
label: 'Add Tanks',
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
*/ /*BottomNavigationBarItem(
|
|
|
|
|
|
|
|
icon: Icon(Icons.private_connectivity_outlined),
|
|
|
|
|
|
|
|
label: 'CreateConnections',
|
|
|
|
|
|
|
|
),*/ /*
|
|
|
|
|
|
|
|
BottomNavigationBarItem(
|
|
|
|
|
|
|
|
icon: Icon(Icons.list_alt),
|
|
|
|
|
|
|
|
label: 'Add Tanker',
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
],
|
|
|
|
|
|
|
|
currentIndex: _selectedIndex,
|
|
|
|
|
|
|
|
selectedItemColor: primaryColor,
|
|
|
|
|
|
|
|
unselectedItemColor: greyColor,
|
|
|
|
|
|
|
|
showUnselectedLabels: true,
|
|
|
|
|
|
|
|
onTap: _onItemTapped,
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
),*/
|
|
|
|
|
|
|
|
),
|
|
|
|
),
|
|
|
|
);
|
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|
|
|
|