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

How to my alarm clock app functioning/working?
Hi, I'm a beginner and want to ask how to make an alarm app functioning? I'hv made the UI with canvas. But I'm still not able to find how to make it working, how to trigger the alarm at a set time.How to write the backend? can we do it in dart? or I'll need to learn kotlin?Thanks

February 15, 2022 at 12:53PM by Logical_Clothes_1089
https://ift.tt/TGNHOqB
New post on /r/flutterdev subreddit:

Any thoughts on the WidgetView pattern ?
Hi,I have been using Provider + change notifier for state management for a while and it was great. Now that I started making biggers projects I think separating the UI from the logic has become a little bit harder since provider always require to have a context.I recently found this article about WidgetView pattern and it seems to work well with provider, although I haven't found much documentation/videos about it.https://blog.gskinner.com/archives/2020/02/flutter-widgetview-a-simple-separation-of-layout-and-logic.htmlI have tried Bloc in the past and I didn't really understand his full potential because I was applying it to small projects. Now I dont know if I should start using bloc or keep provider + change notifier + widgetview.The main advantage of bloc would be to have a lot of documentation and lots of people using it while the advantage of widgetview would be being able to still using provider and reduce the boilerplate.Do you guys have any thought about this? have anyone tried to use widgetview ?Thank you so much

February 15, 2022 at 01:23PM by ZuppaSalata
https://ift.tt/dXBqRyN
New post on /r/flutterdev subreddit:

<b>Pass File from child back to parent</b>
I'm using Image Picker on a file that looks like this `import 'dart:io';` class EditImage extends StatefulWidget { const EditImage({Key? key}) : super(key: key);@override State<EditImage> createState() => _EditImageState(); }class _EditImageState extends State<EditImage> { File? image; Future pickImage() async { try { final image = await ImagePicker().pickImage(source: ImageSource.gallery); if (image == null) return;<pre> final imageTemporary = File(image.path); setState(() { this.image = imageTemporary; }); } on PlatformException catch (e) { // ignore: avoid_print print("Failed to pick image:$e"); } </pre>}Future pickCamera() async { try { final image = await ImagePicker().pickImage(source: ImageSource.camera); if (image == null) return;<pre> final imageTemporary = File(image.path); setState(() { this.image = imageTemporary; }); } on PlatformException catch (e) { // ignore: avoid_print print("Failed to pick image:$e"); } </pre>}@override Widget build(BuildContext context) { return Padding( padding: EdgeInsets.only(left: 0.15.sw), child: GestureDetector( onTap: () { if (image == null) { showDialog<void>( context: context, barrierDismissible: false, // user must tap button! builder: (BuildContext context) { return AlertDialog( title: Row( mainAxisAlignment: MainAxisAlignment.spaceBetween, // ignore: prefer_const_literals_to_create_immutables children: [ const Text( 'Choose Image', style: TextStyle(), ), IconButton( onPressed: () { Navigator.pop(context); }, icon: Icon( Icons.close, size: 20.sp, color: const Color(0xFF000000), ), ) ], ), content: SingleChildScrollView( child: ListBody( children: const <Widget>[ Text( 'Choose a profile Picture to upload', style: TextStyle(), ), ], ), ), actions: <Widget>[ TextButton( child: const Text( 'Camera', style: TextStyle( fontSize: 12, color: Colors.black, fontWeight: FontWeight.bold, ), ), onPressed: () { pickCamera(); Navigator.pop(context); }, ), TextButton( child: const Text( 'Gallery', style: TextStyle( fontSize: 12, color: Colors.black, fontWeight: FontWeight.bold, ), ), onPressed: () { pickImage(); Navigator.pop(context); }, ), ], ); }, ); } }, child: SizedBox( width: 190.w, height: 125.h, child: Stack( children: [ Positioned( bottom: 0, right: 5, child: ConstrainedBox( constraints: BoxConstraints.tightFor(width: 70.w, height: 15.h), child: ElevatedButton( style: ElevatedButton.styleFrom( elevation: 0, primary: Colors.green[700], ), onPressed: () { if (image != null) { showDialog<void>( context: context, barrierDismissible: false, // user must tap button! builder: (BuildContext context) { return AlertDialog( title: Row( mainAxisAlignment: MainAxisAlignment.spaceBetween, // ignore: prefer_const_literals_to_create_immutables children: [ const Text( 'Choose Image', style: TextStyle(), ), IconButton( onPressed: () { Navigator.pop(context); }, icon: Icon( Icons.close, size: 20.sp, color: const Color(0xFF000000), ), ) ], ), content: SingleChildScrollView( child: ListBody( children: const <Widget>[ Text( 'Choose a profile Picture to upload', style: TextStyle(), ), ], ), ), actions: <Widget>[ TextButton( child: const Text( 'Camera', style: TextStyle( fontSize: 12, color: Colors.black, fontWeight: FontWeight.bold, ), ), onPressed: () { pickCamera(); Navigator.pop(context); }, ), TextButton( child: const Text( 'Gallery', style: TextStyle( fontSize: 12, color: Colors.black, fontWeight: FontWeight.bold, ), ), onPressed: () { pickImage(); Navigator.pop(context); }, ), ], ); }, ); } }, child: const Align( alignment: Alignment.topRight, child: Text( '+EDIT', textAlign: TextAlign.right, style: TextStyle( fontSize: 12, color: Color(0xff0ced10), fontWeight: FontWeight.bold), ), ), ), ), ), Container( height: 125.h, width: 125.w, clipBehavior: Clip.antiAlias, decoration: BoxDecoration( color: Colors.white, borderRadius: BorderRadius.circular(15.r), border: Border.all(color: const Color(0xff0ced10), width: 2), boxShadow: [ BoxShadow( color: Colors.black, offset: const…
New post on /r/flutterdev subreddit:

