Skip to content

Commit

Permalink
chore(Pubpsec): upgrade package dependencies
Browse files Browse the repository at this point in the history
Signed-off-by: arafaysaleem <a.rafaysaleem@gmail.com>
  • Loading branch information
arafaysaleem committed Dec 22, 2021
1 parent 8b745d5 commit ab657e8
Show file tree
Hide file tree
Showing 15 changed files with 198 additions and 150 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/PR-generate-goldens.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
- name: Run Build Runner For Codegen Files
run: flutter packages pub run build_runner build --delete-conflicting-outputs
- name: Run tests
run: flutter test --update-goldens test/golden_tests
run: flutter test --update-goldens --tags=golden test/golden_tests
- name: Commit Updated Goldens
run: |
git config --global user.name 'arafaysaleem'
Expand Down
2 changes: 2 additions & 0 deletions dart_test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
tags:
golden:
10 changes: 4 additions & 6 deletions lib/enums/booking_status_enum.dart
Original file line number Diff line number Diff line change
@@ -1,18 +1,16 @@
import 'package:flutter/foundation.dart';
import 'package:freezed_annotation/freezed_annotation.dart';
// ignore_for_file: constant_identifier_names

/// A collection of statuses that bookings can have.
@JsonEnum()
enum BookingStatus {
@JsonValue('confirmed') CONFIRMED,
@JsonValue('cancelled') CANCELLED,
@JsonValue('reserved') RESERVED,
CONFIRMED,
CANCELLED,
RESERVED,
}

/// A utility with extensions for enum name and serialized value.
extension ExtBookingStatus on BookingStatus{
String get name => describeEnum(this);

String get toJson => name.toLowerCase();
}

Expand Down
10 changes: 4 additions & 6 deletions lib/enums/movie_type_enum.dart
Original file line number Diff line number Diff line change
@@ -1,19 +1,17 @@
import 'package:flutter/foundation.dart';
import 'package:freezed_annotation/freezed_annotation.dart';
// ignore_for_file: constant_identifier_names

/// A collection of types that movies can be.
@JsonEnum()
enum MovieType {
@JsonValue('now_showing') NOW_SHOWING,
@JsonValue('coming_soon') COMING_SOON,
@JsonValue('removed') REMOVED,
NOW_SHOWING,
COMING_SOON,
REMOVED,
ALL_MOVIES,
}

/// A utility with extensions for enum name and serialized value.
extension ExtMovieType on MovieType{
String get name => describeEnum(this);

String get toJson => name.toLowerCase();
}

9 changes: 4 additions & 5 deletions lib/enums/payment_method_enum.dart
Original file line number Diff line number Diff line change
@@ -1,19 +1,18 @@
import 'package:flutter/foundation.dart';
import 'package:freezed_annotation/freezed_annotation.dart';
// ignore_for_file: constant_identifier_names

import '../helper/extensions/string_extension.dart';

/// A collection of payment methods that a user can choose.
@JsonEnum()
enum PaymentMethod {
@JsonValue('cash') CASH,
@JsonValue('cod') COD,
@JsonValue('card') CARD,
CASH,
COD,
CARD,
}

/// A utility with extensions for enum name and serialized value.
extension ExtPaymentMethod on PaymentMethod {
String get name => describeEnum(this);
String get toJson => name.toLowerCase();
String get inString => name.capitalize;
}
9 changes: 4 additions & 5 deletions lib/enums/role_type_enum.dart
Original file line number Diff line number Diff line change
@@ -1,19 +1,18 @@
import 'package:flutter/foundation.dart';
import 'package:freezed_annotation/freezed_annotation.dart';
// ignore_for_file: constant_identifier_names

import '../helper/extensions/string_extension.dart';

/// A collection of roles that movie actors can have.
@JsonEnum()
enum RoleType {
@JsonValue('director') DIRECTOR,
@JsonValue('producer') PRODUCER,
@JsonValue('cast') CAST,
DIRECTOR,
PRODUCER,
CAST,
}

