Skip to content

Instantly share code, notes, and snippets.

View popeyelau's full-sized avatar
:octocat:
To the stars!

Popeye Lau popeyelau

:octocat:
To the stars!
View GitHub Profile
@bizz84
bizz84 / go_router_nested_navigation.dart
Created March 17, 2022 10:17
Example of GoRouter nested navigation using BottomNavigationBar
import 'package:flutter/material.dart';
import 'package:go_router/go_router.dart';
void main() => runApp(App());
class App extends StatelessWidget {
App({Key? key}) : super(key: key);
static const title = 'GoRouter Example: Nested Navigation';
@FelipeSantos75
FelipeSantos75 / glass.dart
Last active January 25, 2022 12:48
glass
import 'dart:ui';
import 'package:flutter/material.dart';
class GlassMorphism extends StatelessWidget {
final Widget child;
final double start;
final double end;
const GlassMorphism({
Key? key,
required this.child,
@ipcjs
ipcjs / api_result.dart
Created June 15, 2021 02:40
Dio: ApiResultInterceptor
class ApiResult<T> {
final int code;
final T data;
final String? message;
const ApiResult({
required this.code,
required this.data,
this.message,
});
import 'dart:ui';
import 'package:flutter/material.dart';
import 'package:flutter/scheduler.dart';
void main() => runApp(MyApp());
const sampleText = '''
Flutter is an open-source UI software development kit created by Google.
It is used to develop applications for Android, iOS, Linux, Mac, Windows, Google Fuchsia,[4] and the web from a single codebase.[5]
@bpsib
bpsib / BBC-Radio-HLS.m3u
Last active April 28, 2025 16:25 — forked from stengland/BBC-Radio.m3u
BBC Radio Streams
#EXTM3U
#EXTINF:-1,BBC - Radio 1
http://as-hls-ww-live.akamaized.net/pool_01505109/live/ww/bbc_radio_one/bbc_radio_one.isml/bbc_radio_one-audio%3d96000.norewind.m3u8
#EXTINF:-1,BBC - Radio 1Xtra
http://as-hls-ww-live.akamaized.net/pool_92079267/live/ww/bbc_1xtra/bbc_1xtra.isml/bbc_1xtra-audio%3d96000.norewind.m3u8
#EXTINF:-1,BBC - Radio 1Dance
http://as-hls-ww-live.akamaized.net/pool_62063831/live/ww/bbc_radio_one_dance/bbc_radio_one_dance.isml/bbc_radio_one_dance-audio%3d96000.norewind.m3u8
#EXTINF:-1,BBC - Radio 1 Anthems (UK Only)
http://as-hls-uk-live.akamaized.net/pool_904/live/uk/bbc_radio_one_anthems/bbc_radio_one_anthems.isml/bbc_radio_one_anthems-audio%3d96000.norewind.m3u8
#EXTINF:-1,BBC - Radio 2
@PlugFox
PlugFox / main.dart
Last active December 10, 2020 02:05
Simple form managment
/// http://dartpad.dev/981a8d2145a9878dae2b52aebd9fae88
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
void main() => runApp(App());
class App extends StatelessWidget {
@override
Widget build(BuildContext context) => const MaterialApp(
@gabrieloc
gabrieloc / Bash.swift
Last active December 29, 2023 00:26
Utilities for writing command line code in Swift
#!/usr/bin/env swift
import Foundation
struct TerminationStatus: Error {
let code: Int32
}
func run(_ command: Command) throws {
print(command.rendered.joined(separator: " "))
@Webreaper
Webreaper / docker-compose.yml
Last active April 25, 2025 23:48
Sample Docker-compose file which shows how to set up Sonarr, Radarr, Prowlarr, Lidarr, QBittorrent and a VPN container so that all all traffic from the containers is routed through the VPN. Also includes Plex and get_iplayer containers, which are not routed through the VPN.
# Docker compose to set up containers for all services you need:
# VPN
# Sonarr, Radarr, Lidarr, Qbittorrent
# Non-VPN
# Plex, get_iplayer
# Before running docker-compose, you should pre-create all of the following folders.
# Folders for Docker State:
# /volume1/dockerdata. - root where this docker-compose.yml should live
# /volume1/dockerdata/plex - Plex config and DB
# /volume1/dockerdata/sonarr - Sonarr config and DB
@rurickdev
rurickdev / creating_vars.dart
Last active September 14, 2020 12:23
Null Safety Codes and examples
void main (){
// In null-safe Dart, none of these can ever be null.
var i = 42; // Inferred to be int.
String name = getFileName(); // getFileName() should return string, never null.
final b = Foo(); // Inferred to be Foo.
// Nullable var declaration just needs an [?] after the type.
int? aNullableInt = null;
var x; // Inferred nullable
include: all_lint_rules.yaml
analyzer:
exclude:
- "**/*.g.dart"
- "**/*.freezed.dart"
# This is generated from the i18n vscode extension
- "**/i18n.dart"
strong-mode:
implicit-casts: false
implicit-dynamic: false