No Description

appointments.dart 3.8KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135
  1. import 'package:flutter/cupertino.dart';
  2. import 'package:flutter_login/flutter_login.dart';
  3. import 'package:flutter/material.dart';
  4. import 'package:google_fonts/google_fonts.dart';
  5. import 'Offices.dart';
  6. import 'dynamic.dart';
  7. import 'Offices.dart';
  8. import 'OfficeScreen.dart';
  9. import 'package:flutter/foundation.dart';
  10. import 'package:http/http.dart' as http;
  11. //This page only works when called by other OfficeScreenPage()
  12. //Need to add the functionality to work on its own
  13. class AppointmentPage extends StatelessWidget {
  14. final Offices O;
  15. AppointmentPage({Key key, @required this.O}) :super(key: key);
  16. // AppointmentPage({Key key, @required this.O}) : super(key: key);
  17. // final String title;
  18. //
  19. // Future<http.Response> fetchAlbum() {
  20. // return http.get('https://ada.uprrp.edu/~hector.sierra/FastMed/API/API/getcitas.php');
  21. // }
  22. // List<dynamicWidget> listDynamic = [];
  23. // List<String> data = [];
  24. // Icon floatingIcon = new Icon(Icons.add);
  25. //
  26. // addDynamic() {
  27. // if (data.length != 0) {
  28. // floatingIcon = new Icon(Icons.add);
  29. // data = [];
  30. // listDynamic = [];
  31. // print('if');
  32. // }
  33. // setState(() {});
  34. // if (listDynamic.length >= 5) {
  35. // return;
  36. // }
  37. // listDynamic.add(new dynamicWidget());
  38. // }
  39. //
  40. // var docs = ["Collazo", "Albizu"];
  41. // var spec = ["General", "Pediatra"];
  42. // var addrs = ["Bo. Montellano, Cayey", "Las Dalias, Mayagüez"];
  43. @override
  44. Widget card() {
  45. return SizedBox(
  46. width: 380,
  47. height: 150,
  48. child: Card(
  49. child: Column(
  50. mainAxisSize: MainAxisSize.min,
  51. children: <Widget>[
  52. ListTile(
  53. leading: Icon(
  54. Icons.check,
  55. color: Colors.green,
  56. size: 60,
  57. ),
  58. title: Text( O.doctor + "\n" + O.specialty, textScaleFactor: 1.5,),
  59. subtitle: Text(O.address, textScaleFactor: 1.45,),
  60. trailing: Text("\n10:45 - 11:45 ", textScaleFactor: 1.30,),
  61. ),
  62. // ListTile(
  63. // leading: Icon(
  64. // Icons.check,
  65. // color: Colors.green,
  66. // size: 60,
  67. // ),
  68. // title: Text("Figueroa" + "\n" + "Gastrointerologo", textScaleFactor: 1.5,),
  69. // subtitle: Text("Las Dalias, Mayagüez", textScaleFactor: 1.45,),
  70. // trailing: Text("\n10:45 - 11:45 ", textScaleFactor: 1.30,),
  71. //
  72. // )
  73. ],
  74. ),
  75. ),
  76. );
  77. }
  78. @override
  79. Widget build(BuildContext context) {
  80. final height = MediaQuery.of(context).size.height;
  81. return Scaffold(
  82. body: Container(
  83. height: height,
  84. child:Container(
  85. width: MediaQuery.of(context).size.width,
  86. padding: EdgeInsets.symmetric(horizontal: 20),
  87. // height: MediaQuery.of(context).size.height,
  88. decoration: BoxDecoration(
  89. borderRadius: BorderRadius.all(Radius.circular(4)),
  90. boxShadow: [
  91. BoxShadow(
  92. color: Colors.white,
  93. offset: Offset(0,3),
  94. blurRadius: 5,
  95. spreadRadius: 2)
  96. ]
  97. ),
  98. child: SingleChildScrollView(
  99. child: Column(
  100. crossAxisAlignment: CrossAxisAlignment.center,
  101. mainAxisAlignment: MainAxisAlignment.center,
  102. children: <Widget> [
  103. SizedBox(
  104. height: 80,
  105. ),
  106. card(),
  107. SizedBox(
  108. height: 25,
  109. ),
  110. // card(docs[1], spec[1], addrs[1]),
  111. ],
  112. )
  113. ),
  114. ),
  115. )
  116. );
  117. }
  118. }