Why is immutability important? (Riverpod versus Provider)
Sorry, I am coming from C, so declarative programming is new to me. I don't understand why we have to make the class immutable for Riverpod. Everyone says imutablity is important, but I am confused on exactly why if we could just have read-only variables to enforce changes from the interface only. Having a separate notifier and class declaration seems very boilerplate to me and inefficient with the copy. Sorry, I really know very little about this because, at my job, I use C for simple embedded systems that control via a while(1). The only threading I understand is an interrupt of 2 levels of priority.Please let me know where I should move this question if it is inappropriate for this subreddit.

February 15, 2022 at 05:14PM by whitemagehealing
https://ift.tt/LovMaC9
New post on /r/flutterdev subreddit:

I wrote a library so you don't have to deal with Nested Hell anymore.
https://ift.tt/hZuTc7P

February 15, 2022 at 07:21PM by SaltyAom
https://ift.tt/Ntug8Xi
New post on /r/flutterdev subreddit:

EventChannel vs MethodChannel for plugins
I know that MethodChannels are for invoking methods, and EventChannels are for streaming data. Is there a performance difference between the two? I have plugins that use MethodChannels for sending data that could be done over EventChannels. I'm wondering if it's worth the effort to switch them over.

February 15, 2022 at 10:17PM by Rexios80
https://ift.tt/GdotQ90
New post on /r/flutterdev subreddit:

Has anyone had success with BLE Beacons in flutter?
Looking for package and general advice.I’d really like to use the OpenBeacon format.I need something I can get data for in IOS and Android. IOS likes to make it impossible to discover beacons but I’ll know what my UUIDs are upfront. OpenBeacon?IOS seems to have a ProximityUUID function that you pass a UUID to and the OS keeps an eye out for it. Does Android have the same?I assume there is a way to “register” a UUID in a flutter package so that I don’t need to manually BLE scan for beacons?Has anyone had success with this in a background mode? I assume I would need to be in background, that if the app is off, the beacon is entirely off/unregistered as well? Or can the beacon presence start the App?Any other gotchas to watch for?

February 16, 2022 at 07:14AM by BigTechCensorsYou
https://ift.tt/Je8oUBX
New post on /r/flutterdev subreddit:

Flutter development on macbook aire m1 8gigs ram.
I was leaning flutter for about 6 months now, I was doing it on a core 2 dou and a 4gb ram and HDD so it was like coding in hell.after a long time of saving I have now 1500$ and I want to buy a new laptop.I'm considering a base model of MBK air m1 with 8gb memory "1450$ with taxes. really sucks I know :( "I'm not going to upgrade for at least 2 ~ 4 years (only if I managed to get a well paid job before that time cause I'm currently on 250$ a month)so I need to get the most of this 1500$what's your thoughts on the MBA base model? like an emulator and a simulator and 1 docker container and some firefox tabs.some people said that I can get a lot more better laptop with that 1500$ and then I can install Open Core or a hackintosh but I'm note sure about that.please I want some advice from people who actually using MBK m1 with 8 gigs and not some random opinions. because this is the savings of my life and I'm willing to make the most of it.

February 16, 2022 at 10:14AM by HasanMHallak
https://ift.tt/afYCzT3
New post on /r/flutterdev subreddit:

Anybody know the status of creating Flutter apps with Android auto and Xbox live?
Wanted to know the state of supporting Android auto and Xbox live?

February 16, 2022 at 03:05PM by thekookysurfer
https://ift.tt/9nLYVBl