Skip to content

Instantly share code, notes, and snippets.

@PiN73
PiN73 / build.log
Created November 15, 2019 15:02
functional_widget - flutter build apk
C:\Users\Pavel\AndroidStudioProjects\test_functional_widget>flutter build apk
You are building a fat APK that includes binaries for android-arm, android-arm64.
If you are deploying the app to the Play Store, it's recommended to use app bundles or split the APK to reduce the APK
size.
To generate an app bundle, run:
flutter build appbundle --target-platform android-arm,android-arm64
Learn more on: https://developer.android.com/guide/app-bundle
To split the APKs per ABI, run:
flutter build apk --target-platform android-arm,android-arm64 --split-per-abi
Learn more on: https://developer.android.com/studio/build/configure-apk-splits#configure-abi-split
@PiN73
PiN73 / run.log
Created November 15, 2019 15:03
functional_widget - flutter run
C:\Users\Pavel\AndroidStudioProjects\test_functional_widget>flutter run
Using hardware rendering with device Android SDK built for x86. If you get graphics artifacts, consider enabling
software rendering with "--enable-software-rendering".
generating build script... 27,9s
starting build daemon... 0,9s
Launching lib\main.dart on Android SDK built for x86 in debug mode...
Initializing gradle... 1,5s
Resolving dependencies... 5,6s
starting build daemon... 0,3s
@PiN73
PiN73 / doctor.log
Created November 15, 2019 15:04
flutter doctor
C:\Users\Pavel\AndroidStudioProjects\test_functional_widget>flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[√] Flutter (Channel stable, v1.9.1+hotfix.6, on Microsoft Windows [Version 10.0.18362.418], locale ru-RU)
[√] Android toolchain - develop for Android devices (Android SDK version 29.0.2)
[√] Android Studio (version 3.5)
[√] Connected device (1 available)
• No issues found!
@PiN73
PiN73 / main.dart
Created March 1, 2020 20:32
Dart map assign
void main() {
Map<int, MapEntry<String, String>> m = {};
m[5] = MapEntry("five", "5");
print(m);
}
import 'package:flutter/foundation.dart';
extension NumExtension on num {
bool greaterThan(num other) => this > other;
}
class MyClass {
final bool a;
final bool b;
final bool c;
@PiN73
PiN73 / main.dart
Last active August 1, 2020 23:33
Column baseline
import 'package:flutter/material.dart';
void main() {
runApp(MyApp());
}
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
@PiN73
PiN73 / main.dart
Created August 1, 2020 23:38
Column with Icon baseline
import 'package:flutter/material.dart';
void main() {
runApp(MyApp());
}
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
@PiN73
PiN73 / main.dart
Last active August 1, 2020 23:55
Column with Icon baseline fixed
import 'package:flutter/material.dart';
void main() {
runApp(MyApp());
}
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
@PiN73
PiN73 / main.dart
Last active August 15, 2020 00:07
Flutter slivers (CustomScrollView) example
import 'package:flutter/material.dart';
void main() {
runApp(MyApp());
}
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
@PiN73
PiN73 / !.md
Last active June 4, 2024 19:43
WPF ScrollViewer virtualization AND smooth scroll. Full: https://github.com/PiN73/TestScrollVirtualization/

By default, <ItemsControl>/<ScrollViewer> doesn't use virtualization. All its items are rendered at once. This causes lags/freezing on first render and each re-render (for example, if list data or window size changes).

Adding ScrollViewer.CanContentScroll="True" will enable virtualization and make loading fast. But the list will be scrolled one whole item a time, which feels like jumping if items height is big enough.

To make virtualization enabled and keep smooth scrolling, add also VirtualizingPanel.ScrollUnit="Pixel"