Thanks to visit codestin.com
Credit goes to github.com

Skip to content

jdebecka/flutter_snippets

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Flutter Snippets

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.

Acknowledgement

This extension was created in collaboration w/ @korzonkiee

Dependencies

Flutter

Dart


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.

Preview

CleanShot 2022-03-21 at 8 07 00

CleanShot 2022-03-21 at 8 08 56

CleanShot 2022-03-21 at 8 10 14

CleanShot 2022-03-21 at 8 11 06

CleanShot 2022-05-10 at 10 10 03

CleanShot 2022-05-10 at 10 08 04

About

Useful Flutter snippets improve the day-to-day development process of Flutter-related products.

Resources

License

Stars

Watchers

Forks

Packages

No packages published