Skip Navigation

Search

Flutter @programming.dev
Enjoying FOSS @programming.dev

go_router custom transition performance

I'm trying to implement the OpenContainer transition for go_router in Flutter. It seems like no matter what I do, the end result is choppy. :/

I'm using the native Transition widgets as well as the relatively new SnapshotWidget, but to no avail. Should I maybe use a custom painter? Would that improve performance?

Please take a look at the code below and let me know if you see any ways that I could improve performance.


Here's my attempt at an OpenContainer transition for go_router:

 undefined
    
import 'package:flutter/material.dart';
import 'package:your_project_name_xxx/ui_models/container_transition_extra.dart';

class ContainerTransition extends StatefulWidget {
  final ContainerTransitionExtra extra;
  final Animation<double> animation;
  final Widget? sourceWidget;
  final Widget targetWidget;

  const ContainerTransition({
    super.key,
    required this.extra,
    required this.animation,
    required this.sourceWidget,
    required this.targetWidget,
  });

  @override
  State<C
  
Flutter @programming.dev
shaked_coffee @feddit.it

Installing flutter on linux immutable distro

Hi! I'm a flutter developer and I've recently switched from Ubuntu to Bluefin (based on Fedora Silverblue) I was trying to install flutter and all the dependencies it asks for when running flutter doctor and while for clang++, cmake and ninja I have been able to install them with Homebrew (brew install llvm cmake ninja) and the warning went away, flutter seems not to detect GTK 3.0 development libraries when installed through homebrew (brew install gtk+3)

After having looked a little bit online, I've seen that the problem is probably that it's searching the libraries in the wrong place and in fact even when I run pkg-config --modversion gtk+-3.0 I see the library as missing. Therefore, I tried setting the PKG_CONFIG_PATH env variable to the folder where brew installed my libraries (/home/linuxbrew/.linuxbrew/opt/gtk+3/lib/pkgconfig) and after that the output of the pkg-config program above is the one expected. However, this doesn't seem to