Skip to content
| Marketplace
Sign in
Visual Studio Code>Programming Languages>Sam FlutterNew to Visual Studio Code? Get it now.

Sam Flutter

samuel-snippets

|
169 installs
| (0) | Free
This extension creates Stateless Widgets, Stateful Widgets, GetX App Structure, GetX Features, GetX Services, MobX Store, Classes, Interfaces, and you can also apply to existing widgets new wrappers in your Flutter projects.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info
  • Cleaned up the context menu, removing the items below and added new options via VSCode QuickPick:

    • 📝 Create Controller
    • 📝 Create DTO
    • 📄 Create Provider Interface
    • 📄 Create Repository Interface
    • 📄 Create Service Interface
    • 📝 Create Model
    • 📝 Create Singleton Class
  • Now when choose Create Stateless Widget or Create Stateful Widget it's possible to choose if a widget will be created as 🧩 Component or 📑 Page.

  • Now when choose Create MobX Store it's possible to choose if the suffix name of MobX Store will be created as 🗂️ Controller or 📦 Store.

  • Now when choose Create Class it's possible to choose the options below:

    • 📝 Create Class
    • 📝 Create Controller Class
    • 📝 Create Controller Class with ChangeNotifier
    • 📝 Create DTO Class
    • 📃 Create Enum
    • ⛔ Create Exception Class
    • 📇 Create Extension
    • 📝 Create Helper Class
    • 📄 Create Interface Class
    • 📒 Create Mixin
    • 📝 Create Model Class
    • 📝 Create Singleton Class
  • Now when choose Create Interface it's possible to choose the options below:

    • 📄 Create Interface Class
    • 📄 Create Provider Interface
    • 📄 Create Repository Interface
    • 📄 Create Service Interface
  • Added the wrapper Wrap with ValueListenableBuilder.

  • Added the wrapper Wrap with InkWell.

  • Updated the template of the wrapper Wrap with LayoutBuilder.

  • Added configuration of Widgets Page file suffix.

  • Added configuration of Create Folder for Widgets Page.

  • Removed configuration of MobX file suffix.

  • Cleaned up the wrappers widgets context menu, removing the items below and added new options via VSCode QuickPick:

    • Wrap with Align
    • Wrap with ClipRRect
    • Wrap with ConstrainedBox
    • Wrap with Expanded
    • Wrap with Flexible
    • Wrap with Form
    • Wrap with GestureDetector
    • Wrap with Hero
    • Wrap with InkWell
    • Wrap with IntrinsicHeight
    • Wrap with IntrinsicWidth
    • Wrap with LayoutBuilder
    • Wrap with LayoutBuilder and SingleChildScrollView
    • Wrap with Observer for MobX
    • Wrap with Obx for GetX
    • Wrap with Positioned
    • Wrap with SafeArea
    • Wrap with SingleChildScrollView
    • Wrap with Stack
    • Wrap with ValueListenableBuilder
    • Wrap with Visibility
  • Added a check if some GetX folders exist to avoid errors.

  • Added more than 180 snippets that can be accessed with sam- prefix.

  • Added the list of available snippets inside the README.md file in the Snippets section.

  • Adds notification message for extension updates.

  • Wrap with Align

  • Wrap with ClipRRect

  • Wrap with ConstrainedBox

  • Wrap with Expanded

  • Wrap with Flexible

  • Wrap with Form

  • Wrap with GestureDetector

  • Wrap with Hero

  • Wrap with InkWell

  • Wrap with IntrinsicHeight

  • Wrap with IntrinsicWidth

  • Wrap with LayoutBuilder

  • Wrap with LayoutBuilder and SingleChildScrollView

  • Wrap with Positioned

  • Wrap with SafeArea

  • Wrap with SingleChildScrollView

  • Wrap with Stack

  • Wrap with ValueListenableBuilder

  • Wrap with MobX Observer

  • Wrap with GetX Obx

Usage Examples

All the examples shown below were performed using the extension's default settings. In your project feel free to customize as you wish.

You can create Stateless Widgets, Stateful Widgets, GetX App Structures, GetX Features, GetX Services, MobX Store, Classes and Interfaces by right clicking on any folder in the tree view and using the following options:

Usage

Widgets

Create Stateless Widget Example:

To create a Stateless Widget, right-click on the folder where the widget will be created, choose 🔶 Create Stateless Widget and inform the name of the widget that will be created.

Usage

Create Stateful Widget Example:

To create a Stateful Widget, right-click on the folder where the widget will be created, choose 🔷 Create Stateful Widget and inform the name of the widget that will be created.

Usage

GetX

Create GetX App Structure Example:

You need to have the get package installed in your pubspec.yaml

To create a GetX App Structure, right-click on the lib folder and choose 📂 Create GetX App Structure.

Usage

The folders that will be created by the command 📂 Create GetX App Structure:

Usage

If you not will use some folder, just delete it from your project.

Create GetX Feature Example:

You need to have the get package installed in your pubspec.yaml

To create a GetX resource that is composed of the view, controller, binding and route files, right-click on the modules folder or any subfolder inside it and choose 📑 Create GetX Feature.

Usage

You can create a folder to group GetX resources. In this case the name of the route file will be the name of the folder created, as we can see in the example below:

Usage

Create GetX Service Example:

You need to have the get package installed in your pubspec.yaml

To create a GetX Service, right-click on the desired folder and choose 🗃️ Create GetX Service.

Usage

MobX

Create MobX Store

You need to have the mobx and flutter_mobx package installed in your pubspec.yaml

To create a MobX Store, right-click on the desired folder and choose 📦 Create MobX Store.

Usage

Interface for Providers, Repositories and Services

Create Provider Interface Example:

Select the folder where the Provider Interface will be created and choose 📄 Create Provider Interface and enter the name of the provider interface to be created.

Usage

Create Repository Interface Example:

Select the folder where the Repository Interface will be created and choose 📄 Create Repository Interface and enter the name of the repository interface to be created.

Usage

Create Service Interface Example:

Select the folder where the Service Interface will be created and choose 📄 Create Service Interface and enter the name of the service interface to be created.

Usage

Classes

Create Class Example:

Select the folder where the class will be created and choose 📝 Create Dart Class and enter the name of the class to be created.

Usage

Create Controller Example:

Select the folder where the controller will be created and choose 📝 Create Controller and enter the name of the controller to be created.

Usage

Create DTO Example:

Select the folder where the DTO will be created and choose 📝 Create DTO and enter the name of the DTO to be created.

Usage

Create Interface Example:

Select the folder where the interface will be created and choose 📝 Create Interface and enter the name of the interface to be created.

Usage

Create Model Example:

Select the folder where the model will be created and choose 📝 Create Model and enter the name of the model to be created.

Usage

Create Singleton Class Example:

Select the folder where the model will be created and choose 📝 Create Singleton Class and enter the name of the singleton class to be created.

Usage

Code Actions

Code action Implements Interface:

In interfaces files it is possible to use the code action Implements interface to create interface implementation file case it is not implemented yet or when already exists and you want create another implementation of interface.

Usage

Extra wrappers

Use the code actions of Visual Studio Code to wrap a widget with one of the following wrappers:

  • Wrap with LayoutBuilder
  • Wrap with Expanded
  • Wrap with Stack
  • Wrap with Positioned
  • Wrap with Align
  • Wrap with ClipRRect
  • Wrap with Hero
  • Wrap with GestureDetector
  • Wrap with SingleChildScrollView
  • Wrap with SafeArea
  • Wrap with Form
  • Wrap with Obx
  • Wrap with Observer

Wrap with LayoutBuilder

Usage

Wrap with Expanded

Usage

Wrap with Stack

Usage

Wrap with Positioned

Usage

Wrap with Align

Usage

Wrap with ClipRRect

Usage

Wrap with Hero

Usage

Wrap with GestureDetector

Usage

Wrap with SingleChildScrollView

Usage

Wrap with SafeArea

Usage

Wrap with Form

Usage

Wrap with Obx

In case of use of GetX, it is possible to wrapper a widget that uses an observable property with the widget Obx from lib get.

Usage

Wrap with Observer

In case of use of MobX, it is possible to wrapper a widget that uses an observable property with the widget Observer from lib flutter_mobx.

Usage

If wrap fails and breaks the code?

In some widgets structures by positioning the cursor over the widget which will be surrounded by new widget may cause breaking the code.

Usage

In this case, undo the last operation and select all the widget that will be wrapped using the shortcut Alt + W, then use Visual Studio Code code actions and choose the appropriate wrapper.

Usage

Snippets

All snippets are available through prefix sam-.

Flutter and Dart

Snippet Description
sam-imp-dart-date Adds Dart Date import
sam-part Adds part file for main file
sam-part-of Adds part of main file
sam-get-file-name Adds current filename in pascal case
sam-class Creates a class for the current file
sam-constructor-class Creates a class constructor for the current file
sam-constructor-class-with-named-params Creates a class constructor for the current file with named params
sam-private-construtor Creates a private class constructor for the current file
sam-private-attribute Creates a private class attribute
sam-constr-inject-firebase-auth Creates an injection for Firebase Auth - Complete
sam-add-inject-firebase-auth Adds an injection for Firebase Auth - Parts to include
sam-constr-inject-controller Creates an injection for Controller - Complete
sam-add-inject-controller Adds an injection for Controller - Parts to include
sam-constr-inject-i-service Creates an injection for IService - Complete
sam-constr-inject-service Creates an injection for Service - Complete
sam-add-inject-i-service Creates an injection for IService - Parts to include
sam-add-inject-service Creates an injection for Service - Parts to include
sam-constr-inject-i-repository Creates an injection for IRepository - Complete
sam-constr-inject-repository Creates an injection for Repository - Complete
sam-add-inject-i-repository Adds an injection for IRepository - Parts to include
sam-add-inject-repository Adds an injection for Repository - Parts to include
sam-constr-inject-session Creates an injection for Session - Complete
sam-add-inject-session Adds an injection for Session - Parts to include
sam-constr-inject-i-provider Creates an injection for IProvider - Complete
sam-constr-inject-provider Creates an injection for Provider - Complete
sam-add-inject-i-provider Adds an injection for IProvider - Parts to include
sam-add-inject-provider Adds an injection for Provider - Parts to include
sam-constr-inject-rest-client Creates an injection for RestClient - Complete
sam-add-inject-rest-client Adds an injection for RestClient - Parts to include
sam-constr-inject-i-api-storage Creates an injection for ApiCacheStorageService - Complete
sam-add-inject-i-api-storage Adds an injection for ApiCacheStorageService - Parts to include
sam-constr-inject-rest-client-with-i-api-storage Creates an injection for RestClient and ApiCacheStorageService - Complete
sam-ifnot Creates an if denying the condition
sam-if-return Creates an if with return if condition was truthy
sam-ifnot-return Creates an if with return if condition was falsy
sam-ifnot-mounted Creates an if with return if StateFull Widget it'n mounted
sam-ifnull Creates an if for null condition
sam-ifnotnull Creates an if for not null condition
sam-ifcontains Creates an if for check if String contains term
sam-cm-basic Creates a basic comment
sam-cm-block Creates a block comment
sam-cm-section Creates a section comment
sam-cm-subsection Creates a subsection comment
sam-cm-section-footer Creates a footer comment
sam-cm-element-block Creates a documentation comment
sam-delayed-seconds Adds a Future.delayed instruction
sam-delayed-seconds-with-callback Adds a Future.delayed instruction with a callback function
sam-duration Adds a Duration instruction
sam-final-void-function Adds property as a void Function()
sam-final-void-call-back Adds property as a VoidCallback function
sam-form-key Adds a variable of type GlobalKey()
sam-form-key-private Adds a private variable of type GlobalKey()
sam-focus-node Adds a variable of type FocusNode()
sam-focus-node-private Adds a private variable of type FocusNode()
sam-text-editing-controller, sam-editing-controller Adds a variable of type TextEditingController()
sam-text-editing-controller-private, sam-editing-controller-private Adds a private variable of type TextEditingController()
sam-list-from-map-and-json Adds two functions fromMap and fromJson to create lists from map data
sam-prop-eq Adds a key and value assignment to an object where the key and value are equal
sam-prop-eq-map Adds a key and value assignment to an map where the key and value are equal
sam-throw-exception Adds the instruction throw Exception()
sam-throw-app-exception Adds the instruction throw AppException()
sam-throw-auth-exception Adds the instruction throw AuthException()
sam-await Adds the instruction await
sam-final-simple Adds a simple assignment variable
sam-final-await Adds a future assignment variable
sam-final-future-wait Adds a future assignment variable for multiple futures processing
sam-build-context Adds a declaration for BuildContext
sam-date-format-dd-mm-yyyy Adds a variable of type DateFormat('dd/MM/y')
sam-future-method Adds a Future method
sam-future-void-method Adds a Future void method
sam-void-method Adds a void method
sam-form-is-valid Check if a form is valid
sam-get-property Adds a get property
sam-static-get-property Adds a static get property
sam-signature-static-method Add a signature to a static method
sam-signature-method Add a signature to method
sam-static-method Adds a static method
sam-signature-future-static-method Adds a signature of a future static method
sam-signature-future-method Adds a signature of a future method
sam-future-static-method Adds a future static method
sam-value-notifier Creates a ValueNotifier attribute

Widgets

