-
Notifications
You must be signed in to change notification settings - Fork 105
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(Pubpsec): upgrade package dependencies
Signed-off-by: arafaysaleem <a.rafaysaleem@gmail.com>
- Loading branch information
1 parent
8b745d5
commit ab657e8
Showing
15 changed files
with
198 additions
and
150 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
tags: | ||
golden: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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(); | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,3 @@ | ||
import 'dart:ui'; | ||
|
||
import 'package:flutter/material.dart'; | ||
|
||
//Helpers | ||
|
Oops, something went wrong.