summaryrefslogtreecommitdiff
path: root/snippets/dart-flutter.snippets
diff options
context:
space:
mode:
authorVito G. Graffagnino <vito@graffagnino.xyz>2022-08-30 16:06:22 +0100
committerVito G. Graffagnino <vito@graffagnino.xyz>2022-08-30 16:06:22 +0100
commitf1eabbaa1b4ff1836d0ee8335b31d009203f3775 (patch)
treebbe77eacaef8ab8a5999e517c3006973c9e3e44c /snippets/dart-flutter.snippets
parent823302458ec6c53455a3f34674415c43ce6a3187 (diff)
fixed zathura integration with texlab using nvim-texlabconfig
Diffstat (limited to 'snippets/dart-flutter.snippets')
-rw-r--r--snippets/dart-flutter.snippets89
1 files changed, 0 insertions, 89 deletions
diff --git a/snippets/dart-flutter.snippets b/snippets/dart-flutter.snippets
deleted file mode 100644
index f51f11c..0000000
--- a/snippets/dart-flutter.snippets
+++ /dev/null
@@ -1,89 +0,0 @@
-# Snippets for dart in flutter project, to use add the following to your .vimrc
-# `autocmd BufRead,BufNewFile,BufEnter *.dart UltiSnipsAddFiletypes dart-flutter`
-# Flutter stateless widget
-snippet stless
- class $1 extends StatelessWidget {
- @override
- Widget build(BuildContext context) {
- return Container(
- $2
- );
- }
- }
-
-# Flutter stateful widget
-snippet stful
- class $1 extends StatefulWidget {
- @override
- _$1State createState() => _$1State();
- }
-
- class _$1State extends State<$1> {
- @override
- Widget build(BuildContext context) {
- return Container(
- $2
- );
- }
- }
-
-# Flutter widget with AnimationController
-snippet stanim
- class $1 extends StatefulWidget {
- @override
- _$1State createState() => _$1State();
- }
-
- class _$1State extends State<$1>
- with SingleTickerProviderStateMixin {
- AnimationController _controller;
-
- @override
- void initState() {
- super.initState();
- _controller = AnimationController(vsync: this);
- }
-
- @override
- void dispose() {
- super.dispose();
- _controller.dispose();
- }
-
- @override
- Widget build(BuildContext context) {
- return Container(
- $2
- );
- }
- }
-
-# Flutter scaffold application
-snippet fsa
- void main() {
- runApp(
- MaterialApp(
- title: 'Flutter Demo',
- theme: ThemeData(
- primarySwatch: Colors.blue,
- ),
- debugShowCheckedModeBanner: false,
- home: const HomePage(),
- ),
- );
- }
-
- class HomePage extends StatelessWidget {
- const HomePage({Key? key}) : super(key: key);
-
- @override
- Widget build(BuildContext context) {
- return Scaffold(
- appBar: AppBar(
- title: const Text('Home Page'),
- ),
- );
- }
- }
-
-