Skip to content

Instantly share code, notes, and snippets.

@oravecz
oravecz / main.dart
Created February 26, 2023 02:18
yawning-performance-0548
void main() {
for (int i = 0; i < 5; i++) {
print('hello ${i + 1}');
}
}
@oravecz
oravecz / main.dart
Last active February 2, 2023 14:09
Flutter Full Page Overlay (Working)
// 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
@oravecz
oravecz / main.dart
Created February 2, 2023 14:08
Counter example
// 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
@oravecz
oravecz / main.dart
Created February 2, 2023 13:39
amber-tundra-1873
import 'package:flutter/material.dart';
void main() {
runApp(
MaterialApp(
debugShowCheckedModeBanner: false,
home: MyApp(),
),
);
@oravecz
oravecz / main.dart
Last active January 14, 2023 03:13
Bloc w/ Animated Items
import 'package:equatable/equatable.dart';
import 'package:flutter_bloc/flutter_bloc.dart';
import 'package:flutter/material.dart';
typedef Op = MyStateItem Function(MyStateItem stateItem);
class MyState extends Equatable {
const MyState(this.items);
final List<MyStateItem> items;
@oravecz
oravecz / main.dart
Created November 7, 2022 19:48
keen-ray-3490
void main() {
for (int i = 0; i < 5; i++) {
print('hello ${i + 1}');
}
}
@oravecz
oravecz / main.dart
Created November 3, 2022 16:30
lively-ray-9860
void main() {
try {
var foo1 = <String, dynamic>{'bar': null};
foo1['bar'] = 1;
print('foo1 succeeded');
} catch (e) {
print('foo1 failed');
}
try {
@oravecz
oravecz / main.dart
Created November 2, 2022 12:29
snowy-kingdom-3761
void main() {
for (int i = 0; i < 5; i++) {
print('hello ${i + 1}');
}
}
@oravecz
oravecz / main.dart
Created October 27, 2022 15:06
silent-truth-8787
// Copyright 2013 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 'dart:math' as math;
import 'package:flutter/material.dart';
import 'package:go_router/go_router.dart';
import 'package:english_words/english_words.dart';
@oravecz
oravecz / main.dart
Last active October 13, 2022 19:22
silent-truth-8787
// Copyright 2013 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 'dart:math' as math;
import 'package:flutter/material.dart';
import 'package:go_router/go_router.dart';
import 'package:english_words/english_words.dart';