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

Any gRPC with Flutter tutorials?
I read some articles but couldn't get grpc to work. Any tutorials that you recommend ?

October 15, 2019 at 03:47PM by bimsina
https://ift.tt/2MggDXI
New post on /r/flutterdev subreddit:

Increase and decrease the font size of user input (TextField)
Hello guys, I am trying to code an app, in which a TextField has a set size, given by a SizedBox around it. As the user types, the text should shrink form the initial font size to whatever size is necessary to fit in the box, so that everything typed is visible, without having to scroll.I have been trying for a while, with no success. I am fairly new to Flutter/Dart so any help would be appreciated. I would also settle for two buttons that increase/decrease the text font size typed in the TextField, so the user does that manually.I have looked into the auto_text_size package, but if you think this could work, please provide a full example because I tried it but every example of this package I could find cannot be use with user input text.Can anyone help me?

October 15, 2019 at 03:16PM by JustyDonutd
https://ift.tt/2MeIUh8
New post on /r/flutterdev subreddit:

Control a page in pageview using a slider as a controller in Flutter
I'm thinking of making an app which has a basic pageview with a controller. I want to pass the controller to a Slider widget and If I move the slider, the corresponding value of the page should be visible. Any ideas to implement it? I have attached the code as gist.​https://gist.github.com/Imgkl/0aac4076fbcfd12b58896e67c3841a91

October 15, 2019 at 05:15PM by chif_
https://ift.tt/2MHvRUC
New post on /r/flutterdev subreddit:

Help with BLE beacon and scanning
I've been struggling with this for more than a week and really need help. I am new to Flutter, BLE and beacons so please be patient.I am trying to create a system using Flutter where one device acts as a BLE beacon and the other acts as a scanner. Each device will have its own app.I managed to do the first part using https://pub.dev/packages/beacon_broadcast library and the example code that I found on github. My android device is broadcasting as a Altbeacon beacon and I can use apps from the Appstore to detect it.For the second part I've been trying to use https://pub.dev/packages/flutter_blue. I tried copying the example code and running it but there are 2 problems that I cannot understand.First, nothing shows up when I try to scan on my Android device. I don't understand why. Stuff shows up when I build and run on iOS device but not on Android.Second, it does not seem to detect the Altbeacon device.Any ideas?

October 15, 2019 at 05:08PM by nprogrammer
https://ift.tt/32sGcdT
New post on /r/flutterdev subreddit:

Flutter “App keeps stopping” message when I try to open it in landscape mode
I'm currently trying to force the app to be always used in portrait mode through the following code:
Future main() async { await DotEnv().load('.env'); await SystemChrome.setPreferredOrientations([ DeviceOrientation.portraitUp, DeviceOrientation.portraitDown, ]); runApp( HomePage() ); } 
When I open the App with the tablet already in portrait it works perfectly but if I close the App, turn the tablet to landscape and try to open it again the message "App keeps stopping" is show and the App wont open until I use the tablet in portrait mode again. It does not throw any exception or error in the terminal when the message is shown and the same error happens both in the emulator as in a real device.How do I make it possible for the App to open and be used in portrait mode without prohibiting the user from opening it with the tablet in landscape mode? Or at least, how do I prevent this message from being shown?

October 15, 2019 at 06:16PM by Octarine_
https://ift.tt/31ofPo4
New post on /r/flutterdev subreddit:

I would send Starbucks gift cards if anyone can show me a Twilio Video implementation in Flutter...
Can't seem to find one anywhere, just some sms ones, but I need Video :(

October 15, 2019 at 06:54PM by TrentRamseyer
https://ift.tt/2oxWhjH
New post on /r/flutterdev subreddit:

2FA
Have someone implemented a 2FA with flutter? Like twitter, instagram or facebook has. When you login (if you have this option active) the app will ask you the 2FA code.

October 15, 2019 at 07:57PM by saulmestanza
https://ift.tt/32jnFR0
New post on /r/flutterdev subreddit:

