fixed const
This commit is contained in:
@@ -3,14 +3,16 @@ import 'package:prosappco/src/authentication/authentication_repository.dart';
|
|||||||
|
|
||||||
final uid = AuthenticationRepository.instance.getCurrentUserUid();
|
final uid = AuthenticationRepository.instance.getCurrentUserUid();
|
||||||
|
|
||||||
// class EventoService {
|
class EventoService {
|
||||||
// Future<Event> createEvent() {
|
Future<void> createEvent(String title, String description, String day) async {
|
||||||
// FirebaseFirestore.instance.collection('users').doc(uid).update({
|
try {
|
||||||
// 'ejemplo': 'ejm',
|
await FirebaseFirestore.instance.collection('services').add({
|
||||||
// });
|
'title': title,
|
||||||
|
'description': description,
|
||||||
// try {} catch (e) {
|
'day': day,
|
||||||
// print('Evento $e');
|
});
|
||||||
// }
|
} catch (e) {
|
||||||
// }
|
print('Evento $e');
|
||||||
// }
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:prosappco/src/components/pop_appbar.dart';
|
import 'package:prosappco/src/components/pop_appbar.dart';
|
||||||
|
import 'package:prosappco/src/models/event_model.dart';
|
||||||
import 'package:table_calendar/table_calendar.dart';
|
import 'package:table_calendar/table_calendar.dart';
|
||||||
|
|
||||||
class CalendarScreen extends StatefulWidget {
|
class CalendarScreen extends StatefulWidget {
|
||||||
@@ -10,6 +11,7 @@ class CalendarScreen extends StatefulWidget {
|
|||||||
}
|
}
|
||||||
|
|
||||||
class _CalendarScreenState extends State<CalendarScreen> {
|
class _CalendarScreenState extends State<CalendarScreen> {
|
||||||
|
EventoService eventoService = EventoService();
|
||||||
CalendarFormat _calendarFormat = CalendarFormat.month;
|
CalendarFormat _calendarFormat = CalendarFormat.month;
|
||||||
DateTime today = DateTime.now();
|
DateTime today = DateTime.now();
|
||||||
|
|
||||||
@@ -65,11 +67,15 @@ class _CalendarScreenState extends State<CalendarScreen> {
|
|||||||
},
|
},
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
Text(today.toString())
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
floatingActionButton: FloatingActionButton(
|
floatingActionButton: FloatingActionButton(
|
||||||
onPressed: () {},
|
onPressed: () async {
|
||||||
|
await eventoService.createEvent(
|
||||||
|
'Hola', 'Saludarnois', today.toString());
|
||||||
|
},
|
||||||
child: const Icon(Icons.add),
|
child: const Icon(Icons.add),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|||||||
@@ -37,10 +37,10 @@ class _NewNumberScreenState extends State<NewNumberScreen> {
|
|||||||
resizeToAvoidBottomInset: false,
|
resizeToAvoidBottomInset: false,
|
||||||
appBar: AppBar(
|
appBar: AppBar(
|
||||||
backgroundColor: Colors.white,
|
backgroundColor: Colors.white,
|
||||||
iconTheme: IconThemeData(
|
iconTheme: const IconThemeData(
|
||||||
color: Colors.black,
|
color: Colors.black,
|
||||||
),
|
),
|
||||||
title: Text(
|
title: const Text(
|
||||||
'Añadir numero',
|
'Añadir numero',
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
color: Colors.black,
|
color: Colors.black,
|
||||||
@@ -61,14 +61,14 @@ class _NewNumberScreenState extends State<NewNumberScreen> {
|
|||||||
Form(
|
Form(
|
||||||
key: _formKey,
|
key: _formKey,
|
||||||
child: Padding(
|
child: Padding(
|
||||||
padding: EdgeInsets.only(bottom: 5),
|
padding: const EdgeInsets.only(bottom: 5),
|
||||||
child: IntlPhoneField(
|
child: IntlPhoneField(
|
||||||
controller: controller.newPhoneNo,
|
controller: controller.newPhoneNo,
|
||||||
initialCountryCode: 'CO',
|
initialCountryCode: 'CO',
|
||||||
onChanged: (newPhoneNo) {
|
onChanged: (newPhoneNo) {
|
||||||
completePhoneNumber = newPhoneNo.completeNumber;
|
completePhoneNumber = newPhoneNo.completeNumber;
|
||||||
},
|
},
|
||||||
decoration: InputDecoration(
|
decoration: const InputDecoration(
|
||||||
enabledBorder: OutlineInputBorder(
|
enabledBorder: OutlineInputBorder(
|
||||||
borderSide: BorderSide(color: Color(0xFFECECEC)),
|
borderSide: BorderSide(color: Color(0xFFECECEC)),
|
||||||
borderRadius: BorderRadius.all(
|
borderRadius: BorderRadius.all(
|
||||||
@@ -92,7 +92,7 @@ class _NewNumberScreenState extends State<NewNumberScreen> {
|
|||||||
style: TextStyle(fontSize: 13.0, color: Color(0xFF65676B))),
|
style: TextStyle(fontSize: 13.0, color: Color(0xFF65676B))),
|
||||||
),
|
),
|
||||||
Padding(
|
Padding(
|
||||||
padding: EdgeInsets.only(bottom: 30),
|
padding: const EdgeInsets.only(bottom: 30),
|
||||||
child: Center(
|
child: Center(
|
||||||
child: PrimaryButtom(
|
child: PrimaryButtom(
|
||||||
onPressed: () {
|
onPressed: () {
|
||||||
|
|||||||
@@ -18,16 +18,16 @@ class RequestSentScreen extends StatelessWidget {
|
|||||||
body: Center(
|
body: Center(
|
||||||
child: Column(
|
child: Column(
|
||||||
children: [
|
children: [
|
||||||
Padding(
|
const Padding(
|
||||||
padding: const EdgeInsets.only(top: 90, bottom: 40),
|
padding: EdgeInsets.only(top: 90, bottom: 40),
|
||||||
child: Icon(
|
child: Icon(
|
||||||
Icons.check_circle_outline,
|
Icons.check_circle_outline,
|
||||||
size: 50,
|
size: 50,
|
||||||
color: Color(0xFF35A8ED),
|
color: Color(0xFF35A8ED),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
Padding(
|
const Padding(
|
||||||
padding: const EdgeInsets.only(bottom: 350),
|
padding: EdgeInsets.only(bottom: 350),
|
||||||
child: Text('Información enviada con éxito.',
|
child: Text('Información enviada con éxito.',
|
||||||
style:
|
style:
|
||||||
TextStyle(color: Color(0xFF2BA4EC), fontSize: 20)),
|
TextStyle(color: Color(0xFF2BA4EC), fontSize: 20)),
|
||||||
|
|||||||
Reference in New Issue
Block a user