Skip to content

Instantly share code, notes, and snippets.

View Kleak's full-sized avatar
🏠
Working from home

Kevin Segaud Kleak

🏠
Working from home
View GitHub Profile
@Kleak
Kleak / main.dart
Created August 12, 2022 17:10
decadent-jungle-7434
class Testing {
final int number;
final String name;
const Testing(this.number, this.name);
String toString() => 'Testing{ $number, $name }';
}
void main(List<String> args) async {

hdpu3d9y7e

@Kleak
Kleak / weird.dart
Last active December 16, 2020 17:31
Dart analyzer weird behavior
class Animal {
final int age;
const Animal(this.age);
}
class Cat extends Animal {
const Cat(int age) : super(age);
String meow() => 'Meow';
}
void main() {
final date = DateTime(2020, 01, 01);
print(date.toIso8601String()); // => 2020-01-01T00:00:00.000
final dateWithTimezone = DateTime(2020, 01, 02).toUtc(); // this correspond in France at 2020/01/01 23h00 one hour shift
print(dateWithTimezone.toIso8601String()); // => 2020-01-01T23:00:00.000Z which is normal
}

Keybase proof

I hereby claim:

  • I am kleak on github.
  • I am kleak (https://keybase.io/kleak) on keybase.
  • I have a public key ASDkTSHMUs_07bO7FmBa1wzuRRT3-CW4m3w2jI_yRLCXlQo

To claim this, I am signing this object: