From cefe3ecaa8cca0d354ef8c39324909399df08c97 Mon Sep 17 00:00:00 2001 From: kauemurakami Date: Wed, 18 Nov 2020 09:00:38 -0300 Subject: [PATCH] fix getbutton, feat: add getsplash screen --- README.md | 1 + package-lock.json | 2 +- package.json | 2 +- snippets/snippets.json | 51 +++++++++++++++++++++++++++++++++++++++++- 4 files changed, 53 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 7463b8f..42239bb 100644 --- a/README.md +++ b/README.md @@ -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 diff --git a/package-lock.json b/package-lock.json index cf16327..7bfcce0 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "get-snippets", - "version": "3.1.5", + "version": "3.1.7", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index ae10643..ffd2f4b 100644 --- a/package.json +++ b/package.json @@ -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" diff --git a/snippets/snippets.json b/snippets/snippets.json index 545ed4a..258d678 100644 --- a/snippets/snippets.json +++ b/snippets/snippets.json @@ -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(", @@ -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 {", + "@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: [", + "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" } } \ No newline at end of file