journey_stepper 0.0.12
journey_stepper: ^0.0.12 copied to clipboard
Journey stepper to create the timeline of the journey.A fully customizable, beautiful and easy to use stepper widget. It help you to show or collect information from users using organized steps.
example/lib/main.dart
import 'package:flutter/material.dart';
import 'package:journey_stepper/journey_stepper.dart';
void main() {
runApp(const MyApp());
}
class MyApp extends StatelessWidget {
const MyApp({super.key});
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'Flutter Demo',
theme: ThemeData(
colorScheme: ColorScheme.fromSeed(seedColor: Colors.red),
useMaterial3: true,
),
home: const MyHomePage(title: 'Journey Stepper'),
);
}
}
class MyHomePage extends StatefulWidget {
const MyHomePage({super.key, required this.title});
final String title;
@override
State<MyHomePage> createState() => _MyHomePageState();
}
class _MyHomePageState extends State<MyHomePage> {
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
backgroundColor: Theme.of(context).colorScheme.inversePrimary,
title: Text(widget.title),
centerTitle: true,
),
body: ListView.builder(
itemCount: 5,
shrinkWrap: true,
padding: const EdgeInsets.symmetric(vertical: 20),
itemBuilder: (context, index) {
return JourneyStepper(
leftTitle: const Column(
crossAxisAlignment: CrossAxisAlignment.end,
children: [
Text(
"Payment",
style: TextStyle(
fontSize: 14,
fontWeight: FontWeight.bold,
),
),
Text(
"We have received your AUD",
style: TextStyle(
fontSize: 12,
fontWeight: FontWeight.bold,
),
),
Text(
"17th May 2023, 3:56 PM",
style: TextStyle(
fontSize: 12,
fontWeight: FontWeight.bold,
),
)
],
),
rightTitle: const Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
"Received",
style: TextStyle(
fontSize: 14,
fontWeight: FontWeight.bold,
),
),
Text(
"We have received your AUD",
style: TextStyle(
fontSize: 12,
fontWeight: FontWeight.bold,
),
),
Text(
"18th May 2023, 3:56 PM",
style: TextStyle(
fontSize: 12,
fontWeight: FontWeight.bold,
),
)
],
),
icon: Icons.add,
iconBackgroundColor: Colors.green,
isLast: index == 4,
);
},
),
);
}
}