Flutter Heroes
26.1K subscribers
272 photos
2 videos
31.1K links
Download Telegram
New post on /r/flutterdev subreddit:

See DevFest 2021: Flutter at Google Developer Groups GDG Cloud Thunder Bay
Are you someone who loves learning about new technologies? Or learning to develop Apps? Or love technology in general?Come join us for the FLUTTER APP Development event on OCTOBER 30th, Saturday (10am EDT). Everyone is invited. No Pre-requisites required, come along and learn at the comfort of your home (ONLINE EVENT)Speakers for the event:Roman Jaquez, Flutter Google Developer Expert, GDG Lawrence Lead Organizer and GDG Mentor for the Northeast Pranav Bhatt, Mobile and Flutter Developer.Along with learning about Flutter and getting job-ready, you can build network, create your profile for peer learning, make your own badges, and win exciting gifts! 📷RSVP NOW: https://gdg.community.dev/events/details/google-gdg-cloud-thunder-bay-presents-devfest-2021-flutter/

October 29, 2021 at 04:53PM by FlutterisAwesome
https://ift.tt/2ZKfNfb
New post on /r/flutterdev subreddit:

Google Developers DevFest-21 Flutter Event
Are you someone who loves learning about new technologies? Or learning to develop Flutter Apps? Or love technology in general?Come join FLUTTER APP Development event on OCTOBER 30th, Saturday (10am EDT). Everyone is invited.No Pre-requisites required, come along and learn at the comfort of your home (ONLINE EVENT)Speakers for the event: 1. Roman Jaquez, Flutter Google Developer Expert, GDG Lawrence Lead Organizer and GDG Mentor for the Northeast 2. Pranav Bhatt, Mobile and Flutter DeveloperRSVP Now: https://gdg.community.dev/events/details/google-gdg-cloud-thunder-bay-presents-devfest-2021-flutter/

October 29, 2021 at 04:46PM by Java--Developer
https://ift.tt/3Gzsp9B
New post on /r/flutterdev subreddit:

Anyone having performance issues on iOS 15?
I have an iPhone 7 on iOS 14.7 and my app runs smoothly on it. But on my iPhone 12 on iOS 15 up to 15.1 my apps stutters on a certain section of my app.I have done the SkSL steps with the iPhone 7 but not with the iPhone 12 on ios15. Could this cause the issue?

October 29, 2021 at 04:23PM by riveraj33
https://ift.tt/2XUtFTc
New tweet from FlutterDev:

B. Widgets is the correct answer! 🥳— Flutter (@FlutterDev) Oct 29, 2021

October 29, 2021 at 07:02PM
https://twitter.com/FlutterDev/status/1454131613483167745
New post on /r/flutterdev subreddit:

What is easier to learn for a newbie Dart / Flutter or JavaScript / React Native
Hey guys and gals, I wanna get into coding apps for myself. I was wondering what has a bigger learning curve. I have 2 options unless there’s a better one. Learn JavaScript / React Native or Dart / Flutter. Keep in mind I don’t have any coding experiences except for some HTML.Thank you

October 29, 2021 at 09:27PM by BallerOtaku
https://ift.tt/3GslEq2
New tweet from FlutterDev:

D. GestureDetector is the correct answer! 🥳— Flutter (@FlutterDev) Oct 29, 2021

October 29, 2021 at 10:30PM
https://twitter.com/FlutterDev/status/1454183826796646400
New post on /r/flutterdev subreddit:

New Video and Beta Testing for Corona Spectator - A Flutter COVID-19 Stats, News and Aid app.
Hey everyone,I created a video for corona spectator for those who want a better representation of the app. I also entered it into the Congressional App Challenge so wish me (or the app) luck! GitHub: https://github.com/31Carlton7/corona_spectator. If you want to use the app with test flight or google play beta, you can use these links below.Test Flight: https://testflight.apple.com/join/dQTw4Q1YGoogle Play Beta: https://play.google.com/apps/testing/com.coronaspectator.appPSA: I cannot upload the apps to the app store or google play store due to their rules related to COVID-19 Apps :(

October 30, 2021 at 01:45AM by 31Carlton7
https://ift.tt/3BnhvA9
New post on /r/flutterdev subreddit:

