Flutter Heroes
📈 Analytical overview of Telegram channel Flutter Heroes
Channel Flutter Heroes (@flutterdev) in the English language segment is an active participant. Currently, the community unites 24 985 subscribers, ranking 4 956 in the Technologies & Applications category.
📊 Audience metrics and dynamics
Since its creation on невідомо, the project has demonstrated rapid growth, gathering an audience of 24 985 subscribers.
According to the latest data from 27 January, 2026, the channel demonstrates stable activity. Although there has been a change in the number of participants by -163 over the last 30 days and by 0 over the last 24 hours, overall reach remains high.
- Verification status: Not verified
- Engagement rate (ER): The average audience engagement rate is 0%. Within the first 24 hours after publication, content typically collects N/A% reactions from the total number of subscribers.
- Post reach: On average, each post receives 0 views. Within the first day, a publication typically gains 0 views.
- Reactions and interaction: The audience actively supports content: the average number of reactions per post is 0.
- Thematic interests: Content is focused on key topics such as developer, firebase, widget, hemantpra389, engineer.
📝 Description and content policy
Channel description not provided.
Thanks to the high frequency of updates (latest data received on 28 January, 2026), the channel maintains relevance and a high level of publication reach. Analytics show that the audience actively interacts with content, making it an important point of influence in the Technologies & Applications category.
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/3GvIZamclass 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/3by8GIZrunApp 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