Widget rebuild when nested provider state
Hi guys,
I am new to flutter and provider and I am stuck with a problem. I have build a simple counter app that demonstrates the issue.There is an inner widget (counter) nested in an outer widget (wrapper). On the level of the outer widget I define a ChangeNotifierProvider with a state class (with ChangeNotifier) called outer (wrapper state). Inside the state outer I define another state (counter state, also with ChangeNotifier) called inner as a variable.The idea is, that the counter changes the counter state inside of the wrapper state. An example for this use case could be that there is a wrapper page with multiple counters and I want to access all counter values on the wrapper level.The problem is, that the code below updates the variable, but the widget isn't rebuild, even though I used notifyListeners(). If you hit the "+1" button, nothing happens, but when hot-reload kicks in (triggered by saving), the counter value is updated to its new value.``` import 'package:flutter/material.dart'; import 'package:provider/provider.dart';void main() => runApp(MyApp());class MyApp extends StatelessWidget { @override Widget build(BuildContext context) { print("Build App"); return MaterialApp( title: 'Flutter Demo', theme: ThemeData( primarySwatch: Colors.blue, ), home: Scaffold( appBar: AppBar( title: Text("Counter"), ), body: OuterWidget()), ); } }class OuterWidget extends StatelessWidget { @override Widget build(BuildContext context) { print("Build Outer"); return ChangeNotifierProvider( builder: (context) => Outer(), child: InnerWidget(), ); } }class InnerWidget extends StatelessWidget { @override Widget build(BuildContext context) { print("Build Inner"); var _outer = Provider.of<Outer>(context); var _inner = _outer.inner; return Column( children: <Widget>[ Text(_inner.counter.toString()), RaisedButton( onPressed: () { _inner.increase(); print(_outer.inner.counter); }, child: Text("+1")) ], ); } }class Outer with ChangeNotifier { Inner _inner = Inner();Inner get inner => _inner; }class Inner with ChangeNotifier { int _counter = 0;int get counter => _counter;void increase() { _counter++; notifyListeners(); } } ```Can you guys help me with this problem?

October 15, 2019 at 08:41PM by le_crosst
https://ift.tt/31jLYgq
New post on /r/flutterdev subreddit:

Detect Navigation events/page changes?
I want to display ads on certain pages in my app. When a user navigate away to a page, that shouldn't display ads, I want to hide them.For this reason, I need to detect navigation/page changes because it wouldn't make sense to call ad.dispose() after every Navigator.push() or Navigator.pop() call.Is this possible in flutter? I haven't found a way to do so, any ideas?

October 15, 2019 at 08:36PM by jwknows
https://ift.tt/2MiR8VO
New post on /r/flutterdev subreddit:

ListView Builder Scroll to index?
Hi i was just wondering if anyone has come across a good solution to scrolling to a specific index in a listview builder? In iOS it is pretty standard to scrollToRowAtIndexPath in tableviews and seems like pretty basic functionality and was surprised this wasn't supported. I found this issue on github https://github.com/flutter/flutter/issues/12319 . Has anyone come up with a good work around for this?

October 16, 2019 at 01:09AM by bigBearRat
https://ift.tt/31geZcD
New post on /r/flutterdev subreddit:

