From 808c3b083b45bfb36f2f0568a38890862d264625 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Francisco=20Javier=20Lled=C3=B3=20Fuster?= Date: Sat, 28 May 2022 07:48:18 +0200 Subject: [PATCH 1/3] init key in mateapp & cupeapp --- snippets/snippets.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/snippets/snippets.json b/snippets/snippets.json index 8edcb16..41a8885 100644 --- a/snippets/snippets.json +++ b/snippets/snippets.json @@ -402,7 +402,7 @@ "void main() => runApp(const MyApp());", "", "class MyApp extends StatelessWidget {", - " const MyApp({super.key});", + " const MyApp({Key? key}) : super(key: key);", "", " @override", " Widget build(BuildContext context) {", @@ -413,7 +413,7 @@ " title: const Text('Material App Bar'),", " ),", " body: const Center(", - " child: Text('Hello World'),", + " child: Text('Hello World'),", " ),", " ),", " );", @@ -430,7 +430,7 @@ "void main() => runApp(const MyApp());", "", "class MyApp extends StatelessWidget {", - " const MyApp({super.key});", + " const MyApp({Key? key}) : super(key: key);", "", " @override", " Widget build(BuildContext context) {", From e8dc532c5c9ead8a7de2279b84740ecb5e0b0101 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Francisco=20Javier=20Lled=C3=B3=20Fuster?= Date: Sat, 24 Sep 2022 10:03:11 +0200 Subject: [PATCH 2/3] screen by default added --- snippets/snippets.json | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/snippets/snippets.json b/snippets/snippets.json index 41a8885..1a8a275 100644 --- a/snippets/snippets.json +++ b/snippets/snippets.json @@ -503,5 +503,26 @@ ");" ], "description": "Create a testWidgets function" + }, + "A new Flutter Screen with a Scaffold": { + "prefix": "fl-screen", + "body": [ + "import 'package:flutter/material.dart';", + "", + "class ${1:Home}Screen extends StatelessWidget {", + " ", + " const ${1:Home}Screen({Key? key}) : super(key: key);", + " ", + " @override", + " Widget build(BuildContext context) {", + " return const Scaffold(", + " body: Center(", + " child: Text('${1:Home}Screen'),", + " ),", + " );", + " }", + "}" + ], + "description": "Create a new screen by default with Scaffold" } } \ No newline at end of file From fc64e1508841bc82f69967f6eaf638d24fbc7944 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Francisco=20Javier=20Lled=C3=B3=20Fuster?= Date: Sat, 24 Sep 2022 10:03:38 +0200 Subject: [PATCH 3/3] screen by default added to snippets