import 'package:flutter/material.dart';
import 'package:lottie/lottie.dart';
import 'package:google_fonts/google_fonts.dart';

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

  @override
  State<DiseasePrediction> createState() => _DiseasePredictionState();
}

class _DiseasePredictionState extends State<DiseasePrediction> {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      backgroundColor: Colors.grey.shade900,
      appBar: AppBar(
        backgroundColor: Colors.black,
        title: Text(
          "Disease Prediction",
          style: GoogleFonts.roboto(
            color: Colors.white,
            fontWeight: FontWeight.bold,
          ),
        ),
        leading: GestureDetector(
          onTap: () {
            Navigator.of(context).pop();
          },
          child: Icon(
            Icons.arrow_back,
            color: Colors.white,
          ),
        ),
      ),
      body: Container(
        margin: EdgeInsets.symmetric(
            horizontal: MediaQuery.of(context).size.width / 15),
        child: Center(
          child: SingleChildScrollView(
            child: Column(
              crossAxisAlignment: CrossAxisAlignment.center,
              children: [
                Text(
                  "Scan your plant to get started", //instructions
                  style: GoogleFonts.roboto(
                    fontSize: MediaQuery.of(context).size.width / 10,
                    fontWeight: FontWeight.w600,
                    color: Colors.white,
                  ),
                  textAlign: TextAlign.center,
                ),
                Text(
                  "Make sure to focus on the fungus", //instructions to capture
                  style: GoogleFonts.roboto(
                    fontSize: MediaQuery.of(context).size.width / 20,
                    fontWeight: FontWeight.w400,
                    color: Colors.white70,
                  ),
                ),
                SizedBox(
                  height: MediaQuery.of(context).size.height / 10.5,
                ),
                GestureDetector(
                  onTap: () {
                    // _getFromGallery();
                  },
                  child: Container(
                    width: MediaQuery.of(context).size.width,
                    child: LottieBuilder.asset(
                      "assets/lottie/scanner.json",
                    ),
                  ),
                )
              ],
            ),
          ),
        ),
      ),
    );
  }
}
