Skip to content

Commit

Permalink
Removing not fully implemented features
Browse files Browse the repository at this point in the history
  • Loading branch information
luismdsleite committed Apr 26, 2022
1 parent aa6364d commit e6b6dad
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 75 deletions.
20 changes: 4 additions & 16 deletions flutter_prototype/lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,15 @@ class MyApp extends StatelessWidget {

class HomeView extends StatelessWidget {
final String? authToken;
const HomeView({Key? key, required this.authToken}) : super(key: key);
const HomeView({Key? key, this.authToken}) : super(key: key);

@override
Widget build(BuildContext context) {
List facility = getFacilitiesList();
var nearestFacility = getNearestFacility();
// var nearestFacility = getNearestFacility();

facility.remove(nearestFacility);
facility.insert(0, nearestFacility);
// facility.remove(nearestFacility);
// facility.insert(0, nearestFacility);
return Scaffold(
appBar: AppBar(
title: const Center(
Expand All @@ -52,18 +52,6 @@ class HomeView extends StatelessWidget {
},
shrinkWrap: true,
),
ElevatedButton(
child: const Text(
'Log Out',
textAlign: TextAlign.center,
),
onPressed: () {
Navigator.push(
context,
MaterialPageRoute(builder: (context) => LoginView()),
);
},
)
]),
);
}
Expand Down
61 changes: 2 additions & 59 deletions flutter_prototype/lib/src/views/facility_view.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,14 @@ import 'package:flutter/material.dart';
import 'package:flutter_code/src/objects/facility.dart';
import 'package:flutter_code/src/form.dart';
import 'package:flutter_code/src/server_comm/requests.dart';
import 'package:flutter_code/src/views/chatdetailpage.dart';
import 'package:flutter_code/src/views/preview.dart';
import 'package:flutter_code/src/views/preview2.dart';

class FacilityView extends StatelessWidget {
final Facility facility;
const FacilityView({Key? key, required this.facility}) : super(key: key);

@override
Widget build(BuildContext context) {
List capacity = getCapacity(facility);
List<String> weekDays = ['Segunda', 'Terça', 'Quarta', 'Quinta', 'Sexta'];
// List capacity = getCapacity(facility);
return Scaffold(
appBar: AppBar(
title: Center(
Expand All @@ -25,16 +21,7 @@ class FacilityView extends StatelessWidget {
Padding(
padding: const EdgeInsets.all(16.0),
child: Text(
'Max Capacity: ' +
capacity[0] +
'\n' +
'Available spots: ' +
capacity[1] +
'\n' +
'Occupied spots: ' +
capacity[2] +
'\n' +
getQueueState(facility),
"Estado da fila : " + getQueueState(facility),
textAlign: TextAlign.center,
style: const TextStyle(height: 3, fontSize: 20),
),
Expand All @@ -52,50 +39,6 @@ class FacilityView extends StatelessWidget {
);
},
),
DropdownButton(
items: weekDays.map((String value) {
return DropdownMenuItem(
value: value,
child: Text(value),
);
}).toList(),
onChanged: (String? newValue) {}),
ElevatedButton(
child: const Text(
'Previsão',
textAlign: TextAlign.center,
),
onPressed: () {
Navigator.push(
context,
MaterialPageRoute(builder: (context) => Preview()),
);
},
),
ElevatedButton(
child: const Text(
'Historico',
textAlign: TextAlign.center,
),
onPressed: () {
Navigator.push(
context,
MaterialPageRoute(builder: (context) => Preview2()),
);
},
),
ElevatedButton(
child: const Text(
'Chat',
textAlign: TextAlign.center,
),
onPressed: () {
Navigator.push(
context,
MaterialPageRoute(builder: (context) => const ChatDetailPage()),
);
},
),
])));
}
}

1 comment on commit e6b6dad

@luismdsleite
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This commit corresponds to #12

Please sign in to comment.