-
Notifications
You must be signed in to change notification settings - Fork 38
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
1ce9080
commit 1d86e23
Showing
14 changed files
with
176 additions
and
82 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
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
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 |
---|---|---|
@@ -0,0 +1,33 @@ | ||
import 'package:flutter/foundation.dart'; | ||
|
||
abstract class MixError { | ||
static FlutterError unsupportedTypeInDto( | ||
Type type, | ||
List<String> supportedTypes, | ||
) { | ||
final supportedTypesFormated = | ||
'${supportedTypes.sublist(0, supportedTypes.length - 1).join(', ')} and ${supportedTypes.last}'; | ||
|
||
return FlutterError.fromParts([ | ||
ErrorSummary('Unsupported $type type'), | ||
ErrorDescription( | ||
'The toDto() method is not implemented for this $type subclass.', | ||
), | ||
ErrorHint('Only $supportedTypesFormated are currently supported.'), | ||
]); | ||
} | ||
|
||
static FlutterError accessTokenValue(String token, String field) { | ||
return FlutterError.fromParts([ | ||
ErrorSummary('Invalid access: $token cannot access field $field'), | ||
ErrorDescription( | ||
'The $field field cannot be directly accessed through TextStyleRef. ' | ||
'Ensure you are using the appropriate methods or properties provided by TextStyleToken to interact with the style properties.', | ||
), | ||
ErrorHint( | ||
'Consider using TextStyleToken.resolve() to access the $field. ' | ||
'This method ensures that $token is used within the appropriate context where $field is available.', | ||
), | ||
]); | ||
} | ||
} |
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
Oops, something went wrong.