New post on /r/flutterdev subreddit:
Wrapper for testWidgets and setUp that gives you access to the tester object in setUp, so you can pump and interact with widgets during setUp.
https://ift.tt/2xN13OK
May 09, 2020 at 05:33PM by spkersten
https://ift.tt/3ckK3hJ
Wrapper for testWidgets and setUp that gives you access to the tester object in setUp, so you can pump and interact with widgets during setUp.
https://ift.tt/2xN13OK
May 09, 2020 at 05:33PM by spkersten
https://ift.tt/3ckK3hJ
Dart packages
flutter_test_ui | Flutter Package
Wrapper for flutter_test that adds a tester argument to setUp and tearDown functions
New post on /r/flutterdev subreddit:
Using Hive instead of SharedPreferences for storing preferences
https://ift.tt/2znwP5u
May 09, 2020 at 06:24PM by Elixane
https://ift.tt/2YM52pN
Using Hive instead of SharedPreferences for storing preferences
https://ift.tt/2znwP5u
May 09, 2020 at 06:24PM by Elixane
https://ift.tt/2YM52pN
Medium
Using Hive instead of SharedPreferences for storing preferences
It might not seem like an intuitive choice, but there are a couple of good reasons why you might consider using hive over shared_preferences
New post on /r/flutterdev subreddit:
Journey building a Video Trimmer package for Flutter
https://ift.tt/2LaQJmK
May 09, 2020 at 06:24PM by Elixane
https://ift.tt/2zrSjhG
Journey building a Video Trimmer package for Flutter
https://ift.tt/2LaQJmK
May 09, 2020 at 06:24PM by Elixane
https://ift.tt/2zrSjhG
Medium
My Journey building a Video Trimmer package for Flutter
This started about 6 months back when I was working on a project which required a video editor for processing videos before uploading them…
New post on /r/flutterdev subreddit:
Flutter 1.17 is awesome and made my iOS app even faster.
I was developing a podcast player app previously posted in Flutter channel. It got some nice reviews regarding UI but I wanted to make it even faster. Yesterday I updated it to 1.17 and its so much smoother. Especially the scrolling has become so much better.One other change I did was that any parsing of Json(of large lists), I moved it into the compute() function to be handled using Isolate.These 2 changes seem to have made a massive difference to the app. I can't even tell the difference between this and a native app while scrolling.P.S Huge thanks to the Flutter community for giving me feedback and helping me improve the app :)
May 09, 2020 at 06:39PM by altair279
https://ift.tt/2SRWUjM
Flutter 1.17 is awesome and made my iOS app even faster.
I was developing a podcast player app previously posted in Flutter channel. It got some nice reviews regarding UI but I wanted to make it even faster. Yesterday I updated it to 1.17 and its so much smoother. Especially the scrolling has become so much better.One other change I did was that any parsing of Json(of large lists), I moved it into the compute() function to be handled using Isolate.These 2 changes seem to have made a massive difference to the app. I can't even tell the difference between this and a native app while scrolling.P.S Huge thanks to the Flutter community for giving me feedback and helping me improve the app :)
May 09, 2020 at 06:39PM by altair279
https://ift.tt/2SRWUjM
reddit
Podcast player app built using Flutter - Beta testers also get...
Posted in r/Flutter by u/altair279 • 39 points and 32 comments
New post on Flutter Dev Google group:
_operatingSystem
When I run my Flutter Projekt on Chrome than the console gives that out: Can some one help me, pleasee? Error: Unsupported operation: Platform._operatingSystem at Object.throw_ [as throw] (http://localhost:54817/dart_sdk.js:4773:11) at Function._operatingSystem (http://localhost:54817/dart
May 09, 2020 at 07:29PM by Jonas Riesen
https://ift.tt/3fBdo9F
_operatingSystem
When I run my Flutter Projekt on Chrome than the console gives that out: Can some one help me, pleasee? Error: Unsupported operation: Platform._operatingSystem at Object.throw_ [as throw] (http://localhost:54817/dart_sdk.js:4773:11) at Function._operatingSystem (http://localhost:54817/dart
May 09, 2020 at 07:29PM by Jonas Riesen
https://ift.tt/3fBdo9F
Google
Google Groups
Google Groups allows you to create and participate in online forums and email-based groups with a rich experience for community conversations.
New post on Flutter Dev Google group:
Bottomsheet
Hello How can I navigate to a new page (blank) that on initstate call bottom sheet and on close of bottom sheet to close and the page Can I do it or is wrong?
May 09, 2020 at 08:00PM by Evripides Kyriacou
https://ift.tt/3dqycyM
Bottomsheet
Hello How can I navigate to a new page (blank) that on initstate call bottom sheet and on close of bottom sheet to close and the page Can I do it or is wrong?
May 09, 2020 at 08:00PM by Evripides Kyriacou
https://ift.tt/3dqycyM
Google
Google Groups
Google Groups allows you to create and participate in online forums and email-based groups with a rich experience for community conversations.
New post on /r/flutterdev subreddit:
Flutter Tutorial for Beginners Windows
https://youtu.be/3zk4Oltga8Q
May 09, 2020 at 07:22PM by atwarog
https://ift.tt/3dvaf9B
Flutter Tutorial for Beginners Windows
https://youtu.be/3zk4Oltga8Q
May 09, 2020 at 07:22PM by atwarog
https://ift.tt/3dvaf9B
YouTube
Flutter Tutorial for Beginners Windows
Flutter Tutorial for Beginners Windows
This video is a flutter tutorial for beginners, we will install flutter on windows 10 android studio. This will include the flutter tutorial vscode as well for those working with it.
Flutter tutorial using visual…
This video is a flutter tutorial for beginners, we will install flutter on windows 10 android studio. This will include the flutter tutorial vscode as well for those working with it.
Flutter tutorial using visual…
New post on /r/flutterdev subreddit:
Flutter web pomodoro site
It want much, but I made it! This was my first try at using flutter for the web, what do you think? What could/should be better?http://joaodcferreira.me/FlutterPomodoro/#/(source code at https://github.com/jdportugal/FlutterPomodoro)
May 09, 2020 at 10:05PM by jd_portugal
https://ift.tt/2SPRnKJ
Flutter web pomodoro site
It want much, but I made it! This was my first try at using flutter for the web, what do you think? What could/should be better?http://joaodcferreira.me/FlutterPomodoro/#/(source code at https://github.com/jdportugal/FlutterPomodoro)
May 09, 2020 at 10:05PM by jd_portugal
https://ift.tt/2SPRnKJ
joaodcferreira.me
pomodoro
A new Flutter project.
New post on /r/flutterdev subreddit:
How do you simulate location?
I have a map from Memphis to Nashville. Each day users log their virtual mile. I would then like to show a marker on the map showing the user's location on the map based on cumulative milage from the start. How would I do this using Google Maps in flutter?
May 09, 2020 at 10:02PM by dfhaywood
https://ift.tt/2yxS7xi
How do you simulate location?
I have a map from Memphis to Nashville. Each day users log their virtual mile. I would then like to show a marker on the map showing the user's location on the map based on cumulative milage from the start. How would I do this using Google Maps in flutter?
May 09, 2020 at 10:02PM by dfhaywood
https://ift.tt/2yxS7xi
reddit
How do you simulate location?
A subreddit for Google's portable UI framework.
New post on Flutter Dev Google group:
Missing Plugin Google Sign in
I have updated flutter to version 1.17 stable channel I got error on google sign that plugin is missing this error "MissingPluginException(No implementation found for method init on channel plugins.flutter.io/google_sign_in)" and also for facebook login in what should i do ??
May 09, 2020 at 11:25PM by Waleed Abdel-Aziz
https://ift.tt/3big5K0
Missing Plugin Google Sign in
I have updated flutter to version 1.17 stable channel I got error on google sign that plugin is missing this error "MissingPluginException(No implementation found for method init on channel plugins.flutter.io/google_sign_in)" and also for facebook login in what should i do ??
May 09, 2020 at 11:25PM by Waleed Abdel-Aziz
https://ift.tt/3big5K0
New post on /r/flutterdev subreddit:
How have you been implementing cross platform UI?
I am writing an app in flutter and starting to think about how I will handle Android and IOS ui's. I have some questions about how people have been doing their UI's.Do you you have separate UI from the ground up with for each platform (eg. separate screen/Top level widget classes and everything)?Or do you have more a more granular implementation where the UI might share the same screen and some components, but some parts of the screen/UI are platform specific.Or do you just try to write one UI where it is not native looking on one or both of the platforms?Thanks!!
May 09, 2020 at 11:37PM by scorr14
https://ift.tt/2WGHVuf
How have you been implementing cross platform UI?
I am writing an app in flutter and starting to think about how I will handle Android and IOS ui's. I have some questions about how people have been doing their UI's.Do you you have separate UI from the ground up with for each platform (eg. separate screen/Top level widget classes and everything)?Or do you have more a more granular implementation where the UI might share the same screen and some components, but some parts of the screen/UI are platform specific.Or do you just try to write one UI where it is not native looking on one or both of the platforms?Thanks!!
May 09, 2020 at 11:37PM by scorr14
https://ift.tt/2WGHVuf
reddit
How have you been implementing cross platform UI?
I am writing an app in flutter and starting to think about how I will handle Android and IOS ui's. I have some questions about how people have...
New post on /r/flutterdev subreddit:
How to Create Bottom Animated Bar (Detailed Explanation)
https://www.youtube.com/watch?v=6KiifI9MITQ
May 10, 2020 at 01:45AM by zen8school
https://ift.tt/2YOXMcI
How to Create Bottom Animated Bar (Detailed Explanation)
https://www.youtube.com/watch?v=6KiifI9MITQ
May 10, 2020 at 01:45AM by zen8school
https://ift.tt/2YOXMcI
YouTube
Flutter: Bottom Animated Bar (Detailed Explanation)
In this video, you will learn how to create an animated bottom bar for our Travel Community App.
(Part 1) How to build a Home Page: https://www.youtube.com/watch?v=_52yqnolz2E
Source code: https://github.com/zen8school/traveler-community/tree/master/animted_bar
(Part 1) How to build a Home Page: https://www.youtube.com/watch?v=_52yqnolz2E
Source code: https://github.com/zen8school/traveler-community/tree/master/animted_bar
New post on Flutter Dev Google group:
Flutter build release APK get NoSuchMethodException error
When I upgraded to 1.17, I encountered the following problems. 1.12.13 also has this problem. https://ift.tt/2yH4h6V
May 10, 2020 at 03:03AM by Silong Liu
https://ift.tt/3bcQ2E8
Flutter build release APK get NoSuchMethodException error
When I upgraded to 1.17, I encountered the following problems. 1.12.13 also has this problem. https://ift.tt/2yH4h6V
May 10, 2020 at 03:03AM by Silong Liu
https://ift.tt/3bcQ2E8
Stack Overflow
Flutter build release APK get NoSuchMethodException error
I encountered a problem when upgrading the Flutter SDK. I used to use 1.9.x (there is no problem below). Now I upgrade to v1.12.13 + hotfix.9 or 1.17.0 to reproduce this problem (I have only tried ...
New post on /r/flutterdev subreddit:
Proplem while running the flutter app
Launching lib\main.dart on Android SDK built for x86 in debug mode... Running Gradle task 'assembleDebug'... Invalid depfile: C:\Users\Mahmoud\Desktop\AndroidProjects\flutter\ppshop\printpadshop.darttool\flutter_build\93ea68bbf251f1dd0c39288859c5e20a\kernel_snapshot.d Invalid depfile: C:\Users\Mahmoud\Desktop\AndroidProjects\flutter\ppshop\printpadshop.dart_tool\flutter_build\93ea68bbf251f1dd0c39288859c5e20a\kernel_snapshot.d Compiler message: lib/pages/login.dart:9:8: Error: Not found: 'dart:html' import 'dart:html'; ^ ../../../../../Pictures/flutter/packages/flutter/lib/src/painting/_network_image_web.dart:64:12: Error: Method not found: 'webOnlyInstantiateImageCodecFromUrl'. return ui.webOnlyInstantiateImageCodecFromUrl(resolved); // ignore: undefined_function Unhandled exception: FileSystemException(uri=org-dartlang-untranslatable-uri:dart%3Ahtml; message=StandardFileSystem only supports file:* and data:* URIs) #0 StandardFileSystem.entityForUri (package:front_end/src/api_prototype/standard_file_system.dart:3 3:7) #1 asFileUri (package:vm/kernel_front_end.dart:604:37) #2 writeDepfile (package:vm/kernel_front_end.dart:799:21) <asynchronous suspension> #3 FrontendCompiler.compile (package:frontend_s erver/frontend_server.dart:472:15) <asynchronous suspension> #4 _FlutterFrontendCompiler.compile (package:flutter_frontend_server/server.dart:38:22) #5 starter (package:flutter_fronten d server/server.dart:149:27) #6 main (file:///C:/b/s/w/ir/cache/builder/src/flutter/flutter_frontend_server/bin/starter.dart:8:30) #7 _startIsolate.<anonymous closure> (dart:isolate-patch/isolate_patch.dart:305:32) #8 _RawReceivePortImpl._h andleM essage (dart:isolate-patch/isolate_patch.dart:174:12) Target kernel_snapshot failed: Exception: Errors during snapshot creation: null build failed. FAILURE: Build failed with an exception. * Where: Script 'C:\Users\Mahmoud\Pictures\flutter\packages\flutter_tools\gradle\flutter.gradle' line: 780 * What went wrong: Execution failed for task ':app:compileFlutterBuildDebug'. > Process 'command 'C:\Users\Mahmoud\Pictures\flutter\bin\flutter.bat'' finished with non-zero exit value 1 * Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights. * Get more help at https://help.gradle.org BUILD FAILED in 14s Finished with error: Gradle task assembleDebug failed with exit code 1
May 10, 2020 at 03:31AM by Mahmoud24112003
https://ift.tt/3dx9ehg
Proplem while running the flutter app
Launching lib\main.dart on Android SDK built for x86 in debug mode... Running Gradle task 'assembleDebug'... Invalid depfile: C:\Users\Mahmoud\Desktop\AndroidProjects\flutter\ppshop\printpadshop.darttool\flutter_build\93ea68bbf251f1dd0c39288859c5e20a\kernel_snapshot.d Invalid depfile: C:\Users\Mahmoud\Desktop\AndroidProjects\flutter\ppshop\printpadshop.dart_tool\flutter_build\93ea68bbf251f1dd0c39288859c5e20a\kernel_snapshot.d Compiler message: lib/pages/login.dart:9:8: Error: Not found: 'dart:html' import 'dart:html'; ^ ../../../../../Pictures/flutter/packages/flutter/lib/src/painting/_network_image_web.dart:64:12: Error: Method not found: 'webOnlyInstantiateImageCodecFromUrl'. return ui.webOnlyInstantiateImageCodecFromUrl(resolved); // ignore: undefined_function Unhandled exception: FileSystemException(uri=org-dartlang-untranslatable-uri:dart%3Ahtml; message=StandardFileSystem only supports file:* and data:* URIs) #0 StandardFileSystem.entityForUri (package:front_end/src/api_prototype/standard_file_system.dart:3 3:7) #1 asFileUri (package:vm/kernel_front_end.dart:604:37) #2 writeDepfile (package:vm/kernel_front_end.dart:799:21) <asynchronous suspension> #3 FrontendCompiler.compile (package:frontend_s erver/frontend_server.dart:472:15) <asynchronous suspension> #4 _FlutterFrontendCompiler.compile (package:flutter_frontend_server/server.dart:38:22) #5 starter (package:flutter_fronten d server/server.dart:149:27) #6 main (file:///C:/b/s/w/ir/cache/builder/src/flutter/flutter_frontend_server/bin/starter.dart:8:30) #7 _startIsolate.<anonymous closure> (dart:isolate-patch/isolate_patch.dart:305:32) #8 _RawReceivePortImpl._h andleM essage (dart:isolate-patch/isolate_patch.dart:174:12) Target kernel_snapshot failed: Exception: Errors during snapshot creation: null build failed. FAILURE: Build failed with an exception. * Where: Script 'C:\Users\Mahmoud\Pictures\flutter\packages\flutter_tools\gradle\flutter.gradle' line: 780 * What went wrong: Execution failed for task ':app:compileFlutterBuildDebug'. > Process 'command 'C:\Users\Mahmoud\Pictures\flutter\bin\flutter.bat'' finished with non-zero exit value 1 * Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights. * Get more help at https://help.gradle.org BUILD FAILED in 14s Finished with error: Gradle task assembleDebug failed with exit code 1
May 10, 2020 at 03:31AM by Mahmoud24112003
https://ift.tt/3dx9ehg
Gradle
Gradle | Search for Help with Gradle Build Tool
New post on /r/flutterdev subreddit:
See how to open Layout Inspector, Timeline, Memory, App Performance, Debugger, Logging & Network monitor in Dart dev tool.
https://twitter.com/erluxman/status/1259315885996638211
May 10, 2020 at 05:12AM by erluxman
https://ift.tt/35JtGJi
See how to open Layout Inspector, Timeline, Memory, App Performance, Debugger, Logging & Network monitor in Dart dev tool.
https://twitter.com/erluxman/status/1259315885996638211
May 10, 2020 at 05:12AM by erluxman
https://ift.tt/35JtGJi
Twitter
Laxman
Very Important 🚨 Dart dev tool🚨 Dev tool contains : Layout Inspector, Timeline, Memory, Performance, Debugger, Logging & Network monitor. AS: Click dart icon on Run tab when app is running. VSCode: "Open Dev Tools" in Command Pallet. #day35 #100DaysofFlutter…
New post on /r/flutterdev subreddit:
Tips 29-35 just got published on 100 days of Flutter Tips
I have published 7 new tips (29-35) on ❤️Awesome Flutter ❤️ tips and tricks ❤️https://github.com/erluxman/awesomefluttertipsCheck them out.I would appreciate any contribution or feedback. 🙏🏻Thanks to u/Kounex for this contribution on Tip no #31.For daily new tips follow this thread :https://twitter.com/erluxman/status/1246608678486065152
May 10, 2020 at 05:49AM by erluxman
https://ift.tt/2LhgaTS
Tips 29-35 just got published on 100 days of Flutter Tips
I have published 7 new tips (29-35) on ❤️Awesome Flutter ❤️ tips and tricks ❤️https://github.com/erluxman/awesomefluttertipsCheck them out.I would appreciate any contribution or feedback. 🙏🏻Thanks to u/Kounex for this contribution on Tip no #31.For daily new tips follow this thread :https://twitter.com/erluxman/status/1246608678486065152
May 10, 2020 at 05:49AM by erluxman
https://ift.tt/2LhgaTS
GitHub
GitHub - erluxman/awesomefluttertips: ❤️ Awesome Flutter Tips and Tricks ❤️
❤️ Awesome Flutter Tips and Tricks ❤️. Contribute to erluxman/awesomefluttertips development by creating an account on GitHub.
New post on Flutter Dev Google group:
How to build face recognition app in flutter
May 10, 2020 at 07:45AM by Rushïkesh
https://ift.tt/2xNUlbe
How to build face recognition app in flutter
May 10, 2020 at 07:45AM by Rushïkesh
https://ift.tt/2xNUlbe
Google
Google Groups
Google Groups allows you to create and participate in online forums and email-based groups with a rich experience for community conversations.
New post on /r/flutterdev subreddit:
50+ Awesome Flutter Login UI Screens | Part 1 | GitHub Link @maadhav_sharma
https://www.youtube.com/watch?v=xLdg2DSagto
May 10, 2020 at 08:25AM by maadhav2001
https://ift.tt/2ST3giX
50+ Awesome Flutter Login UI Screens | Part 1 | GitHub Link @maadhav_sharma
https://www.youtube.com/watch?v=xLdg2DSagto
May 10, 2020 at 08:25AM by maadhav2001
https://ift.tt/2ST3giX
YouTube
50+ Awesome Flutter Login UI Screens |Part 1| GitHub Link
GitHub :
https://github.com/Kunal923/Flutter_Login_UI
💐Join Our Slack Group: https://join.slack.com/t/codedecoders/shared_invite/zt-e73qrqh1-U5gBcRtIZXBftg38~1wTiQ
✌Subscribe to CodeDecoders: http://bit.ly/CodeDecoders
💮Design credit:https://dribbble.com/deeperUI…
https://github.com/Kunal923/Flutter_Login_UI
💐Join Our Slack Group: https://join.slack.com/t/codedecoders/shared_invite/zt-e73qrqh1-U5gBcRtIZXBftg38~1wTiQ
✌Subscribe to CodeDecoders: http://bit.ly/CodeDecoders
💮Design credit:https://dribbble.com/deeperUI…
New post on /r/flutterdev subreddit:
Database Suggestions
hi im new to flutter and im trying to find the perfect database for my app.. that has the ability to go offline and when going online it updates the offline database...any suggestions?..thanks in advance 😁
May 10, 2020 at 11:02AM by Alienisus
https://ift.tt/2LjozWA
Database Suggestions
hi im new to flutter and im trying to find the perfect database for my app.. that has the ability to go offline and when going online it updates the offline database...any suggestions?..thanks in advance 😁
May 10, 2020 at 11:02AM by Alienisus
https://ift.tt/2LjozWA
Reddit
Database Suggestions : r/FlutterDev
126K subscribers in the FlutterDev community. A community for the publishing of news and discussion about Flutter.
New post on /r/flutterdev subreddit:
RangeSlider
https://youtu.be/MCZnodE1Nj4
May 10, 2020 at 10:42AM by TheTechDesigner
https://ift.tt/2yHUiOH
RangeSlider
https://youtu.be/MCZnodE1Nj4
May 10, 2020 at 10:42AM by TheTechDesigner
https://ift.tt/2yHUiOH
YouTube
Flutter Widget | 32 | How to use RangeSlider in Flutter | RangeValues, RangeLabels | Speed Code
#TheTechDesigner
#Flutter #FlutterUI #SpeedCode #FlutterTutorial #FlutterAnimation #FlutterWidgets
#Center #MainAxisAlignment #Column #Row #Text #Padding #TextStyle #RangeSlider #min #max #divisions #inactiveColor #Color #activeColor #values #labels #onChanged…
#Flutter #FlutterUI #SpeedCode #FlutterTutorial #FlutterAnimation #FlutterWidgets
#Center #MainAxisAlignment #Column #Row #Text #Padding #TextStyle #RangeSlider #min #max #divisions #inactiveColor #Color #activeColor #values #labels #onChanged…
New post on /r/flutterdev subreddit:
Proper state management across routes
Using a TODOs app as an example, imagine you have a simple app with a list of TODOs displayed on the main screen, as well as second settings screen. In the settings screen, say you have a setting to that changes whether the text of each TODO is displayed in uppercase or lowercase.I can imagine a couple different methods that to achieve this:When pushing the settings screen, you could await the Navigator for a result. The settings screen must pop the Navigator with a result and the main screen interprets it and updates its state accordingly.Pass a callback to the settings screen which the settings screen calls when it updates the setting. The main screen rebuilds itself when the callback is called.(Similar to #2) Using the controller approach. For example, have a ValueNotifier<bool> in the main screen that contains the true/false value of whether or not to capitalize the text. The main screen uses ValueListenableBuilder as a parent to the ListView so it is rebuilt when the value changes. Then pass the notifier to the settings screen and when the settings screen updates the notifier, the list will rebuild.Use RouteAware on the main screen. When the navigation returns back to the main screen (onPopNextRoute), check if the setting is now different and rebuild if so.My problem is that none of these solutions seem good to me or I don't know which is best. Or maybe I'm missing something else.Solution #1 seems like the proper approach in that it waits for the settings screen to be finished and then you can determine whether to rebuild. But this seems like it would not be good with more complex routing. Like if the settings screen could navigate to other screens which might return back to the main screen. Ensuring the proper result is returned to the main screen sounds like it could get very tedious.Solutions #2 and #3 have the problem where updating the value on the settings screen will cause the main screen to be notified and rebuilt even when it is not being displayed to the user. Sure Flutter might be efficient but this just feels wrong. Or am I wrong to worry about this? I worry more for a larger app with many screens. Imagine updating a setting that rebuilds many different widgets on previous screens. Also, passing the callback/notifier around could get tedious with additional routes as well.Solution #4 seems okay, but it means caching each setting's previous value and comparing for differences, even if they have not even been touched in the settings screen. This approach is not one I've seen anyone else really use so I'm not too confident about using it even though this is what I'm currently using in my real app.
May 10, 2020 at 11:28AM by dumbnormie
https://ift.tt/2YN05NC
Proper state management across routes
Using a TODOs app as an example, imagine you have a simple app with a list of TODOs displayed on the main screen, as well as second settings screen. In the settings screen, say you have a setting to that changes whether the text of each TODO is displayed in uppercase or lowercase.I can imagine a couple different methods that to achieve this:When pushing the settings screen, you could await the Navigator for a result. The settings screen must pop the Navigator with a result and the main screen interprets it and updates its state accordingly.Pass a callback to the settings screen which the settings screen calls when it updates the setting. The main screen rebuilds itself when the callback is called.(Similar to #2) Using the controller approach. For example, have a ValueNotifier<bool> in the main screen that contains the true/false value of whether or not to capitalize the text. The main screen uses ValueListenableBuilder as a parent to the ListView so it is rebuilt when the value changes. Then pass the notifier to the settings screen and when the settings screen updates the notifier, the list will rebuild.Use RouteAware on the main screen. When the navigation returns back to the main screen (onPopNextRoute), check if the setting is now different and rebuild if so.My problem is that none of these solutions seem good to me or I don't know which is best. Or maybe I'm missing something else.Solution #1 seems like the proper approach in that it waits for the settings screen to be finished and then you can determine whether to rebuild. But this seems like it would not be good with more complex routing. Like if the settings screen could navigate to other screens which might return back to the main screen. Ensuring the proper result is returned to the main screen sounds like it could get very tedious.Solutions #2 and #3 have the problem where updating the value on the settings screen will cause the main screen to be notified and rebuilt even when it is not being displayed to the user. Sure Flutter might be efficient but this just feels wrong. Or am I wrong to worry about this? I worry more for a larger app with many screens. Imagine updating a setting that rebuilds many different widgets on previous screens. Also, passing the callback/notifier around could get tedious with additional routes as well.Solution #4 seems okay, but it means caching each setting's previous value and comparing for differences, even if they have not even been touched in the settings screen. This approach is not one I've seen anyone else really use so I'm not too confident about using it even though this is what I'm currently using in my real app.
May 10, 2020 at 11:28AM by dumbnormie
https://ift.tt/2YN05NC
api.flutter.dev
RouteAware class - widgets library - Dart API
API docs for the RouteAware class from the widgets library, for the Dart programming language.