Are global data structures viable in Flutter?
In the past I didn't care too much and most of my production apps mixed logic and UI wherever convenient all over the place. In a recent company app however there was a need to pass and process lots of api-fetched data in various unrelated places and the above approach started to result in a big ball of spaghetti and boilerplate, which forced me to finally give state management packages a try - Riverpod proved pretty useful but ultimately I decided to simplify things and came up with the following approach:The app has a global class (data structure), and the entire logic lives within this class. Basically the app works fully without any UI. The whole UI is then build separately and doesn't "do" anything, it just reflects the global class; calls some callbacks and interfaces with the data structure via getters and setters. Anything in the UI that needs to be updated upon a state change adds its SetState callback to a list in the logic class so that it can be updated with something like a NotifyListeners function.This works pretty great, but I remember a comment somewhere where someone said a global data structure is against how Flutter is supposed to be used. I'm also not sure how it sits against object oriented programming principles. Also if it has issues if the team grows and anything "global" becomes and issue?What are your thoughts? How do you structure your big apps so that they follow good practices and are scalability proof?

October 30, 2021 at 09:49AM by HeftyImplement
https://ift.tt/3pOdvGv
New post on /r/flutterdev subreddit:

Has anyone moved from Swift/SwiftUI to Dart/Flutter?
I’ve started learning dart recently to then go on to learning flutter and building my first app.However I also get drawn in by the idea of working natively within Swift and SwiftUI however I feel like it would have a steeper learning curve plus there’s the obvious of it not being cross platform.I’m wondering if any Swift devs have made the switch to Dart/Flutter (or didn’t end up making the switch) and what there thoughts are?

October 30, 2021 at 10:57AM by dualnote
https://ift.tt/3CtEfQ5
New post on /r/flutterdev subreddit:

How safe is Firebase Email/Password Registration & Sign-in?
Firebase gives developers an easy way to set up an email-password authentication.The functionality of Firebase is so nice that it even sends a verification email to the provided address and allows us the check whether the user have passed verification.But how secure is such authentication method?What I mean is when users choose the Google Sign In, they use their Google account, and I think it's pretty secure for my app because usually Google accounts are also verified by phone numbers.
It's also not so easy to make a bot-farm with Google Accounts as it is with random emails (someone can easily set up their own email service on their server and that's it).So... How secure is the Firebase email-password sign in?
Or maybe I am just overthinking it and that's just how things are - email-password sign-ins are not secure by their nature and I just have to live with it?

October 30, 2021 at 11:39AM by submergedmole
https://ift.tt/3pLGriy
New post on /r/flutterdev subreddit:

Why is Flutter's key not the default?
Other GUI frameworks such as MFC(Windows) and Qt Quick distinguish basic gui elements by ehandle or id. I know that id and handle correspond to the Key concept in Flutter. I guess this has to do with some optimization. I'd like to know more precisely why the key is not default in Flutter.

October 30, 2021 at 03:11PM by liaddial
https://ift.tt/3nEQiEd
New post on /r/flutterdev subreddit:

Why wrap MaterialApp in a stateless widget?
I have a strong CS background and am learning Flutter. I've noticed an inconsistency among Flutter tutorials regarding how runApp is invoked. Some say to execute runApp(MaterialApp(…)). Others say to create a new class (named MyApp for example) that extends StatelessWidget and to execute runApp(MyApp()). I don't see any meaningful difference between either of these approaches.Additionally, if I'm creating a Material app, then why would I extend StatelessWidget just to return a MaterialApp instance in the build method when I could simply extend MaterialApp and effectively do the runApp(MaterialApp(…)) approach instead? What's the point in wrapping it in a stateless widget?

October 30, 2021 at 04:02PM by tylercrompton
https://ift.tt/3pM3vxE
New post on /r/flutterdev subreddit:

Correct method to upgrade flutter
Hi all, Junior dev here and I'm assigned with a task to upgrade an app which uses flutter version 1.22.2 to version 2. What should be the correct approach or procedures to be done? Is running "flutter upgrade" enough?

October 30, 2021 at 08:46PM by runjohanrun
https://ift.tt/3kbB9cH
New post on /r/flutterdev subreddit:

What are the questions that need to be asked to a flutter developer for hiring?
We are hiring for a ecommerce app. Can you guide me?

October 30, 2021 at 09:58PM by rishhabhj
https://ift.tt/3Eq6X4U
New post on /r/flutterdev subreddit:

Observing whether the application window is active or not
I needed to determine whether my application window is active or not. At least on macOS, the selection color is different for controls in active or inactive windows and Flutter widgets don't support this out of the box. Unfortunately, the Flutter desktop support lets me down here, too.I created a ChangeNotifier so that widgets can listen to changes:
class WindowActiveState extends ChangeNotifier { bool get isActive => _isActive; void set isActive(bool isActive) { if (_isActive != isActive) { _isActive = isActive; notifyListeners(); } } bool _isActive = false; } 
Then I created a singleton of that class:
/// Provides listenable state whether the application window is active or not. late final windowActiveState = setup(WindowActiveState()); 
The setup method is conditionally imported based on whether this is a web application or a desktop application (I didn't care about mobile in my project).Here is my web implementation. I need to observe the focus. Unfortunately, the document object lacks the hasFocus method, it was probably forgotten.
WindowActiveState setup(WindowActiveState activeState) { window.onFocus.listen((_) => activeState.isActive = true); window.onBlur.listen((_) => activeState.isActive = false); activeState.isActive = JsObject.fromBrowserObject(document).callMethod('hasFocus') as bool; return activeState; } 
For the macOS implementation, I set up a MethodChannel and implemented two methods windowIsActive and setWindowIsActive. The former is called by the native part on state changes and the latter is used (like hasFocus) to read the current(ish) state.
WindowActiveState setup(WindowActiveState activeState) { final channel = MethodChannel('icnh/WindowActiveState'); channel.setMethodCallHandler((call) async { if (call.method == 'setWindowIsActive') { activeState.isActive = call.arguments as bool; } }); channel.invokeMethod<bool>('windowIsActive') .then((value) => activeState.isActive = value!); return activeState; } 
For the native part, I did the simplest thing possible. I didn't create a reusable plugin but just the minimum to setup the method channel, right in the awakeFromNib method of MainFlutterWindow:
... channel = FlutterMethodChannel( name: "icnh/WindowActiveState", binaryMessenger: flutterViewController.engine.binaryMessenger) channel.setMethodCallHandler { call, result in if call.method == "windowIsActive" { result(self.isKeyWindow) } else { result(FlutterMethodNotImplemented) } } ... 
I also made that class its own NSWindowDelegate and implemented the methods to get informed with the "key" state (as macOS calls it) changes:
func windowDidBecomeKey(_ notification: Notification) { channel.invokeMethod("setWindowIsActive", arguments: true) } func windowDidResignKey(_ notification: Notification) { channel.invokeMethod("setWindowIsActive", arguments: false) } 
I'm a bit worried that the self. reference inside the method handler is a memory leak but then again, Flutter unfortunately doesn't support multiple application windows and therefore, I will only ever have one window and it doesn't matter.This took me about two hours including searching for built-in solutions that didn't exist. I'm posting this here so you don't have to spend that time, too.The only problem remaining: When I change the Themes ColorScheme based on the active state, this change is animated by Flutter and that makes it even more obvious that my application is not native but a poor imitation. Damn.Full code

October 31, 2021 at 10:45AM by eibaan
https://ift.tt/3by8GIZ
New post on /r/flutterdev subreddit:

Detect user created widgets in widget tree
Hey Hey Flutter Dev!I've been working on a problem today to detect certain widgets in the widget tree so I've been playing around with ` context.visitChildElements` and `element. visitChildren`. I can see all the widgets in the tree, but there's just too many.I looked at the way the flutter widget inspector does it and they have some internal expectations that won't exist within other users code bases. The example, I have a scaffold with a body Center and a child Material button. Passing the context to my function below prints out about 200+ widgets with those three scattered in between. I would like to only print out those three, or at least elliminate all widgets created by Flutter automatically and not created by the code the user supplied.
 List<WidgetInfo> getElements(BuildContext context) { var widgetsOfInterest = <WidgetInfo>[]; widgetsOfInterest.clear(); int indentation = 0; void visitor(Element element) { indentation++; Key? key = element.widget.key; String className = element.widget.runtimeType.toString(); while (element.findRenderObject() is! RenderBox) {} RenderBox box = element.findRenderObject() as RenderBox; var offset = box.getTransformTo(null).getTranslation(); final indent = ' ' * indentation; // Here I want to check if this is a widget we created and print its name and offset if (debugIsLocalCreationLocation(element)) print('$className $offset'); if ((MaterialButton).toString() == className) { widgetsOfInterest.add(WidgetInfo( indentation: indentation, size: box.size, paintBounds: box.paintBounds.shift( Offset(offset.x, offset.y), ), key: key, className: className, )); } element.visitChildren(visitor); } context.visitChildElements(visitor); return widgetsOfInterest; } 
If anyone have any insights or experience with the Flutter widget tree that could point me in the right direction I would appreciate that.

October 31, 2021 at 11:46AM by Filledstacks
https://ift.tt/3GvIZam