VSCODE Flutter Snippets

29次阅读
没有评论

来自模块简介,待翻译

Flutter Snippets

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

Import Snippets

Import Package Description
impM material Package Import Material package
impC cupertino Package Import Cupertino package
impS services Package Import Services package
impF foundation Package Import Foundation package
impH http Package Import HTTP package
impURL url_launcher Package Import URL_Launcher package
impP provider Package Import Provider package
impGF google_fonts Package Import Google_Fonts package
impPP path_provider Package Import Path_Provider package
impB flutter_bloc Package Import Flutter_Bloc package
impGF sqflite Package Import Sqflite package
impFS flutter_screenutil Package Import Flutter_Screenutil package

Shortcut Snippets

Shortcut Expanded Description
screen Scaffold with text Creates a screen with text in center
devprev Device Preview Creates a screen with the syntax of Device Preview Package
mateapp Material App Creates a new screen with Material App
cupeapp Cupertino App Creates a new screen with Cupertino App
build Build Method Describes the part of the user interface represented by the widget.
customPainter Custom Painer Creates custom painter
customClipper Custom Clippers Creates custom clippers
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.
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.
caa CrossAxisAlignment Creates CrossAxisAlignment
maa MainAxisAlignment Creates MainAxisAlignment
appbar Custom AppBar widget Creates Custom AppBar widget
fstyle Flutter TextStyle property Creates Flutter TextStyle
defaultApp Default Counter App Creates Default Counter App
fstring Flutter String snippet Creates Flutter String snippet
fcolor Flutter Color snippet Creates Flutter Color snippet
fequatable Flutter Equatable class snippet Creates Equatable class snippet
fapptext Flutter AppText class snippet Creates AppText class snippet for Strings used in app
fappimage Flutter AppImage class snippet Creates AppImage class snippet for Image assets used in app
fappcolor Flutter AppColors class snippet Creates AppColors class snippet for Color used in app

Flutter Widget Snippets

Snippet Description
fstful StatefulWidget snippet. This is an alternative of stful
fstless StatelessWidget snippet. This is an alternative of stless
fscaff Scaffold widget snippet
fedgall EdgeInsets widget snippet with named constructor all
fedgonly EdgeInsets widget snippet with named constructor only
ftxt Text widget snippet
finitlf Flutter initState lifecycle method snippet
fic Flutter Icon widget snippet
fcont Flutter Container widget snippet
fcent Flutter Center widget snippet
frow Flutter Row widget snippet
fcol Flutter Column widget snippet
fex Expand widget snippet
fszbw SizedBox widget snippet with just width argument
fszbh SizedBox widget snippet with just height argument
fszb SizedBox widget with width and height arguments
fedgsym EdgeInsets widget with named constructor symmetric
fedgsymv EdgeInsets widget with named constructor symmetric with vertical parameter
fedgsymh EdgeInsets widget with named constructor symmetric with horizontal parameter
fimpmat Add material’s package import statement
fstream Display a StreamBuilder widget
felbtn Flutter ElevatedButton snippet
Snippet Description
dvar Dart variable declaration using var
dfinal Dart variable declaration using final
dconst Dart variable declaration using const
dinvar Dart Public Instance variable snippet
dprinvar Dart Private instance variable snippet
dmt Dart public method snippet
dprmt Dart private method snippet
darr Dart public arrow function snippet
dprarr Dart private arrow function snippet
dopnctor Dart optional named parameters constructor snippet
dlist Dart List collection snippet
dmap Dart Map collection snippet
dset Dart Set collection snippet
dgetarr Dart arrow function getter snippet
dimpas Dart import as snippet
dimpshow Dart import show snippet
dimplazy Dart import deffered as snippet
dimphide Dart import hide snippet
dexhide Dart export hide snippet
dexshow Dart export show snippet
dconvert Dart convert lib import snippet
dimpmeta Add meta package import statement
dan Add a Dart anonymous function
dcla Add Dart Class snippet
dclae Add Dart Class snippet with extends keyword

Flutter Bloc pattern snippets

Snippet Description
fblocprov Flutter bloc provider snippet
正文完