Skip to content

Instantly share code, notes, and snippets.

View IlyaMax's full-sized avatar
🇺🇦

IlyaMax

🇺🇦
  • Ukraine, Odesa
View GitHub Profile
@IlyaMax
IlyaMax / main.dart
Created September 27, 2023 09:34
scroll to yellow container in infinite list of random color containers
// 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 'dart:math';
import 'package:flutter/material.dart';
void main() => runApp(MyApp());
@IlyaMax
IlyaMax / main.dart
Created April 3, 2023 08:02
Bloc pattern question
// 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';
import 'package:rxdart/rxdart.dart';
void main() => runApp(MyApp());
class MyApp extends StatelessWidget {
@IlyaMax
IlyaMax / main.dart
Created January 11, 2023 15:58
CompositedTransformFollower inside Scrollable and Column Bug
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
void main() {
runApp(
MaterialApp(
home: Scaffold(
appBar: AppBar(
title: Text('EXAMPLE BUG CompositedTransformFollower'),
),
@IlyaMax
IlyaMax / main.dart
Created January 5, 2023 13:33
Example with LocalKeys
import 'package:flutter/material.dart';
void main() => runApp(MyApp());
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'Flutter Demo',
debugShowCheckedModeBanner: false,
@IlyaMax
IlyaMax / main.dart
Created July 29, 2022 16:01
IntrinsicHeight/Width with Scrollable
// Copyright 2019 The Flutter team. 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';
import 'package:google_fonts/google_fonts.dart';
void main() => runApp(MyApp());
class MyApp extends StatelessWidget {
@IlyaMax
IlyaMax / main.dart
Last active April 12, 2022 17:21
global keys state preserving usecase
import 'dart:math';
import 'package:flutter/material.dart';
void main() {
runApp(const MyApp());
}
class MyApp extends StatelessWidget {
const MyApp({Key? key}) : super(key: key);
@IlyaMax
IlyaMax / main.dart
Last active February 12, 2022 11:45
InheritedWidget with StatefulWidget example
import 'dart:async';
import 'dart:math';
import 'package:flutter/material.dart';
void main() {
runApp(
const MyApp(),
);
}
@IlyaMax
IlyaMax / main.dart
Created November 26, 2021 07:17
CustomMultiChildLayout 2 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 'dart:math';
import 'package:flutter/material.dart';
void main() => runApp(MyApp());
@IlyaMax
IlyaMax / main.dart
Created November 25, 2021 17:31
CustomMultiChildLayout 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 'dart:math';
import 'package:flutter/material.dart';
void main() => runApp(MyApp());
@IlyaMax
IlyaMax / main.dart
Last active June 24, 2021 14:32
ScaffoldMessenger Sample
import 'package:flutter/material.dart';
void main() => runApp(const MyApp());
/// This is the main application widget.
class MyApp extends StatelessWidget {
const MyApp({Key? key}) : super(key: key);
static const String _title = 'ScaffoldMessenger Sample';