Skip to content
| Marketplace
Sign in
Visual Studio Code>Programming Languages>Simpler Flutter SnippetsNew to Visual Studio Code? Get it now.
Simpler Flutter Snippets

Simpler Flutter Snippets

Eldiyar-Dev

|
3,184 installs
| (1) | Free
Work Faster
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

import 'dart:developer';

simpler-flutter-snippets README

Snippets for Flutter

simpler-flutter-snippets

Wrappers for Flutter

simpler-flutter-snippets A set of helpful Flutter and Dart Snippets for day to day Flutter development.

Installation

  • Name of Package - Simpler Flutter Snippets -
  • Visual Studio Code | Visual Studio Marketplace

Features

Simply Flutter / Dart Snippets

I'm working hard to select all the day to day widgets, so wait for more Snippets!.

Flutter / Dart related Snippets

Flutter related snippets

Snippet Widgets Description
stateFullWidget --> StatefulWidget()
stateLessWidget --> StatelessWidget()
caaaaaa --> crossAxisAlignment: CrossAxisAlignment.choice,
maaaaaa --> mainAxisAlignment: MainAxisAlignment.choice,
mainAxi --> mainAxisSize: MainAxisSize.min
ftxt --> Text()
frxr --> Text.rich()
fstyle --> TextStyle()
1xHeight --> const SizedBox(height: action),
1xWidth --> const SizedBox(width: action),
1xx --> const SizedBox(width: 10, height: 10,),
SizedBox --> const SizedBox.choice
fic --> const Icon(Icons.clear);
ficbtn --> const IconButton()
fcontainer --> Container()
fsaffold --> Scaffold()
listViewB --> ListView.builder()
listViewS --> ListView.separated()
gridViewB --> GridView.builder()
gridViewC --> GridView.count()
pageViewB --> PageView.builder()
padding --> choice: const EdgeInsets.all(10),
fedgeAll --> EdgeInsets.all(32.0)
fedgeOnly --> const EdgeInsets.only()
fedgSym --> const EdgeInsets.symmetric(vertical: 8, horizontal: 8,),
felebtn --> ElevatedButton()
fimg --> Image.[choice assets,network ];
borderCircular --> borderRadius: BorderRadius.circular(action),
borderAll --> borderRadius: BorderRadius.all(Radius.circular(action)),
fshowDialog --> showDialog()
frow --> Row
fcol --> Column
flist --> List listName = [];
fcolorHax --> Color(0xFF9C27B0),
fvalueNotifier --> ValueNotifier customValue = ValueNotifier(false);
fanimatedBuilder --> late Animation animations;
fvariable --> Just Variables
fmap --> Map<dynamic, dynamic> mapName = {};
fset --> Set setName = {};
fgetarr --> dynamic get name => returnValue;
fsettarr --> set name(dynamic value) => some = value;
ff -->

Flutter Life Cycle related snippets

Snippet Cycles Description
flifeInit --> InitState()
flifeDispose --> Dispose()
flifeReassemble --> Reassemble()
flifeDidChangeD --> DidChangeD()
flifeDidUpdateW --> DidUpdateW()
flifeDiActivate --> DiActivate()
flifeCycle --> Cycle()

Flutter Dop related snippets

Snippet Widgets Description
fnav material --> Navigator.push() material
fnav cupertino --> Navigator.push() cupertino
mateApp --> MaterialApp()
cupeApp --> CupertinoApp()
fsvg --> SvgPicture.asset()
flocale --> LocaleKeys..tr(),()
dddddddddddddddddLog ---> log('data: choice')
usecase --> usecases()
fcontroller --> controller()
context --> read context.read<>().add();
context --> router context.router.push();
fgetttttt --> GetIt.I<>()..add()
toStr --> toString()
fSimplerFlutterReCase --> just cases()
futureFunc --> Future
freezed --> freezed model
fhiveModel --> hive model

deleted in version 0.1.9 | trrrrr Repo --> | try - repo() | | trrrrr Simple --> | try - simple() | | trrrrr Pro --> | try - dop() | | repo --> | repository() | | into --> | interactor() |

Flutter related Wrapper

Wrappers Widgets Description visibility on Menu
Wrap with Value Listenable ValueListenableBuilder [default] - true
Wrap with Cubit/Bloc Builder Cubit/Bloc Builder [default] - false
Wrap with Cubit/Bloc Consumer Cubit/Bloc Consumer [default] - false
Wrap with Stack Widget Stack [default] - true
Wrap with Future Builder FutureBuilder [default] - false
Wrap with StateFullBuilder StateFullBuilder [default] - false
Wrap with Tween Builder Tween Builder [default] - false
Wrap with AnimatedBuilder AnimatedBuilder [default] - false
Wrap with StreamBuilder StreamBuilder [default] - false
Wrap with SingleChildScroll SingleChildScrollViewBuilder [default] - false
Wrap with Expanded Expanded [default] - false
Wrap with Flexible Flexible [default] - false
Wrap with FittedBox FittedBox [default] - false

Flutter related Imports

Imports Description
fimport --> MaterialApp import Material App
fimport --> CupertinoApp import Cupertino App
fimport --> Provider import Provider
fimport --> Locale import Locale
fimport --> autRoute g import autRoute g
fimport --> flutter bloc import flutter bloc
fimport --> equatable import equatable
fimport --> injectable import injectable
--------------------------------- --------------------------------------------------------------

Flutter just logger

Logger Type Description
from Clipboard Logger log(data-unique: ${ from clipboard } )
only Interpolation Logger log(data-unique: ${ } ) - with only interpolation
simple Logger log(data:) - simple

Wrappers

"SimplerFlutterSnippets.WrapperOnMenu": "show",
"SimplerFlutterSnippets.FutureBuilder": true,
"SimplerFlutterSnippets.ValueListenableBuilder": true,
"SimplerFlutterSnippets.StateFullBuilder": true,
"SimplerFlutterSnippets.TweenBuilder": true,
"SimplerFlutterSnippets.StreamBuilder": true,
"SimplerFlutterSnippets.SingleChildScrollViewBuilder": true,
"SimplerFlutterSnippets.AnimatedBuilder": true,
"SimplerFlutterSnippets.CubitBuilder": true,
"SimplerFlutterSnippets.CubitConsumer": true,
"SimplerFlutterSnippets.WrapperStack": true,
"SimplerFlutterSnippets.removeThisWidget": true,
"SimplerFlutterSnippets.selectedImport": true,
"SimplerFlutterSnippets.TypeLogger": "from Clipboard Logger" 

SimplerFlutterSnippets.TypeLogger

  • working only on keyShorts snippets.customLogger

About auto Imports and auto Quick Fix

    "SimplerFlutterSnippets.selectedImport": true,
    "SimplerFlutterSnippets.autoFix": true,
    "SimplerFlutterSnippets.FlutterImports": {
        "targetFileTypes": [
            "dart"
        ],
        "importMappings": [
            {
                "imports": [
                    "import 'package:freezed_annotation/freezed_annotation.dart';"
                ],
                "keys": [
                    "freezed"
                ]
            },
            {
                "imports": [
                    "import 'package:flutter/material.dart';"
                ],
                "keys": [
                    "StatefulWidget",
                    "StatelessWidget"
                ]
            }
        ]
    },

-- FYI keybindings snippets.customLogger - [command + shift + q] snippets.expanded - [command + shift + e] snippets.flexible - [command + shift + f] snippets.emptyWidgetWrap - [command + shift + w] snippets.rowColumn - [command + shift + c] snippets.toggleAutoFix - [command + shift + x] - true/false snippets.removeThisWidget - [command + shift + r] snippets.singleChildScrollView - [command + shift + s] ValueNotifierBuilder - [command + shift + v]

Release Notes

0.2.9

  • added log for js

  • added create custom snippets | key [cmd + shift + a] = path in your project .vscode folder

  • added delete custom snippets | key [cmd + shift + h]

  • added list of custom snippets | key [cmd + shift + L]

  • added create custom Wrappers

command: simpler_flutter_snippets.create title: Create Custom Snippets

command: simpler_flutter_snippets.delete title: Delete Custom Snippets

command: simpler_flutter_snippets.list title:List of Custom Snippets json Example

