stepper_a 1.2.1 stepper_a: ^1.2.1 copied to clipboard
StepperA is a simple and robust Flutter package which is making it possible to use FormKey validation and easy access your own button press control.
import 'package:flutter/material.dart';
import 'example_one.dart';
import 'example_two.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(
primarySwatch: Colors.blue,
),
home: const StepperExample(),
);
}
}
class StepperExample extends StatefulWidget {
const StepperExample({Key? key}) : super(key: key);
@override
State<StepperExample> createState() => _StepperExampleState();
}
class _StepperExampleState extends State<StepperExample> {
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(title: const Text("Stepper Example"),),
body:Center(
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
InkWell(
onTap: (){
Navigator.push(
context,
MaterialPageRoute(builder: (context) => const ExampleOne()));
},
child: Container(
padding: const EdgeInsets.symmetric(vertical: 15,horizontal: 30),
decoration: const BoxDecoration(
color: Colors.blue,
borderRadius: BorderRadius.all(Radius.circular(10))
),
child: const Text("Example One"),
),
),
const SizedBox(height: 10,),
InkWell(
onTap: (){
Navigator.push(
context,
MaterialPageRoute(builder: (context) => const ExampleTwo()));
},
child: Container(
padding: const EdgeInsets.symmetric(vertical: 15,horizontal: 30),
decoration: const BoxDecoration(
color: Colors.blue,
borderRadius: BorderRadius.all(Radius.circular(10))
),
child: const Text("Example Two"),
),
)
],
),
)
);
}
}