dart/flutter <=> xcode / ios SDK compatibility
is there a website/list that aligns which versions of dart/flutter are compatible with which versions of xcode/ios SDK?of course i know you should always use the "latest" version (and the app stores even have requirements around what they will accept), but it would be helpful to have it spelled out and written down.i've seen something like this in a press release that explains it (dart 2.5 supporting ios13), but nothing that lists different versions/histories/etc...https://venturebeat.com/2019/09/10/google-launches-dart-2-5-with-intelligent-code-completion-flutter-1-9-with-ios-13-and-macos-catalina-support/would probably be helpful for android SDK too, but maybe that's more obvious (haven't looked into it exactly yet).thanks!

October 16, 2019 at 01:07AM by pickleback11
https://ift.tt/2pkC1lF
New post on /r/flutterdev subreddit:

Android studio isn't placing a trailing comma
I'm on MAC,When I hit the ( keythe android studio automated types it as ()on the tutorial videos I learn from, whenever the instructor hits the ( key, the android studio types it as (),I couldn't figure out why I'm having this issue and android studio settings are far beyond my understanding.

October 16, 2019 at 02:24AM by Rokett
https://ift.tt/2qi3HrJ
New post on /r/flutterdev subreddit:

ListView Navigation
Hello everyone, how can I add a navigation route to each tile of the ExpansionTile, someone can help me?In the subtitles I want to add the navigation routes.
List<MyTile> listOfTiles = <MyTile>[ MyTile('El Triangulador', <MyTile>[ MyTile('● Definición'), MyTile('● Personas que intervienen'), MyTile('● Actitudes sanas para resolver'), ]), MyTile('El Frustrador', <MyTile>[ MyTile('● Definición'), MyTile('● Rasgos'), MyTile('● Actitudes frente a la frustración'), MyTile('● Criando hijos sanos'), ]), ] class ListViewHome extends StatelessWidget { @override Widget build(BuildContext context) { // TODO: implement build return ListView.builder( itemCount: listOfTiles.length, itemBuilder: (context, int index) { return StuffInTiles(listOfTiles[index]); }, ); } } class StuffInTiles extends StatelessWidget { final MyTile myTile; StuffInTiles(this.myTile); @override Widget build(BuildContext context) { // TODO: implement build return _buildTiles(myTile); } ///Second Heads Widget _buildTiles(MyTile t) { if (t.children.isEmpty) { return ListTile( title: Text( t.title, textScaleFactor: 1.2, style: listViewHome, ), ); } ///First Head return ExpansionTile( key: PageStorageKey<MyTile>(t), title: Text( t.title, textScaleFactor: 1.5, style: listViewHome, ), leading: CircleAvatar( backgroundColor: Colors.white, backgroundImage: AssetImage('assets/icons/toxic.png'), ), children: t.children.map(_buildTiles).toList(), ); } } class MyTile { String title; List<MyTile> children; MyTile(this.title, [this.children = const <MyTile>[]]); } 


October 16, 2019 at 04:28AM by tutegomeze
https://ift.tt/33yKlwL
New post on /r/flutterdev subreddit:

Flutter Design Patterns: An overview of Singleton design pattern and its implementation in Dart and Flutter
https://ift.tt/2oKL67e

October 16, 2019 at 08:32AM by mkobuolys
https://ift.tt/2VL7RUu
New post on /r/flutterdev subreddit:

Debug errors I can't understand
I'm currently learning Flutter and from some reasons when I've restarted my PC and tried to debug my app, I have the following errors:Compiler message: ../../../AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/intl-0.15.8/lib/src/intl/bidi_formatter.dart: Error: A file can't be part of more than one library.Try moving the shared declarations into the libraries, or into a new library. ../../../AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/intl-0.15.8/lib/intl.Dart: Context: Used as a part in this library.../../../AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/intl-0.15.8/lib/intl.dart: Context: Used as a part in this library.../../../AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/intl-0.15.8/lib/src/intl/bidi_utils.dart: Error: A file can't be part of more than one library.Try moving the shared declarations into the libraries, or into a new library. ../../../AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/intl-0.15.8/lib/intl.Dart: Context: Used as a part in this library. ../../../AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/intl-0.15.8/lib/intl.dart: Context: Used as a part in this library.../../../AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/intl-0.15.8/lib/src/intl/compact_number_format.dart: Error: A file can't be part of more than one library. Try moving the shared declarations into the libraries, or into a new library. ../../../AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/intl-0.15.8/lib/intl.Dart: Context: Used as a part in this library. ../../../AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/intl-0.15.8/lib/intl.dart: Context: Used as a part in this library.../../../AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/intl-0.15.8/lib/src/intl/date_format.dart: Error: A file can't be part of more than one library. Try moving the shared declarations into the libraries, or into a new library. ../../../AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/intl-0.15.8/lib/intl.Dart: Context: Used as a part in this library.../../../AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/intl-0.15.8/lib/intl.dart: Context: Used as a part in this library. ../../../AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/intl-0.15.8/lib/src/intl/date_format_field.dart: Error: A file can't be part of more than one library. Try moving the shared declarations into the libraries, or into a new library.../../../AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/intl-0.15.8/lib/intl.Dart: Context: Used as a part in this library. ../../../AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/intl-0.15.8/lib/intl.dart: Context: Used as a part in this library. ../../../AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/intl-0.15.8/lib/src/intl/date_format_helpers.dart: Error: A file can't be part of more than one library. Try moving the shared declarations into the libraries, or into a new library.../../../AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/intl-0.15.8/lib/intl.Dart: Context: Used as a part in this library. ../../../AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/intl-0.15.8/lib/intl.dart: Context: Used as a part in this library.../../../AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/intl-0.15.8/lib/src/intl/number_format.dart: Error: A file can't be part of more than one library. Try moving the shared declarations into the libraries, or into a new library.../../../AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/intl-0.15.8/lib/intl.Dart: Context: Used as a part in this library. ../../../AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/intl-0.15.8/lib/intl.dart: Context: Used as a part in this library.../../../AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/intl-0.15.8/lib/intl.dart:115:3: Error: Type 'DateFormat' not found.Everything was working fine before.The import of intl.dart is correct.

October 16, 2019 at 09:23AM by Kadarach
https://ift.tt/2MjY9FF
New post on /r/flutterdev subreddit:

Flutter app stuck on white screen at start up in android
Hi guys,I am new to flutter,I do have experience in Nadroid development and have even published an apps on the play store. Lately I have been interested in flutter and even did a few introductory concepts on it (CRUD). I took an open source project from github and changed only the google .json file so as to use my fire base backend. The app launches on my android device but is stuck on white screen. I have searched everywhere for this issue but no solution. Its been three days and I am losing my mind. Can anyone help me out here.The open source project is called Fluttergram.

October 16, 2019 at 12:02PM by fireking09
https://ift.tt/33zKtft
New post on /r/flutterdev subreddit:

Part two of moving from React to Flutter Web
Hey Flutter community!
Some time has passed and due to high engagement and interest, I've just published second part from my mini series of moving from React to Flutter Web.Let me know your comments, ideas, suggestions - anything! Hope you can find it helpful.Cheers

October 16, 2019 at 11:30AM by Deimantasa
https://ift.tt/2ONwajo