easy_navigation_flutter 0.0.4 copy "easy_navigation_flutter: ^0.0.4" to clipboard
easy_navigation_flutter: ^0.0.4 copied to clipboard

Flutter package for simplified page-to-page navigation.

example/main.dart

import 'package:easy_navigation_flutter/easy_navigation_flutter.dart';
import 'package:flutter/material.dart';


void main() {
  runApp(const MyApp());
}

class MyApp extends StatelessWidget {
  const MyApp({super.key});

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        appBar: AppBar(title: const Text('Flutter Navigator Example')),
        body: Center(
          child: ElevatedButton(
            onPressed: () {
              NavigatorHelper.to(context, const SecondPage()); // Navigate to SecondPage
            },
            child: const Text('Go to Second Page'),
          ),
        ),
      ),
    );
  }
}

class SecondPage extends StatelessWidget {
  const SecondPage({super.key});

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(title: const Text('Second Page')),
      body: Center(
        child: ElevatedButton(
          onPressed: () {
             NavigatorHelper.to(context, const MyApp()); 
          },
          child: const Text('Go Back'),
        ),
      ),
    );
  }
}
4
likes
135
points
14
downloads

Publisher

verified publishersuneeldk.in

Weekly Downloads

Flutter package for simplified page-to-page navigation.

Documentation

API reference

License

MIT (license)

Dependencies

flutter

More

Packages that depend on easy_navigation_flutter