se añadio un modelo y el menu de modo profesional
This commit is contained in:
@@ -4,6 +4,7 @@ import 'package:flutter/cupertino.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:prosappco/src/authentication/authentication_repository.dart';
|
||||
import 'package:prosappco/src/components/drawer_menu.dart';
|
||||
import 'package:prosappco/src/models/score_model.dart';
|
||||
import 'package:prosappco/src/screens/professional.dart';
|
||||
import 'package:intl/intl.dart';
|
||||
|
||||
@@ -16,6 +17,7 @@ class ServiceScreen extends StatefulWidget {
|
||||
|
||||
class _ServiceScreenState extends State<ServiceScreen> {
|
||||
final DateFormat formatter = DateFormat('dd/MM/yyyy');
|
||||
final DateTime now = DateTime.now();
|
||||
|
||||
DateTime? _selectedDate;
|
||||
TimeOfDay? _selectedTime;
|
||||
@@ -23,9 +25,9 @@ class _ServiceScreenState extends State<ServiceScreen> {
|
||||
Future<void> _selectDate(BuildContext context) async {
|
||||
final DateTime? picked = await showDatePicker(
|
||||
context: context,
|
||||
initialDate: DateTime.now(),
|
||||
firstDate: DateTime(2022),
|
||||
lastDate: DateTime(2025),
|
||||
initialDate: now,
|
||||
firstDate: DateTime(now.year),
|
||||
lastDate: DateTime(now.year + 1),
|
||||
// builder: (context, child) {
|
||||
// return Theme(data: ThemeData.dark(), child: child!);
|
||||
// },
|
||||
@@ -95,18 +97,10 @@ class _ServiceScreenState extends State<ServiceScreen> {
|
||||
List<String> opc = ["Servicio", "Opción 1", "Opción 2", "Opción 3"];
|
||||
String defaultValue = opc[0];
|
||||
|
||||
String city = _ciudad.toString();
|
||||
String state = _estado.toString();
|
||||
|
||||
return SafeArea(
|
||||
child: Scaffold(
|
||||
backgroundColor: Color(0xFFD6F4FF),
|
||||
drawer: DrawerMenu(
|
||||
ref: storage.ref().child(_photo),
|
||||
userName: user?.displayName ?? '',
|
||||
userPhoneNumber: user?.phoneNumber ?? '',
|
||||
userCity: city,
|
||||
userState: state),
|
||||
drawer: DrawerMenu(),
|
||||
body: SingleChildScrollView(
|
||||
reverse: true,
|
||||
child: Stack(
|
||||
@@ -243,8 +237,11 @@ class _ServiceScreenState extends State<ServiceScreen> {
|
||||
_selectDate(context);
|
||||
},
|
||||
readOnly: true,
|
||||
decoration: const InputDecoration(
|
||||
prefixIcon: Icon(Icons.calendar_month),
|
||||
decoration: InputDecoration(
|
||||
prefixIcon: const Icon(Icons.calendar_month),
|
||||
suffixIcon: _selectedDate == null
|
||||
? const Icon(Icons.arrow_drop_down)
|
||||
: null,
|
||||
hintText: 'Fecha',
|
||||
),
|
||||
controller: TextEditingController(
|
||||
|
||||
Reference in New Issue
Block a user