New post on /r/flutterdev subreddit:
After Flutter Windows stable release, what's next ?
Does anyone know what should we expect after the recent update on Flutter Windows ? Are similar updates planned for MacOS, Linux or maybe Web ?
February 14, 2022 at 09:24PM by pepperoni210
https://ift.tt/ztefh6A
After Flutter Windows stable release, what's next ?
Does anyone know what should we expect after the recent update on Flutter Windows ? Are similar updates planned for MacOS, Linux or maybe Web ?
February 14, 2022 at 09:24PM by pepperoni210
https://ift.tt/ztefh6A
reddit
After Flutter Windows stable release, what's next ?
Does anyone know what should we expect after the recent update on Flutter Windows ? Are similar updates planned for MacOS, Linux or maybe Web ?
New post on /r/flutterdev subreddit:
Build simple and readable apps with Super Responsive
https://ift.tt/SfKtHMh
February 14, 2022 at 11:19PM by namzug__16
https://ift.tt/GErbUKp
Build simple and readable apps with Super Responsive
https://ift.tt/SfKtHMh
February 14, 2022 at 11:19PM by namzug__16
https://ift.tt/GErbUKp
Dart packages
super_responsive | Flutter Package
Utils and widgets to make your flutter apps and websites fully responsive.
New post on /r/flutterdev subreddit:
Flutter Random Number Generation Article For Beginners
https://androidride.com/flutter-random-number-generator/
February 15, 2022 at 02:28AM by Immediate_Entry_3626
https://ift.tt/sePwt68
Flutter Random Number Generation Article For Beginners
https://androidride.com/flutter-random-number-generator/
February 15, 2022 at 02:28AM by Immediate_Entry_3626
https://ift.tt/sePwt68
AndroidRide
4 Ways To Generate Random Number In Flutter - AndroidRide
Do you want to generate random number in Flutter? Don't worry, then you are at the right place. Here we will discuss a lot about generating random numbers.
New post on /r/flutterdev subreddit:
Floating Bottom Bar package will animate a floating action button at the center and icons at the bottom Navigation Bar using AnimatedContainer and SlideTransition respectively.
https://ift.tt/kfypxcR
February 15, 2022 at 05:45AM by connectsteven
https://ift.tt/qKThVZd
Floating Bottom Bar package will animate a floating action button at the center and icons at the bottom Navigation Bar using AnimatedContainer and SlideTransition respectively.
https://ift.tt/kfypxcR
February 15, 2022 at 05:45AM by connectsteven
https://ift.tt/qKThVZd
Dart packages
floating_bottom_bar | Flutter Package
This package provides sliding animation to floating action button located at the center and bottom tab button.
New post on /r/flutterdev subreddit:
Flutter Mobile Apps - How to add Circular Card, Border and Border Color
https://youtube.com/watch?v=wdlhUX4MfIs&feature=share
February 15, 2022 at 06:42AM by osppro
https://ift.tt/krnB4mp
Flutter Mobile Apps - How to add Circular Card, Border and Border Color
https://youtube.com/watch?v=wdlhUX4MfIs&feature=share
February 15, 2022 at 06:42AM by osppro
https://ift.tt/krnB4mp
YouTube
Flutter Mobile Apps - How to add Circular Card, Border and Border Color
#flutterapps #cardswithflutter #osppro #fluttercourse.
Flutter Mobile Apps - How to add Circular Card, Border and Border Color
Learn how to add cards to your flutter apps
how to add borders
how to add border colors and center your text.
Flutter Mobile Apps - How to add Circular Card, Border and Border Color
Learn how to add cards to your flutter apps
how to add borders
how to add border colors and center your text.
New post on /r/flutterdev subreddit:
Beginners Guide To Update Firestore Data
https://youtu.be/Xl0WWCs27bk
February 15, 2022 at 07:15AM by projectmind_guru
https://ift.tt/1XPj3wO
Beginners Guide To Update Firestore Data
https://youtu.be/Xl0WWCs27bk
February 15, 2022 at 07:15AM by projectmind_guru
https://ift.tt/1XPj3wO
YouTube
Flutter Tutorial For Beginners: Updating Firestore Data - Decider Part 12
See how to decrement a value in firestore when a user clicks a button in a flutter app.
🏷 Get 15% off my Flutter Monetization course with code YOUTUBE_SUBSCRIBER https://1manstartup.com/monetize
📲 Download the completed app: https://1manstartup.com/decider…
🏷 Get 15% off my Flutter Monetization course with code YOUTUBE_SUBSCRIBER https://1manstartup.com/monetize
📲 Download the completed app: https://1manstartup.com/decider…
New post on /r/flutterdev subreddit:
How hard is it to migrate a larger production app from Xamarin.Forms to Flutter?
Hey guys,I know there are some more posts about the migration from Xamarin.Forms to Flutter and i also know there is a great section in the flutter docs that show how you can migrate your UI and code to Flutter. I've been building a production iOS/Android app for the past 3-4 years in Xamarin.Forms and i have to say i really love C# but the struggles i had with bugs and somehow, in my opinion, weird concepts for layouts (e.g. making your layout responsive for multiple devices which is a pain in the a$$ in Xamarin.Forms) really cost me a lot of time. Additionally our app clients ask for desktop support for the app and i feel like waiting for .NET MAUI is a bit too risky as i have no idea when it will be released.I'm ready to invest some time in the Migration but i want to make it as easy as possible. I'd like to copy all the app logic classes (network, data handling, etc) one to one as it works fine in C# and I'm happy to rebuild a lot of the UI anyways, as i think it has some potential to be better. Is there actually a way to transpile C# .NET code to Dart or do i need to do this manually line by line? I'm using so much Linq and for example i have a customized TCP socket which I have no idea if i can migrate it to Dart or not? Excuse me if these questions are quite basic, i have migrated projects before but never from one programming language to another.For the end user i want a seamingless transition to the new app. In the appstore it should basically be a new big update for the old app and that's about it. From what i read that should be possible anyways.Thanks in advance and I'm happy to hear your Migration stories!
February 15, 2022 at 09:08AM by Ely_oaks
https://ift.tt/MJQGSbz
How hard is it to migrate a larger production app from Xamarin.Forms to Flutter?
Hey guys,I know there are some more posts about the migration from Xamarin.Forms to Flutter and i also know there is a great section in the flutter docs that show how you can migrate your UI and code to Flutter. I've been building a production iOS/Android app for the past 3-4 years in Xamarin.Forms and i have to say i really love C# but the struggles i had with bugs and somehow, in my opinion, weird concepts for layouts (e.g. making your layout responsive for multiple devices which is a pain in the a$$ in Xamarin.Forms) really cost me a lot of time. Additionally our app clients ask for desktop support for the app and i feel like waiting for .NET MAUI is a bit too risky as i have no idea when it will be released.I'm ready to invest some time in the Migration but i want to make it as easy as possible. I'd like to copy all the app logic classes (network, data handling, etc) one to one as it works fine in C# and I'm happy to rebuild a lot of the UI anyways, as i think it has some potential to be better. Is there actually a way to transpile C# .NET code to Dart or do i need to do this manually line by line? I'm using so much Linq and for example i have a customized TCP socket which I have no idea if i can migrate it to Dart or not? Excuse me if these questions are quite basic, i have migrated projects before but never from one programming language to another.For the end user i want a seamingless transition to the new app. In the appstore it should basically be a new big update for the old app and that's about it. From what i read that should be possible anyways.Thanks in advance and I'm happy to hear your Migration stories!
February 15, 2022 at 09:08AM by Ely_oaks
https://ift.tt/MJQGSbz
reddit
How hard is it to migrate a larger production app from...
Hey guys, I know there are some more posts about the migration from Xamarin.Forms to Flutter and i also know there is a great section in the...
New post on /r/flutterdev subreddit:
Hot Reload Not Working in VScode
In VScode hot Reload is not working when I press ⚡bolt icon nor when i press r in terminal but it's working when i press ctrl + s . In android studio it's working fine in all the way.Does anyone knows the fix !?
February 15, 2022 at 09:04AM by jaiswal16
https://ift.tt/Br2bLTF
Hot Reload Not Working in VScode
In VScode hot Reload is not working when I press ⚡bolt icon nor when i press r in terminal but it's working when i press ctrl + s . In android studio it's working fine in all the way.Does anyone knows the fix !?
February 15, 2022 at 09:04AM by jaiswal16
https://ift.tt/Br2bLTF
reddit
Hot Reload Not Working in VScode
In VScode hot Reload is not working when I press ⚡bolt icon nor when i press r in terminal but it's working when i press ctrl + s . In android...
New post on /r/flutterdev subreddit:
Food Delivery App UI Speed Code
https://youtu.be/RW3gvy5BpYU
February 15, 2022 at 08:47AM by base77
https://ift.tt/jWohdXw
Food Delivery App UI Speed Code
https://youtu.be/RW3gvy5BpYU
February 15, 2022 at 08:47AM by base77
https://ift.tt/jWohdXw
YouTube
Food Delivery App UI, like you have never seen before 🤯🤯 | Flutter UI | Speed Code
A Food Delivery App #UI developed using #flutter.
As the UI contains a lot of #animations, it may be a bit harder to understand.
The logic behind the navigation animation is to first animate the present screen from the bottom to top till #App Bar and then…
As the UI contains a lot of #animations, it may be a bit harder to understand.
The logic behind the navigation animation is to first animate the present screen from the bottom to top till #App Bar and then…
New post on /r/flutterdev subreddit:
Experience of the Flutter community
What is the depth of experience of developers in the Flutter community above and beyond Flutter?How many years of experience do you have in IT.View Poll
February 15, 2022 at 09:22AM by bsutto
https://ift.tt/FVOwMSf
Experience of the Flutter community
What is the depth of experience of developers in the Flutter community above and beyond Flutter?How many years of experience do you have in IT.View Poll
February 15, 2022 at 09:22AM by bsutto
https://ift.tt/FVOwMSf
New post on /r/flutterdev subreddit:
Static Metaprogramming will change Dart/Flutter for the best !
https://ift.tt/8nqPfve
February 15, 2022 at 12:00PM by GabrielBB03
https://ift.tt/J8MSjdy
Static Metaprogramming will change Dart/Flutter for the best !
https://ift.tt/8nqPfve
February 15, 2022 at 12:00PM by GabrielBB03
https://ift.tt/J8MSjdy
GitHub
language/motivation.md at master · dart-lang/language
Design of the Dart language. Contribute to dart-lang/language development by creating an account on GitHub.
New post on /r/flutterdev subreddit:
Feedback needed on in-app purchase implementation
Hey everyone! I implemented in-app purchases in Flutter. I used the official plugin in_app_purchase. I would like to be sure that I did everything correctly. Any feedback is very much appreciated! Following is what I did:1) I load all products from store:
February 15, 2022 at 11:59AM by hmarat
https://ift.tt/ugOl8PX
Feedback needed on in-app purchase implementation
Hey everyone! I implemented in-app purchases in Flutter. I used the official plugin in_app_purchase. I would like to be sure that I did everything correctly. Any feedback is very much appreciated! Following is what I did:1) I load all products from store:
final isAvailable = InAppPurchase.instance.isAvailable(); if(isAvailable){ final response = await IAPInstance.queryProductDetails(skis.toSet()); products.value = response.productDetails; }2) Then I start listening to the purchaseUpdated stream
void _listenToPurchaseUpdated( List<PurchaseDetails> purchaseDetailsList, ) async { if (purchaseDetailsList.isEmpty) { return; } final purchaseDetails = purchaseDetailsList.first; if (purchaseDetails.status == PurchaseStatus.pending) { // PENDING } else { if (purchaseDetails.status == PurchaseStatus.error) { // HANDLE ERROR } else if (purchaseDetails.status == PurchaseStatus.purchased || purchaseDetails.status == PurchaseStatus.restored) { final token = purchaseDetails.verificationData.serverVerificationData; final productId = purchaseDetails.productID; // Here I check if token is valid, and if it is, I update user data in DB final isValid = await checkIsTokenValid(productId, token); if (isValid) { // Show dialog, that purchase was completed successfully if (purchaseDetails.pendingCompletePurchase) { // QUESTION_1: when purchase status is restored, pendingCompletePurchase is always "false". I don't need it to call when purchase is autorenewed? await IAPInstance.completePurchase(purchaseDetails); } } else { // HANDLE ERROR } } } } final Stream purchaseUpdated = IAPInstance.purchaseStream; _subscription = purchaseUpdated.listen((purchaseDetailsList) { _listenToPurchaseUpdated(purchaseDetailsList); }, onDone: () { print('On done callback called'); _subscription.cancel(); // QUESTION_2: Why I cancel subscription here? Is it necessary? }, onError: (error) { // handle error here. print('Error callback called: $error'); });3) When the user wants to buy a subscription, I do this:
final PurchaseParam purchaseParam = PurchaseParam(productDetails: details); await IAPInstance.buyNonConsumable(purchaseParam: purchaseParam);It will fire an event and the stream callback will be executed.4) The biggest question is about auto-renewal:4.1) When user is outside of app, and the subscription is renewed, how can I detect it and update in my DB? (Both for iOS and Android). My solution is to call IAPInstance.restorePurchase() when app is opened the first time. This will fire purchaseUpdated callback with "restored" purchase status, and then I do my validation with backend, which will check the token and then change user subscription expiration date in my DB. But when I check purchaseDetails.pendingCompletePurchase, it always returns false, when status is restored. Shouldn't I call completePurchase() when purchase is restored? Am I doing it correctly?4.2) When the user is in foreground, i.e. in the application, and subscription expires and renewed, purchaseUpdated callback is not called :(( What to do here? Check expiration time on app open and set timer for calling IAPInstance.restorePurchase()? I think this will also fire the purchaseUpdated callback with "restored" purchase status.P.S. In testing mode, monthly subscription duration is 5 minute, and when I don't open app long time, when I come back, there is no subscription. Is it OK? Is it only because of my test card?Thank you very much!
February 15, 2022 at 11:59AM by hmarat
https://ift.tt/ugOl8PX
reddit
Feedback needed on in-app purchase implementation
Hey everyone! I implemented in-app purchases in Flutter. I used the official plugin `in_app_purchase`. I would like to be sure that I did...
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
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
reddit
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...
New post on /r/flutterdev subreddit:
Flutter Bloc (v8.0.1) Pattern to load API data with Freezed and Auto Route
https://www.youtube.com/watch?v=HqFysuGBeUI
February 15, 2022 at 02:13PM by imran_sefat
https://ift.tt/RjTatL2
Flutter Bloc (v8.0.1) Pattern to load API data with Freezed and Auto Route
https://www.youtube.com/watch?v=HqFysuGBeUI
February 15, 2022 at 02:13PM by imran_sefat
https://ift.tt/RjTatL2
YouTube
Flutter Bloc (v8.0.1) Pattern to load API data with Freezed and Auto Route
Hello, this is a tutorial to load API data with Bloc Pattern along with Freezed to generate the data class and auto_route for navigations.
Timestamps
0:00 Intro
0:35 Project Structure and Dependencies
4:05 API Data explained
4:39 Datamodel generation with…
Timestamps
0:00 Intro
0:35 Project Structure and Dependencies
4:05 API Data explained
4:39 Datamodel generation with…
New post on /r/flutterdev subreddit:
Flutter Real Estate Mania UI Speed Code with Source Code
https://www.youtube.com/watch?v=mdqwmrZoPGo
February 15, 2022 at 02:12PM by imran_sefat
https://ift.tt/PkREJ5L
Flutter Real Estate Mania UI Speed Code with Source Code
https://www.youtube.com/watch?v=mdqwmrZoPGo
February 15, 2022 at 02:12PM by imran_sefat
https://ift.tt/PkREJ5L
YouTube
Flutter Real Estate Mania UI Speed Code with Source Code
Hello, this is a Speed Code video of a Real Estate app. The link to the GitHub repo is available below.
The original Dribble Design can be found here: https://dribbble.com/shots/16805313-Real-Estate-App
⏰ Timestamps
0:00 Intro
0:33 Starter Template with…
The original Dribble Design can be found here: https://dribbble.com/shots/16805313-Real-Estate-App
⏰ Timestamps
0:00 Intro
0:33 Starter Template with…
New post on /r/flutterdev subreddit:
3 Ways to Add ListView inside Column in Flutter - FlutterBeads
https://ift.tt/p78bsY4
February 15, 2022 at 01:30PM by pinkeshdarji
https://ift.tt/3F20kaj
3 Ways to Add ListView inside Column in Flutter - FlutterBeads
https://ift.tt/p78bsY4
February 15, 2022 at 01:30PM by pinkeshdarji
https://ift.tt/3F20kaj
FlutterBeads
3 Ways to Add ListView inside Column in Flutter - FlutterBeads
<span class="rt-reading-time" style="display: block;"><span class="rt-label rt-prefix"></span> <span class="rt-time">3</span> <span class="rt-label rt-postfix">min read</span></span> While developing your Flutter app, you may need to include a scrollable…
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
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
gskinner blog
Flutter: WidgetView – A Simple Separation of Layout and Logic
One of the most interesting aspects of Flutter, is the way it mixes declarative markup-style code, with imperative business logic style code, all within the same Dart programming language and file....
New post on /r/flutterdev subreddit:
Flutter Mobile Apps - How to Add Background to Flutter Cards
https://youtube.com/watch?v=zErLhGYKdfQ&feature=share
February 15, 2022 at 04:09PM by osppro
https://ift.tt/xzOU9mY
Flutter Mobile Apps - How to Add Background to Flutter Cards
https://youtube.com/watch?v=zErLhGYKdfQ&feature=share
February 15, 2022 at 04:09PM by osppro
https://ift.tt/xzOU9mY
YouTube
Flutter Mobile Apps - How to Add Background to Flutter Cards
#flutterapps #fluttermobileapp #flutter #mobileapps #androidapps
#Flutter #tutorials #mobileapps #androidappswithflutter #ospproprogrammer #mobileapps
Flutter Mobile Apps - How to Add Background to Flutter Cards
Internship Training Join now https://osppr…
#Flutter #tutorials #mobileapps #androidappswithflutter #ospproprogrammer #mobileapps
Flutter Mobile Apps - How to Add Background to Flutter Cards
Internship Training Join now https://osppr…
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…
<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
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
reddit
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....
New tweet from FlutterDev:
🔥💙 Adding Firebase to your Flutter project Tune in tomorrow at 9:00 AM PT with @puf and the @FlutterComm as they go over tips on how to add @Firebase to your Flutter project. ✨ Set a reminder 👉🏽 https://t.co/U9SPrIEAZY #FlutterPuzzleHack https://t.co/DNTB4mCGF7— Flutter (@FlutterDev) Feb 15, 2022
February 15, 2022 at 06:00PM
https://twitter.com/FlutterDev/status/1493631193094684672
🔥💙 Adding Firebase to your Flutter project Tune in tomorrow at 9:00 AM PT with @puf and the @FlutterComm as they go over tips on how to add @Firebase to your Flutter project. ✨ Set a reminder 👉🏽 https://t.co/U9SPrIEAZY #FlutterPuzzleHack https://t.co/DNTB4mCGF7— Flutter (@FlutterDev) Feb 15, 2022
February 15, 2022 at 06:00PM
https://twitter.com/FlutterDev/status/1493631193094684672
YouTube
Adding Firebase to your Flutter Project :: Flutter Puzzle Hack :: Volume 4 of 4
Join Frank van Puffelen (Puf), Firebase Engineer at Google, for tips on how to add Firebase to your Flutter project.
Join the Puzzle Hack today - https://flutterhack.devpost.com/
Resources: https://flutterhack.devpost.com/resources
Follow us on…
Join the Puzzle Hack today - https://flutterhack.devpost.com/
Resources: https://flutterhack.devpost.com/resources
Follow us on…