Snippet Description
sam-border-side Adds borderSide property using BorderSide() with width and color
sam-border-side-color Adds borderSide property using BorderSide() with color
sam-shape-rounded-rectangle-border Adds a shape property using RoundedRectangleBorder()
sam-main-axis-size Adds mainAxisSize property using MainAxisSize to Row() or Column()
sam-main-axis-alignment Adds mainAxisAlignment property using MainAxisAlignment to Row() or Column()
sam-cross-axis-alignment Adds crossAxisAlignment property using CrossAxisAlignment to Row() or Column()
sam-alignment Adds alignment property using Alignment
sam-wrap-alignment Adds alignment property using WrapAlignment
sam-font-weight Adds FontWeight
sam-text-align Adds TextAlign
sam-0xff, sam-hex-color Adds a Hexadecimal Color
sam-color-hex Adds a color property using a Hexadecimal Color
sam-color Adds a color property using Colors
sam-background-color Adds a backgroundColor property using Colors
sam-background-color-hex Adds a backgroundColor property using a Hexadecimal Color
sam-color-theme Adds a color property using Theme.of(context)
sam-theme-of Adds a color using Theme.of(context)
sam-text-overflow Adds an overflow property using TextOverflow.ellipsis
sam-space-vertical, sam-separator-vertical Adds a vertical spacing between widgets using SizedBox
sam-space-horizontal, sam-separator-horizontal Adds a horizontal spacing between widgets using SizedBox
sam-space-shrink Adds a SizedBox.shrink()
sam-margin-all Adds margin property using EdgeInsets.all()
sam-margin-symmetric Adds margin property using EdgeInsets.symmetric()
sam-margin-only Adds margin property using EdgeInsets.only()
sam-padding-all Adds padding property using EdgeInsets.all()
sam-padding-symmetric Adds padding property using EdgeInsets.symmetric()
sam-padding-only Adds padding property using EdgeInsets.only()
sam-padding-zero Adds padding property using EdgeInsets.zero
sam-edge-insets-zero Adds EdgeInsets.zero
sam-border-all Adds border property using Border.all()
sam-border-symmetric Adds border property using Border.symmetric()
sam-bouncing-scroll-physics Adds physics property using BouncingScrollPhysics()
sam-direction Adds direction property using Axis
sam-scroll-direction Adds scrollDirection property using Axis
sam-navigator-push-named Adds Navigator instruction using pushNamed
sam-navigator-pop Adds Navigator instruction using pop
sam-navigator-push Adds Navigator instruction using MaterialPageRoute
sam-media-query Adds MediaQuery instruction using size
sam-app-bar-theme Adds appBarTheme property using AppBarTheme()
sam-app-bar-brightness Adds brightness property using Brightness
sam-text-style Adds style property using TextStyle() with color, fontSize and fontWeight
sam-text-style-weight Adds style property using TextStyle() only for fontWeight
sam-text-style-size Adds style property using TextStyle() only for fontSize
sam-text-style-color Adds style property using TextStyle() only for color
sam-text-style-theme-of Adds style property using Theme.of(context).textTheme
sam-image-asset Adds Image Widget with properties height, width, image and fit
sam-fit-box-fit Adds fit property using BoxFit
sam-icon-button Adds IconButton Widget with properties icon, color, iconSize and onPressed
sam-elevated-rectangle-button Adds ElevatedButton Widget using BorderRadius()
sam-elevated-circ-button Adds ElevatedButton Widget using CircleBorder()
sam-decoration Adds decoration property using BoxDecoration
sam-decoration-with-decoration-image Adds decoration property using BoxDecoration and DecorationImage
sam-decoration-image Adds image property using DecorationImage
sam-decoration-with-border-radius Adds decoration property using BoxDecoration with BorderRadius.circular()
sam-border-radius Adds borderRadius property using BorderRadius.circular()
sam-decoration-with-border-radius-only Adds decoration property using BoxDecoration with BorderRadius.only()
sam-border-radius-only Adds borderRadius property using BorderRadius.only()
sam-decoration-with-box-shadow Adds decoration property using BoxDecoration with BoxShadow
sam-box-shadow Adds boxShadow property using BoxShadow
sam-decoration-with-box-shadow-bottom-sheet Adds decoration property using BoxDecoration with BoxShadow for Bottom Sheet
sam-box-shadow-bottom-sheet Adds boxShadow property using BoxShadow for Bottom Sheet
sam-column Adds Column Widget
sam-row Adds Row Widget
sam-text Adds Text Widget
sam-text-span Adds TextSpan Widget with text property
sam-text-span-children Adds TextSpan Widget with children property
sam-outlined-icon-button Adds OutlinedButton Widget with Icon
sam-status-bar-icon-brightness Sets the color for statusBarIconBrightness
sam-text-input-action, sam-input-action Adds textInputAction property using TextInputAction
sam-text-capitalization Adds textCapitalization property using TextCapitalization
sam-keyboard-type, sam-input-type Adds keyboardType property using TextInputType
sam-ensure-initialized Adds the instruction WidgetsFlutterBinding.ensureInitialized();
sam-scaffold Adds Scaffold Widget
sam-popup-menu-button Adds PopupMenuButton Widget
sam-constraints-box-constraints Adds constraints property using BoxConstraints
sam-add-locales-pt-br Adds localizations for pt-BR
sam-text-shadow Adds shadows property using Shadow to use in Text Widget
sam-text-rich Adds Text.rich Widget

GetX

Snippet Description
sam-imp-get Adds GetX import
sam-rx-attribute Creates a Rx attribute
sam-rxn-attribute Creates a Rxn attribute
sam-obs-attribute Creates a GetX Observable attribute
sam-get-size Uses GetX to get width or height of screen
sam-get-find Adds the Get.find() the get instance of classe using GetX
sam-get-width Uses GetX to get width of screen
sam-get-height Uses GetX to get height of screen
sam-width-get-width Adds width property using Get.width
sam-height-get-height Adds width property using Get.height
sam-get-put-service Adds Get.put() instruction for Service()
sam-get-put-service-impl Adds Get.put() instruction for ServiceImpl()
sam-get-put-session Adds Get.put() instruction for Session()
sam-get-put-repository Adds Get.put() instruction for Repository()
sam-get-put-repository-impl Adds Get.put() instruction for RepositoryImpl()
sam-get-put-provider Adds Get.put() instruction for Provider()
sam-get-put-provider-impl Adds Get.put() instruction for ProviderImpl()
sam-get-view Adds GetView instruction for get instance of controller inside view
sam-get-put-controller Adds Get.put() instruction for Controller()
sam-get-lazy-put-controller Adds Get.lazyPut() instruction for Controller()
sam-get-lazy-put-provider Adds Get.lazyPut() instruction for Provider() used by a Service()
sam-get-lazy-put-provider Adds Get.lazyPut() instruction for ProviderImpl() used by a ServiceImpl()
sam-get-lazy-put-service Adds Get.lazyPut() instruction for Service()
sam-get-lazy-put-service-impl Adds Get.lazyPut() instruction for ServiceImpl()
sam-get-lazy-put-repository Adds Get.lazyPut() instruction for Repository() used by a Service()
sam-get-lazy-put-repository Adds Get.lazyPut() instruction for RepositoryImpl() used by a ServiceImpl()
sam-on-init Adds override for onInit method
sam-on-ready Adds override for onReady method
sam-on-close Adds override for onClose method

Provider

Snippet Description
sam-provider-read Adds the context.read() to get instance of classe using Provider
sam-provider-read-data Adds the context.read()... to get instance of classe using Provider
sam-provider-watch Adds the context.watch()... to watch instance of classe using Provider
sam-provider-select Adds the context.select<ClassName, type>()... to select instance of classe using Provider

Modular

Snippet Description
sam-modular-module Creates a Flutter Modular Module
sam-modular-get Adds the Modular.get() the get instance of class using Modular
sam-modular-get-of-type Adds the Modular.get() to get instance of class using Modular
sam-bind-lazy-singleton-i-class Adds Bind.lazySingleton() instruction for any IClass using Modular
sam-bind-lazy-singleton-class Adds Bind.lazySingleton() instruction for any Class using Modular
sam-bind-lazy-singleton-controller Adds Bind.lazySingleton() instruction for Controller using Modular
sam-bind-lazy-singleton-repository Adds Bind.lazySingleton() instruction for Repository() used by a Service() using Modular
sam-bind-lazy-singleton-repository-impl Adds Bind.lazySingleton() instruction for RepositoryImpl() used by a ServiceImpl() using Modular
sam-bind-lazy-singleton-service Adds Bind.lazySingleton() instruction for Service() using Modular
sam-bind-lazy-singleton-service-impl Adds Bind.lazySingleton() instruction for ServiceImpl() using Modular

Linter (analysis_options.yaml)

Snippet Description
sam-linter-analyzer Configures the analyzer options
sam-linter-rules Includes many rules for the linter to improve development

Settings

Create Folder for Interfaces

Defines if it will create a folder to contain the interface and implementation only for Providers, Repositories and Services.

Usage

Create Implementation of Interface

Defines whether the implementation class of an interface will be created together.

Usage

GetX Display Context Menu

Defines if the context menu with GetX features will be displayed.

Usage

GetX Project Path

Default path for the GetX Project folders and files.

Usage

GetX Use Constructor Tear-offs

Defines if the Bindings and Routes files will use the new Dart language feature named Constructor tear-offs.

Usage

GetX View Suffix

Default suffix name for the GetX view layer.

Usage

MobX Display Context Menu

Defines if the context menu with MobX features will be displayed.

Usage

MobX File Suffix

Default suffix name for the MobX store.

Usage

Use I Prefix For Interfaces

Defines whether an interface will be created using I with prefix to the interface name..

Usage

Shortcut Expanded Description
sam-statelessW Stateless Widget Creates a Stateless widget
sam-statefulW Stateful Widget Creates a Stateful widget
sam-build Build Method Describes the part of the user interface represented by the widget.
sam-initS InitState Called when this object is inserted into the tree. The framework will call this method exactly once for each State object it creates.
sam-dis Dispose Called when this object is removed from the tree permanently. The framework calls this method when this State object will never build again.
sam-reassemble Reassemble Called whenever the application is reassembled during debugging, for example during hot reload.
sam-didChangeD didChangeDependencies Called when a dependency of this State object changes
sam-didUpdateW didUpdateWidget Called whenever the widget configuration changes.
sam-customClipper Custom Clipper Used for creating custom shapes
sam-customPainter Custom Painter Used for creating custom paint
sam-listViewB ListView.Builder Creates a scrollable, linear array of widgets that are created on demand.Providing a non-null itemCount improves the ability of the ListView to estimate the maximum scroll extent.
sam-listViewS ListView.Separated Creates a fixed-length scrollable linear array of list 'items' separated by list item 'separators'.
sam-gridViewB GridView.Builder Creates a scrollable, 2D array of widgets that are created on demand. Providing a non-null itemCount improves the ability of the GridView to estimate the maximum scroll extent.
sam-gridViewC GridView.Count Creates a scrollable, 2D array of widgets with a fixed number of tiles in the cross axis.
sam-gridViewE GridView.Extent Creates a scrollable, 2D array of widgets with tiles that each have a maximum cross-axis extent.
sam-customScrollV Custom ScrollView Creates a ScrollView that creates custom scroll effects using slivers. If the primary argument is true, the controller must be null.
sam-streamBldr Stream Builder Creates a new StreamBuilder that builds itself based on the latest snapshot of interaction with the specified stream
sam-animatedBldr Animated Builder Creates an Animated Builder. The widget specified to child is passed to the builder
sam-statefulBldr Stateful Builder Creates a widget that both has state and delegates its build to a callback. Useful for rebuilding specific sections of the widget tree.
sam-orientationBldr Orientation Builder Creates a builder which allows for the orientation of the device to be specified and referenced
sam-layoutBldr Layout Builder Similar to the Builder widget except that the framework calls the builder function at layout time and provides the parent widget's constraints.
sam-singleChildSV Single Child Scroll View Creates a scroll view with a single child
sam-futureBldr Future Builder Creates a Future Builder. This builds itself based on the latest snapshot of interaction with a Future.
sam-nosm No Such Method This method is invoked when a non-existent method or property is accessed.
sam-inheritedW Inherited Widget Class used to propagate information down the widget tree.
sam-mounted Mounted Whether this State object is currently in a tree.
sam-snk Sink A Sink is the input of a stream.
sam-strm Stream A source of asynchronous data events. A stream can be of any data type.
sam-subj Subject A BehaviorSubject is also a broadcast StreamController which returns an Observable rather than a Stream.
sam-toStr To String Returns a string representation of this object.
sam-debugP Debug Print Prints a message to the console, which you can access using the flutter tool's logs command (flutter logs).
sam-importM Material Package Import Material package.
sam-importC Cupertino Package Import Cupertino package.
sam-importFT flutter_test Package Import flutter_test package.
sam-importAL App localisation Allows for the importation of app_localisation following generation.
sam-mateapp Material App Create a new Material App.
sam-cupeapp Cupertino Package Create a New Cupertino App.
sam-tweenAnimationBuilder Tween Animation Builder Widget builder that animates a property of a Widget to a target value whenever the target value changes.
sam-valueListenableBuilder Value Listenable Builder Given a ValueListenable and a builder which builds widgets from concrete values of T, this class will automatically register itself as a listener of the ValueListenable and call the builder with updated values when the value changes.
sam-f-group Group Create a group test function.
sam-f-test Test Create a test function.
sam-f-testWidgets Test Widgets Create a testWidgets function.

