Flutter Snippet extension will allow you code and test your Flutter/Dart projects faster. There are multiple test snippets as well as Widget oriented ones.
This extension was created in collaboration w/ @korzonkiee
- Object Models
- Comments
- Object Model Testing
- json_serializable
- equatable
| Shortcut | Description |
|---|---|
| jsonMethods | Creates factory fromJson and toJson to use with JsonSerializable. |
| serializableObject | Creates JsonSerializable object class extending Equatable w/ fromJson, toJson and copyWith() method pre-defined. |
| jsonMethodsWithComments | Create factory fromJson and toJson to use with JsonSerializable with comments. |
| docTempl | Creates macro for the document template. |
| macroComment | Creates class comment using macro. |
| mock | Creates Mock for a class. Used in testing w/ Mocktail. |
| whenThenAnswer | Creates when method followed by thenAnswer. Used in testing w/ Mocktail. |
| whenThenThrow | Creates when method followed by thenThrow. Used in testing w/ Mocktail. |
| whenThenReturn | Creates when method followed by thenReturn. Used in testing w/ Mocktail. |
| fakeClass | Creates class extending Fake. Used in testing. |
| fakeStateEvent | Creates class for Bloc/Cubit state, and Bloc event extending Fake. Used in testing. |
| pageViewProvider | Page w/ View where Bloc is propagated down. Includes route. |
| pageView | Page w/ View. Includes route. |
| classProperty | Property of the class w/ comment. |
| propertycomment | Comment w/ an example. |
| emptyObject | Empty object for a model. |
| objectModelTest | Creates test for an object model. |
| materialPage | Creates Material page. |
| materialRoute | Creates Material page route. |
| fadeTransitionPage | Creates Material page w/ a fade transition. |