This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import 'package:flutter/widgets.dart'; | |
class SomeBuilder<T> extends StatefulWidget { | |
const SomeBuilder({ | |
required this.initialValue, | |
required this.builder, | |
this.child, | |
super.key, // ignore: unused_element | |
}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import 'dart:async'; | |
class Subject<T> implements StreamController<T> { | |
Subject({ | |
T? initialValue, | |
FutureOr<void> Function()? onCancel, | |
void Function()? onListen, | |
}) : _value = initialValue, | |
_parent = StreamController.broadcast( | |
onListen: onListen, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"dart.lineLength": 120, | |
"[dart]": { | |
"editor.rulers": [ | |
120 | |
], | |
}, | |
"dart.additionalAnalyzerFileExtensions": [ | |
"drift" | |
], |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Copyright 2019 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'; | |
import 'dart:math'; | |
import 'package:flutter/material.dart'; | |
void main() => runApp(const MyApp()); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void main() { | |
const x = 8; | |
const y = SomeLongEnum.veryVeryVeryLongEnumValue; | |
// instead of this unreadable bullshit | |
int runTest(int taxiStationId) { | |
if (y == SomeLongEnum.veryVeryVeryLongEnumValue && | |
taxiStationId % 3 == 0 && | |
taxiStationId % 3 == 0 && | |
y == SomeLongEnum.veryVeryVeryLongEnumValue && |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import 'dart:isolate'; | |
void main() async { | |
final toMainIsolate = ReceivePort(); | |
final stream = toMainIsolate.asBroadcastStream(); | |
// Isolate | |
final isolate = await Isolate.spawn(isolateWorker, toMainIsolate.sendPort); | |
final SendPort sendPort = await stream.first; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import 'package:flutter/material.dart'; | |
import 'system_chrome_animation.dart'; | |
class AnimatedMaterialRoute<T> extends MaterialPageRoute<T> with SystemChromeAnimationMixin { | |
AnimatedMaterialRoute({required super.builder, required this.originColor, required this.targetColor}); | |
@override | |
final Color originColor; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file | |
// for details. 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'; | |
void main() => runApp(MyApp()); | |
class MyApp extends StatelessWidget { | |
@override |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
codium --install-extension adpyke.codesnap | |
codium --install-extension CoenraadS.bracket-pair-colorizer-2 | |
codium --install-extension DaltonMenezes.aura-theme | |
codium --install-extension Dart-Code.dart-code | |
codium --install-extension Dart-Code.flutter | |
codium --install-extension equinusocio.vsc-material-theme-icons | |
codium --install-extension fwcd.kotlin | |
codium --install-extension gaetschwartz.build-runner | |
codium --install-extension golang.go | |
codium --install-extension hirantha.json-to-dart |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"name": "Aura Dark", | |
"type": "dark", | |
"colors": { | |
"focusBorder": "#a394f033", | |
"foreground": "#edecee", | |
"errorForeground": "#ff6767", | |
"widget.shadow": "#0f0f0f", | |
// "selection.background": "#3d375e7f", | |
"selection.background": "#6b657a94", |