Flutter Snippets

Snippet Widget Description
sam-fscaf Scaffold Widget Creates a Scaffold widget
sam-fex Expanded Widget Creates a Expanded widget
sam-ftxt Text Widget Creates a Text widget
sam-fic Icon Widget Creates a Icon widget
sam-fcont Container Widget Creates a Container widget
sam-fcent Center Widget Creates a Center widget
sam-frow Row Widget Creates a Row widget
sam-fcol Column Widget Creates a Column widget
sam-fstk Stack Widget Creates a Stack widget
sam-falign Align Widget Creates a Align widget
sam-ftextbtn TextButton Widget Creates a TextButton widget
sam-fab FloatingActionButton Widget Creates a FloatingActionButton widget
sam-ficbtn IconButton Widget Creates a IconButton widget
sam-felevbtn RaisedButton Widget Creates a RaisedButton widget
sam-fgesdet GestureDetector Widget Creates a GestureDetector widget
sam-fink InkWell Widget Creates a InkWell widget
sam-fdrawer Drawer Widget Creates a Drawer widget
sam-fmeque MediaQuery Widget Creates a MediaQuery widget
sam-ftheme Theme Widget Creates a Theme widget
sam-flogo FlutterLogo Widget Creates a FlutterLogo widget
sam-fszb SizedBox Widget Creates a SizedBox widget
sam-fszbw SizedBox Widget with width Creates a SizedBox widget with width
sam-fszbh SizedBox Widget with height Creates a SizedBox widget with height
sam-flistv ListView Widget Creates a ListView widget
sam-fnav Navigation Widget Creates the Navigation widget
sam-fpop Navigator pop Creates the Navigator pop function

Import Snippets

Import Package Description
sam-impM material Package Import Material package
sam-impC cupertino Package Import Cupertino package
sam-impS services Package Import Services package
sam-impF foundation Package Import Foundation package
sam-impH http Package Import HTTP package
sam-impURL url_launcher Package Import URL_Launcher package
sam-impP provider Package Import Provider package
sam-impGF google_fonts Package Import Google_Fonts package
sam-impPP path_provider Package Import Path_Provider package
sam-impB flutter_bloc Package Import Flutter_Bloc package
sam-impGF sqflite Package Import Sqflite package
sam-impFS flutter_screenutil Package Import Flutter_Screenutil package
sam-impI intl Package Import Intl package
sam-impR riverpod Package Import Riverpod package
sam-impHooks flutter_hooks Package Import Flutter_Hooks package

Shortcut Snippets

Shortcut Expanded Description
sam-screen Scaffold with text Creates a screen with text in center
sam-devprev Device Preview Creates a screen with the syntax of Device Preview Package
sam-mateapp Material App Creates a new screen with Material App
sam-cupeapp Cupertino App Creates a new screen with Cupertino App
sam-build Build Method Describes the part of the user interface represented by the widget.
sam-customPainter Custom Painer Creates custom painter
sam-customClipper Custom Clippers Creates custom clippers
sam-initS InitState Called when this object is inserted into the tree. The framework will call this method exactly once for each State object it creates.
sam-dis Dispose Called when this object is removed from the tree permanently. The framework calls this method when this State object will never build again.
sam-caa CrossAxisAlignment Creates CrossAxisAlignment
sam-maa MainAxisAlignment Creates MainAxisAlignment
sam-appbar Custom AppBar widget Creates Custom AppBar widget
sam-fstyle Flutter TextStyle property Creates Flutter TextStyle
sam-defaultApp Default Counter App Creates Default Counter App
sam-fstring Flutter String snippet Creates Flutter String snippet
sam-fcolor Flutter Color snippet Creates Flutter Color snippet
sam-fequatable Flutter Equatable class snippet Creates Equatable class snippet
sam-fapptext Flutter AppText class snippet Creates AppText class snippet for Strings used in app
sam-fappimage Flutter AppImage class snippet Creates AppImage class snippet for Image assets used in app
sam-fappcolor Flutter AppColors class snippet Creates AppColors class snippet for Color used in app

Riverpod Snippets

Snippet Expanded Description
sam-stlessConsumer ConsumerStatelessWidget snippet Create a Flutter ConsumerStatelessWidget snippet
sam-stfulConsumer ConsumerStatefulWidget snippet Creates Flutter ConsumerStatefulWidget snippet
sam-changeNotifierProvider ChangeNotifierProvider snippet Creates Flutter ChangeNotifierProvider snippet
sam-changeNotifier ChangeNotifier snippet Creates Flutter ChangeNotifier snippet
sam-futureProvider FutureProvider snippet Creates Flutter FutureProvider snippet
sam-stlessHookConsumer HookConsumerWidget snippet Creates Flutter HookConsumerWidget snippet
sam-stfulHookConsumer StatefulHookConsumerWidget snippet Creates Flutter StatefulHookConsumerWidget snippet
sam-provider Provider snippet Creates Flutter Provider snippet
sam-stateNotifierProvider StateNotifierProvider snippet Creates Flutter StateNotifierProvider snippet
sam-stateNotifier StateNotifier snippet Creates Flutter StateNotifier snippet
sam-stateProvider StateProvider snippet Creates Flutter StateProvider snippet
sam-streamProvider StreamProvider snippet Creates Flutter StreamProvider snippet

Android Permission Snippets

