Created
May 20, 2019 11:03
-
-
Save hiteshchoudhary/02f2c993eadf7e2f9991f90952f58bf9 to your computer and use it in GitHub Desktop.
Flutter snippets for stateful and stateless widgets
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"stateless": { | |
"prefix": "fless", | |
"body": [ | |
"import 'package:flutter/material.dart';", | |
"class $1 extends StatelessWidget {", | |
"\t@override", | |
"\tWidget build(BuildContext context) {", | |
"\t\treturn Container(", | |
"\t\t\t$2", | |
"\t\t);", | |
"\t}", | |
"}" | |
] | |
}, | |
"stateful": { | |
"prefix": "ffull", | |
"body": [ | |
"import 'package:flutter/material.dart';", | |
"class $1 extends StatefulWidget {", | |
"\t@override", | |
" \t_$1State createState() => _$1State();", | |
"}", | |
"class _$1State extends State<$1> {", | |
" \t@override", | |
" \tWidget build(BuildContext context) {", | |
"\t\treturn Container(", | |
" \t\t\t$2", | |
"\t\t);", | |
"\t}", | |
"} " | |
] | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi this is my code this works fine but this is a custom widget created for the paginated list. What I want when I use this then I the import sentence put it on the top
import 'package:fleet_flutter/widgets/WidgetPaginatedList.dart';
currently this sentence is called on exact above of that widget so I want to import this on the top of class