Skip to content

Anushlinux/Page-Navigation

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 

Repository files navigation

Description

This is a basic Flutter project demonstrating navigation between screens: a First Page and a Second Page and a App drawer. It uses the MaterialApp widget as the main application and defines routes for navigating between the pages.

Features

  • Simple navigation between two screens
  • App bar with title and background color
  • Drawer on the First Page
  • Button on the Second Page to navigate back to the First Page

Getting Started

  1. Prerequisites
  2. Clone or Download the Repository
    • Use Git to clone the repository:
      git clone https://github.com/your-username/my-app.git
    • Alternatively, download the ZIP file from your GitHub repository and extract it.
  3. Run the App
    • Navigate to the project directory in your terminal.
    • Run the following command to install dependencies:
      flutter pub get
    • Start the development server:
      flutter run

Folder Structure

myapp/
  lib/
    main.dart               # Entry point of the application
    pages/
      first_page.dart        # Defines the First Page widget
      second_page.dart       # Defines the Second Page widget
  pubspec.yaml             # Project configuration file

Code Overview

  • main.dart: This file is the entry point of the application. It creates a MyApp widget using the runApp function.
  • first_page.dart: This file defines the firstPage widget, which represents the First Page of the app.
  • second_page.dart: This file defines the secondPage widget, which represents the Second Page of the app.

Navigation

The app uses named routes to navigate between the First Page and the Second Page. The routes property in the MaterialApp widget defines these routes:

  • /firstPage: This route leads to the firstPage widget.
  • /secondPage: This route leads to the secondPage widget.

Contributing

Feel free to fork this repository and make your own contributions. We appreciate any pull requests that improve the code or add new features. Please follow these guidelines:

  • Create a new branch for your feature or bug fix.
  • Write clear and concise commit messages.
  • Add unit tests for your changes.
  • Submit a pull request for review.

Additional Notes

  • The ignore_for_file: prefer_const_constructors line in firstPage.dart is temporary and should be removed when you replace the placeholder content with your actual UI.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published