import 'package:flutter/cupertino.dart'; import 'package:flutter_login/flutter_login.dart'; import 'package:flutter/material.dart'; import 'package:google_fonts/google_fonts.dart'; import 'Offices.dart'; import 'dynamic.dart'; import 'Offices.dart'; import 'OfficeScreen.dart'; import 'package:flutter/foundation.dart'; import 'package:http/http.dart' as http; //This page only works when called by other OfficeScreenPage() //Need to add the functionality to work on its own class AppointmentPage extends StatelessWidget { final Offices O; AppointmentPage({Key key, @required this.O}) :super(key: key); // AppointmentPage({Key key, @required this.O}) : super(key: key); // final String title; // // Future fetchAlbum() { // return http.get('https://ada.uprrp.edu/~hector.sierra/FastMed/API/API/getcitas.php'); // } // List listDynamic = []; // List data = []; // Icon floatingIcon = new Icon(Icons.add); // // addDynamic() { // if (data.length != 0) { // floatingIcon = new Icon(Icons.add); // data = []; // listDynamic = []; // print('if'); // } // setState(() {}); // if (listDynamic.length >= 5) { // return; // } // listDynamic.add(new dynamicWidget()); // } // // var docs = ["Collazo", "Albizu"]; // var spec = ["General", "Pediatra"]; // var addrs = ["Bo. Montellano, Cayey", "Las Dalias, Mayagüez"]; @override Widget card() { return SizedBox( width: 380, height: 150, child: Card( child: Column( mainAxisSize: MainAxisSize.min, children: [ ListTile( leading: Icon( Icons.check, color: Colors.green, size: 60, ), title: Text( O.doctor + "\n" + O.specialty, textScaleFactor: 1.5,), subtitle: Text(O.address, textScaleFactor: 1.45,), trailing: Text("\n10:45 - 11:45 ", textScaleFactor: 1.30,), ), // ListTile( // leading: Icon( // Icons.check, // color: Colors.green, // size: 60, // ), // title: Text("Figueroa" + "\n" + "Gastrointerologo", textScaleFactor: 1.5,), // subtitle: Text("Las Dalias, Mayagüez", textScaleFactor: 1.45,), // trailing: Text("\n10:45 - 11:45 ", textScaleFactor: 1.30,), // // ) ], ), ), ); } @override Widget build(BuildContext context) { final height = MediaQuery.of(context).size.height; return Scaffold( body: Container( height: height, child:Container( width: MediaQuery.of(context).size.width, padding: EdgeInsets.symmetric(horizontal: 20), // height: MediaQuery.of(context).size.height, decoration: BoxDecoration( borderRadius: BorderRadius.all(Radius.circular(4)), boxShadow: [ BoxShadow( color: Colors.white, offset: Offset(0,3), blurRadius: 5, spreadRadius: 2) ] ), child: SingleChildScrollView( child: Column( crossAxisAlignment: CrossAxisAlignment.center, mainAxisAlignment: MainAxisAlignment.center, children: [ SizedBox( height: 80, ), card(), SizedBox( height: 25, ), // card(docs[1], spec[1], addrs[1]), ], ) ), ), ) ); } }