Skip to content

Commit 7f62092

Browse files
committed
Add address, position, and phoneNumber for each study space
1 parent 546c29f commit 7f62092

File tree

1 file changed

+82
-31
lines changed

1 file changed

+82
-31
lines changed

lib/main.dart

Lines changed: 82 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -166,15 +166,37 @@ class MyApp extends StatelessWidget {
166166
}
167167
}
168168

169+
class Position {
170+
final double longitude;
171+
final double latitude;
172+
173+
Position({required this.longitude, required this.latitude});
174+
}
175+
176+
class PhoneNumber {
177+
final String area;
178+
final String exchange;
179+
final String number;
180+
181+
PhoneNumber(this.area, this.exchange, this.number);
182+
}
183+
169184
class StudySpace {
170185
final String title;
171186
List<OpeningHours> openingHours;
172187
final String pictureUrl;
173-
174-
StudySpace(
175-
{required this.title,
176-
required this.openingHours,
177-
required this.pictureUrl});
188+
final Position position;
189+
final String address;
190+
final PhoneNumber phoneNumber;
191+
192+
StudySpace({
193+
required this.title,
194+
required this.openingHours,
195+
required this.pictureUrl,
196+
required this.position,
197+
required this.address,
198+
required this.phoneNumber,
199+
});
178200
}
179201

180202
class MyHomePage extends StatefulWidget {
@@ -197,48 +219,77 @@ class _MyHomePageState extends State<MyHomePage> {
197219

198220
List<StudySpace> studySpaces = [
199221
StudySpace(
200-
title: "Art, Architecture, and Engineering Library",
201-
openingHours: [const OpeningHours.allDay()],
202-
pictureUrl: "assets/duderstadt.webp"),
222+
title: "Art, Architecture, and Engineering Library",
223+
openingHours: [const OpeningHours.allDay()],
224+
pictureUrl: "assets/duderstadt.webp",
225+
address: "2281 Bonisteel Blvd",
226+
position: Position(latitude: 42.291165, longitude: -83.715716),
227+
phoneNumber: PhoneNumber("734", "647", "5747"),
228+
),
203229
StudySpace(
204-
title: "Hatcher Library",
205-
openingHours: [
206-
const OpeningHours.range(
207-
TimeOfDay(hour: 8, minute: 0), TimeOfDay(hour: 19, minute: 0))
208-
],
209-
pictureUrl: "assets/hatcher.webp"),
230+
title: "Hatcher Library",
231+
openingHours: [
232+
const OpeningHours.range(
233+
TimeOfDay(hour: 8, minute: 0), TimeOfDay(hour: 19, minute: 0))
234+
],
235+
pictureUrl: "assets/hatcher.webp",
236+
address: "913 S. University Avenue",
237+
position: Position(
238+
latitude: 42.276334,
239+
longitude: -83.737981), // Uses Hatcher Library South
240+
phoneNumber: PhoneNumber("734", "764", "0401"),
241+
),
210242
StudySpace(
211-
title: "Shapiro Library",
212-
openingHours: [const OpeningHours.allDay()],
213-
pictureUrl: "assets/shapiro.webp"),
243+
title: "Shapiro Library",
244+
openingHours: [const OpeningHours.allDay()],
245+
pictureUrl: "assets/shapiro.webp",
246+
address: "919 S. University Ave",
247+
position: Position(latitude: 42.275615, longitude: -83.737183),
248+
phoneNumber: PhoneNumber("734", "764", "7490"),
249+
),
214250
StudySpace(
215-
title: "Fine Arts Library",
216-
openingHours: [
217-
const OpeningHours.range(
218-
TimeOfDay(hour: 9, minute: 0), TimeOfDay(hour: 17, minute: 0))
219-
],
220-
pictureUrl: "assets/fine_arts.webp"),
251+
title: "Fine Arts Library",
252+
openingHours: [
253+
const OpeningHours.range(
254+
TimeOfDay(hour: 9, minute: 0), TimeOfDay(hour: 17, minute: 0))
255+
],
256+
pictureUrl: "assets/fine_arts.webp",
257+
address: "855 S. University Ave",
258+
position: Position(latitude: 42.274944, longitude: -83.738995),
259+
phoneNumber: PhoneNumber("734", "764", "5405"),
260+
),
221261
StudySpace(
222262
title: "Asia Library",
223263
openingHours: [
224264
const OpeningHours.range(
225265
TimeOfDay(hour: 8, minute: 0), TimeOfDay(hour: 19, minute: 0))
226266
],
227-
pictureUrl: "assets/asia.webp"),
267+
pictureUrl: "assets/asia.webp",
268+
address:
269+
"913 S. University Ave", // located on 4th floor of Hatcher North
270+
position: Position(latitude: 42.276334, longitude: -83.737981),
271+
phoneNumber: PhoneNumber("734", "764", "0406")),
228272
StudySpace(
229-
title: "Taubman Health Sciences Library",
230-
openingHours: [
231-
const OpeningHours.range(
232-
TimeOfDay(hour: 9, minute: 0), TimeOfDay(hour: 17, minute: 0))
233-
],
234-
pictureUrl: "assets/taubman.webp"),
273+
title: "Taubman Health Sciences Library",
274+
openingHours: [
275+
const OpeningHours.range(
276+
TimeOfDay(hour: 9, minute: 0), TimeOfDay(hour: 17, minute: 0))
277+
],
278+
pictureUrl: "assets/taubman.webp",
279+
address: "1135 Catherine St",
280+
position: Position(latitude: 42.283548, longitude: -83.734451),
281+
phoneNumber: PhoneNumber("734", "764", "1210"),
282+
),
235283
StudySpace(
236284
title: "Music Library",
237285
openingHours: [
238286
const OpeningHours.range(
239287
TimeOfDay(hour: 9, minute: 0), TimeOfDay(hour: 17, minute: 0))
240288
],
241-
pictureUrl: "assets/music.webp")
289+
pictureUrl: "assets/music.webp",
290+
address: "1100 Baits Dr",
291+
position: Position(latitude: 42.290373, longitude: -83.721006),
292+
phoneNumber: PhoneNumber("734", "764", "2512"))
242293
];
243294

244295
@override

0 commit comments

Comments
 (0)