hng_authentication 0.0.2 copy "hng_authentication: ^0.0.2" to clipboard
hng_authentication: ^0.0.2 copied to clipboard

outdated

An Authentication package used in hng_internship_10.

example/lib/main.dart

import 'package:example/ui/registration_form.dart';
import 'package:flutter/material.dart';
// find a way to import our authentication service from package folder into this example folder to use
// import 'package:authentica';

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

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

  // This widget is the root of your application.
  @override
  Widget build(BuildContext context) {
    final TextEditingController nameController = TextEditingController();
    final TextEditingController emailController = TextEditingController();
    final TextEditingController passwordController = TextEditingController();

  
      
    return MaterialApp(
      title: 'Authentication Example',
      routes: {
        '/': (context) => RegistrationForm(
              emailController: emailController,
              successRoutePage: '/home', 
              nameController: nameController, 
              passwordController: passwordController, // Use the route name here
            ),
        '/home': (context) => const Home(), // Define a route for Home
      },
      initialRoute: '/',
    );
  }
}

class Home extends StatefulWidget {
  const Home({super.key});

  @override
  State<Home> createState() => _HomeState();
}

class _HomeState extends State<Home> {
  @override
  Widget build(BuildContext context) {
    return const Placeholder();
  }
}
6
likes
0
points
29
downloads

Publisher

unverified uploader

Weekly Downloads

An Authentication package used in hng_internship_10.

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

flutter, google_fonts, http, mockito

More

Packages that depend on hng_authentication