stepper_view 1.0.0 copy "stepper_view: ^1.0.0" to clipboard
stepper_view: ^1.0.0 copied to clipboard

A Flutter Widget to Add a Stepper View in your project without any problem.

A Flutter Widget to Add a Stepper View in your project without any problem.

Features #

Developers can add Data with a Data Model class statically or from a remote server. You can also control the number of steps you want to show. There is "Continue", "Back" and "Finish" option available to control the flow of stepper's execution.

Getting started #

You can add this package anywhere just like any other widget.

class HomePage extends StatefulWidget {
  const HomePage({Key? key}) : super(key: key);

  @override
  _HomePageState createState() => _HomePageState();
}

class _HomePageState extends State<HomePage> {
  List<StepData> stepsData = [];

  @override
  Widget build(BuildContext context) {
    return StepperView(data: stepsData,numberOfSteps: 3,);
  }

  @override
  void initState() {
    _getData();
    super.initState();
  }

  static const MethodChannel platform = MethodChannel('ads/campaign');

  Future<void> _getData() async {

    try {
      final result = await platform.invokeMethod('getCampaignData');
      var jsonData = jsonDecode(result);
      DataModel model = DataModel.fromJson(jsonData);
      setState(() {
        stepsData = model.data!;
      });
    } on PlatformException catch (e) {
      print('${e.message}');
    }
  }


}
4
likes
120
points
8
downloads

Documentation

API reference

Publisher

unverified uploader

Weekly Downloads

A Flutter Widget to Add a Stepper View in your project without any problem.

Repository (GitHub)
View/report issues

License

BSD-3-Clause (license)

Dependencies

flutter

More

Packages that depend on stepper_view