Skip to content

Commit

Permalink
Upgrade to flutter 3.7.0 (#335)
Browse files Browse the repository at this point in the history
  • Loading branch information
DeD1rk authored Feb 1, 2023
1 parent 04a3969 commit 3fd9e92
Show file tree
Hide file tree
Showing 31 changed files with 617 additions and 427 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:
- master

env:
FLUTTER_VERSION: 3.3.6
FLUTTER_VERSION: 3.7.0

jobs:
linting:
Expand Down
4 changes: 2 additions & 2 deletions lib/models/event_registration.dart
Original file line number Diff line number Diff line change
Expand Up @@ -38,15 +38,15 @@ class UserEventRegistration {

bool get isPaid => payment != null;

@JsonKey(ignore: true)
@JsonKey(includeFromJson: false)
bool? _tpayAllowed;

/// Whether this registration can be paid with Thalia Pay.
/// See https://github.com/svthalia/concrexit/issues/1784.
///
/// Warning: this is only properly set on registrations
/// retrieved through [ApiRepository.getEvent].
@JsonKey(ignore: true)
@JsonKey(includeFromJson: false)
bool get tpayAllowed => _tpayAllowed ?? false;
set tpayAllowed(bool value) => _tpayAllowed = value;

Expand Down
8 changes: 4 additions & 4 deletions lib/models/food_order.dart
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,15 @@ class FoodOrder {
final Product product;
final Payment? payment;

@JsonKey(ignore: true)
@JsonKey(includeFromJson: false)
bool? _tpayAllowed;

/// Whether this order can be paid with Thalia Pay.
/// See https://github.com/svthalia/concrexit/issues/1784.
///
/// Warning: this is not properly set on orders retrieved
/// through [ApiRepository.getFoodEvents].
@JsonKey(ignore: true)
@JsonKey(includeFromJson: false)
bool get tpayAllowed => _tpayAllowed ?? false;
set tpayAllowed(bool value) => _tpayAllowed = value;

Expand Down Expand Up @@ -58,7 +58,7 @@ class AdminFoodOrder implements FoodOrder {
final Payment? payment;

@override
@JsonKey(ignore: true)
@JsonKey(includeFromJson: false)
bool? _tpayAllowed;

/// Whether this order can be paid with Thalia Pay.
Expand All @@ -67,7 +67,7 @@ class AdminFoodOrder implements FoodOrder {
/// Warning: this is not properly set on orders retrieved
/// through [ApiRepository.getFoodEvents].
@override
@JsonKey(ignore: true)
@JsonKey(includeFromJson: false)
bool get tpayAllowed => _tpayAllowed ?? false;
@override
set tpayAllowed(bool value) => _tpayAllowed = value;
Expand Down
4 changes: 2 additions & 2 deletions lib/models/sales_order.dart
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,12 @@ class SalesOrder {

final Uri paymentUrl;

@JsonKey(ignore: true)
@JsonKey(includeFromJson: false)
bool? _tpayAllowed;

/// Whether this order can be paid with Thalia Pay.
/// See https://github.com/svthalia/concrexit/issues/1784.
@JsonKey(ignore: true)
@JsonKey(includeFromJson: false)
bool get tpayAllowed => _tpayAllowed ?? false;
set tpayAllowed(bool value) => _tpayAllowed = value;

Expand Down
4 changes: 2 additions & 2 deletions lib/tosti/models/venue.dart
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ class TostiVenue {
final String? colorInCalendar;
final bool canBeReserved;

@JsonKey(ignore: true)
@JsonKey(includeFromJson: false)
final TostiShift? shift;

@JsonKey(ignore: true)
@JsonKey(includeFromJson: false)
final ThaliedjePlayer? player;

TostiVenue(
Expand Down
20 changes: 11 additions & 9 deletions lib/tosti/tosti_shift_screen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ class TostiShiftScreen extends StatelessWidget {
const SizedBox(height: 16),
Text(
shift.venueName.toUpperCase(),
style: textTheme.headline6,
style: textTheme.titleLarge,
),
const Divider(height: 24),
Row(
Expand All @@ -71,9 +71,10 @@ class TostiShiftScreen extends StatelessWidget {
crossAxisAlignment:
CrossAxisAlignment.start,
children: [
Text('TIME', style: textTheme.caption),
Text('TIME',
style: textTheme.bodySmall),
const SizedBox(height: 4),
Text(time, style: textTheme.subtitle2),
Text(time, style: textTheme.titleSmall),
],
),
),
Expand All @@ -86,35 +87,36 @@ class TostiShiftScreen extends StatelessWidget {
children: [
Text(
'CAPACITY',
style: textTheme.caption,
style: textTheme.bodySmall,
),
const SizedBox(height: 4),
Text(
'${shift.amountOfOrders}'
' / ${shift.maxOrdersTotal}',
style: textTheme.subtitle2,
style: textTheme.titleSmall,
),
],
),
)
],
),
const SizedBox(height: 12),
Text('AT YOUR SERVICE', style: textTheme.caption),
Text('AT YOUR SERVICE',
style: textTheme.bodySmall),
const SizedBox(height: 4),
Text(
shift.assignees.isNotEmpty
? shift.assignees
.map((e) => e.displayName)
.join(', ')
: '-',
style: textTheme.subtitle2,
style: textTheme.titleSmall,
),
const Divider(height: 24),
if (shift.canOrder)
Text(
'PLACE YOUR ORDER',
style: textTheme.caption,
style: textTheme.bodySmall,
)
else
const Text(
Expand Down Expand Up @@ -310,7 +312,7 @@ class _OrderTile extends StatelessWidget {
trailing: Row(
mainAxisSize: MainAxisSize.min,
children: [
Text(statusText, style: Theme.of(context).textTheme.caption),
Text(statusText, style: Theme.of(context).textTheme.bodySmall),
const SizedBox(width: 8.0),
Container(
width: 16.0,
Expand Down
10 changes: 5 additions & 5 deletions lib/tosti/widgets/venue_card.dart
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ class _VenueCardState extends State<VenueCard> {
padding: const EdgeInsets.symmetric(horizontal: 12),
child: Text(
widget.venue.name.toUpperCase(),
style: textTheme.headline6,
style: textTheme.titleLarge,
),
),
if (widget.venue.player != null) const Divider(height: 16),
Expand Down Expand Up @@ -121,26 +121,26 @@ class _PlayerSegment extends StatelessWidget {
children: [
Text(
'CURRENTLY PLAYING:',
style: textTheme.caption,
style: textTheme.bodySmall,
),
const SizedBox(height: 4),
Text(
track.name!,
maxLines: 2,
overflow: TextOverflow.ellipsis,
style: textTheme.subtitle2,
style: textTheme.titleSmall,
),
const SizedBox(height: 12),
Text(
'BY:',
style: textTheme.caption,
style: textTheme.bodySmall,
),
const SizedBox(height: 4),
Text(
track.artists.join(', '),
maxLines: 2,
overflow: TextOverflow.ellipsis,
style: textTheme.subtitle2,
style: textTheme.titleSmall,
),
],
),
Expand Down
4 changes: 2 additions & 2 deletions lib/ui/screens/album_screen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -453,7 +453,7 @@ class __PageCounterState extends State<_PageCounter> {
Text(
'${currentIndex + 1} / ${widget.album.photos.length}',
style:
textTheme.bodyText1?.copyWith(fontSize: 24, color: Colors.white),
textTheme.bodyLarge?.copyWith(fontSize: 24, color: Colors.white),
),
Tooltip(
message: 'like photo',
Expand All @@ -471,7 +471,7 @@ class __PageCounterState extends State<_PageCounter> {
),
Text(
'${photo.numLikes}',
style: textTheme.bodyText1?.copyWith(
style: textTheme.bodyLarge?.copyWith(
fontSize: 24,
color: Colors.white,
),
Expand Down
4 changes: 2 additions & 2 deletions lib/ui/screens/albums_screen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -107,8 +107,8 @@ class AlbumsSearchDelegate extends SearchDelegate {
final theme = super.appBarTheme(context);
return theme.copyWith(
textTheme: theme.textTheme.copyWith(
headline6: GoogleFonts.openSans(
textStyle: Theme.of(context).textTheme.headline6,
titleLarge: GoogleFonts.openSans(
textStyle: Theme.of(context).textTheme.titleLarge,
),
),
);
Expand Down
14 changes: 7 additions & 7 deletions lib/ui/screens/calendar_screen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -104,8 +104,8 @@ class CalendarSearchDelegate extends SearchDelegate {
final theme = super.appBarTheme(context);
return theme.copyWith(
textTheme: theme.textTheme.copyWith(
headline6: GoogleFonts.openSans(
textStyle: Theme.of(context).textTheme.headline6,
titleLarge: GoogleFonts.openSans(
textStyle: Theme.of(context).textTheme.titleLarge,
),
),
);
Expand Down Expand Up @@ -265,7 +265,7 @@ class CalendarScrollView extends StatelessWidget {
: monthYearFormatter
.format(month.toLocal())
.toUpperCase(),
style: Theme.of(context).textTheme.subtitle1,
style: Theme.of(context).textTheme.titleMedium,
),
),
),
Expand Down Expand Up @@ -322,16 +322,16 @@ class _DayCard extends StatelessWidget {
children: [
Text(
dayFormatter.format(day.toLocal()).toUpperCase(),
style: Theme.of(context).textTheme.caption!.apply(
style: Theme.of(context).textTheme.bodySmall!.apply(
color: Theme.of(context)
.textTheme
.caption!
.bodySmall!
.color!
.withOpacity(0.5)),
),
Text(
day.day.toString(),
style: Theme.of(context).textTheme.headline3,
style: Theme.of(context).textTheme.displaySmall,
strutStyle: const StrutStyle(
forceStrutHeight: true,
leading: 2.2,
Expand Down Expand Up @@ -414,7 +414,7 @@ class _EventCard extends StatelessWidget {
event.label,
maxLines: 1,
overflow: TextOverflow.ellipsis,
style: Theme.of(context).textTheme.bodyText2!.copyWith(
style: Theme.of(context).textTheme.bodyMedium!.copyWith(
color: Colors.white.withOpacity(0.8),
),
),
Expand Down
14 changes: 7 additions & 7 deletions lib/ui/screens/event_admin_screen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ class _MarkPresentQrButton extends StatelessWidget {
padding: const EdgeInsets.all(16),
child: Text(
'Scan to mark yourself present.',
style: theme.textTheme.subtitle2,
style: theme.textTheme.titleSmall,
),
),
QrImage(
Expand All @@ -150,7 +150,7 @@ class _MarkPresentQrButton extends StatelessWidget {
quarterTurns: 2,
child: Text(
'Scan to mark yourself present.',
style: theme.textTheme.subtitle2,
style: theme.textTheme.titleSmall,
),
),
)
Expand Down Expand Up @@ -238,7 +238,7 @@ class __RegistrationTileState extends State<_RegistrationTile> {
if (registration.isPaid &&
registration.payment!.type == PaymentType.tpayPayment) {
paymentDropdown = DropdownButton<PaymentType?>(
style: Theme.of(context).textTheme.bodyText2,
style: Theme.of(context).textTheme.bodyMedium,
items: const [
DropdownMenuItem(
value: PaymentType.tpayPayment,
Expand Down Expand Up @@ -266,7 +266,7 @@ class __RegistrationTileState extends State<_RegistrationTile> {
);
} else {
paymentDropdown = DropdownButton<PaymentType?>(
style: Theme.of(context).textTheme.bodyText2,
style: Theme.of(context).textTheme.bodyMedium,
items: const [
DropdownMenuItem(
value: PaymentType.cardPayment,
Expand Down Expand Up @@ -320,7 +320,7 @@ class __RegistrationTileState extends State<_RegistrationTile> {
children: [
Text(
'Present:',
style: Theme.of(context).textTheme.caption,
style: Theme.of(context).textTheme.bodySmall,
),
presentCheckbox,
paymentDropdown,
Expand All @@ -340,8 +340,8 @@ class EventAdminSearchDelegate extends SearchDelegate {
final theme = super.appBarTheme(context);
return theme.copyWith(
textTheme: theme.textTheme.copyWith(
headline6: GoogleFonts.openSans(
textStyle: Theme.of(context).textTheme.headline6,
titleLarge: GoogleFonts.openSans(
textStyle: Theme.of(context).textTheme.titleLarge,
),
),
);
Expand Down
Loading

0 comments on commit 3fd9e92

Please sign in to comment.