order_tracker 0.0.2 order_tracker: ^0.0.2 copied to clipboard
A package to help build order tracking ui with animation in Flutter.
Order tracker plugin for Flutter #
A Flutter plugin for iOS and Android for order tracker same as flipkart order tracker ui.
Android | iOS | |
---|---|---|
Support | SDK 21+ | 11.0+ |
Future Feature #
- Add icons in a text place.
- Update ui.
Gif #
Installation #
First, add order_tracker
as
a dependency in your pubspec.yaml file.
Example #
import 'package:flutter/material.dart';
import 'package:order_tracker/order_tracker.dart';
class MyHomePage extends StatefulWidget {
const MyHomePage({Key? key}) : super(key: key);
@override
State<MyHomePage> createState() => _MyHomePageState();
}
class _MyHomePageState extends State<MyHomePage> {
///this TextDto present in a package add data in this dto and set in a list.
List<TextDto> orderList = [
TextDto("Your order has been placed", "Fri, 25th Mar '22 - 10:47pm"),
TextDto("Seller ha processed your order", "Sun, 27th Mar '22 - 10:19am"),
TextDto("Your item has been picked up by courier partner.", "Tue, 29th Mar '22 - 5:00pm"),
];
List<TextDto> shippedList = [
TextDto("Your order has been shipped", "Tue, 29th Mar '22 - 5:04pm"),
TextDto("Your item has been received in the nearest hub to you.", null),
];
List<TextDto> outOfDeliveryList = [
TextDto("Your order is out for delivery", "Thu, 31th Mar '22 - 2:27pm"),
];
List<TextDto> deliveredList = [
TextDto("Your order has been delivered", "Thu, 31th Mar '22 - 3:58pm"),
];
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: const Text("Order Tracker Demo"),
),
body: Padding(
padding: const EdgeInsets.all(20),
child: OrderTracker(
status: Status.delivered,
activeColor: Colors.green,
inActiveColor: Colors.grey[300],
orderTitleAndDateList: orderList,
shippedTitleAndDateList: shippedList,
outOfDeliveryTitleAndDateList: outOfDeliveryList,
deliveredTitleAndDateList: deliveredList,
),
),
);
}
}