Flutter

626 readers
1 users here now

Flutter and the related logo are trademarks of Google LLC. We are not endorsed by or affiliated with Google LLC

founded 1 year ago
MODERATORS
26
 
 

I haven't seen any of the issues mentioned in the article. I suspect it is related to the libraries the author's project is using and I may not be using. These look like good temporary workarounds until fixes in the libraries can be rolled out.

27
 
 

Here's a nice simple article explaining enhanced enums that have been around for a while but may be something overlooked. Between these and sealed classes I think Dart has an excellent story for pattern matching.

28
 
 

Randal Schwartz takes the .when from Riverpod's AsyncValue and creates it for an AsyncSnapshot, using Dart 3 pattern matching.

29
 
 

A modular project approach for Flutter. Nino Handler shows us how to organize our app into a package-based modular app architecture.

How to Fetch Data and Perform Data Mutations with the Riverpod Architecture. Andrea Bizzotto gives us a great tutorial on how to fetch data and perform mutations using Riverpod.

How to use URL Launcher package in flutter | URL Launcher | #flutter #flutterdev #flutterwidgets. By WorldOfFlutter. A brief description on how to use the URL Launcher package by flutter. Follow the above steps for different URL schemes and use it in your projects!

A Complete Guide for using Dynamic Island in your next Flutter App. By Yash Makan. In this comprehensive tutorial, I'll walk you through the exciting world of Dynamic Island on iOS and how to seamlessly integrate them into your Flutter application with real-time API integration.

And more

30
 
 

Disclaimer: I made this

I spend a lot of time contributing to huge mono repos (flutter/packages, flutterfire, etc) and while some of them use melos to deal with the mess most of them don't. To help deal with this, I made puby.

Melos can be useful, but it requires project-specific setup so it's not good for repos that you don't control (and don't already have it set up). puby requires no setup, and you can run it literally anywhere. For example, if you keep all your dart/flutter projects in one directory you can execute commands in all of them at once by running puby in the root directory.

puby can do a lot, but here are the highlights:

Run any pub command

The first thing puby was made for is in its name: running pub commands. Run puby get, puby upgrade, etc to run those commands in all the projects in the current directory. Any extra arguments passed into puby will get passed to the commands puby runs. puby will automatically use the correct root command (dart/flutter) and even supports running with fvm if the project has it set up. puby combines the exit codes of the commands it runs, so it can be used to check for failures in CI.

puby link

puby link uses existing pubspec.lock files to catalog the dependencies required for all projects in the current directory, adds them to the pub cache, and then runs pub get --offline in all the projects in parallel. This can run up to five times faster than a regular pub get. This requires you to check in your pubspec.lock files to git, but the benefit is that when you switch branches a puby link will get you up to date in a few seconds.

puby clean

puby clean used to just be an alias for flutter clean, but since I added support for running commands in parallel for puby link it can now clean all projects in parallel as well. This is useful to clear out the cache of an entire monorepo, but it also has a much cooler use: cleaning up all of your local dart/flutter projects at once. Run puby clean in the directory containing all your local projects and you'll be surprised how much disk space you can reclaim.

puby exec

Run any command in all projects

Convenience commands

puby comes with many conventience commands to make common tasks easier

command equivalent
puby gen [engine] pub run build_runner build --delete-conflicting-outputs
puby test [engine] test
puby mup [engine] pub upgrade --major-versions
puby reset puby clean && puby get

Outro

My team and I use puby every day. Please let me know what you think!

31
 
 

Flutter Connection 2023 was held in Paris on June 2nd. There are 12 videos available to watch from YouTube with some interesting topics covered.

32
 
 

This edition covers Flutter performance tips, parallel API calls, the power of the late keyword, hook widgets for state management, and various Flutter-related videos and packages.

33
 
 

Disclaimer: I made this

I've been wanting a way to create type-safe Firebase rules for a while, so I made this package to let you do just that. I've used it for several of my projects now, and it's so much nicer than raw-dogging the rules syntax with no autocomplete. I was able to write rules from scratch without referencing the documentation once, and they deployed first try without any errors. I'm always hungry for feedback on my work, so please feel free to comment any feedback or suggestions.

34
 
 

There were many sessions at FlutterCon in Berlin and they’re now available to watch online.

35
 
 

A few days ago I had this urge of making my own music player, since I have a Subsonic capable server (ampache) to host and serve music. I've been using DSub, which has a lot of features that I don't use, but works very very well. Alas it isn't "up to date" in terms of design.

So I made my own, heavily inspired by Android 13, Material 3 enabled, has dynamic colors / system theme fallback (a small thing that goes a long way, I didn't want to make an half baked customisation screen, since Android already has one why not use it?)

This was my very first Flutter and Dart experience, and I must say it was very enjoyable! The docs are awesome, there are a lot of plugins to choose from, hot reloading... I know now that I needed that feature, it's a must have to iterate quickly! I might have reduce the amount of time I slept the past few days but it was very well worth it.

Here is demo video https://imgur.com/a/SwOxcij (it has changed a bit since then, mostly on boarders/padding, by a few pixels at most but still relevant ; more up to date pictures on the readme of the github repo)!

https://github.com/SuperFola/FlSub (the code might not be perfect, but I did my best as a backend developper)

36
37
 
 

Did anyone achieve animations while reordering lists in Flutter? (With grid or list view) Like Android's native Recycler View behaviour.

When you reorder the list items animate to new positions. With ListView.builder they just update with no animations.

Is this possible with AnimatedList?

38
 
 

This looks super-cool, maybe could be useful to some :)

39
 
 

Hey guys, very new to flutter and have been learning in order to start making pull requests on Github. However its been a while since ive used a non-R programming language so I might be a bit rusty with some concepts.

For reference, the repo i want to help out is Thunder

What im trying to do is cause a page to scroll to the top, when the user presses the bottom navigation bar button for that page.

So it goes PageView, CommunityPage, then PostCardList, which is a class containing a ListView showing the cards and whatever else.

I get that I need to pass one of the scrollControllers up to the main PageView level, and then use the BottomNavigationBar onTap (index) function to call an animateTo on it. But i dont know where, or how i pass the scrollcontroller up a level. When i know how, do i just pass it from the PostCardList class, to the CommunityPage class, to the PageView-level class? Or is there some better way??

Sorry for such a low level question but ive been learning this for like 2 or 3 days and have no experience whatsoever hahaha

Thanks!

40
 
 

Where did the Flutter crowd move on to? Are they all still on Reddit or did they go to Discord?

41
 
 

Recently started testing different frameworks to build small standalone apps to help manage a bigger (quite large) system. Latest one I was working with was TKinter for python and it was good. Running queries and generating reports. but the UI was very outdated. Yesterday I started looking into flutter for windows desktop and been looking at available packages on pub.dev

42
29
submitted 1 year ago by rei to c/flutter
 
 

I am just starting to learn flutter so it may be a minute before I can contribute. But if anyone here is interested here is the github link!

43
 
 

hello everyone, I wanted to learn flutter for more than a year now, but I never did. I think this will change soon, though. The thing is, I've been assigned to work on a Flutter project by my professor, and I have around a week before the project starts. I want to use this week to learn as much about Flutter as possible, and that way I can understand what other team members will be planning. We have two months to complete the project, so I'll be sure to learn more further down the line. I know a week is not enough to get really good at Flutter, but all I want is to be able to understand what they will plan and work accordingly.

So the question is: what is the best way to get started with Flutter? I can give around 4 to 5 hours a day of learning, and I have prior knowledge of web development, specifically React and Django. So if anyone has any suggestions, I'd be honored to hear from you guys. Thanks to you all.

44
45
10
submitted 1 year ago* (last edited 1 year ago) by [email protected] to c/flutter
 
 

Hey folks! I hope you're having a lovely day. I created a sublemmy for Dart; feel free to join at [email protected]!

Edit: Add relative link

46