replace: swap prosappweb content for prosapp_web_app (more complete version)
prosapp_web_app has chat, dashboard, calendar, support, 13 providers and Fluro URL routing. Keep Dockerfile + nginx.conf from previous prosappweb. Upgrade google_fonts 6.2.1 → 8.1.0 (Dart 3.12 compat fix). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Sonnet 4.6
parent
74a4f41902
commit
15175c1b91
@@ -0,0 +1,90 @@
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
import 'package:prosapp_web_app/ui/layouts/auth/widgets/custom_title.dart';
|
||||
import 'package:prosapp_web_app/ui/layouts/auth/widgets/background_auth.dart';
|
||||
|
||||
class AuthLayout extends StatelessWidget {
|
||||
final Widget child;
|
||||
const AuthLayout({super.key, required this.child});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final size = MediaQuery.of(context).size;
|
||||
|
||||
return Scaffold(
|
||||
body: Scrollbar(
|
||||
child: ListView(
|
||||
physics: const ClampingScrollPhysics(),
|
||||
children: [
|
||||
size.width > 1000
|
||||
? _DesktopBody(child: child)
|
||||
: _MobileBody(child: child),
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
class _MobileBody extends StatelessWidget {
|
||||
final Widget child;
|
||||
|
||||
const _MobileBody({super.key, required this.child});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Container(
|
||||
color: Colors.white,
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
const SizedBox(height: 20),
|
||||
const CustomTitle(),
|
||||
SizedBox(width: double.infinity, height: 420, child: child),
|
||||
const SizedBox(
|
||||
width: double.infinity,
|
||||
height: 400,
|
||||
child: BackgroundAuth(),
|
||||
)
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
class _DesktopBody extends StatelessWidget {
|
||||
final Widget child;
|
||||
|
||||
const _DesktopBody({super.key, required this.child});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final size = MediaQuery.of(context).size;
|
||||
|
||||
return Container(
|
||||
width: size.width,
|
||||
height: size.height,
|
||||
color: Colors.white,
|
||||
child: Row(
|
||||
children: [
|
||||
const Expanded(child: BackgroundAuth()),
|
||||
|
||||
// View container
|
||||
Container(
|
||||
width: 600,
|
||||
height: double.infinity,
|
||||
color: Colors.white,
|
||||
child: Column(
|
||||
children: [
|
||||
const SizedBox(height: 20),
|
||||
const CustomTitle(),
|
||||
const SizedBox(height: 50),
|
||||
Expanded(child: child),
|
||||
],
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
class BackgroundAuth extends StatelessWidget {
|
||||
const BackgroundAuth({super.key});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Container(
|
||||
color: Colors.blue,
|
||||
child: Container(
|
||||
constraints: const BoxConstraints(maxWidth: 400),
|
||||
child: const Center(
|
||||
child: Padding(
|
||||
padding: EdgeInsets.symmetric(horizontal: 30),
|
||||
child: Image(
|
||||
image: AssetImage('prosapp-logo.png'),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,38 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:google_fonts/google_fonts.dart';
|
||||
|
||||
class CustomTitle extends StatelessWidget {
|
||||
const CustomTitle({
|
||||
super.key,
|
||||
});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Container(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 20),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.center,
|
||||
children: [
|
||||
const SizedBox(height: 100), // Añade espacio arriba
|
||||
Image.asset(
|
||||
'logo.png',
|
||||
width: 60,
|
||||
height: 60,
|
||||
),
|
||||
const SizedBox(height: 40), // Mantiene el espacio entre el logo y el texto
|
||||
FittedBox(
|
||||
fit: BoxFit.contain,
|
||||
child: Text(
|
||||
"Iniciar sesión",
|
||||
style: GoogleFonts.montserratAlternates(
|
||||
fontSize: 30,
|
||||
color: Colors.black,
|
||||
fontWeight: FontWeight.bold,
|
||||
),
|
||||
),
|
||||
)
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,85 @@
|
||||
import 'package:prosapp_web_app/providers/sidemenu_provider.dart';
|
||||
import 'package:prosapp_web_app/ui/shared/navbar.dart';
|
||||
import 'package:prosapp_web_app/ui/shared/sidebar.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
class DashboardLayout extends StatefulWidget {
|
||||
final Widget child;
|
||||
const DashboardLayout({super.key, required this.child});
|
||||
|
||||
@override
|
||||
State<DashboardLayout> createState() => _DashboardLayoutState();
|
||||
}
|
||||
|
||||
class _DashboardLayoutState extends State<DashboardLayout>
|
||||
with SingleTickerProviderStateMixin {
|
||||
@override
|
||||
void initState() {
|
||||
super.initState();
|
||||
SideMenuProvider.menuController = AnimationController(
|
||||
vsync: this,
|
||||
duration: const Duration(milliseconds: 300),
|
||||
);
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final size = MediaQuery.of(context).size;
|
||||
|
||||
return Scaffold(
|
||||
backgroundColor: const Color(0xffEDF1F2),
|
||||
body: Stack(
|
||||
children: [
|
||||
Row(
|
||||
children: [
|
||||
if (size.width >= 700) const Sidebar(),
|
||||
Expanded(
|
||||
child: Column(
|
||||
children: [
|
||||
// Navbar
|
||||
const Navbar(),
|
||||
|
||||
// View
|
||||
Expanded(
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.symmetric(
|
||||
horizontal: 20,
|
||||
vertical: 10,
|
||||
),
|
||||
child: widget.child,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
)
|
||||
],
|
||||
),
|
||||
if (size.width < 700)
|
||||
AnimatedBuilder(
|
||||
animation: SideMenuProvider.menuController,
|
||||
builder: (context, _) => Stack(
|
||||
children: [
|
||||
if (SideMenuProvider.isOpen)
|
||||
Opacity(
|
||||
opacity: SideMenuProvider.opacity.value,
|
||||
child: GestureDetector(
|
||||
onTap: () => SideMenuProvider.closeMenu(),
|
||||
child: Container(
|
||||
width: size.width,
|
||||
height: size.height,
|
||||
color: Colors.black26,
|
||||
),
|
||||
),
|
||||
),
|
||||
Transform.translate(
|
||||
offset: Offset(SideMenuProvider.movement.value, 0),
|
||||
child: const Sidebar(),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
class SplashLayout extends StatelessWidget {
|
||||
const SplashLayout({super.key});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return const Scaffold(
|
||||
body: Center(
|
||||
child: Column(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
CircularProgressIndicator(),
|
||||
SizedBox(height: 20),
|
||||
Text('Checking...'),
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user