latest code updated

master
suresh 4 months ago
parent cfbd6ce6e7
commit a88dcf2c01

@ -10,6 +10,7 @@ import 'package:fluttertoast/fluttertoast_web.dart';
import 'package:geolocator_web/geolocator_web.dart';
import 'package:image_picker_for_web/image_picker_for_web.dart';
import 'package:shared_preferences_web/shared_preferences_web.dart';
import 'package:url_launcher_web/url_launcher_web.dart';
import 'package:flutter_web_plugins/flutter_web_plugins.dart';
void registerPlugins([final Registrar? pluginRegistrar]) {
@ -18,5 +19,6 @@ void registerPlugins([final Registrar? pluginRegistrar]) {
GeolocatorPlugin.registerWith(registrar);
ImagePickerPlugin.registerWith(registrar);
SharedPreferencesPlugin.registerWith(registrar);
UrlLauncherPlugin.registerWith(registrar);
registrar.registerMessageHandler();
}

@ -487,6 +487,54 @@
"packageUri": "lib/",
"languageVersion": "2.15"
},
{
"name": "url_launcher",
"rootUri": "file:///D:/flutter/.pub-cache/hosted/pub.dartlang.org/url_launcher-6.1.11",
"packageUri": "lib/",
"languageVersion": "2.18"
},
{
"name": "url_launcher_android",
"rootUri": "file:///D:/flutter/.pub-cache/hosted/pub.dartlang.org/url_launcher_android-6.0.38",
"packageUri": "lib/",
"languageVersion": "2.18"
},
{
"name": "url_launcher_ios",
"rootUri": "file:///D:/flutter/.pub-cache/hosted/pub.dartlang.org/url_launcher_ios-6.1.4",
"packageUri": "lib/",
"languageVersion": "2.18"
},
{
"name": "url_launcher_linux",
"rootUri": "file:///D:/flutter/.pub-cache/hosted/pub.dartlang.org/url_launcher_linux-3.0.5",
"packageUri": "lib/",
"languageVersion": "2.17"
},
{
"name": "url_launcher_macos",
"rootUri": "file:///D:/flutter/.pub-cache/hosted/pub.dartlang.org/url_launcher_macos-3.0.6",
"packageUri": "lib/",
"languageVersion": "2.18"
},
{
"name": "url_launcher_platform_interface",
"rootUri": "file:///D:/flutter/.pub-cache/hosted/pub.dartlang.org/url_launcher_platform_interface-2.1.3",
"packageUri": "lib/",
"languageVersion": "2.18"
},
{
"name": "url_launcher_web",
"rootUri": "file:///D:/flutter/.pub-cache/hosted/pub.dartlang.org/url_launcher_web-2.0.18",
"packageUri": "lib/",
"languageVersion": "2.18"
},
{
"name": "url_launcher_windows",
"rootUri": "file:///D:/flutter/.pub-cache/hosted/pub.dartlang.org/url_launcher_windows-3.0.7",
"packageUri": "lib/",
"languageVersion": "2.18"
},
{
"name": "uuid",
"rootUri": "file:///D:/flutter/.pub-cache/hosted/pub.dartlang.org/uuid-4.1.0",
@ -530,7 +578,7 @@
"languageVersion": "2.18"
}
],
"generated": "2023-11-29T10:19:58.570401Z",
"generated": "2024-03-05T10:02:46.197118Z",
"generator": "pub",
"generatorVersion": "2.18.5"
"generatorVersion": "2.18.6"
}

