Skip to content

Commit

Permalink
fix getbutton, feat: add getsplash screen
Browse files Browse the repository at this point in the history
  • Loading branch information
kauemurakami committed Nov 18, 2020
1 parent 4571e1a commit cefe3ec
Show file tree
Hide file tree
Showing 4 changed files with 53 additions and 3 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -313,6 +313,7 @@ wait for the snippet, set the variable and function name and you're done !
### More awesome Snippets
getService
getBinding
getSplashPage
getPut
getFind
getLazyPut
Expand Down
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "get-snippets",
"displayName": "GetX Snippets",
"description": "An extension to accelerate the process of developing applications with flutter, aimed at everyone using the Get package.",
"version": "3.1.5",
"version": "3.1.7",
"publisher": "get-snippets",
"engines": {
"vscode": "^1.2.0"
Expand Down
51 changes: 50 additions & 1 deletion snippets/snippets.json
Original file line number Diff line number Diff line change
Expand Up @@ -537,7 +537,7 @@
"",
"RaisedButton(",
"\tcolor: ${1:Colors.blue},",
"\tonPressed: ()=> _.${2:function},",
"\tonPressed: ()=> _.${2:function()},",
"\tsplashColor: ${3:Colors.blueGrey},",
"\tchild: Text('${4:OK}',",
"\t\tstyle: TextStyle(",
Expand Down Expand Up @@ -861,5 +861,54 @@
");"
],
"description": "Get defaultDialog"
},
"Get Splash Page": {
"prefix": "getsplashpage",
"body": [
"import 'package:flutter/material.dart';",
"import 'package:get/get.dart';",

"class SplashPage extends StatefulWidget {",

"@override",
"_SplashPageState createState() => _SplashPageState();",
"}",
"class _SplashPageState extends State<SplashPage> {",
"@override",
"void initState() {",
"super.initState();",
"Future.delayed(Duration(seconds: 2), () => Get.toNamed('login'));",
"}",

"@override",
"Widget build(BuildContext context) {",
"return Container(",
"color: Colors.white,",
"child: Column(children: <Widget>[",
"Padding(",
"padding: EdgeInsets.only(top: 200, bottom: 10),",
"child: Container(",
"height: 200,",
"width: 200,",
"/*decoration: BoxDecoration(",
"image: DecorationImage(",
"image: AssetImage('images/img_splash.png'),",
"fit: BoxFit.fill)),*/",
"),",
"),",
"Text(",
"'CONNECT',",
"style: TextStyle(",
"color: Colors.greenAccent,",
"fontSize: 20,",
"decoration: TextDecoration.none),",
"),",
"]),",
");",
"}",
"}"

],
"description": "Get defaultDialog"
}
}

0 comments on commit cefe3ec

Please sign in to comment.