Skip to content

Instantly share code, notes, and snippets.

View jonahwilliams's full-sized avatar

Jonah Williams jonahwilliams

View GitHub Profile
typedef AdaptiveThemeCallback<T> = T Function(ThemeData theme, T defaultValue);
class ThemeMapper<T> {
ThemeMapper(this.callback);
final AdaptiveThemeCallback<T> callback;
Type get type => T;
T invoke(ThemeData theme, T defaultValue) {
class ThemeMapper<T> {
ThemeMapper(this.callback);
final T Function(T value) callback;
T invoke(T defaultValue) {
return callback(defaultValue);
}
}
import 'dart:math';
import 'dart:ui';
import 'package:flutter/material.dart';
final _random = Random();
void main() => runApp(const BackdropFilterDemo());
class BackdropFilterDemo extends StatelessWidget {
diff --git a/impeller/aiks/aiks_playground.cc b/impeller/aiks/aiks_playground.cc
index 3f31c658da..c958250213 100644
--- a/impeller/aiks/aiks_playground.cc
+++ b/impeller/aiks/aiks_playground.cc
@@ -52,4 +52,9 @@ bool AiksPlayground::OpenPlaygroundHere(AiksPlaygroundCallback callback) {
});
}
+void AiksPlayground::TearDown() {
+ inspector_.Reset();
ffmpeg -i box.mov -vf "fps=50" -pix_fmt rgb24 output.gif
@jonahwilliams
jonahwilliams / main.dart
Created July 10, 2023 22:48
Gradient stuff
// Copyright 2014 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:ui' as ui;
import 'package:flutter/material.dart';
void main() {
runApp(MyApp());
}
pid: 28483, tid: 28565, name: 1.ui >>> io.flutter.demo.gallery <<<
uid: 10554
tagged_addr_ctrl: 0000000000000001 (PR_TAGGED_ADDR_ENABLE)
signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x0000000000000000
Cause: null pointer dereference
x0 0000000000000000 x1 b40000742dfcc0c0 x2 b40000749df5f4b8 x3 000000735058c898
x4 000000720000a3d1 x5 0000000000fdd7c8 x6 e1a8c061c060c161 x7 b0e1f0e190c041d0
x8 0000000000000000 x9 0000000000000028 x10 0000000000000000 x11 b40000749df5f3b8
x12 0000000000000002 x13 000000007fffffff x14 0000000000fdd7c8 x15 000000734c2b7f60
x16 0000007350c1c6b0 x17 00000076727470c0 x18 000000734b6a2000 x19 000000732cfcb7e8
@jonahwilliams
jonahwilliams / main.dart
Created June 27, 2023 17:00
text wierdness
// Copyright 2014 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 'package:flutter/material.dart';
import 'package:flutter/widgets.dart';
void main() =>
runApp(
MaterialApp(home: Scaffold(body: ListView(
diff --git a/impeller/renderer/backend/vulkan/swapchain_impl_vk.cc b/impeller/renderer/backend/vulkan/swapchain_impl_vk.cc
index af52870ba9..fcea92a521 100644
--- a/impeller/renderer/backend/vulkan/swapchain_impl_vk.cc
+++ b/impeller/renderer/backend/vulkan/swapchain_impl_vk.cc
@@ -197,7 +197,7 @@ SwapchainImplVK::SwapchainImplVK(const std::shared_ptr<Context>& context,
);
swapchain_info.imageArrayLayers = 1u;
swapchain_info.imageUsage = vk::ImageUsageFlagBits::eColorAttachment;
- swapchain_info.preTransform = caps.currentTransform;
+ swapchain_info.preTransform = vk::SurfaceTransformFlagBitsKHR::eIdentity; // caps.currentTransform;
name: gallery
description: A resource to help developers evaluate and use Flutter.
repository: https://github.com/flutter/gallery
version: 2.10.2+021002 # See README.md for details on versioning.
environment:
flutter: ^3.10.0-10.0.pre.17 # Keep relatively close to master channel version
sdk: ">=2.17.0"
dependencies: