Skip to content

Instantly share code, notes, and snippets.

@Skylled
Skylled / dart.json
Last active July 5, 2017 04:48
Flutter StatefulWidget VS-Code/Dart-Code snippet
{
"Stateful + State": {
"prefix": "stateful",
"body": [
"class ${1:Class} extends StatefulWidget {",
" @override",
" ${2:State} createState() => new ${2:State}();",
"}",
"",
"class ${2:State} extends State<${1:Class}> {",
public void triggerGoogleIOStuff(String message) {
mDetailsCoordinator.triggerGoogleIOStuff(message);
if (message.equals("Here we go") || message.equals("Ready to reserve?")) {
mCarRentalView.setVisibility(View.VISIBLE);
mCarRentalContactView.setVisibility(View.GONE);
} else if (message.equals("Filling in your details")) {
mCarRentalView.setVisibility(View.GONE);
mCarRentalContactView.setVisibility(View.VISIBLE);
} else {
mCarRentalView.setVisibility(View.GONE);
@Skylled
Skylled / expansion_tile_card.dart
Created February 24, 2020 01:38
ExpansionTileCard, based on Flutter's ExpansionTile, inspired by the Google Material Theme
// Originally based on ExpansionTile from Flutter.
//
// Copyright 2014 The Flutter Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
import 'package:flutter/material.dart';
const Duration _kExpand = Duration(milliseconds: 200);