@ -1,7 +1,7 @@
healthcare_delivery
2.18
file:///D:/ArmintaProjects/healthcare-deliveryboy/
file:///D:/ArmintaProjects/healthcare-deliveryboy/lib/
file:///D:/HealthCareProjects/healthcare-deliveryboy/
file:///D:/HealthCareProjects/healthcare-deliveryboy/lib/
archive
2.12
file:///D:/flutter/.pub-cache/hosted/pub.dartlang.org/archive-3.4.2/
@ -310,6 +310,38 @@ universal_io
2.15
file:///D:/flutter/.pub-cache/hosted/pub.dartlang.org/universal_io-2.2.0/
file:///D:/flutter/.pub-cache/hosted/pub.dartlang.org/universal_io-2.2.0/lib/
url_launcher
2.18
file:///D:/flutter/.pub-cache/hosted/pub.dartlang.org/url_launcher-6.1.11/
file:///D:/flutter/.pub-cache/hosted/pub.dartlang.org/url_launcher-6.1.11/lib/
url_launcher_android
2.18
file:///D:/flutter/.pub-cache/hosted/pub.dartlang.org/url_launcher_android-6.0.38/
file:///D:/flutter/.pub-cache/hosted/pub.dartlang.org/url_launcher_android-6.0.38/lib/
url_launcher_ios
2.18
file:///D:/flutter/.pub-cache/hosted/pub.dartlang.org/url_launcher_ios-6.1.4/
file:///D:/flutter/.pub-cache/hosted/pub.dartlang.org/url_launcher_ios-6.1.4/lib/
url_launcher_linux
2.17
file:///D:/flutter/.pub-cache/hosted/pub.dartlang.org/url_launcher_linux-3.0.5/
file:///D:/flutter/.pub-cache/hosted/pub.dartlang.org/url_launcher_linux-3.0.5/lib/
url_launcher_macos
2.18
file:///D:/flutter/.pub-cache/hosted/pub.dartlang.org/url_launcher_macos-3.0.6/
file:///D:/flutter/.pub-cache/hosted/pub.dartlang.org/url_launcher_macos-3.0.6/lib/
url_launcher_platform_interface
2.18
file:///D:/flutter/.pub-cache/hosted/pub.dartlang.org/url_launcher_platform_interface-2.1.3/
file:///D:/flutter/.pub-cache/hosted/pub.dartlang.org/url_launcher_platform_interface-2.1.3/lib/
url_launcher_web
2.18
file:///D:/flutter/.pub-cache/hosted/pub.dartlang.org/url_launcher_web-2.0.18/
file:///D:/flutter/.pub-cache/hosted/pub.dartlang.org/url_launcher_web-2.0.18/lib/
url_launcher_windows
2.18
file:///D:/flutter/.pub-cache/hosted/pub.dartlang.org/url_launcher_windows-3.0.7/
file:///D:/flutter/.pub-cache/hosted/pub.dartlang.org/url_launcher_windows-3.0.7/lib/
uuid
2.14
file:///D:/flutter/.pub-cache/hosted/pub.dartlang.org/uuid-4.1.0/

@ -1 +1 @@
3.3.9
3.3.10

@ -0,0 +1,271 @@
import 'dart:convert';
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:healthcare_delivery/common/settings.dart';
import 'package:healthcare_delivery/model/biddingrequest_model.dart';
import 'package:intl/intl.dart';
import 'package:url_launcher/url_launcher.dart';
class DelivryBookingData extends StatefulWidget {
const DelivryBookingData({Key? key}) : super(key: key);
@override
State<DelivryBookingData> createState() => _DelivryBookingDataState();
}
class _DelivryBookingDataState extends State<DelivryBookingData> {
bool isSupplierDataLoading=false;
bool isSereverIssue = false;
bool isSereverIssueConnected = false;
bool isSereverIssuePending = false;
String dropdownTypeOfPayment = 'Cash';
String dueAmount = '';
bool isDataLoading = false;
TextEditingController amountPaidController = TextEditingController();
List<demo> bookingDataList = [];
List<demo> completedOrdersList = [];
List<demo> activeOrdersList = [];
bool isLoading=false;
Future<void> getBokkingsData() async {
isLoading = true;
try {
var response = await AppSettings.getdeliveryboybookings();
setState(() {
activeOrdersList =
((jsonDecode(response)['data']) as List).map((dynamic model) {
return demo.fromJson(model);
}).toList();
isLoading = false;
});
} catch (e) {
setState(() {
isLoading = false;
isSereverIssueConnected = true;
});
}
}
@override
void initState() {
getBokkingsData();
super.initState();
}
Widget activeOrders(){
if (activeOrdersList.length != 0) {
return ListView.builder(
padding: EdgeInsets.all(8),
itemCount: activeOrdersList.length,
itemBuilder: (BuildContext context, int index) {
return Card(
child: Padding(
padding: EdgeInsets.all(8),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Container(
// width: MediaQuery.of(context).size.width * .75,
child: Column(
mainAxisAlignment:
MainAxisAlignment.spaceBetween,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Row(
children: [
Text('PharmacyName :',
style: labelTextStyle()),
SizedBox(
width: 5.0,
),
Text(
activeOrdersList[index]
.pharmacyName
.toUpperCase(),
style: valuesTextStyle()),
],
),
Row(
children: [
Text('Pharmacy Phone :',
style: labelTextStyle()),
SizedBox(
width: 5.0,
),
Text(
activeOrdersList [index]
.pharmacyPhone
.toString(),
style: valuesTextStyle()),
],
),
Row(
children: [
Text('User Name :',
style: labelTextStyle()),
SizedBox(
width: 5.0,
),
Text(activeOrdersList[index].firstName,
style: valuesTextStyle()),
],
),
Row(
children: [
Text('User Phone :',
style: labelTextStyle()),
SizedBox(
width: 5.0,
),
Text(activeOrdersList[index].contactNumber,
style: valuesTextStyle()),
],
),
Row(
children: [
Text('Address :',
style: labelTextStyle()),
SizedBox(
width: 5.0,
),
Text(activeOrdersList[index].address,
style: valuesTextStyle()),
],
),
Row(
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment:
CrossAxisAlignment.start,
children: [
Column(
children: [
IconButton(
iconSize: 30,
icon: const Icon(
Icons.phone,
color: primaryColor,
),
onPressed: () async {
final Uri _phoneUri = Uri(
scheme: "tel",
path: activeOrdersList[index]
.contactNumber);
try {
await launch(
_phoneUri.toString());
} catch (error) {
throw ("Cannot dial");
}
},
),
Text(
'Call now',
style: iconBelowTextStyle(),
),
],
),
SizedBox(
width: 30,
),
Column(
children: [
IconButton(
iconSize: 30,
icon: const Icon(
Icons.start,
color: primaryColor,
),
onPressed: () {
/* Navigator.push(
context,
new MaterialPageRoute(
builder: (__) => new OrderTrackingPage(lat:activeOrdersList[index].lat,lng:activeOrdersList[index].lng)));*/
},
),
Text(
'Start Trip',
style: iconBelowTextStyle(),
),
],
),
SizedBox(
width: 30,
),
],
),
],
),
),
],
),
),
);
});
}
else {
return Center(
child: Padding(
padding: EdgeInsets.fromLTRB(0, 40, 0, 0),
child: isSereverIssueConnected
? Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Image(
image: AssetImage('images/logo.png'),
// height: MediaQuery.of(context).size.height * .10,
),
SizedBox(
height: 20,
),
Text(
'No Data',style:serverIssueTextStyle() ,),
],
)
: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Image(
image: AssetImage('images/no_data.png'),
// height: MediaQuery.of(context).size.height * .10,
),
SizedBox(
height: 20,
),
Text(
'No Connected Tankers',style:serverIssueTextStyle() ,),
],
),
));
}
}
/**/
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppSettings.appBar('BiddingRequests'),
body: isDataLoading?Center(
child: CircularProgressIndicator(
color: primaryColor,
strokeWidth: 5.0,
),
): activeOrders(),
);
}
}