Permission Expanded Description
sam-perInt INTERNET Permission Android Internet permission
Create New Flutter App
Prefix Description
sam-newFlutterApp Initial Flutter App
sam-newFlutterAppProvider Initial Flutter App With Provider
sam-newFlutterAppGet Initial Flutter App With GetX
Import Statement
Prefix Code
sam-imm import 'package:flutter/material.dart';
sam-imc import 'package:flutter/cupertino.dart';
sam-imGet import 'package:get/get.dart';
sam-imProvider import 'package:provider/provider.dart';
Basic Widget Snippets
Prefix Description Code
sam-container It will give Container Widgets Container(
  child: Text("Container"),
)
sam-row It will give Row Widgets Row(
 crossAxisAlignment: CrossAxisAlignment.center,
 mainAxisAlignment: MainAxisAlignment.start,
 children: [],
)
sam-col It will give Column Widgets Column(
 crossAxisAlignment: CrossAxisAlignment.center,
 mainAxisAlignment: MainAxisAlignment.start,
 children: [],
)
sam-text It will give Text Widget Text(
 "Text",
 style: TextStyle(),
)
sam-scsv It will give SingleChildScrollView Widget SingleChildScrollView(
 child: Container(),
)
sam-gd It will give GestureDetector Widget with onTap Method GestureDetector(
 onTap: (){
 
 },
 child: Container(),
)
sam-sb It will give SizedBox widget with width & height SizedBox(
 height: 0,
 width: 0,
 child: Container(),
)
sam-sbw It will give SizedBox widget with width only SizedBox(
 width: 0,
 child: Container(),
)
sam-sbh It will give SizedBox widget with height only SizedBox(
 height: 0,
 child: Container(),
)
sam-imgA It will give Image.asset() method with height & width Image.asset(
 "assets/filename",
 width: 0,
 height: 0,
)
sam-imgN It will give Image.network() method with height & width Image.network(
 "URL",
 width: 0,
 height: 0,
)
sam-imgF It will give Image.file() method with height & width Image.network(
 fileObject,
 width: 0,
 height: 0,
)
sam-navigatorPush It will give Navigator.push() with initial structure Navigator.push(
 context,
 MaterialPageRoute(
  builder: (context) => MyHomePage(),
 ),
);
sam-navigatorPop It will give a Navigator.pop() method Navigator.pop(context);
sam-navigatorPushName It will give Navigator.pushNamed method with initial parameter Navigator.pushNamed(context, "/myHomePage");
Builders Widget Snippets
Prefix Description Code
sam-lvBuild It will give a ListView.builder with initial properties ListView.builder(
 itemCount: 0,
 shrinkWrap: true,
 scrollDirection: Axis.vertical,
 itemBuilder: (context, index) {
  return Text("ListView.builder");
 },
)
sam-lvSeparated It will give a ListView.separated with initial properties ListView.separated(
 itemCount: 0,
 shrinkWrap: true,
 itemBuilder: (context, index) {
  return Text("ListView.separated");
 },
 separatorBuilder: (context, index) {
  return Divider(
   height: 2,
   color: Colors.grey,
  );
 },
)
sam-gvBuild It will give a GridView.builder with initial properties GridView.builder(
 gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(crossAxisCount: 3),
 itemCount: 0,
 shrinkWrap: true,
 itemBuilder: (context, index) {
  return Text("GridView.Builder");
 },
)
sam-gvCount It will give a GridView.count with initial properties GridView.count(
 crossAxisCount: 3,
 shrinkWrap: true,
 children: [
  Text("Gridview.count"),
 ],
)
sam-gvExtent It will give a GridView.extent with initial properties GridView.extent(
 maxCrossAxisExtent: 100,
 shrinkWrap: true,
 children: [
  Text("Gridview.extent"),
 ],
)
sam-pvBuild It will give a PageView.builder with initial structure PageView.builder(
 itemCount: 3,
 itemBuilder: (context, index) {
 return Container(
  margin: EdgeInsets.symmetric(horizontal: 10, vertical: 10),
  decoration: BoxDecoration(
   color: Colors.purple,
   borderRadius: BorderRadius.circular(10),
  ),
  child: Text(
    "PageView",
    style: TextStyle(color: Colors.white),
   ),
  );
 },
)
sam-streamBuild It will give a StreamBuilder with initial properties StreamBuilder(
 stream: stream,
 initialData: initalData,
 builder: (BuildContext context, AsyncSnapshot snapshot) {
   return Text("Stream Builder");
 },
)
sam-animatedBuild It will give a AnimatedBuilder with initial properties AnimatedBuilder(
 animation: animation,
 child: child,
 builder: (context, child) {
  return Text("Animated Builder");
 },
)
sam-layoutBuild It will give a LayoutBuilder with initial properties LayoutBuilder(
 builder: (BuildContext context, BoxConstraints constraints) {
  return Text("Layout Builder");
 },
)
sam-futureBuild It will give a FutureBuilder with initial properties FutureBuilder(
 future: future,
 initialData: initialData,
 builder: (context, snapshot) {
  return Text("Future Builder");
 },
)
sam-tweenBuild It will give a TweenAnimationBuilder with initial properties TweenAnimationBuilder(
 duration: const Duration(),
 tween: Tween(),
 builder: (BuildContext context, dynamic value, Widget? child) {
  return Text("Tween Animation Builder");
 },
),
Advance Widget Snippets
Prefix Description Code
sam-cClipper It will give a class that exetnds CustomClipper with override method import 'package:flutter/cupertino.dart';
class NameClipper extends CustomClipper {

 @override
 Path getClip(Size size) {
  // TODO: implement getClip
  throw UnimplementedError();
 }

 bool shouldReclip(covariant CustomClipper oldClipper) => false;
}
sam-cPainter It will give a class that exetnds CustomPainter with override method import 'package:flutter/material.dart';
class namePainter extends CustomPainter {

 @override
 void paint(Canvas canvas, Size size) {

 }
 @override
 bool shouldRepaint(namePainter oldDelegate) => false;

 @override
 bool shouldRebuildSemantics(namePainter oldDelegate) => false;
}
Margin & Padding Snippets
Prefix Description Code
sam-padAll It will give a padding property with EdgeInsets.All() method with inital parameter padding: EdgeInsets.all(8),
sam-padLTRB It will give a padding property with EdgeInsets.fromLTRB() method with inital parameter padding: EdgeInsets.fromLTRB(left, top, right, bottom),
sam-padSym It will give a padding property with EdgeInsets.symmetric() method with inital parameter padding: EdgeInsets.symmetric(horizontal: 0, vertical: 0),
sam-padOnly It will give a padding property with EdgeInsets.only() method padding: EdgeInsets.only(),
sam-marAll It will give a margin property with EdgeInsets.All() method with inital parameter margin: EdgeInsets.all(8),
sam-marLTRB It will give a margin property with EdgeInsets.fromLTRB() method with inital parameter margin: EdgeInsets.fromLTRB(left, top, right, bottom),
sam-marSym It will give a margin property with EdgeInsets.symmetric() method with inital parameter margin: EdgeInsets.symmetric(horizontal: 0, vertical: 0),
sam-marOnly It will give a margin property with EdgeInsets.only() method margin: EdgeInsets.only(),
Widget's Properties & Var Declaration Snippets
Prefix Description Code
sam-width It will give width property with MediaQuery Width width: MediaQuery.of(context).size.width,
sam-height It will give height property with MediaQuery Width height: MediaQuery.of(context).size.height,
sam-brAll It will give borderRadius property with BorderRadius.all() method borderRadius: BorderRadius.all(Radius.circular(10)),
sam-brCircular It will give borderRadius property with BorderRadius.circular() method borderRadius: BorderRadius.circular(10),
sam-colorHax It will give color property with Color object initial argument color: Color(0xFF9C27B0),
sam-list It will give a List with initial assignment List listName = [

];
Provider Snippets
Prefix Description Code
sam-changeNotiFier It will give a class that extends ChangeNotifier with one demo variable import 'package:flutter/material.dart';

