rameez_animated_login_screen 0.0.1 copy "rameez_animated_login_screen: ^0.0.1" to clipboard
rameez_animated_login_screen: ^0.0.1 copied to clipboard

outdated

A new Flutter package project.

example/lib/main.dart

// ignore_for_file: avoid_print

import 'package:flutter/material.dart';
import 'package:rameez_animated_login_screen/login_data.dart';
import 'package:rameez_animated_login_screen/rameez_animated_login_screen.dart';

import 'firstpage.dart';

void main() => runApp(const App());

class App extends StatelessWidget {
  const App({Key? key}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Login Screen',
      debugShowCheckedModeBanner: false,
      theme: ThemeData(primarySwatch: Colors.blue),
      home: const HomePage(),
    );
  }
}

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

  @override
  Widget build(BuildContext context) {
    return Scaffold(
        body: Container(
            decoration: const BoxDecoration(
              image: DecorationImage(
                image: AssetImage("assets/a.jpg"),
                fit: BoxFit.cover,
              ),
            ),
            child: Align(
              alignment: Alignment.center,
              child: RameezAnimatedLoginScreen(
                //flareController: flareController,
                passwordFieldCaretMovement: (Offset globalCaretPosition) {},
                userFieldCaretMovement: (Offset globalCaretPosition) {},
                //flareImage: 'assets/Test.flr',
                routeAfterSuccessFulSignIn: () {
                  Navigator.of(context).push(
                    MaterialPageRoute<void>(
                      builder: (BuildContext context) => const Page1(),
                    ),
                  );
                },
                validateUserNameAndPassword: validate,
                defaultAnimation: true, passwordLabel: 'Enter Password',
                usernameLabel: 'Enter User Name',
              ),
            )));
  }

  bool validate(LoginData loginData) {
    print(loginData.password);
    print(loginData.name);
    if (loginData.name == "ram" && loginData.password == "rame") {
      return true;
    }
    return false;
  }
}
20
likes
0
pub points
22%
popularity

Publisher

unverified uploader

A new Flutter package project.

Homepage

License

unknown (license)

Dependencies

flare_flutter, flutter, flutter_spinkit, quiver

More

Packages that depend on rameez_animated_login_screen