@ -1,6 +1,7 @@
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:flutter_svg/flutter_svg.dart';
import 'package:healthcare_delivery/common/biddingrequests.dart';
import 'package:healthcare_delivery/common/login.dart';
import 'package:healthcare_delivery/common/settings.dart';
import 'dart:io';
@ -96,10 +97,10 @@ class _DashboardState extends State<Dashboard> {
Expanded(
child: GestureDetector(
onTap: () {
/*Navigator.push(
Navigator.push(
context,
MaterialPageRoute(builder: (context) => DelivryBookingData()),
);*/
);
},
child: Container(
padding: EdgeInsets.all(05),

@ -0,0 +1,41 @@
import 'package:flutter/material.dart';
class demo {
String pharmacyName = '';
String pharmacyPhone = '';
String firstName = '';
String contactNumber='';
String address='';
String ammount='';
String delivery_agent='';
String orderStatus = '';
double lat=0;
double lng=0;
Color cardColor=Colors.white;
demo();
factory demo.fromJson(Map<String, dynamic> json){
demo rtvm = new demo();
rtvm.pharmacyName = json['pharmacies'][0]["pharmacyname"].toString() ?? '';
rtvm.pharmacyPhone =json['pharmacies'][0]["phone"].toString() ?? '';
rtvm.firstName = json['user']['profile']["firstName"].toString() ?? '';
rtvm.contactNumber = json['user']['profile']["contactNumber"].toString() ?? '';
rtvm.address = json['user']['profile']["address1"].toString() ?? '';
rtvm.delivery_agent = json['delivery_agent'] ??'';
rtvm.orderStatus = json['orderStatus'] ??'';
return rtvm;
}
}

@ -7,9 +7,13 @@
#include "generated_plugin_registrant.h"
#include <file_selector_linux/file_selector_plugin.h>
#include <url_launcher_linux/url_launcher_plugin.h>
void fl_register_plugins(FlPluginRegistry* registry) {
g_autoptr(FlPluginRegistrar) file_selector_linux_registrar =
fl_plugin_registry_get_registrar_for_plugin(registry, "FileSelectorPlugin");
file_selector_plugin_register_with_registrar(file_selector_linux_registrar);
g_autoptr(FlPluginRegistrar) url_launcher_linux_registrar =
fl_plugin_registry_get_registrar_for_plugin(registry, "UrlLauncherPlugin");
url_launcher_plugin_register_with_registrar(url_launcher_linux_registrar);
}

@ -4,6 +4,7 @@
list(APPEND FLUTTER_PLUGIN_LIST
file_selector_linux
url_launcher_linux
)
list(APPEND FLUTTER_FFI_PLUGIN_LIST

@ -8,9 +8,11 @@ import Foundation
import file_selector_macos
import geolocator_apple
import shared_preferences_foundation
import url_launcher_macos
func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) {
FileSelectorPlugin.register(with: registry.registrar(forPlugin: "FileSelectorPlugin"))
GeolocatorPlugin.register(with: registry.registrar(forPlugin: "GeolocatorPlugin"))
SharedPreferencesPlugin.register(with: registry.registrar(forPlugin: "SharedPreferencesPlugin"))
UrlLauncherPlugin.register(with: registry.registrar(forPlugin: "UrlLauncherPlugin"))
}

@ -560,6 +560,62 @@ packages:
url: "https://pub.dartlang.org"
source: hosted
version: "2.2.0"
url_launcher:
dependency: "direct main"
description:
name: url_launcher
url: "https://pub.dartlang.org"
source: hosted
version: "6.1.11"
url_launcher_android:
dependency: transitive
description:
name: url_launcher_android
url: "https://pub.dartlang.org"
source: hosted
version: "6.0.38"
url_launcher_ios:
dependency: transitive
description:
name: url_launcher_ios
url: "https://pub.dartlang.org"
source: hosted
version: "6.1.4"
url_launcher_linux:
dependency: transitive
description:
name: url_launcher_linux
url: "https://pub.dartlang.org"
source: hosted
version: "3.0.5"
url_launcher_macos:
dependency: transitive
description:
name: url_launcher_macos
url: "https://pub.dartlang.org"
source: hosted
version: "3.0.6"
url_launcher_platform_interface:
dependency: transitive
description:
name: url_launcher_platform_interface
url: "https://pub.dartlang.org"
source: hosted
version: "2.1.3"
url_launcher_web:
dependency: transitive
description:
name: url_launcher_web
url: "https://pub.dartlang.org"
source: hosted
version: "2.0.18"
url_launcher_windows:
dependency: transitive
description:
name: url_launcher_windows
url: "https://pub.dartlang.org"
source: hosted
version: "3.0.7"
uuid:
dependency: transitive
description:

@ -20,7 +20,7 @@ dependencies:
geolocator: ^9.0.2
image_picker: ^0.8.6+1
flutter_svg: ^1.0.1
url_launcher: ^6.1.9
dev_dependencies:
flutter_test:

@ -8,10 +8,13 @@
#include <file_selector_windows/file_selector_windows.h>
#include <geolocator_windows/geolocator_windows.h>
#include <url_launcher_windows/url_launcher_windows.h>
void RegisterPlugins(flutter::PluginRegistry* registry) {
FileSelectorWindowsRegisterWithRegistrar(
registry->GetRegistrarForPlugin("FileSelectorWindows"));
GeolocatorWindowsRegisterWithRegistrar(
registry->GetRegistrarForPlugin("GeolocatorWindows"));
UrlLauncherWindowsRegisterWithRegistrar(
registry->GetRegistrarForPlugin("UrlLauncherWindows"));
}

@ -5,6 +5,7 @@
list(APPEND FLUTTER_PLUGIN_LIST
file_selector_windows
geolocator_windows
url_launcher_windows
)
list(APPEND FLUTTER_FFI_PLUGIN_LIST

Loading…
Cancel
Save