Skip to content

Commit ec95dab

Browse files
committed
Switch to small buttons for address and phone number
1 parent 7a91969 commit ec95dab

File tree

1 file changed

+33
-29
lines changed

1 file changed

+33
-29
lines changed

lib/studySpacePage.dart

Lines changed: 33 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -167,40 +167,44 @@ class StudySpacePage extends StatelessWidget {
167167
Text(
168168
studySpace.title,
169169
style: Theme.of(context).textTheme.headlineSmall,
170-
textAlign: TextAlign.center,
170+
textAlign: TextAlign.start,
171171
),
172172
SizedBox(
173173
height:
174-
Theme.of(context).textTheme.headlineSmall!.fontSize! /
175-
2),
176-
OpeningHourCard(openingHours: studySpace.openingHours),
174+
Theme.of(context).textTheme.bodyLarge!.fontSize! / 2),
175+
Row(
176+
children: [
177+
OutlinedButton.icon(
178+
onPressed: () async {
179+
if (kDebugMode) {
180+
print(
181+
"Tapped on the address of ${studySpace.title}.");
182+
}
183+
MapsLauncher.launchQuery(
184+
"${studySpace.title}, ${studySpace.address}");
185+
},
186+
icon: const Icon(MaterialIconsSelected.place),
187+
label: const Text("Map")),
188+
SizedBox(
189+
width:
190+
Theme.of(context).textTheme.bodyLarge!.fontSize! /
191+
2),
192+
OutlinedButton.icon(
193+
onPressed: () async {
194+
if (kDebugMode) {
195+
print(
196+
"Tapped on the contact of ${studySpace.title}.");
197+
launch("tel://${studySpace.phoneNumber}");
198+
}
199+
},
200+
icon: const Icon(MaterialIconsSelected.call),
201+
label: const Text("Call")),
202+
],
203+
),
177204
SizedBox(
178205
height:
179-
Theme.of(context).textTheme.headlineSmall!.fontSize! /
180-
2),
181-
Text("Address", style: Theme.of(context).textTheme.titleLarge),
182-
OutlinedButton.icon(
183-
onPressed: () async {
184-
if (kDebugMode) {
185-
print("Tapped on the address of ${studySpace.title}.");
186-
}
187-
MapsLauncher.launchQuery(
188-
"${studySpace.title}, ${studySpace.address}");
189-
},
190-
icon: Icon(MaterialIconsSelected.place,
191-
size: Theme.of(context).textTheme.bodyLarge!.fontSize!),
192-
label: Text(studySpace.address)),
193-
Text("Contact", style: Theme.of(context).textTheme.titleLarge),
194-
OutlinedButton.icon(
195-
onPressed: () async {
196-
if (kDebugMode) {
197-
print("Tapped on the contact of ${studySpace.title}.");
198-
launch("tel://${studySpace.phoneNumber}");
199-
}
200-
},
201-
icon: Icon(MaterialIconsSelected.call,
202-
size: Theme.of(context).textTheme.bodyLarge!.fontSize!),
203-
label: Text(studySpace.phoneNumber)),
206+
Theme.of(context).textTheme.bodyLarge!.fontSize! / 2),
207+
OpeningHourCard(openingHours: studySpace.openingHours),
204208
SizedBox(
205209
height:
206210
Theme.of(context).textTheme.headlineSmall!.fontSize! /

0 commit comments

Comments
 (0)