Flutter Heroes
📈 Telegram kanali Flutter Heroes analitikasi
Flutter Heroes (@flutterdev) Ingliz til segmentidagi kanali faol ishtirokchi. Hozirda hamjamiyat 24 985 obunachidan iborat bo'lib, Texnologiyalar & Aralashmalar toifasida 4 956-o'rinni egallagan.
📊 Auditoriya ko‘rsatkichlari va dinamika
невідомо sanasidan buyon loyiha tez o‘sib, 24 985 obunachiga ega bo‘ldi.
27 Yanvar, 2026 dagi oxirgi ma’lumotlarga ko‘ra kanal barqaror faollikka ega. Oxirgi 30 kunda obunachilar soni -163 ga, so‘nggi 24 soatda esa 0 ga o‘zgardi va umumiy qamrov yuqori darajada qolmoqda.
- Tasdiqlash holati: Tasdiqlanmagan
- Jalb etish (ER): Auditoriya o‘rtacha 0% darajada jalb etiladi. Nashrdan keyingi dastlabki 24 soatda kontent odatda umumiy obunachilar sonining N/A% ini tashkil etuvchi reaksiyalarni to‘playdi.
- Post qamrovi: Har bir post o‘rtacha 0 marta ko‘riladi; birinchi sutkada odatda 0 ta ko‘rish yig‘iladi.
- Reaksiyalar va o‘zaro ta’sir: Auditoriya faol: har bir postga o‘rtacha 0 ta reaksiya keladi.
- Tematik yo‘nalishlar: Kontent developer, firebase, widget, hemantpra389, engineer kabi asosiy mavzularga jamlangan.
📝 Tavsif va kontent siyosati
Kanal uchun tavsif kiritilmagan.
Yuqori yangilanish chastotasi (oxirgi ma’lumot 28 Yanvar, 2026 da olingan) sababli kanal doimo dolzarb va katta qamrovli bo‘lib qoladi. Analitika auditoriya kontent bilan faol hamkorlik qilishini, uni Texnologiyalar & Aralashmalar toifasidagi muhim ta’sir nuqtasiga aylantirishini ko‘rsatadi.
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