"SimplerFlutterSnippets.customWraps": [
        {
            "name": "Stack custom -->",
            "_comment": "your widget -- ${widget} -- | auto select -- ${1:listenable} -- | selection menu -- ${1|start,center|} --",
            "autoFormat": true,
            "autoCopy": "",
            "body": [
                "  Stack(",
                "  children: [",
                "    ${widget}",
                "  ],",
                ")"
            ]
        },
        {
            "name": "Value listenable -->",
            "autoCopy": "ValueNotifier<bool> customValueX = ValueNotifier<bool>(false);",
            "autoFormat": true,
            "body": [
                "ValueListenableBuilder(",
                " valueListenable: ${1:listenable},",
                " builder: (context, value, child) {",
                "    return ${widget};",
                " },",
                ")"
            ]
        },
        {
            "name": "Column -->",
            "autoFormat": false,
            "autoCopy": "",
            "body": [
                "Column(",
                "crossAxisAlignment: CrossAxisAlignment.${1|start,center|},",
                "children: [",
                "${widget}",
                "]",
                ")"
            ]
        }
    ],

0.2.8

  • added new snippets class -->

0.2.7

  • Fixed the cursor that moved down after the wrapper

0.2.6

  • added toggle Auto Fix to apply quick fixers
  • snippets.toggleAutoFix - keybinding [command + shift + x]
  • deleted auto format
  • added new key bind snippets - snippets.emptyWidgetWrap - keybinding [command + shift + w] - snippets.rowColumn - keybinding [command + shift + c]

0.2.5

  • updated auto IMPORTS when clicking the Widget
  • added new feature selecting auto quick fix
    • SimplerFlutterSnippets.selectedImport: true
    • SimplerFlutterSnippets.autoFix: true
    • SimplerFlutterSnippets.FlutterImports: {
      • targetFileTypes: ["dart"]
      • importMappings: [ { "imports": [ "import 'package:freezed_annotation/freezed_annotation.dart';" ], "keys": [ "freezed" ] }, ] }

0.2.4

  • added auto IMPORTS when clicking the Widget
    • SimplerFlutterSnippets.selectedImport = true [restart the vs code]
      • BlocProvider
      • BlocListener
      • BlocBuilder
      • BlocSelector
      • BlocConsumer
      • RepositoryProvider
      • read
      • freezed
      • GetIt
      • HiveType
      • LocaleKeys
      • tr
      • AutoRouter
      • router
      • singleton
      • injectable
      • LazySingleton
      • Singleton
      • Injectable
      • Equatable
      • log

0.2.0-0.2.3 (Fixing bugs)

  • little release
    • added keybinding remove this widget
      • mac cmd+shift+r
      • winda ctrl+shift+r

0.1.9

  • added new Wrappers with auto imports
    • Stack
    • Cubit/Bloc Builder
    • Cubit/Bloc Consumer
  • to snippet "listViewS" add default SIzedBox

0.1.8

  • fixed increment the logger

0.1.7

  • frxr -> Text.rich()
  • wrapeers command + shift + e ->
    • expanded,
    • flexible,
    • fittedBox
  • wrapper command + shift + s
    • SingleChildScrollView
    • Padding
  • fhiveModel - hive Model
  • fnav cupertino - Navigator - Cupertino
  • changed Log'a String to data-unique

0.1.5

  • Changed Log's String -> data to

0.1.4

  • Bug Fixed
  • Optimized The Extension

0.1.3

  • ReWrite Settings

0.1.0

  • added logger
    • snippets.customLogger add keybinding

0.0.8

  • Wrappers

    • StateFullBuilder
    • AnimatedBuilder
    • StreamBuilder
    • SingleChildScrollViewBuilder
  • Snippets

    • fvalueNotifier
    • freezed
    • frow
    • fcol
    • flist
    • fcolorHax
    • fvalueNotifier
    • fanimatedBuilder
    • fvariable
    • fmap
    • fset
    • fgetarr
    • fsettarr
    • ff

0.0.7

  • Tween Builder

  • hide / show

    • on vs code menu

0.0.3-4-6

  • wrappers
    • ValueListableBuilder
    • FutureBuilder

0.0.2

  • Widgets
  • Life Cycle
  • Dop

0.0.1

Initial release

Enjoy!

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft