mirrored_repositories/Flutter-Learning/Flutter-apps/workout_planner/lib
import 'package:flutter/material.dart';
import 'home_page.dart';
import 'package:lottie/lottie.dart';

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

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      backgroundColor: Colors.grey[300],
      body: Padding(
        padding: const EdgeInsets.symmetric(horizontal: 30),
        child: Center(
          child: Column(
            mainAxisAlignment: MainAxisAlignment.center,
            children: [
              const SizedBox(height: 20),
              //logo
              Lottie.network(
                  'https://assets8.lottiefiles.com/packages/lf20_mskGaJ.json'),
              const SizedBox(height: 60),
              // title

              Padding(
                padding: const EdgeInsets.symmetric(horizontal: 60.0),
                child: const Text(
                  'Your Workout Companion',
                  style: TextStyle(
                    fontSize: 32,
                    color: Color.fromARGB(255, 55, 52, 52),
                    fontWeight: FontWeight.w900,
                  ),
                ),
              ),
              const SizedBox(height: 20),
              //some text
              const Text(
                'Track your daily workouts & watch your progress',
                style: TextStyle(fontSize: 16, color: Colors.grey),
                textAlign: TextAlign.center,
              ),
              const SizedBox(height: 48),
              //Go to main page
              InkWell(
                onTap: () {
                  Navigator.push(
                    context,
                    MaterialPageRoute(
                      builder: (context) => const HomePage(),
                    ),
                  );
                },
                child: Container(
                  padding: const EdgeInsets.all(25),
                  decoration: BoxDecoration(
                      color: Colors.grey[900],
                      borderRadius: BorderRadius.circular(12)),
                  child: const Center(
                    child: Text(
                      'Get Started',
                      style: TextStyle(
                          color: Colors.white,
                          fontSize: 17,
                          fontWeight: FontWeight.bold),
                    ),
                  ),
                ),
              )
            ],
          ),
        ),
      ),
    );
  }
}
