Workshop: Flutter Auth Login #part2 Create Pages

Create Pages in Workshop

Craete all files in Picture


Copy HomePage.dart Paste on Project and Rename file

Edit Class Name and title name

E.g. AboutPage.dart

import 'package:flutter/material.dart';

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

  _AboutPageState createState() => _AboutPageState();

class _AboutPageState extends State<AboutPage> {
  Widget build(BuildContext context) {
    return Scaffold(
        appBar: AppBar(
          title: Text('AboutPage'),
        body: Center(
          child: Column(
            children: [Text('AboutPage')],


import 'package:flutter/material.dart';
import 'package:flutter_workshoptest/pages/EditProfilePage.dart';
import 'package:flutter_workshoptest/pages/HomePage.dart';
import 'package:flutter_workshoptest/pages/LoginPage.dart';
import 'package:flutter_workshoptest/pages/RegisterPage.dart';
import 'package:flutter_workshoptest/pages/Launcher.dart';
import 'package:flutter_workshoptest/pages/ProfilePage.dart';

void main() {

class MyApp extends StatelessWidget {
  // This widget is the root of your application.
  Widget build(BuildContext context) {
    return MaterialApp(
      debugShowCheckedModeBanner: false,
      title: 'Flutter Workshop1',
      theme: ThemeData(
       initialRoute: '/',
      routes: {
        '/': (context) => LoginPage(),
        "/home": (context) => HomePage(),
        "/login": (context) => LoginPage(),
        "/register": (context) => RegisterPage(),
        "/profile": (context) => ProfilePage(),
        "/editprofile": (context) => EditProfilePage(),
        "/launcher": (context) => Launcher(),        

(Visited 255 times, 1 visits today)
Spread the love