Files
Run_vision_pro_inicial_DB/lib/screens/inicial_screen.dart
Carlos Correia 6931d6ada2 atualização
2026-03-05 18:08:06 +00:00

93 lines
3.1 KiB
Dart

import 'package:flutter/material.dart';
import '../constants/app_colors.dart';
import '../constants/app_strings.dart';
import '../sheets/entrar_sheet.dart';
import '../sheets/registrar_sheet.dart';
import '../services/supabase_service.dart';
class InicialScreen extends StatelessWidget {
const InicialScreen({super.key});
@override
Widget build(BuildContext context) {
// Test Supabase connection on app start
WidgetsBinding.instance.addPostFrameCallback((_) async {
final isConnected = await SupabaseService.testConnection();
print('DEBUG: Status da conexão: $isConnected');
});
return Scaffold(
backgroundColor: AppColors.background,
body: Center(
child: Padding(
padding: const EdgeInsets.symmetric(horizontal: 24.0),
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
SizedBox(
width: double.infinity,
height: 60,
child: ElevatedButton(
onPressed: () {
showModalBottomSheet(
context: context,
isScrollControlled: true,
backgroundColor: Colors.transparent,
builder: (context) => const RegistrarSheet(),
);
},
style: ElevatedButton.styleFrom(
backgroundColor: AppColors.buttonColor,
foregroundColor: AppColors.white,
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(30),
),
elevation: 5,
),
child: Text(
AppStrings.registrar,
style: const TextStyle(
fontSize: 18,
fontWeight: FontWeight.w600,
),
),
),
),
const SizedBox(height: 16),
SizedBox(
width: double.infinity,
height: 60,
child: ElevatedButton(
onPressed: () {
showModalBottomSheet(
context: context,
isScrollControlled: true,
backgroundColor: Colors.transparent,
builder: (context) => const EntrarSheet(),
);
},
style: ElevatedButton.styleFrom(
backgroundColor: AppColors.buttonColor,
foregroundColor: AppColors.white,
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(30),
),
elevation: 5,
),
child: Text(
AppStrings.entrar,
style: const TextStyle(
fontSize: 18,
fontWeight: FontWeight.w600,
),
),
),
),
],
),
),
),
);
}
}