Skip to content

Instantly share code, notes, and snippets.

@Nailik
Nailik / main.dart
Last active July 16, 2020 09:04
vertical tabbar flutter
import 'package:flutter/material.dart';
import 'dart:math';
void main() {
runApp(TabBarDemo());
}
class TabBarDemo extends StatelessWidget {
@override
Widget build(BuildContext context) {
@Nailik
Nailik / main.dart
Last active July 17, 2020 12:09
Flutter App Start
import 'package:flutter/material.dart';
void main() {
runApp(FlutterDemo());
}
class FlutterDemo extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
@Nailik
Nailik / main.dart
Last active July 20, 2020 12:46
Dart Einstieg
// Copyright 2015 the Dart project 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 "dart:async";
void main() {
print(AutoMarkeExtension.fromText("Mercedes").toText());
dynamic car = new Car("Mercedes");
print(car);
final car2 = Car("Mercedes", color: "blue");
@Nailik
Nailik / main.dart
Created July 25, 2020 23:43
Navigation
import 'package:flutter/material.dart';
void main() {
runApp(MaterialApp(
title: 'Navigation Basics',
home: FirstRoute(),
));
}
class FirstRoute extends StatelessWidget {
@Nailik
Nailik / main.dart
Created July 25, 2020 23:45
named routes
import 'package:flutter/material.dart';
void main() {
runApp(MaterialApp(
title: 'Named Routes Demo',
// Start the app with the "/" named route. In this case, the app starts
// on the FirstScreen widget.
initialRoute: '/',
routes: {
// When navigating to the "/" route, build the FirstScreen widget.
@Nailik
Nailik / main.dart
Created July 25, 2020 23:47
named routes arguments
import 'package:flutter/material.dart';
void main() => runApp(MyApp());
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
// Provide a function to handle named routes. Use this function to
// identify the named route being pushed, and create the correct
@Nailik
Nailik / main.dart
Created July 25, 2020 23:49
Return data from a screen
import 'package:flutter/material.dart';
void main() {
runApp(MaterialApp(
title: 'Returning Data',
home: HomeScreen(),
));
}
class HomeScreen extends StatelessWidget {
@Nailik
Nailik / main.dart
Created July 25, 2020 23:50
Send data to a new screen
import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart';
class Todo {
final String title;
final String description;
Todo(this.title, this.description);
}
@Nailik
Nailik / installation.sh
Created February 17, 2022 14:54
HermesLedControl for Matrix Voice
#
#
# This is an installation guide how to use HermesLedControl https://github.com/project-alice-assistant/HermesLedControl
# with a Matrix Voice Device and Rhasspy
#
### This is NOT a script yet, use it step by step
#
#
#
## Because Matrix Voice does not support bullseye you need to use buster
@Nailik
Nailik / athom-presence-sensor.yaml
Last active December 18, 2023 09:49
Custom Athom Presence Sensor with disabled led and faster lux
substitutions:
name: "athom-presence-sensor"
friendly_name: "presence sensor"
room: ""
device_description: "mmwave radar human presence sensor"
project_name: "Athom Technology.Presence Sensor"
project_version: "1.0"
esphome:
name: "${name}"