import 'package:flutter/material.dart';
import 'package:flutter_svg/flutter_svg.dart';

class ConnectionErrorScreen extends StatelessWidget{

  const ConnectionErrorScreen({super.key});

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      body: Container(
        margin: EdgeInsets.all(30),
        child: Center(
          child: Column(
            spacing: 15,
            children: [
              Spacer(flex: 2),
              SvgPicture.asset("assets/images/ui/connection_error.svg"),
              Text("Sin conexión a internet",
                  style: TextStyle(fontWeight: FontWeight.bold, fontSize: 25)
              ),
              Text("Necesitas conectividad para usar SaveFamily"),
              Text("Puedes continuar en modo offline pero algunas funciones no estaràn disponibles"),
              Spacer(flex: 1),
              FilledButton(
                onPressed: ()=>{},
                child: Container(
                  width: double.infinity,
                  padding: EdgeInsets.all(20),
                  child: Text("Modo offline")
                )
              ),
              TextButton(onPressed: ()=>{}, child: Text("Reintentar")),
              Spacer(flex: 2)
            ]
          ),
        )
      )
    );
  }
}