Skip to content

Commit

Permalink
Merge pull request #69 from arafaysaleem/fix/bookings-api
Browse files Browse the repository at this point in the history
fix(Bookings): Remove incorrect cast
  • Loading branch information
arafaysaleem authored Aug 7, 2021
2 parents 4e46c11 + d025c92 commit 71b651a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 10 deletions.
4 changes: 2 additions & 2 deletions lib/services/repositories/bookings_repository.dart
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,8 @@ class BookingsRepository {
endpoint: ApiEndpoint.bookings(BookingEndpoint.SHOWS, id: showId),
cancelToken: _cancelToken,
converter: (responseBody) {
return responseBody['booked_seats'].map<SeatModel>((JSON seat) {
return SeatModel.fromJson(seat);
return responseBody['booked_seats'].map<SeatModel>((dynamic seat) {
return SeatModel.fromJson(seat as JSON);
}).toList() as List<SeatModel>;
},
);
Expand Down
12 changes: 4 additions & 8 deletions lib/views/widgets/user_bookings/booking_details_dialog.dart
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import 'dart:ui';

import 'package:flutter/material.dart';

//Helpers
Expand Down Expand Up @@ -48,12 +50,6 @@ class BookingDetailsDialog extends StatelessWidget {
Expanded(
child: Material(
color: Constants.scaffoldColor,
shape: const RoundedRectangleBorder(
borderRadius: BorderRadius.only(
bottomRight: Radius.circular(20),
bottomLeft: Radius.circular(20),
),
),
child: Padding(
padding: const EdgeInsets.fromLTRB(15, 12, 15, 0),
child: Column(
Expand Down Expand Up @@ -120,8 +116,8 @@ class BookingDetailsDialog extends StatelessWidget {
decoration: const BoxDecoration(
color: Constants.primaryColor,
borderRadius: BorderRadius.only(
bottomLeft: Radius.circular(10),
bottomRight: Radius.circular(10),
bottomLeft: Radius.circular(20),
bottomRight: Radius.circular(20),
),
),
child: const Icon(
Expand Down

0 comments on commit 71b651a

Please sign in to comment.