class MySchedule extends ChangeNotifier {
 int _count = 0;

 int get count => _count;

 set count(int value) {
  _count = value;
  notifyListeners();
 }
}
sam-consumer It will give Consumer widget with initial properties Consumer(
 builder: (context, value, child) {
  return Text("Provider Consumer");
 },
)
Get Snippets
Prefix Description Code
sam-getController It will give a class that extends GetxController with one demo variable import 'package:get/get.dart';

class NameController extends GetxController {
 var number = 0.obs;
 void changeValue(val) => number.value = val;
}
sam-getBinding It will give a class that extends Bindings with override method import 'package:get/get.dart';

class HomeBindings extends Bindings {

 @override
 void dependencies() {
  Get.put(Controller1());
 }
}
sam-getBuilder It will give GetBuilder widgets with initial properties GetBuilder(
 init: Controller(),
 builder: (controller) {
  return Text("Get Builder");
 },
)
sam-getX It will give GetX widgets with initial properties GetX(
 init: Controller(),
 builder: (controller) {
  return Text("GetX");
 },
)
sam-mixingBuilder It will give MixinBuilder widgets with initial properties MixinBuilder(
 init: Controller(),
 builder: (controller) {
  return Text("Mixing Builder");
 },
)
sam-gWidth It will give width property with Get Width width: Get.size.width,
sam-gHeight It will give height property with Get Width height: Get.size.height,

Flutter related snippets

Snippet Description
sam-fstful StatefulWidget snippet. This is an alternative of stful
sam-fstless StatelessWidget snippet. This is an alternative of stless
sam-fscaff Scaffold widget snippet
sam-fedgall EdgeInsets widget snippet with named constructor all
sam-fedgonly EdgeInsets widget snippet with named constructor only
sam-ftxt Text widget snippet
sam-finitlf Flutter initState lifecycle method snippet
sam-fic Flutter Icon widget snippet
sam-fcont Flutter Container widget snippet
sam-fcent Flutter Center widget snippet
sam-frow Flutter Row widget snippet
sam-fcol Flutter Column widget snippet
sam-fex Expand widget snippet
sam-fszbw SizedBox widget snippet with just width argument
sam-fszbh SizedBox widget snippet with just height argument
sam-fszb SizedBox widget with width and height arguments
sam-fedgsym EdgeInsets widget with named constructor symmetric
sam-fedgsymv EdgeInsets widget with named constructor symmetric with vertical parameter
sam-fedgsymh EdgeInsets widget with named constructor symmetric with horizontal parameter
sam-fimpmat Add material's package import statement
sam-fstream Display a StreamBuilder widget
sam-felbtn Flutter ElevatedButton snippet

Dart related snippets

Snippet Description
sam-dvar Dart variable declaration using var
sam-dfinal Dart variable declaration using final
sam-dconst Dart variable declaration using const
sam-dinvar Dart Public Instance variable snippet
sam-dprinvar Dart Private instance variable snippet
sam-dmt Dart public method snippet
sam-dprmt Dart private method snippet
sam-darr Dart public arrow function snippet
sam-dprarr Dart private arrow function snippet
sam-dopnctor Dart optional named parameters constructor snippet
sam-dlist Dart List collection snippet
sam-dmap Dart Map collection snippet
sam-dset Dart Set collection snippet
sam-dgetarr Dart arrow function getter snippet
sam-dimpas Dart import as snippet
sam-dimpshow Dart import show snippet
sam-dimplazy Dart import deffered as snippet
sam-dimphide Dart import hide snippet
sam-dexhide Dart export hide snippet
sam-dexshow Dart export show snippet
sam-dconvert Dart convert lib import snippet
sam-dimpmeta Add meta package import statement
sam-dan Add a Dart anonymous function
sam-dcla Add Dart Class snippet
sam-dclae Add Dart Class snippet with extends keyword

Flutter Bloc pattern snippets

Snippet Description
sam-fblocprov Flutter bloc provider snippet
Features Wrap With
Wrap with LayoutBuilder
Wrap with Builder
Wrap with ValueListenableBuilder
Wrap with Consumer
Wrap with MobX Observer
Wrap with Obx
Wrap with Getx

Menu Features:

Menu Features
Clean Arch.: New Feature Backend
Clean Arch.: New Feature Flutter
3-Tiers Back: New Feature
Create Dart Interface
Create Dart Class
Create Stateless Widget
Create Stateful Widget
GetX: New Feature
Flutter Modular: New Feature

Dart Snippets Usage

Shortcut Description
sam-freezed Creates a Freezed class
sam-freezed-json-serializable Creates a Freezed with JsonSerializable
sam-interface Creates a Interfaces
sam-class-interface Creates a Classes with interface
sam-callable-class Create a Callable Classes
sam-d-test-init Create a dart tests
sam-class Create class with file name
sam-class-singleton Create a singleton class with file name
sam-class-equatable Create class with file name and add Equatable
sam-constructor Create constructor with file name based
sam-private-constructor Create private constructor with file name based
sam-static-attribute Create static atribute in class
sam-seconds-delay Create Future.delayed in seconds
sam-milliseconds-delay Create Future.delayed in milliseconds

Flutter Snippets Usage

