flutter_mytransporter 0.0.1 flutter_mytransporter: ^0.0.1 copied to clipboard
MyTransporter Flutter SDK.
import 'package:flutter/material.dart';
import 'package:flutter_mytransporter/flutter_mytransporter.dart';
void main() {
runApp(MyApp());
}
class MyApp extends StatefulWidget {
@override
_MyAppState createState() => _MyAppState();
}
class _MyAppState extends State<MyApp> {
@override
void initState() {
super.initState();
}
@override
Widget build(BuildContext context) {
return MaterialApp(
home: Scaffold(
appBar: AppBar(
title: const Text('Mytransporter SDK'),
),
body: Center(
child: FlutterMytransporter(
publicKey: "sghuijkoksdjichugysuchijo",
email: "test@test.com",
phone: "+2348081834554",
pickupLatitude: 36.0,
pickupLocation: "skjdbsjbd",
pickupLongitude: 0.2,
firstName: "test",
lastName: "test",
onCancel: (response) {
print(response);
},
onTransport: (response) {
print(response);
},
onError: (error) => print(error)),
)),
);
}
}