/// A utility with extensions for enum name and serialized value.
extension ExtRoleType on RoleType{
String get name => describeEnum(this);
String get toJson => name.toLowerCase();
String get inString => name.capitalize;
}
Expand Down
9 changes: 4 additions & 5 deletions lib/enums/show_status_enum.dart
Original file line number Diff line number Diff line change
@@ -1,19 +1,18 @@
import 'package:flutter/foundation.dart';
import 'package:freezed_annotation/freezed_annotation.dart';
// ignore_for_file: constant_identifier_names

import '../helper/extensions/string_extension.dart';

/// A collection of statuses that a show can have.
@JsonEnum()
enum ShowStatus {
@JsonValue('free') FREE,
@JsonValue('almost_full') ALMOST_FULL,
@JsonValue('full') FULL,
FREE,
ALMOST_FULL,
FULL,
}

/// A utility with extensions for enum name and serialized value.
extension ExtShowStatus on ShowStatus{
String get name => describeEnum(this);
String get toJson => name.toLowerCase();
String get inString => name.removeUnderScore.toUpperCase();
}
Expand Down
3 changes: 1 addition & 2 deletions lib/enums/show_type_enum.dart
Original file line number Diff line number Diff line change
@@ -1,16 +1,15 @@
import 'package:flutter/foundation.dart';
import 'package:freezed_annotation/freezed_annotation.dart';
// ignore_for_file: constant_identifier_names

/// A collection of types that a show can be.
@JsonEnum()
enum ShowType {
@JsonValue('2D') i2D,
@JsonValue('3D') i3D,
}

/// A utility with extensions for enum name and serialized value.
extension ExtShowType on ShowType{
String get name => describeEnum(this);
String get inString => name.substring(1); //removes i prefix
String get toJson => inString;
}
Expand Down
8 changes: 3 additions & 5 deletions lib/enums/theater_type_enum.dart
Original file line number Diff line number Diff line change
@@ -1,17 +1,15 @@
import 'package:flutter/foundation.dart';
import 'package:freezed_annotation/freezed_annotation.dart';
// ignore_for_file: constant_identifier_names

/// A collection of types that a theater can be.
@JsonEnum()
enum TheaterType {
@JsonValue('normal') NORMAL,
@JsonValue('royal') ROYAL,
NORMAL,
ROYAL,
}

/// A utility with extensions for enum name and serialized value.
extension ExtTheaterType on TheaterType{
String get name => describeEnum(this);

String get toJson => name.toLowerCase();
}

Expand Down
10 changes: 4 additions & 6 deletions lib/enums/user_role_enum.dart
Original file line number Diff line number Diff line change
@@ -1,17 +1,15 @@
import 'package:flutter/foundation.dart';
import 'package:freezed_annotation/freezed_annotation.dart';
// ignore_for_file: constant_identifier_names

/// A collection of roles that a user can be.
@JsonEnum()
enum UserRole {
@JsonValue('admin') ADMIN,
@JsonValue('api_user') API_USER,
@JsonValue('super_user') SUPER_USER,
ADMIN,
API_USER,
SUPER_USER,
}

/// A utility with extensions for enum name and serialized value.
extension ExtUserRole on UserRole{
String get name => describeEnum(this);

String get toJson => name.toLowerCase();
}
2 changes: 1 addition & 1 deletion lib/views/screens/confirmation_screen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ class ConfirmationScreen extends StatelessWidget {
children: const [
Spacer(),

SpinKitPouringHourglass(
SpinKitPouringHourGlass(
color: Colors.white,
duration: Duration(milliseconds: 1100),
size: 64,
Expand Down
1 change: 0 additions & 1 deletion lib/views/widgets/common/custom_textfield.dart
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:flutter/widgets.dart';

//Helpers
import '../../../helper/extensions/context_extensions.dart';
Expand Down
2 changes: 0 additions & 2 deletions lib/views/widgets/user_bookings/booking_details_dialog.dart
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import 'dart:ui';

import 'package:flutter/material.dart';

//Helpers
Expand Down
Loading

0 comments on commit ab657e8

Please sign in to comment.