Shortcut Description
sam-stl Create StatelessWidget with Scaffold and AppBar
sam-stls Create StatelessWidget with super.key, Scaffold and AppBar
sam-stf Create StatefulWidget with Scaffold and AppBar
sam-stfs Create StatefulWidget with with super.key, Scaffold and AppBar
sam-f-test-init Create a dart tests
sam-change-notifier Create change notifier class
sam-value-notifier Create ValueNotifier
sam-text-editing-controller Create TextEditingController
sam-separator Create SizedBox separator
sam-form-key Create formKey GlobalKey
sam-part Add a part based file name ex: home_controller -> (home_controller.g.dart
sam-mediaquery Put MediaQuery.of
sam-sw Get Screen size width from MediaQuery
sam-sh Get Screen size height from MediaQuery
sam-navigator Put Navigator.of(context).
sam-snackbar Put ScaffoldMessenger.of(context).showSnackBar(const SnackBar(content: Text('$1')))

Aqueduct Snippets Usage

Shortcut Description
sam-aqu-operation Creates aqueduct operation
sam-aqu-serializable Creates aqueduct class serializable

Modular Snippets Usage

Shortcut Description
sam-modular-router-child Creates router with page
sam-modular-router Creates router module
sam-modular-initial-router-module Creates router module with Modular.initialRoute
sam-modular-initial-router-child Creates router page with Modular.initialRoute
sam-modular-bind Create Bind for modular
sam-modular_codegen_inject Modular codegen inject
sam-modular_module Create Module

Modular3 Snippets Usage

Shortcut Description
sam-modular3-router-child Creates router with page
sam-modular3-router Creates router module
sam-modular3-initial-router-child Creates router page with Modular.initialRoute
sam-modular3-bind-factory Create Bind Factory for modular
sam-modular3-bind-instance Create Bind Instance for modular
sam-modular3-bind-singleton Create Bind Singleton for modular
sam-modular3-bind-lazySingleton Create Bind Lazy Singleton for modular with interface
sam-modular3-bind-factory-interface Create Bind Factory for modular with interface
sam-modular3-bind-instance-interface Create Bind Instance for modular with interface
sam-modular3-bind-singleton-interface Create Bind Singleton for modular with interface
sam-modular3-bind-lazySingleton-interface Create Bind Lazy Singleton for modular with interface
sam-modular3_module Create Module

Flutter Bloc Snippets Usage

Shortcut Description
sam-bloctransform Override transformEvents method

Cubit Snippets Usage

Shortcut Description
sam-cubitot Override onTransition method
sam-cubitaction Create cubit function action

Mockito Snippets Usage

Shortcut Description
sam-test-when-async Add when mockito async
sam-test-when Add when mockito sync
sam-test-when-throw Add when mockito sync
sam-test-mock Create a mock class

Flutter Provider Snippets Usage

Shortcut Description
sam-provider-watch context.watch
sam-provider-read context.watch
sam-provider-select context.select

Flutter GetX Snippets Usage

Shortcut Description
sam-getxbinding Create Binding
sam-getxcontroller Create Controller
sam-getxrx Create Rx variable
sam-getxobs Create .obs variable
sam-getxoninit Create onInit method
sam-getxonclose Create onClose method
sam-getxpage Create Page with GetView

Shelf/Shelf-Router Snippets Usage

Shortcut Description
sam-shelf-controller Create Controller with shelf-router
sam-shelf-operation Create Rest Operation

Shortcuts

Import Package

Key press Meaning
importM Material Package
importC Cupertino Package

Class

Key press Meaning
resClass Responsive Class Code

Builders

Key press Meaning
listViewB ListView.Builder
ListViewS ListView.Separated
gridViewB GridView.Builder
gridViewC GridView.Count
gridViewE GridView.Extent
streamB Stream Builder
layoutB Layout Builder
oriB Orientation Builder
futureB Future Builder
futureBLV Future Builder ListView
futureBLVModel Future Builder with ListView Model

Scroll Views

Key press Meaning
customSV Custom ScrollView
singleChildSV Single Child ScrollView

Widgets

Key press Meaning
stlW Stateless Widget
stfW Stateful Widget

Functions

Key press Meaning
debugP Debug Print

Methods

Key press Meaning
buildM Build Method
initS Init State Method
dis Dispose Method
alertDialog Alert Dialog Method

Common Height

Key press Meaning
smallHeight const SizedBox(height: 8.0)
mediumHeight const SizedBox(height: 16.0)
largeHeight const SizedBox(height: 24.0)
largerHeight const SizedBox(height: 32.0)
largestHeight const SizedBox(height: 40.0)

Common Width

Key press Meaning
smallWidth const SizedBox(width: 8.0)
mediumWidth const SizedBox(width: 16.0)
largeWidth const SizedBox(width: 24.0)
largerWidth const SizedBox(width: 32.0)
largestWidth const SizedBox(width: 40.0)

Height

  • 1xHeight : 10 logical pixel Height.
Key press Meaning
1xHeight const SizedBox(height: 10.0)
2xHeight const SizedBox(height: 20.0)
3xHeight const SizedBox(height: 30.0)
4xHeight const SizedBox(height: 40.0)
5xHeight const SizedBox(height: 50.0)
6xHeight const SizedBox(height: 60.0)
7xHeight const SizedBox(height: 70.0)
8xHeight const SizedBox(height: 80.0)
9xHeight const SizedBox(height: 90.0)
10xHeight const SizedBox(height: 100.0)
11xHeight const SizedBox(height: 110.0)
12xHeight const SizedBox(height: 120.0)
13xHeight const SizedBox(height: 130.0)
14xHeight const SizedBox(height: 140.0)
15xHeight const SizedBox(height: 150.0)
16xHeight const SizedBox(height: 160.0)
17xHeight const SizedBox(height: 170.0)
18xHeight const SizedBox(height: 180.0)
19xHeight const SizedBox(height: 190.0)
20xHeight const SizedBox(height: 200.0)

Width

  • 1xWidth : 10 logical pixel Width.
Key press Meaning
1xWidth const SizedBox(width: 10.0)
2xWidth const SizedBox(width: 20.0)
3xWidth const SizedBox(width: 30.0)
4xWidth const SizedBox(width: 40.0)
5xWidth const SizedBox(width: 50.0)
6xWidth const SizedBox(width: 60.0)
7xWidth const SizedBox(width: 70.0)
8xWidth const SizedBox(width: 80.0)
9xWidth const SizedBox(width: 90.0)
10xWidth const SizedBox(width: 100.0)
11xWidth const SizedBox(width: 110.0)
12xWidth const SizedBox(width: 120.0)
13xWidth const SizedBox(width: 130.0)
14xWidth const SizedBox(width: 140.0)
15xWidth const SizedBox(width: 150.0)
16xWidth const SizedBox(width: 160.0)
17xWidth const SizedBox(width: 170.0)
18xWidth const SizedBox(width: 180.0)
19xWidth const SizedBox(width: 190.0)
20xWidth const SizedBox(width: 200.0)

Flutter

  • Bloc
  • Mocktail
  • Flutter Widgets
  • Flutter Testing

Dart

  • 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.

Flutter Provider Snippets

Flutter Provider Snippets is a collection of commonly used Flutter classes and methods used when you use provider. It increases your speed of development.

Shortcut Description
providerOf Get the a specific Type from the context
providerOfFalse Get the a specific Type from the context without listen changes
consumer Create a consumer
selector Create a selector with 1 property
selector2 Create a selector with 2 properties
selector3 Create a selector with 3 properties
provider Create a provider
changeNotifierProvider Create a changeNotifierProxyProvider with 1 dependency
changeNotifierProxyProvider2 Create a changeNotifierProxyProvider with 2 dependencies
changeNotifierProxyProvider3 Create a changeNotifierProxyProvider with 3 dependencies
proxyProvider Create a proxyProvider with 1 dependency
proxyProvider2 Create a proxyProvider with 2 dependencies
proxyProvider3 Create a proxyProvider with 3 dependencies
  • Contact us
  • Jobs
  • Privacy
  • Terms of use
  • Trademarks
© 2023 Microsoft